/* assets/css/dashboard_unified.css */

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

:root {
    /* Theme Variables - Default (Dark) */
    --bg-gradient: linear-gradient(135deg, #0d0d0d 0%, #1a1a1a 50%, #2a1b1b 100%);
    --bg-overlay-1: radial-gradient(circle at 10% 20%, rgba(4, 159, 110, 0.2) 0%, transparent 40%);
    --bg-overlay-2: radial-gradient(circle at 90% 80%, rgba(200, 80, 0, 0.2) 0%, transparent 40%);

    --title-gradient: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
    --brand-filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.15));

    --card-bg: rgba(30, 41, 59, 0.6);
    --card-border: rgba(255, 255, 255, 0.1);
    --input-bg: rgba(0, 0, 0, 0.3);
    --input-border: rgba(255, 255, 255, 0.1);

    --primary-color: #a35d38;
    --primary-hover: #b86e45;

    --text-main: #ffffff;
    --text-muted: #cbd5e1;
    --text-header: #ffffff;
    /* New variable for specific headers if needed */

    --success-color: #4caf50;
    --warning-color: #ff9800;
    --danger-color: #ff4d4d;
    --info-color: #2196f3;

    --sidebar-width: 310px;
    /* Restored variable */
    --sidebar-bg: rgba(30, 41, 59, 0.7);
    --sidebar-border: rgba(255, 255, 255, 0.05);

    /* Glass Effect */
    --glass-blur: blur(16px);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Light Theme Variables Override */
/* Light Theme Variables Override - Premium Frosted Glass */
body.light-theme {
    /* Richer, cooler background base */
    --bg-gradient: linear-gradient(135deg, #eef2f6 0%, #e2e8f0 100%);

    /* Stronger Ambient Orbs for Glass Effect */
    --bg-overlay-1: radial-gradient(circle at 5% 10%, rgba(14, 165, 233, 0.15) 0%, transparent 45%);
    --bg-overlay-2: radial-gradient(circle at 95% 90%, rgba(249, 115, 22, 0.12) 0%, transparent 45%);

    /* Translucent Glass Cards */
    --card-bg: rgba(255, 255, 255, 0.75);
    /* Frosted texture border */
    --card-border: rgba(255, 255, 255, 0.8);

    --input-bg: rgba(255, 255, 255, 0.9);
    --input-border: #cbd5e1;

    --text-main: #1e293b;
    /* Slate 800 - High Contrast */
    --text-muted: #64748b;
    /* Slate 500 */
    --text-header: #0f172a;
    /* Slate 900 */

    --sidebar-bg: rgba(255, 255, 255, 0.85);
    /* Semi-transparent sidebar */
    --sidebar-border: rgba(255, 255, 255, 0.4);

    /* Definition of the Glass Effect */
    --glass-blur: blur(20px);
    /* Strong blur for premium feel */
    --glass-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.05),
        0 10px 15px -3px rgba(0, 0, 0, 0.05),
        inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    /* Inner light rim */

    --title-gradient: linear-gradient(135deg, #0f172a 0%, #334155 100%);
    --brand-filter: invert(1) brightness(0.2);
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-gradient);
    /* Enable multiple backgrounds for ambient orbs */
    background-image: var(--bg-overlay-1), var(--bg-overlay-2), var(--bg-gradient);
    background-attachment: fixed;
    background-blend-mode: normal;
    /* Overlay for light mode */
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
}

/* Background overlay hint */
body::before {
    content: '';
    position: fixed;
    top: -20%;
    left: -20%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(0, 255, 136, 0.15), transparent 70%);
    filter: blur(80px);
    z-index: -1;
    pointer-events: none;
}

body::after {
    content: '';
    position: fixed;
    bottom: -20%;
    right: -20%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(255, 100, 0, 0.15), transparent 70%);
    filter: blur(80px);
    z-index: -1;
    pointer-events: none;
}

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

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-right: 1px solid var(--sidebar-border);
    padding: 32px 20px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: width 0.8s cubic-bezier(0.25, 0.8, 0.25, 1), padding 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ... (omitting unchanged brand sections for brevity check match) ... */

/* Dashboard Icon Highlight in Collapsed Mode (Only when NOT active) */
.sidebar.collapsed .nav-item a[href*="dashboard.php"]:not(.active) {
    position: relative;
    color: var(--warning-color);
    /* Orange/Gold for "Home" attention */
    background: rgba(255, 152, 0, 0.1);
    animation: dashboard-pulse 2s infinite;
    border: 1px solid rgba(255, 152, 0, 0.3);
}

@keyframes dashboard-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 152, 0, 0.4);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(255, 152, 0, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 152, 0, 0);
    }
}

