﻿/**
 * Department of Posts - RBAC Portal
 * Professional Modern UI Framework
 * Government of India - Enhanced Design System
 */

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

/* ============================================================
   STANDARD PAGE LAYOUT — Global Container Classes
   All pages using content-wrapper > page-center-content >
   dashboard-container get consistent margins automatically.
   ============================================================ */
.page-center-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
}

.dashboard-container {
    width: 100%;
}

/* ============================================================
   CSS VARIABLES - Professional Color Palette
   ============================================================ */
:root {
    /* Primary - Corporate Orange */
    --primary-color: #f97316;
    --primary-hover: #ea580c;
    --primary-light: #ffedd5;
    --primary-dark: #c2410c;

    /* Neutral - Professional Grays */
    --neutral-50: #f8fafc;
    --neutral-100: #f1f5f9;
    --neutral-200: #e2e8f0;
    --neutral-300: #cbd5e1;
    --neutral-400: #94a3b8;
    --neutral-600: #475569;
    --neutral-700: #334155;
    --neutral-800: #1e293b;
    --neutral-900: #0f172a;

    /* Accent - Subtle Professional */
    --accent-color: #0891b2;
    --accent-hover: #0e7490;
    --accent-light: #cffafe;

    /* Semantic Colors - Muted Professional */
    --success-color: #059669;
    --success-light: #d1fae5;
    --success-dark: #047857;
    --error-color: #dc2626;
    --error-light: #fee2e2;
    --error-dark: #b91c1c;
    --warning-color: #d97706;
    --warning-light: #fef3c7;
    --warning-dark: #b45309;
    --info-color: #0284c7;
    --info-light: #e0f2fe;
    --info-dark: #0369a1;

    /* Backgrounds */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;

    /* Text Colors */
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    /* Borders & Shadows */
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;
}

/* ============================================================
   RESET & BASE STYLES
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Poppins', 'Inter', sans-serif;
    font-weight: 600;
    line-height: 1.3;
    color: var(--neutral-900);
}

h1 {
    font-size: 1.875rem;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.25rem;
}

h4 {
    font-size: 1.125rem;
}

h5 {
    font-size: 1rem;
}

h6 {
    font-size: 0.875rem;
}

/* ============================================================
   LAYOUT STRUCTURE
   ============================================================ */
.main-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 220px;
    background: #5a6c7d;
    color: white;
    position: fixed;
    left: 0;
    top: 106px;
    bottom: 0;
    overflow-y: auto;
    z-index: 100;
    box-shadow: var(--shadow-lg);
    transition: width var(--transition-base), transform var(--transition-base);
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.content-wrapper {
    margin-left: 0;
    margin-top: 106px;
    width: 100%;
    min-height: calc(100vh - 106px);
    display: flex;
    flex-direction: column;
    transition: margin-left var(--transition-base), width var(--transition-base);
}

.main-content {
    flex: 1;
    padding: 1rem 0;
    width: 100%;
    max-width: none;
}

/* ============================================================
   HEADER
   ============================================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: #5a6c7d;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    box-shadow: var(--shadow-sm);
    z-index: 1000;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0;
    margin: 0;
    padding: 0;
}

.header-logo {
    font-family: 'Poppins', sans-serif;
    font-size: 1.125rem;
    font-weight: 600;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}



.header-right {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.user-info {
    text-align: right;
    padding-right: 1rem;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.user-name {
    font-weight: 600;
    color: #ffffff;
    font-size: 0.875rem;
}

.user-role {
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin-top: 2px;
}

/* ============================================================
   SIDEBAR NAVIGATION
   ============================================================ */
.sidebar-menu {
    list-style: none;
    padding: 0.75rem 0;
}

.menu-item {
    margin: 0;
}

.menu-item a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: all var(--transition-base);
    border-left: 3px solid transparent;
    font-size: 0.8125rem;
    font-weight: 500;
}

.menu-item a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border-left-color: var(--accent-color);
}

.menu-item.active a {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    border-left-color: var(--accent-color);
    font-weight: 600;
}

