:root {
    --primary-color: #2596be;
    --primary-dark: #1d7a9b;
    --secondary-color: #3b82f6;
    --bg-gradient: none;
    --glass-bg: rgba(255, 255, 255, 0.4);
    --glass-border: rgba(255, 255, 255, 0.5);
    --text-color: #1f2937;
    --text-light: #f3f4f6;
    --sidebar-width: 260px;
    --header-height: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background: #b9e4f5;
    color: var(--text-color);
    min-height: 100vh;
}

body.login-page {
    background: linear-gradient(135deg, #b9e4f5 0%, #2596be 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Glassmorphism Utilities */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.glass-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: #4b5563;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 150, 190, 0.2);
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 6px rgba(37, 150, 190, 0.2);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-block {
    display: block;
    width: 100%;
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: #ffffff;
    border-right: 1px solid rgba(255, 255, 255, 0.4);
    position: fixed;
    height: 100%;
    z-index: 10;
    transition: transform 0.3s ease;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2.5rem;
    padding-top: calc(var(--header-height) + 2.5rem);
    background: #ffffff;
    min-height: 100vh;
}

/* Sidebar Components */
.sidebar-header {
    min-height: var(--header-height);
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    background: #b9e4f5;
}

.brand-logo img {
    clip-path: inset(40% 0 40% 0);
    margin: -40% 0;
}

.brand-logo {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-menu {
    padding: 1.5rem 1rem;
    list-style: none;
}

.menu-item {
    margin-bottom: 0.5rem;
}

.menu-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    color: #4b5563;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.menu-link:hover,
.menu-link.active {
    background: #e0f2fe;
    color: var(--primary-color);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.menu-icon {
    width: 20px;
    text-align: center;
}

/* Header */
.top-header {
    height: var(--header-height);
    background: #ffffff;
    position: fixed;
    top: 0;
    right: 0;
    left: var(--sidebar-width);
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    border-bottom: 1px solid #f3f4f6;
}

/* Tables */
.table-container {
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #f3f4f6;
}

.table th {
    background: #f9fafb;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.table tr:last-child td {
    border-bottom: none;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Card */
.card {
    background: transparent;
    /* Card background handled by main-content */
    padding: 0;
    /* Content padding handled by main-content */
    margin-bottom: 2rem;
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* Specific styling for stat cards in dashboard to keep them distinct */
.dashboard-grid .card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #f3f4f6;
    height: 100%;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #e0e7ff;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .top-header {
        left: 0;
    }
}