/* Main Content Expansion with Animation */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    max-width: 1600px;
    width: calc(100% - var(--sidebar-width));
    transition: margin-left 0.8s cubic-bezier(0.25, 0.8, 0.25, 1), width 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.main-content.expanded {
    margin-left: 80px;
    width: calc(100% - 80px);
    max-width: 100%;
    /* Fix balancing issue */
}

.brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: opacity 0.3s ease;
    padding-top: 10px;
}

.brand-img {
    max-width: 180px;
    height: auto;
    margin-bottom: 15px;
    margin-bottom: 15px;
    transition: all 0.4s ease;
    filter: var(--brand-filter);
}

.brand-text {
    width: 100%;
    transition: opacity 0.3s ease;
    width: 100%;
}

.brand-text h2 {
    font-size: 2rem;
    color: var(--text-main);
    font-weight: 800;
    margin-bottom: 2px;
    letter-spacing: 0.5px;
    white-space: nowrap;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    /* Removed uppercase transformation */
}

.brand-subtitle {
    font-size: 1.1rem;
    background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
    -webkit-background-clip: text;
    background-clip: text;
    /* Fix lint */
    -webkit-text-fill-color: transparent;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0;
    line-height: 1.2;
}

/* Navigation List Cleanup */
.nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.nav-links {
    list-style: none;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-x: hidden;
    /* Prevent spill */
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    color: var(--text-muted);
    /* Use variable */
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.875rem;
    line-height: 1.4;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    /* Force one line */
}

.nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #4a90e2;
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.nav-link:hover {
    color: var(--text-main);
    background: rgba(74, 144, 226, 0.05);
}

.nav-link.active {
    background: linear-gradient(90deg, rgba(74, 144, 226, 0.15), rgba(74, 144, 226, 0.05));
    color: #4a90e2;
    font-weight: 600;
}

.nav-link.active::before {
    transform: scaleY(1);
}

.nav-link i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.nav-link:hover i {
    transform: scale(1.1);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: calc(100% - var(--sidebar-width));
}

/* Header */
.top-header {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 20px;
    align-items: center;
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    padding: 20px 24px;
    margin-bottom: 20px;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    box-shadow: var(--glass-shadow);
    position: relative;
    z-index: 1000;
}

.header-left {
    grid-column: 1;
}

.welcome-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: var(--text-main);
}

.welcome-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

.header-right {
    grid-column: 2;
}

/* --- Date & Time (Formal Professional) --- */
.datetime-display {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-right: 30px;
    line-height: 1.2;
}

.time-text {
    font-family: var(--font-primary), "Segoe UI", sans-serif;
    font-size: 2.0rem;
    font-weight: 700;
    color: var(--text-header);
    letter-spacing: 1.5px;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.date-text {
    font-family: var(--font-primary), "Segoe UI", sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: 4px;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.3;
}

.user-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
}

.user-role {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    position: relative;
    transition: color 0.2s;
    padding: 8px;
}

.icon-btn:hover {
    color: var(--text-main);
}

.notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    padding: 0 4px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-left: 20px;
    border-left: 1px solid var(--card-border);
    cursor: pointer;
    /* Added for interaction hint */
}

.user-avatar-small {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    overflow: hidden;
    /* Clips the image */
    background: var(--card-bg);
}

.user-avatar-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Ensures aspect ratio is maintained */
}

.user-avatar-small span {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.9rem;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #2a1b1b, #1a1a1a);
    border: 1px solid var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-weight: 600;
}

/* --- Sidebar Collapse & Logo --- */
.brand-img {
    max-width: 100%;
    height: auto;
    max-height: 60px;
    display: block;
    margin: 0 auto;
    transition: all 0.3s ease;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
}

#collapse-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 8px;
}

#collapse-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

#collapse-btn i {
    transition: transform 0.3s ease;
}

/* Collapsed State with Smooth Animation */
.sidebar.collapsed {
    width: 80px;
    padding: 32px 10px;
    /* Adjusted padding for centering */
}

.sidebar.collapsed .brand {
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.sidebar.collapsed .brand-img {
    max-width: 40px;
    /* Slightly smaller logo icon */
    margin-bottom: 0;
}

.sidebar.collapsed .brand-text {
    opacity: 0;
    height: 0;
    overflow: hidden;
    margin: 0;
}

.sidebar.collapsed .nav-link span {
    opacity: 0;
    width: 0;
    overflow: hidden;
    display: none;
    /* Ensure no width taken */
}

.sidebar.collapsed .nav-link {
    justify-content: center;
    padding: 12px;
    gap: 0;
    /* Remove gap in collapsed state */
}

.sidebar.collapsed .nav-link i {
    font-size: 1.2rem;
    width: auto;
    margin: 0;
    transform: none;
    /* Reset visual transforms potentially causing issues */
}

.sidebar.collapsed .sidebar-footer {
    padding-top: 16px;
}

.sidebar.collapsed #collapse-btn {
    justify-content: center;
    padding: 12px;
    gap: 0;
}