/* Sidebar Toggle Button */
.sidebar-toggle {
    position: absolute;
    top: 0.75rem;
    right: -14px;
    width: 28px;
    height: 28px;
    background: var(--primary-color);
    border: 2px solid var(--bg-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
    z-index: 101;
    box-shadow: var(--shadow-md);
}

.sidebar-toggle:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
}

.sidebar-toggle svg {
    transition: transform var(--transition-base);
    width: 14px;
    height: 14px;
}

.sidebar.collapsed {
    width: 60px;
}

.sidebar.collapsed .sidebar-toggle svg {
    transform: rotate(180deg);
}

.sidebar.collapsed .menu-item a {
    padding: 0.625rem 0.5rem;
    justify-content: center;
    gap: 0;
}

.sidebar.collapsed .menu-item a span {
    display: none;
}

.sidebar.collapsed+.content-wrapper {
    margin-left: 60px;
    width: calc(100% - 60px);
}

/* Top Menu Bar */
.top-menu {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    height: 42px;
    background: #64748b;
    border-bottom: 1px solid var(--neutral-300);
    z-index: 999;
    box-shadow: var(--shadow-sm);
}

.top-menu-items {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
    padding: 0 1.5rem;
    gap: 0.5rem;
}

.top-menu-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    position: relative;
}

.top-menu-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.top-menu-item.active {
    color: white;
    background-color: rgba(255, 255, 255, 0.15);
}

.top-menu-item.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: white;
}

.top-menu-item svg {
    flex-shrink: 0;
}

.menu-icon {
    min-width: 20px;
    text-align: center;
    font-style: normal;
    opacity: 0.9;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    background-color: #59595b;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.5rem 2rem;
    text-align: center;
    font-size: 0.75rem;
    color: white;
    margin-top: auto;
}

/* ============================================================
   GRID SYSTEM
   ============================================================ */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.625rem;
}

.col {
    flex: 1;
    padding: 0 0.625rem;
}

.col-2 {
    flex: 0 0 16.666%;
    max-width: 16.666%;
    padding: 0 0.625rem;
}

.col-3 {
    flex: 0 0 25%;
    max-width: 25%;
    padding: 0 0.625rem;
}

.col-4 {
    flex: 0 0 33.333%;
    max-width: 33.333%;
    padding: 0 0.625rem;
}

.col-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 0 0.625rem;
}

.col-8 {
    flex: 0 0 66.666%;
    max-width: 66.666%;
    padding: 0 0.625rem;
}

.col-12 {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 0 0.625rem;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
    background-color: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 1.25rem;
    overflow: hidden;
    transition: all var(--transition-base);
    border: 2px solid #cbd5e1;
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card-header {
    padding: 0.875rem 1.25rem;
    border-bottom: 2px solid #cbd5e1;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.875rem;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
    position: relative;
}

/* Green Accent Strip on Headers */
.card-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: #059669;
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    padding: 0.875rem 1.25rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
}

/* Dashboard Summary Cards - Single Gradient Only (NO OVERLAY) */
.summary-card {
    padding: 0;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    border: none;
    color: white;
    min-height: 110px;
    height: 110px;
}

.summary-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.summary-card-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    height: 100%;
    position: relative;
}

.summary-card-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.summary-card-icon svg {
    width: 40px;
    height: 40px;
    stroke-width: 1.5;
    opacity: 0.95;
}

.summary-card-info {
    flex: 1;
    min-width: 0;
    background: none !important;
    background-color: transparent !important;
}

.summary-card-title {
    font-size: 0.6875rem;
    opacity: 0.85;
    margin-bottom: 0.5rem;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.summary-card-value {
    font-size: 2.25rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    line-height: 1;
}

/* Professional Color Variants - Pure Single Gradients */
.summary-card-primary {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
}

.summary-card-success {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
}

.summary-card-warning {
    background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
}

.summary-card-info {
    background: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%);
}

.summary-card-warning {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
}

.summary-card-info {
    background: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%);
}

.summary-card-danger {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
}

