:root {
    --primary-color: #1a237e; /* Deep Royal Blue */
    --secondary-color: #c5a059; /* Gold/Brass */
    --accent-color: #f5f5f5;
    --text-color: #333;
    --sidebar-width: 260px;
    --header-height: 70px;
    --card-shadow: 0 4px 20px rgba(0,0,0,0.08);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', 'Noto Sans Sinhala', sans-serif;
}

body {
    background-color: #f8f9fa;
    color: var(--text-color);
    line-height: 1.6;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--primary-color);
    color: white;
    padding-top: 20px;
    position: fixed;
    height: 100vh;
    z-index: 1000;
    box-shadow: 4px 0 10px rgba(0,0,0,0.1);
}

.sidebar-header {
    padding: 0 20px 30px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 20px;
}

.sidebar-header h2 {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--secondary-color);
}

.nav-menu {
    list-style: none;
}

.nav-item {
    margin-bottom: 5px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 25px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: var(--transition);
    border-left: 4px solid transparent;
}

.nav-link i {
    margin-right: 15px;
    font-size: 1.1rem;
}

.nav-link:hover, .nav-link.active {
    background: rgba(255,255,255,0.1);
    color: white;
    border-left-color: var(--secondary-color);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    background: #f4f6f9;
}

.top-header {
    height: var(--header-height);
    background: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.breadcrumb {
    color: #666;
    font-size: 0.9rem;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-name {
    font-weight: 600;
}

/* Content Body */
.content-body {
    padding: 30px;
}

/* Dashboard Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.blue { background: #e3f2fd; color: #1976d2; }
.stat-icon.gold { background: #fff8e1; color: #ffa000; }
.stat-icon.green { background: #e8f5e9; color: #388e3c; }
.stat-icon.purple { background: #f3e5f5; color: #7b1fa2; }

.stat-info h3 {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.stat-info p {
    color: #888;
    font-size: 0.9rem;
}

/* Tables */
.data-card {
    background: white;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
}

.card-header {
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: #f8f9fa;
    padding: 15px 20px;
    text-align: left;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #666;
    border-bottom: 2px solid #eee;
}

td {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    font-size: 0.95rem;
}

tr:hover {
    background: #fcfcfc;
}

/* Badges */
.badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-active { background: #e8f5e9; color: #2e7d32; }
.badge-inactive { background: #ffebee; color: #c62828; }

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #151b60;
    box-shadow: 0 4px 15px rgba(26, 35, 126, 0.3);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 35, 126, 0.1);
}

/* Login Page */
.login-page {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, #0d1240 100%);
}

.login-card {
    background: white;
    width: 100%;
    max-width: 450px;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.login-header {
    text-align: center;
    margin-bottom: 35px;
}

.login-logo {
    width: 80px;
    height: 80px;
    background: var(--accent-color);
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary-color);
    border: 3px solid var(--secondary-color);
}

.login-header h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.login-header p {
    color: #777;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}