.sidebar.collapsed #collapse-btn .collapse-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
    display: none;
}

.sidebar.collapsed #collapse-btn i {
    font-size: 1.2rem;
    /* Match nav icons */
}

/* Main Content Expansion with Animation */
/* Main Content Expansion with Animation */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    max-width: 1600px;
    width: calc(100% - var(--sidebar-width));
    transition: margin-left 0.8s cubic-bezier(0.25, 0.8, 0.25, 1), width 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.main-content.expanded {
    margin-left: 80px;
    width: calc(100% - 80px);
    max-width: 100%;
    /* Fix balancing issue */
}


/* --- Header Icons --- */
.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.icon-btn i {
    font-size: 1.1rem;
}


/* --- User Dropdown --- */
.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-left: 16px;
    border-left: 1px solid var(--card-border);
    cursor: pointer;
    position: relative;
    /* For dropdown positioning */
}

.profile-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 15px;
    width: 220px;
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    overflow: hidden;
    display: none;
    transform-origin: top right;
    animation: scaleIn 0.2s ease;
}

.profile-dropdown.active {
    display: block;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.dropdown-header {
    padding: 12px 20px;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--card-border);
}

.profile-dropdown a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.profile-dropdown a:hover {
    background: rgba(125, 125, 125, 0.1);
}

.profile-dropdown a i {
    width: 16px;
    text-align: center;
    color: var(--text-muted);
}

.dropdown-divider {
    height: 1px;
    background: var(--card-border);
    margin: 4px 0;
}

.profile-dropdown a.logout-item {
    color: var(--danger-color);
}

.profile-dropdown a.logout-item i {
    color: var(--danger-color);
}

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

.metric-card {
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s;
    box-shadow: var(--glass-shadow);
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 20px;
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: var(--glass-shadow);
    position: relative;
    /* For badge positioning */
}

.action-btn:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    /* Slightly lighter on hover */
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.45);
}