.summary-card-purple {
    background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width var(--transition-base), height var(--transition-base);
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

/* Primary Button - Darker Accounting Green (Add New) */
.btn-primary {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #047857 0%, #065f46 100%);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

/* Secondary Button - Gray */
.btn-secondary {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    color: white;
    border: none;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
    box-shadow: 0 4px 12px rgba(71, 85, 105, 0.3);
}

/* Success Button - Green */
.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Danger Button - Red (stays red) */
.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Info Button - Teal */
.btn-info {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    color: white;
    border: none;
}

.btn-info:hover {
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background-color: var(--primary-light);
}

/* Tiny Buttons for Table Actions */
.btn-xs {
    padding: 0.25rem 0.5rem;
    font-size: 0.6875rem;
    border-radius: 4px;
    font-weight: 600;
}

.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.75rem;
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ============================================================
   FORMS
   ============================================================ */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.375rem;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.8125rem;
}

.form-label.required::after {
    content: " *";
    color: var(--error-color);
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.8125rem;
    line-height: 1.4;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    border: 1.5px solid #94a3b8;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.form-control:hover {
    border-color: #64748b;
}

.form-control:focus {
    outline: none;
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.form-control:disabled {
    background-color: var(--neutral-100);
    color: var(--text-muted);
    cursor: not-allowed;
}

.form-control::placeholder {
    color: var(--text-muted);
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23475569' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
}

textarea.form-control {
    min-height: 80px;
    resize: vertical;
}

.form-error {
    color: var(--error-color);
    font-size: 0.75rem;
    margin-top: 0.375rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.form-help {
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin-top: 0.375rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: normal;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

/* ============================================================
   TABLES
   ============================================================ */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--bg-primary);
}

.table thead {
    background: #5a6c7d;
    border-bottom: 2px solid var(--neutral-400);
}

.table th {
    padding: 0.5rem 0.75rem;
    text-align: left;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.8rem;
    color: white;
    text-transform: none;
    letter-spacing: 0.5px;
    cursor: pointer;
    user-select: none;
}

.table th:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.75rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.table tbody tr {
    transition: background-color var(--transition-fast);
}

.table tbody tr:hover {
    background-color: var(--neutral-50);
}

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

.table-actions {
    display: flex;
    gap: 0.375rem;
    align-items: center;
}

.table-actions a,
.table-actions button {
    font-size: 0.6875rem;
    padding: 0.25rem 0.5rem;
}

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    border: 1px solid transparent;
}

.alert strong {
    font-weight: 600;
}

.alert-success {
    background-color: var(--success-light);
    border-color: var(--success-color);
    color: var(--success-dark);
}

.alert-error {
    background-color: var(--error-light);
    border-color: var(--error-color);
    color: var(--error-dark);
}

.alert-warning {
    background-color: var(--warning-light);
    border-color: var(--warning-color);
    color: var(--warning-dark);
}

.alert-info {
    background-color: var(--info-light);
    border-color: var(--info-color);
    color: var(--info-dark);
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
    display: flex;
    gap: 0.375rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.pagination-btn,
.pagination-current {
    padding: 0.5rem 0.875rem;
    border: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition-base);
}

.pagination-btn:hover {
    background-color: #64748b;
    color: white;
    border-color: #64748b;
}

.pagination-current {
    background-color: #475569;
    color: white;
    border-color: #475569;
}

/* ============================================================
   SEARCH BAR
   ============================================================ */
.search-bar {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.search-bar input {
    flex: 1;
}

.search-bar .btn {
    flex-shrink: 0;
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-success {
    background-color: var(--success-light);
    color: var(--success-dark);
}

.badge-danger {
    background-color: var(--error-light);
    color: var(--error-dark);
}

.badge-warning {
    background-color: var(--warning-light);
    color: var(--warning-dark);
}

.badge-info {
    background-color: var(--info-light);
    color: var(--info-dark);
}

.btn-outline:hover {
    background-color: var(--neutral-50);
    border-color: var(--neutral-400);
}

/* Specific Action Buttons */
.btn-search {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    color: white;
    border: none;
}

.btn-search:hover {
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
    box-shadow: 0 4px 12px rgba(71, 85, 105, 0.3);
}

.btn-import {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    color: white;
    border: none;
}

.btn-import:hover {
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.btn-export {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
    border: none;
}

.btn-export:hover {
    background: linear-gradient(135deg, #ea580c 0%, #dc2626 100%);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.btn-edit {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    color: white;
    border: none;
    font-size: 0.8125rem;
}

.btn-edit:hover {
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
}

/* ============================================================
   MODAL
   ============================================================ */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn var(--transition-base);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: var(--bg-primary);
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: slideUp var(--transition-base);
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1.125rem;
    color: var(--neutral-900);
    background-color: var(--bg-secondary);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    background-color: var(--bg-secondary);
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.mt-10 {
    margin-top: 0.625rem;
}

.mt-20 {
    margin-top: 1.25rem;
}

.mt-30 {
    margin-top: 1.875rem;
}

.mb-10 {
    margin-bottom: 0.625rem;
}

.mb-20 {
    margin-bottom: 1.25rem;
}

.mb-30 {
    margin-bottom: 1.875rem;
}

.text-muted {
    color: var(--text-muted);
}

.text-secondary {
    color: var(--text-secondary);
}

.text-success {
    color: var(--success-color);
}

.text-error {
    color: var(--error-color);
}

.text-warning {
    color: var(--warning-color);
}

.text-info {
    color: var(--info-color);
}

.fw-normal {
    font-weight: 400;
}

.fw-medium {
    font-weight: 500;
}

.fw-semibold {
    font-weight: 600;
}

.fw-bold {
    font-weight: 700;
}

.d-flex {
    display: flex;
}

.align-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-10 {
    gap: 0.625rem;
}

.gap-20 {
    gap: 1.25rem;
}

/* ============================================================
   LOADING STATES
   ============================================================ */
.loading {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================================
   RESPONSIVE DESIGN
   ============================================================ */
@media (max-width: 1024px) {
    .main-content {
        padding: 1.5rem;
    }

    .col-2,
    .col-3,
    .col-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 0 1rem;
    }

    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .content-wrapper {
        margin-left: 0;
        width: 100%;
    }

    .main-content {
        padding: 1rem;
    }

    .row {
        margin: 0 -0.5rem;
    }

    .col,
    .col-2,
    .col-3,
    .col-4,
    .col-6,
    .col-8,
    .col-12 {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 0 0.5rem;
    }

    .summary-card {
        margin-bottom: 1rem;
    }

    .table-wrapper {
        border-radius: var(--radius-md);
    }

    .header-logo {
        font-size: 0.875rem;
    }

    .user-info {
        display: none;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 0 0.75rem;
    }

    .main-content {
        padding: 0.75rem;
    }

    .card-body {
        padding: 1rem;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.8125rem;
    }
}

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {

    .header,
    .sidebar,
    .footer,
    .btn,
    .pagination {
        display: none;
    }

    .content-wrapper {
        margin: 0;
        width: 100%;
    }

    .card {
        box-shadow: none;
        border: 1px solid #000;
    }
}

/* ============================================================
   SIDEBAR TOGGLE & COLLAPSED STATE (ADDED) 
   ============================================================ */

/* Sidebar Toggle Button */
.sidebar-toggle {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
    z-index: 102;
}

.sidebar-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Collapsed Sidebar Logic (Mini Mode - 70px) */
.sidebar.collapsed {
    width: 70px;
}

/* Hide text in collapsed mode */
.sidebar.collapsed .sidebar-menu span,
.sidebar.collapsed .sidebar-brand-text,
.sidebar.collapsed .section-title,
.sidebar.collapsed .user-profile {
    display: none !important;
    opacity: 0;
}

.sidebar.collapsed .sidebar-menu a {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

.sidebar.collapsed .sidebar-menu a svg {
    margin-right: 0;
}

/* Adjust Content Wrapper */
.sidebar.collapsed+.content-wrapper,
body:has(.sidebar.collapsed) .content-wrapper {
    margin-left: 70px;
    width: calc(100% - 70px);
}

/* Center toggle button in collapsed mode */
.sidebar.collapsed .sidebar-toggle {
    right: 50%;
    transform: translateX(50%);
}

/* ============================================================
   MODERN UI: NAVIGATION CARDS (LAUNCHPAD)
   ============================================================ */
.nav-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
    padding: 0;
    align-items: start;
}

.nav-card {
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 0.75rem 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    min-height: 90px;
}

.nav-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: var(--primary-light);
}

.nav-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    opacity: 0;
    transition: opacity 0.3s;
}

.nav-card:hover::before {
    opacity: 1;
}

.nav-card-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-secondary);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.nav-card-icon svg {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

.nav-card:hover .nav-card-icon {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1) rotate(5deg);
}

.nav-card-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
    font-family: 'Poppins', sans-serif;
    line-height: 1.2;
}

.nav-card-desc {
    font-size: 0.625rem;
    color: #64748b;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    flex-grow: 1;
    display: none;
}

.nav-card-action {
    margin-top: auto;
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.625rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    opacity: 0;
    transform: translateY(5px);
    transition: all 0.3s ease;
}

.nav-card:hover .nav-card-action {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   MODERN SIDEBAR: PILLS STYLE
   ============================================================ */
.sidebar {
    background: #1e293b;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-menu {
    padding: 1rem 0.75rem;
}

.menu-item {
    margin-bottom: 0.25rem;
}

.menu-item a {
    border-radius: 8px;
    border-left: none;
    padding: 0.75rem 1rem;
    color: #94a3b8;
    position: relative;
    overflow: hidden;
}

.menu-item a:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: white;
    transform: translateX(4px);
    border-left: none;
}

.menu-item.active a {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    border-left: none;
    font-weight: 600;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.menu-icon {
    min-width: 22px;
    display: flex;
    justify-content: center;
}

.sidebar-toggle {
    background: white;
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    top: 50% !important;
}

.sidebar-toggle:hover {
    background: #f1f5f9;
    color: var(--primary-hover);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    background: #59595b;
    color: #e2e8f0;
    padding: 0.5rem 0;
    margin-top: auto;
    width: 100%;
}


.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 0;
    padding-bottom: 0;
}

.footer-links a {
    color: #e2e8f0;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-info {
    text-align: center;
    font-size: 0.75rem;
    color: #cbd5e1;
}

.footer-info p {
    margin-bottom: 0.5rem;
}

.footer-meta {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.meta-separator {
    color: #cbd5e1;
}

.scroll-top-btn {
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.scroll-top-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Force full width from left edge */
.content-wrapper {
    margin: 0 !important;
    padding: 0 !important;
}

.main-content {
    margin: 0 !important;
    padding: 1rem 0 !important;
    max-width: none !important;
}

.nav-grid {
    margin: 0 !important;
    padding: 0 !important;
}

/* Expandable Card Accordion Styles */
.nav-card-container {
    display: flex;
    flex-direction: column;
}

.nav-card.expandable {
    cursor: pointer;
    background: white;
    color: var(--text-color);
    transition: all 0.3s ease;
    position: relative;
}

.nav-card.expandable:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.nav-card.expandable .nav-card-icon {
    background: var(--primary-color);
    color: white;
}

.nav-card.expandable .nav-card-title {
    color: var(--text-color);
    font-size: 0.875rem;
}

.chevron-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
    color: var(--text-secondary);
}

.nav-card-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    margin-top: 0;
    margin-bottom: 0;
    opacity: 0;
    visibility: hidden;
}

.submenu-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: #1e293b;
    border-bottom: 1px solid #e2e8f0;
    transition: background 0.2s ease;
}

.submenu-item:last-child {
    border-bottom: none;
}

.submenu-item:hover {
    background: #1e293b;
    color: white;
}

.submenu-item:hover .submenu-item-text,
.submenu-item:hover .submenu-item-icon,
.submenu-item:hover .submenu-item-arrow {
    color: white;
}

.submenu-item-icon {
    width: 24px;
    height: 24px;
    margin-right: 0.75rem;
    color: #64748b;
}

.submenu-item-text {
    flex: 1;
    font-size: 0.6875rem;
    font-weight: 500;
}

.submenu-item-arrow {
    width: 16px;
    height: 16px;
    color: #94a3b8;
}

/* Regular non-expandable cards */
.nav-card:not(.expandable) {
    background: white;
}