@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Lexend:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #43a047;
    --primary-hover: #388e3c;
    --primary-light: rgba(67, 160, 71, 0.1);
    --secondary: #2e7d32;
    --bg-warm: #fcf9f8;
    --bg-card: rgba(255, 255, 255, 0.85);
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --border-color: rgba(226, 232, 240, 0.8);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.02);
    --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(67, 160, 71, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.03);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, var(--bg-warm) 0%, #f3efe9 100%);
    color: var(--text-dark);
    min-height: 100vh;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Lexend', sans-serif;
    font-weight: 600;
    color: #0f172a;
}

/* Glassmorphism Classes */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.glass-panel:hover {
    border-color: rgba(67, 160, 71, 0.2);
    box-shadow: var(--shadow-lg);
}

/* Utility classes */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-family: 'Lexend', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    gap: 8px;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 14px rgba(67, 160, 71, 0.3);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(67, 160, 71, 0.4);
}

.btn-secondary {
    background: white;
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

/* Login Page Styling */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.login-bg-decor {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(67, 160, 71, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
    z-index: 0;
}

.login-bg-decor.top-right {
    top: -200px;
    right: -200px;
}

.login-bg-decor.bottom-left {
    bottom: -200px;
    left: -200px;
}

.login-card {
    width: 100%;
    max-width: 480px;
    padding: 40px;
    z-index: 1;
    text-align: center;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 18px;
    margin-bottom: 24px;
    box-shadow: 0 8px 16px rgba(67, 160, 71, 0.25);
    color: white;
    font-family: 'Lexend', sans-serif;
    font-size: 2rem;
    font-weight: 800;
}

.login-title {
    font-size: 1.8rem;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.login-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 32px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-label {
    display: block;
    font-family: 'Lexend', sans-serif;
    font-weight: 500;
    font-size: 0.85rem;
    color: #475569;
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.6);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    color: var(--text-dark);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(67, 160, 71, 0.15);
}

.form-checkbox-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
    gap: 8px;
}

.checkbox-label input {
    accent-color: var(--primary);
}

.error-message {
    background: #fef2f2;
    border: 1px solid #fee2e2;
    color: #ef4444;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.85rem;
    margin-bottom: 24px;
    text-align: left;
    list-style-position: inside;
}

/* Dashboard Layout */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-right: 1px solid var(--border-color);
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 10;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
    text-decoration: none;
}

.sidebar-logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-family: 'Lexend', sans-serif;
    font-weight: 800;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(67, 160, 71, 0.2);
}

.sidebar-title {
    font-size: 1.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.menu-item-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    color: var(--text-muted);
    font-family: 'Lexend', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
}

.menu-item-link:hover {
    background: rgba(67, 160, 71, 0.05);
    color: var(--primary);
}

.menu-item-link.active {
    background: var(--primary-light);
    color: var(--primary);
}

.menu-item-link svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.sidebar-footer {
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.user-profile-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-family: 'Lexend', sans-serif;
    border: 2px solid white;
    box-shadow: var(--shadow-sm);
}

.user-details {
    overflow: hidden;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.logout-btn {
    width: 100%;
    padding: 10px;
    background: none;
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border-radius: 10px;
    font-family: 'Lexend', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.logout-btn:hover {
    background: #fef2f2;
    border-color: #ef4444;
}

/* Main Dashboard Area */
.main-content {
    flex-grow: 1;
    margin-left: 280px;
    padding: 40px;
    max-width: 1400px;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.welcome-section h1 {
    font-size: 2rem;
    margin-bottom: 4px;
}

.welcome-section p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.date-badge {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.stat-card {
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-info h3 {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 700;
    font-family: 'Lexend', sans-serif;
    color: #0f172a;
    line-height: 1;
}

.stat-icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon-wrapper.primary {
    background: var(--primary-light);
    color: var(--primary);
}

.stat-icon-wrapper.blue {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.stat-icon-wrapper.purple {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.stat-icon-wrapper.orange {
    background: rgba(249, 115, 22, 0.1);
    color: #f97316;
}

.stat-icon-wrapper svg {
    width: 28px;
    height: 28px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

/* Data Table Panel */
.table-panel {
    padding: 32px;
    margin-bottom: 40px;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.panel-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.panel-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Custom Table Design */
.table-container {
    width: 100%;
    overflow-x: auto;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.custom-table th {
    padding: 16px;
    font-family: 'Lexend', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border-color);
    background: rgba(248, 250, 252, 0.5);
}

.custom-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    vertical-align: middle;
}

.custom-table tr:last-child td {
    border-bottom: none;
}

.custom-table tr:hover td {
    background: rgba(67, 160, 71, 0.01);
}

.user-table-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-table-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
}

.user-table-name {
    font-weight: 500;
    color: #0f172a;
}

.user-table-email {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.badge-info {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

.badge-warning {
    background: rgba(234, 179, 8, 0.1);
    color: #ca8a04;
}

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

.fade-in-up {
    animation: fadeIn 0.4s ease-out forwards;
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .sidebar {
        width: 80px;
        padding: 24px 12px;
        align-items: center;
    }
    .sidebar-title, .sidebar-footer .user-details, .logout-btn span {
        display: none;
    }
    .sidebar-brand {
        margin-bottom: 24px;
        justify-content: center;
    }
    .menu-item-link {
        padding: 12px;
        justify-content: center;
    }
    .menu-item-link span {
        display: none;
    }
    .main-content {
        margin-left: 80px;
        padding: 24px;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
}