/* Enhanced Notification Badges */
.action-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    font-size: 0.85rem;
    font-weight: 800;
    min-width: 28px;
    height: 28px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    z-index: 10;
    border: 2px solid var(--card-bg);
    /* Contrast border */
    animation: badge-pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes badge-pop {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.action-badge.red {
    background: #ef4444;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.5);
}

.action-badge.green {
    background: #10b981;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.5);
}

.action-badge.badge-stacked {
    right: 25px;
    /* Offset just enough to see overlap */
    z-index: 9;
    transform: scale(0.9);
}

.metric-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.card-info {
    flex: 1;
}

.card-title {
    color: #94a3b8;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.card-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
    line-height: 1;
}

.card-sub {
    font-size: 0.8rem;
    color: #94a3b8;
}

.card-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.card-icon-box.blue {
    background: rgba(74, 144, 226, 0.1);
    color: #4a90e2;
}

.card-icon-box.orange {
    background: rgba(251, 146, 60, 0.1);
    color: #fb923c;
}

.card-icon-box.red {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.card-icon-box.green {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.card-icon-box.purple {
    background: rgba(168, 85, 247, 0.1);
    color: #a855f7;
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 24px 16px;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.2s;
    text-align: center;
    min-height: 120px;
    box-shadow: var(--glass-shadow);
}

.action-btn:hover {
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.action-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.action-icon-box.blue {
    background: rgba(74, 144, 226, 0.1);
    color: #4a90e2;
}

.action-icon-box.orange {
    background: rgba(251, 146, 60, 0.1);
    color: #fb923c;
}

.action-icon-box.red {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.action-icon-box.green {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.action-icon-box.purple {
    background: rgba(168, 85, 247, 0.1);
    color: #a855f7;
}

/* Activity Table */
.activity-card {
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 24px;
    min-height: 200px;
    overflow-x: auto;
    box-shadow: var(--glass-shadow);
}

.no-data-msg {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 20px;
    margin: 0;
}

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

.activity-table th {
    text-align: left;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--card-border);
    padding: 12px 16px;
    text-transform: uppercase;
}

.activity-table td {
    padding: 16px;
    color: var(--text-main);
    border-bottom: 1px solid var(--card-border);
    font-size: 0.95rem;
}

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

/* Status Badges */
.status-badge {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pending {
    background: rgba(255, 152, 0, 0.15);
    color: var(--warning-color);
    border: 1px solid rgba(255, 152, 0, 0.3);
}

.status-approved {
    background: rgba(33, 150, 243, 0.15);
    color: var(--info-color);
    border: 1px solid rgba(33, 150, 243, 0.3);
}

.status-validated {
    background: rgba(76, 175, 80, 0.15);
    color: var(--success-color);
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.status-rejected {
    background: rgba(255, 77, 77, 0.15);
    color: var(--danger-color);
    border: 1px solid rgba(255, 77, 77, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        backdrop-filter: blur(30px);
        /* Stronger blur for mobile menu */
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 20px;
    }

    .top-header {
        flex-direction: column;
        gap: 16px;
    }

    .search-bar {
        width: 100%;
    }
}

/* Coming Soon Toast */
.coming-soon-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #1e293b, #334155);
    border: 1px solid rgba(74, 144, 226, 0.3);
    border-left: 3px solid #4a90e2;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.coming-soon-toast.show {
    opacity: 1;
    transform: translateX(0);
}

.coming-soon-toast i {
    color: #4a90e2;
    font-size: 1.2rem;
}

/* --- Generic Toast Notification --- */
.toast-notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #1e293b, #334155);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 3px solid #4a90e2;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-notification.success {
    border-left-color: var(--success-color);
}

.toast-notification.success i {
    color: var(--success-color);
}

.toast-notification.error {
    border-left-color: var(--danger-color);
}

.toast-notification.error i {
    color: var(--danger-color);
}

/* Light Theme Toast Override */
body.light-theme .toast-notification {
    background: #ffffff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid #cbd5e1;
}

/* Light Theme Overrides handled by CSS Variables at top */
/* Dark mode select styling */
select.form-control {
    background-color: var(--bg-dark);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    height: 38px;
    border-radius: 6px;
    appearance: none;
    -webkit-appearance: none;
    -moz-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='%23ffffff' d='M6 8.825L1.175 4 2.238 2.938 6 6.7 9.763 2.938 10.825 4z'/%3E%3C/svg%3E");
}

select.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.2);
}

/* Light theme overrides */
[data-theme='light'] select.form-control {
    background-color: #ffffff;
    color: #333333;
    border-color: #ddd;
    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='%23333333' d='M6 8.825L1.175 4 2.238 2.938 6 6.7 9.763 2.938 10.825 4z'/%3E%3C/svg%3E");
}

/* --- Input With Icon (Global) --- */
.input-with-icon {
    position: relative;
    width: 100%;
}

.input-with-icon .icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
    pointer-events: none;
    z-index: 5;
}

.input-with-icon input,
.input-with-icon select {
    padding-left: 40px !important;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
    height: 38px;
    /* Standardize height */
}
/* --- SAP Fiori Inspired Dashboard Tiles --- */
.fiori-launchpad {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.fiori-tile {
    /* Base Glassmorphism similar to metric cards */
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 24px 20px;
    text-decoration: none;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 160px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: var(--glass-shadow);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.fiori-tile::before {
    /* subtle top highlight line */
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: transparent;
    transition: background 0.3s ease;
}

.fiori-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
    background: rgba(40, 50, 70, 0.8);
    border-color: rgba(255, 255, 255, 0.3);
}

body.light-theme .fiori-tile:hover {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

/* Theme accent colors for tiles on hover */
.fiori-tile.tile-blue:hover::before { background: #4a90e2; }
.fiori-tile.tile-orange:hover::before { background: #fb923c; }
.fiori-tile.tile-green:hover::before { background: #22c55e; }
.fiori-tile.tile-purple:hover::before { background: #a855f7; }

.fiori-tile-icon {
    font-size: 2.2rem;
    margin-bottom: 16px;
    color: var(--text-main);
    opacity: 0.9;
    transition: transform 0.3s ease;
}

.fiori-tile:hover .fiori-tile-icon {
    transform: scale(1.1) rotate(-5deg);
}

.fiori-tile.tile-blue .fiori-tile-icon { color: #4a90e2; }
.fiori-tile.tile-orange .fiori-tile-icon { color: #fb923c; }
.fiori-tile.tile-green .fiori-tile-icon { color: #22c55e; }
.fiori-tile.tile-purple .fiori-tile-icon { color: #a855f7; }

.fiori-tile-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
}

.fiori-tile-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 400;
    line-height: 1.4;
    opacity: 0.8;
}

/* Fix text colors for Light Theme explicitly if needed inside the tile, although var(--text-main) handles most of it. But subtitles might need adjusting */
body.light-theme .fiori-tile .fiori-tile-subtitle { color: var(--text-muted); }
body.light-theme .fiori-tile .fiori-tile-icon { color: var(--text-main); }
body.light-theme .fiori-tile.tile-blue .fiori-tile-icon { color: #2563eb; } /* slightly darker blue for light theme */
body.light-theme .fiori-tile.tile-orange .fiori-tile-icon { color: #ea580c; }
body.light-theme .fiori-tile.tile-green .fiori-tile-icon { color: #16a34a; }
body.light-theme .fiori-tile.tile-purple .fiori-tile-icon { color: #9333ea; }

