/* Admin Dashboard Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #111827;
    min-height: 100vh;
}

.dashboard-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Top Bar */
.top-bar {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.top-bar-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #4F46E5, #7C3AED);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.logo-text h1 {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.logo-text p {
    font-size: 13px;
    color: #6B7280;
    margin: 0;
}

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

.icon-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: #F3F4F6;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6B7280;
    transition: all 0.3s;
    position: relative;
}

.icon-btn:hover {
    background: #E5E7EB;
    color: #111827;
}

.icon-btn .badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #DC2626;
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Main Content */
.main-content {
    flex: 1;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
}

/* Glass Container */
.glass-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Welcome Card */
.welcome-card {
    margin-bottom: 24px;
}

.welcome-content {
    padding: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.welcome-text h2 {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 8px 0;
}

.welcome-text p {
    font-size: 15px;
    color: #6B7280;
    margin: 0;
}

.welcome-icon {
    width: 80px;
    height: 80px;
    background: rgba(79, 70, 229, 0.1);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.welcome-icon i {
    font-size: 40px;
    color: #4F46E5;
}

/* Section Header */
.section-header {
    margin: 32px 0 16px 0;
}

.section-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Management Grid */
.management-grid {
    display: grid;
    /* auto-fill (not auto-fit): empty columns stay, so a user with only one
       or two Quick Access modules gets same-size cards, not a full-width one. */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.management-card {
    cursor: pointer;
    transition: transform 0.3s;
    position: relative;
    overflow: hidden;
}

.management-card:hover {
    transform: translateY(-8px);
}

.card-gradient {
    position: absolute;
    inset: 0;
    opacity: 0.2;
    pointer-events: none;
}

.scheme-gradient {
    background: linear-gradient(135deg, #4F46E5, #7C3AED);
}

.document-gradient {
    background: linear-gradient(135deg, #EC4899, #F59E0B);
}

.card-content {
    position: relative;
    padding: 32px;
    text-align: center;
}

.card-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.scheme-icon {
    background: linear-gradient(135deg, #4F46E5, #7C3AED);
}

.document-icon {
    background: linear-gradient(135deg, #EC4899, #F59E0B);
}

.card-icon i {
    font-size: 40px;
    color: white;
}

.card-content h3 {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 8px 0;
}

.card-content p {
    font-size: 14px;
    color: #6B7280;
    margin: 0;
}

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

.stat-card {
    padding: 20px;
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.stat-card .stat-icon i {
    font-size: 24px;
}

.stat-card h3 {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 4px 0;
}

.stat-card p {
    font-size: 13px;
    color: #6B7280;
    margin: 0;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.slide-up {
    animation: slideUp 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-danger {
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 14px;
}

.btn-primary {
    background: linear-gradient(135deg, #4F46E5, #7C3AED);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(79, 70, 229, 0.4);
}

.btn-secondary {
    background: #F3F4F6;
    color: #374151;
}

.btn-secondary:hover {
    background: #E5E7EB;
}

.btn-danger {
    background: #FEE2E2;
    color: #DC2626;
}

.btn-danger:hover {
    background: #FEF2F2;
}

.btn-primary:disabled,
.btn-secondary:disabled,
.btn-danger:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 768px) {
    .top-bar-content {
        flex-direction: column;
        gap: 16px;
    }

    .management-grid,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .welcome-content {
        flex-direction: column;
        text-align: center;
    }

    .welcome-icon {
        order: -1;
        margin-bottom: 20px;
    }
}
