:root {
    /* Exact Palette & Clay Shadow Variables from User HTML */
    --canvas-bg: #829a8c;
    --sidebar-clay: #dcd0be;
    --main-clay: #d2c8b8;
    --card-surface: rgba(230, 222, 210, 0.65);
    --card-border: rgba(255, 255, 255, 0.7);
    --text-dark: #1f2937;
    --text-muted: #5e6c79;
    --radius-xl: 22px;
    --radius-lg: 16px;
    --radius-sm: 8px;
    --clay-shadow: 0 14px 28px rgba(35, 45, 40, 0.12), inset 0 2px 3px rgba(255, 255, 255, 0.75), inset 0 -2px 4px rgba(0, 0, 0, 0.08);
    --card-shadow: 0 8px 20px rgba(0, 0, 0, 0.08), inset 0 1px 2px rgba(255, 255, 255, 0.8);

    --primary-color: #f97316;
    --primary-hover: #ea580c;
    --secondary-color: #5e6c79;

    --success-color: #10b981;
    --info-color: #0ea5e9;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;

    --bg-body: radial-gradient(circle at 5% 5%, rgba(255, 215, 175, 0.75) 0%, rgba(255, 185, 130, 0.25) 35%, transparent 65%),
                linear-gradient(to top left, #7e9587 0%, #8fa597 45%, #c9aa94 75%, #ffd8b3 100%);
    --bg-card: rgba(230, 222, 210, 0.65);

    --text-main: #1f2937;
    --border-color: rgba(255, 255, 255, 0.7);

    --sidebar-bg: #dcd0be;
    --sidebar-text: #4b5563;
    --sidebar-active-bg: linear-gradient(180deg, #f97316 0%, #ea580c 100%);
    --sidebar-active-text: #ffffff;

    --shadow-sm: 0 8px 20px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 14px 28px rgba(35, 45, 40, 0.12);

    --radius: 16px;
    --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

[data-theme="dark"] {
    --bg-body: radial-gradient(circle at 80% 12%, rgba(14, 165, 233, 0.18) 0%, transparent 45%),
                radial-gradient(circle at 15% 85%, rgba(14, 165, 233, 0.18) 0%, transparent 45%),
                radial-gradient(circle at 75% 15%, #1c3642 0%, #112028 50%, #0c161d 100%);
    --bg-card: rgba(22, 33, 42, 0.85);
    --card-surface: rgba(22, 33, 42, 0.85);
    --sidebar-clay: #151e24;
    --sidebar-bg: #151e24;
    --text-main: #e2e8f0;
    --text-dark: #e2e8f0;
    --text-muted: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.12);
    --clay-shadow: 0 14px 28px rgba(0, 0, 0, 0.45);
    --card-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
    --sidebar-text: #cbd5e1;
    --sidebar-active-bg: linear-gradient(180deg, #f97316 0%, #ea580c 100%);
    --sidebar-active-text: #ffffff;
}

/* White Circle Container for Company Logo */
.brand-logo-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
    padding: 3px;
}

.brand-logo-circle img {
    height: 100%;
    width: 100%;
    object-fit: contain;
}

[data-theme="dark"] body,
[data-theme="dark"] .brand,
[data-theme="dark"] .brand h2,
[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3, [data-theme="dark"] h4, [data-theme="dark"] h5, [data-theme="dark"] h6,
[data-theme="dark"] .card-title,
[data-theme="dark"] .nav-item,
[data-theme="dark"] .table td,
[data-theme="dark"] .form-label,
[data-theme="dark"] .form-control,
[data-theme="dark"] label,
[data-theme="dark"] .user-display-name,
[data-theme="dark"] .feed-text strong,
[data-theme="dark"] .feed-text {
    color: #e2e8f0 !important;
}

[data-theme="dark"] .topbar-user-badge {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: none;
}

[data-theme="dark"] .btn-icon {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
}

[data-theme="dark"] .nav-item:not(.active) {
    color: #cbd5e1 !important;
}

[data-theme="dark"] .nav-item:not(.active) i {
    color: #94a3b8 !important;
}

[data-theme="dark"] p,
[data-theme="dark"] .feed-time,
[data-theme="dark"] .feed-heading,
[data-theme="dark"] .user-role-tag {
    color: #94a3b8 !important;
}

/* Filter Tab Bar (Rounded Glassy Bar from User Screenshot) */
.filter-tab-bar {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 4px;
    border-radius: 30px;
    border: 1px solid var(--border-color);
    gap: 4px;
}

[data-theme="dark"] .filter-tab-bar {
    background: rgba(255, 255, 255, 0.07);
}

.filter-pill {
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s ease;
}

.filter-pill.active, .filter-pill:hover {
    background: rgba(255, 255, 255, 0.3);
    color: var(--text-main);
}

[data-theme="dark"] .filter-pill.active {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

/* Projects Table & Badge Pills */
.badge-type-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(217, 147, 90, 0.15);
    color: #e59a42;
    border: 1px solid rgba(217, 147, 90, 0.3);
}

.badge-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid transparent;
}

.status-req {
    background: rgba(148, 163, 184, 0.18);
    color: #94a3b8;
    border-color: rgba(148, 163, 184, 0.3);
}

.status-dev {
    background: rgba(14, 165, 233, 0.18);
    color: #0ea5e9;
    border-color: rgba(14, 165, 233, 0.3);
}

.status-review {
    background: rgba(168, 85, 247, 0.18);
    color: #a855f7;
    border-color: rgba(168, 85, 247, 0.3);
}

.status-deploy {
    background: rgba(16, 185, 129, 0.18);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.3);
}

/* Horizontal Timeline Progress Indicator Bar */
.timeline-bar-wrap {
    width: 90px;
    height: 5px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 4px;
    position: relative;
    margin: 4px 0;
}

.timeline-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #0ea5e9, #10b981);
    border-radius: 4px;
}

.timeline-pin {
    position: absolute;
    top: -6px;
    transform: translateX(-50%);
    font-size: 0.55rem;
    color: var(--text-main);
}

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

html, body {
    height: 100vh;
    width: 100vw;
    overflow: hidden !important;
    font-family: var(--font-sans);
    background: var(--bg-body);
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.4;
    transition: background 0.3s, color 0.3s;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

/* Zero Page Scroll Layout with Ambient Glass Background */
.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    padding: 0.75rem 1rem;
    gap: 1rem;
    position: relative;
    overflow: hidden;
    background: transparent;
}

/* Background Geometric Plexus Line Texture from User HTML */
.plexus-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.28;
    z-index: 0;
    background-image: radial-gradient(circle at 15% 50%, #ffffff 2px, transparent 2px),
                      radial-gradient(circle at 85% 30%, #ffffff 2px, transparent 2px),
                      radial-gradient(circle at 70% 80%, #ffffff 3px, transparent 3px);
    background-size: 240px 240px;
}

/* Sidebar - 3D Clay Finish */
aside, .sidebar {
    width: 240px;
    background: var(--sidebar-clay);
    border-radius: var(--radius-xl);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: var(--clay-shadow);
    border: 1.5px solid var(--card-border);
    position: relative;
    z-index: 10;
    height: calc(100vh - 1.5rem);
    flex-shrink: 0;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease;
    overflow-x: hidden;
}

[data-theme="dark"] aside, [data-theme="dark"] .sidebar {
    background: rgba(30, 36, 44, 0.9);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.4);
}

.brand, .sidebar-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 8px;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.2px;
    color: #111827;
    border-bottom: none;
}

.brand-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3b82f6;
    font-size: 1.3rem;
}

.brand h2 {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.2px;
    color: #111827;
    margin: 0;
}

.nav-list, .sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0;
    flex: 1;
    overflow-y: auto;
    list-style: none;
}

.nav-item, .sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: #4b5563;
    font-weight: 600;
    font-size: 0.88rem;
    transition: all 0.2s ease;
    border: none;
}

.nav-item i, .sidebar-nav li a i {
    font-size: 1rem;
    width: 18px;
    color: #6b7280;
    background: transparent;
    padding: 0;
}

.nav-item:hover, .sidebar-nav li a:hover {
    color: #111827;
    background: rgba(255, 255, 255, 0.4);
}

.nav-item.active, .sidebar-nav li a.active {
    background: linear-gradient(180deg, #f97316 0%, #ea580c 100%);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(234, 88, 12, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.4);
    font-weight: 700;
}

.nav-item.active i, .sidebar-nav li a.active i {
    color: #ffffff;
    background: transparent;
    padding: 0;
}

.sidebar-activity {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 10px;
}

.feed-heading {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.feed-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.75rem;
}

.feed-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.feed-text strong {
    color: #111827;
    font-weight: 700;
}

.feed-time {
    color: #6b7280;
    font-size: 0.7rem;
}

/* Main Content Layout */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    gap: 0.75rem;
    min-width: 0;
    height: calc(100vh - 1.5rem);
    position: relative;
    z-index: 10;
}

/* Glass Floating Topbar with 3D Gloss */
.topbar {
    background: rgba(238, 228, 213, 0.75);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    padding: 0.6rem 1.1rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 8px 24px rgba(100, 80, 60, 0.08), inset 0 1px 0 #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

[data-theme="dark"] .topbar {
    background: rgba(30, 36, 44, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 30px -6px rgba(0, 0, 0, 0.4);
}

/* Topbar User Badge & Buttons */
.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 6px rgba(100, 80, 60, 0.06);
}

.topbar-user-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(250, 243, 235, 0.85);
    padding: 0.3rem 0.5rem 0.3rem 0.75rem;
    border-radius: 40px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 12px rgba(100, 80, 60, 0.06), inset 0 1px 1px #ffffff;
}

.user-avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 8px rgba(255, 159, 67, 0.35);
}

.user-info-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.user-display-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-main);
}

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

.btn-logout-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    border-radius: 20px;
}

.page-content {
    padding: 0;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

body.fixed-dashboard .page-content {
    overflow: hidden !important;
}

/* Executive Analytics Control Strip */
.control-strip {
    background: var(--card-surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    padding: 12px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1.5px solid var(--card-border);
    box-shadow: var(--card-shadow);
}

.strip-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.pill-cyan {
    background: #c7ebf3;
    color: #0284c7;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    letter-spacing: 0.02em;
}

.timestamp-box {
    font-size: 0.8rem;
    font-weight: 700;
    color: #a77c38;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 5x KPI Cards Grid */
.kpi-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.kpi-block {
    height: 95px;
    border-radius: var(--radius-lg);
    padding: 12px 14px;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.1), inset 0 1px 2px rgba(255, 255, 255, 0.5);
}

.kpi-bg-cyan {
    background: linear-gradient(135deg, #3d6b77 0%, #52808c 100%);
}

.kpi-bg-green {
    background: linear-gradient(135deg, #447a6f 0%, #589689 100%);
}

.kpi-bg-orange {
    background: linear-gradient(135deg, #c45b37 0%, #d8714e 100%);
}

.kpi-bg-blue {
    background: linear-gradient(135deg, #2b96d8 0%, #4cb1ef 100%);
}

.kpi-bg-purple {
    background: linear-gradient(135deg, #7c74c9 0%, #5d53b7 100%);
}

.kpi-tag {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    opacity: 0.9;
    letter-spacing: 0.03em;
}

.kpi-num {
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.4px;
}

.kpi-note {
    font-size: 0.74rem;
    font-weight: 600;
    opacity: 0.95;
    display: flex;
    align-items: center;
    gap: 6px;
}

.kpi-icon-bubble {
    position: absolute;
    bottom: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* 4-Chart Grid Section */
.analytics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.chart-box {
    background: var(--card-surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    border: 1.5px solid var(--card-border);
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 250px;
}

.chart-heading-group {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.chart-heading-group h3 {
    font-size: 0.92rem;
    font-weight: 800;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-heading-group p {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 2px;
    font-weight: 500;
}

.chart-badge-pill {
    background: #cbf0f8;
    color: #0284c7;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
}

.chart-wrap {
    flex: 1;
    position: relative;
    width: 100%;
    height: 100%;
}

/* Floating Bot Button Bottom Right */
.floating-bot {
    position: fixed;
    bottom: 24px;
    right: 28px;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #7c74c9 0%, #5d53b7 100%);
    border-radius: 50%;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    box-shadow: 0 8px 20px rgba(93, 83, 183, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.5);
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    cursor: pointer;
    z-index: 100;
}

/* Cards & Realistic 3D Glass Containers */
.card {
    background: var(--card-surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--card-shadow);
    margin-bottom: 1.5rem;
    transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    box-shadow: 0 16px 40px -8px rgba(100, 80, 60, 0.15), inset 0 1px 2px #ffffff;
    transform: translateY(-3px);
}

[data-theme="dark"] .card {
    background: rgba(45, 52, 64, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.4);
}

.card-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
}

/* Buttons 3D Gloss & Glow */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1.1rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    gap: 0.5rem;
    letter-spacing: 0.2px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(255, 159, 67, 0.35);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary-color) 100%);
    box-shadow: 0 6px 20px 0 rgba(255, 159, 67, 0.5);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #d63031 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(234, 84, 85, 0.3);
}

.btn-danger:hover {
    box-shadow: 0 6px 18px rgba(234, 84, 85, 0.45);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background-color: rgba(255, 159, 67, 0.06);
    transform: translateY(-1px);
}

/* Form Controls */
.form-group {
    margin-bottom: 1.15rem;
}

.form-label {
    display: block;
    margin-bottom: 0.45rem;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 0.65rem 0.9rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-body);
    color: var(--text-main);
    font-size: 0.92rem;
    transition: all 0.25s ease;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.015);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(255, 159, 67, 0.18);
    background-color: var(--bg-card);
}

/* Tables Styling */
.table-container {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
}

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

.table th,
.table td {
    padding: 0.9rem 1.1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.table th {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    background-color: var(--bg-body);
}

.table tbody tr {
    transition: background-color 0.2s ease;
}

.table tbody tr:hover {
    background-color: rgba(255, 159, 67, 0.04);
}

/* Badges */
.badge {
    padding: 0.3rem 0.85rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.badge-success {
    background-color: rgba(40, 199, 111, 0.12);
    color: var(--success-color);
    box-shadow: 0 2px 8px rgba(40, 199, 111, 0.2);
}

.badge-warning {
    background-color: rgba(255, 159, 67, 0.12);
    color: var(--warning-color);
    box-shadow: 0 2px 8px rgba(255, 159, 67, 0.2);
}

.badge-danger {
    background-color: rgba(234, 84, 85, 0.12);
    color: var(--danger-color);
    box-shadow: 0 2px 8px rgba(234, 84, 85, 0.2);
}

.badge-info {
    background-color: rgba(0, 207, 232, 0.12);
    color: var(--info-color);
    box-shadow: 0 2px 8px rgba(0, 207, 232, 0.2);
}

/* Grid Dashboard */
.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(255,159,67,0.15) 0%, rgba(255,159,67,0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: linear-gradient(135deg, rgba(255,159,67,0.18), rgba(255,159,67,0.05));
    border: 1px solid rgba(255, 159, 67, 0.2);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(160, 160, 160, 0.3);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(160, 160, 160, 0.5);
}

/* Mobile Responsiveness */
.toggle-sidebar {
    display: block;
    cursor: pointer;
}

@media (min-width: 1025px) {
    .sidebar.collapsed {
        width: 74px !important;
        padding: 20px 8px !important;
    }

    .sidebar.collapsed .brand {
        justify-content: center !important;
        padding: 4px 0 !important;
    }

    .sidebar.collapsed .brand h2,
    .sidebar.collapsed .nav-item span,
    .sidebar.collapsed .sidebar-activity,
    .sidebar.collapsed .sidebar-footer {
        display: none !important;
        opacity: 0;
        visibility: hidden;
    }

    .sidebar.collapsed .nav-item {
        justify-content: center !important;
        padding: 12px 0 !important;
        gap: 0 !important;
        border-radius: 12px !important;
    }

    .sidebar.collapsed .nav-item i {
        font-size: 1.25rem !important;
        width: auto !important;
        margin: 0 !important;
    }
}

@media (max-width: 900px) {
    .app-container {
        padding: 0.5rem;
        gap: 0.5rem;
        flex-direction: column;
    }

    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        bottom: 0;
        height: 100vh;
        z-index: 1000;
        width: 280px;
        border-radius: 0;
        margin: 0;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        transition: left 0.3s ease-in-out;
        visibility: hidden;
    }

    .sidebar.show {
        left: 0;
        visibility: visible;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        backdrop-filter: blur(2px);
    }

    .sidebar-overlay.show {
        display: block;
    }

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

    .grid-4,
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 1rem;
    }
}

/* Hide Scrollbar Lines Globally while retaining smooth scroll */
::-webkit-scrollbar {
    width: 0px !important;
    height: 0px !important;
    background: transparent !important;
    display: none !important;
}

* {
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
}

/* ==========================================================================
   STYLISH THEME-ADAPTIVE SWEETALERT2 POPUPS (LIGHT & DARK MODE)
   ========================================================================== */

/* Dark Backdrop with Glassmorphic Blur */
.swal2-container.swal2-backdrop-show {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    background: rgba(15, 23, 42, 0.55) !important;
}

[data-theme="dark"] .swal2-container.swal2-backdrop-show {
    background: rgba(0, 0, 0, 0.75) !important;
}

/* Glassmorphic Modern Card Popup */
.swal2-popup {
    border-radius: 24px !important;
    padding: 2.2rem 1.75rem 1.75rem 1.75rem !important;
    font-family: var(--font-sans, 'Plus Jakarta Sans', sans-serif) !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.8) !important;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.12), inset 0 1px 2px rgba(255, 255, 255, 0.9) !important;
    color: #1f2937 !important;
    max-width: 440px !important;
    animation: swalPopIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

[data-theme="dark"] .swal2-popup {
    background: rgba(20, 30, 42, 0.95) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 25px 55px rgba(0, 0, 0, 0.65), inset 0 1px 1px rgba(255, 255, 255, 0.08) !important;
    color: #f1f5f9 !important;
}

@keyframes swalPopIn {
    0% { transform: scale(0.85); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Header & Title */
.swal2-title {
    font-size: 1.35rem !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em !important;
    color: #0f172a !important;
    margin-bottom: 0.4rem !important;
    padding: 0 !important;
}

[data-theme="dark"] .swal2-title {
    color: #f8fafc !important;
}

/* Subtitle / Text Content */
.swal2-html-container {
    font-size: 0.92rem !important;
    color: #64748b !important;
    font-weight: 500 !important;
    margin: 0.5rem 0 1.25rem 0 !important;
    line-height: 1.55 !important;
    padding: 0 !important;
}

[data-theme="dark"] .swal2-html-container {
    color: #94a3b8 !important;
}

/* Icon Customization */
.swal2-icon {
    margin: 0.5rem auto 1.25rem auto !important;
    transform: scale(0.95);
    border-width: 3px !important;
}

.swal2-icon.swal2-warning {
    border-color: #f59e0b !important;
    color: #f59e0b !important;
    background: rgba(245, 158, 11, 0.1) !important;
}

.swal2-icon.swal2-error, .swal2-icon.swal2-danger {
    border-color: #ef4444 !important;
    color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.1) !important;
}

.swal2-icon.swal2-success {
    border-color: #10b981 !important;
    color: #10b981 !important;
    background: rgba(16, 185, 129, 0.1) !important;
}

/* Action Buttons Container */
.swal2-actions {
    gap: 12px !important;
    margin-top: 1.25rem !important;
    width: 100% !important;
}

.swal2-styled {
    border-radius: 12px !important;
    font-weight: 700 !important;
    font-size: 0.88rem !important;
    padding: 11px 22px !important;
    letter-spacing: 0.01em !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    cursor: pointer !important;
}

/* Confirm / Delete Button Styling */
.swal2-confirm.swal2-styled {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35) !important;
    flex: 1 !important;
}

.swal2-confirm.swal2-styled:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.48) !important;
}

.swal2-confirm.swal2-styled:active {
    transform: translateY(0) scale(0.98);
}

/* Cancel Button Styling */
.swal2-cancel.swal2-styled {
    background: rgba(0, 0, 0, 0.06) !important;
    color: #475569 !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    flex: 1 !important;
    box-shadow: none !important;
}

[data-theme="dark"] .swal2-cancel.swal2-styled {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #cbd5e1 !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

.swal2-cancel.swal2-styled:hover {
    background: rgba(0, 0, 0, 0.1) !important;
    color: #1e293b !important;
    transform: translateY(-1px);
}

[data-theme="dark"] .swal2-cancel.swal2-styled:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
}

/* Frameless Zoom-Out Welcome Animation (No Container Boxes) */
.frameless-welcome-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    background: transparent;
}

.frameless-welcome-content {
    text-align: center;
    animation: welcomeZoomOut 2.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transform-origin: center center;
    pointer-events: none;
}

.welcome-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin: 0;
    color: var(--text-main);
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    letter-spacing: -0.5px;
}

.welcome-name {
    font-size: 3.2rem;
    font-weight: 900;
    margin: 0.15rem 0 0.4rem 0;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 15px rgba(249, 115, 22, 0.4));
    letter-spacing: -0.5px;
}

.welcome-location {
    font-size: 1.05rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(249, 115, 22, 0.12);
    color: #f97316;
    padding: 6px 16px;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(249, 115, 22, 0.25);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

@keyframes welcomeZoomOut {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    20% {
        opacity: 1;
        transform: scale(1.05);
    }
    32% {
        transform: scale(1);
    }
    75% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(1.45);
    }
}

/* Dynamic Light & Dark Theme Welcome Toast Popup (No Buttons) */
.welcome-theme-popup {
    border-radius: 20px !important;
    padding: 1.25rem 1.6rem !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3) !important;
    border: 1.5px solid var(--border-color) !important;
}

[data-theme="light"] .welcome-theme-popup {
    background: rgba(255, 255, 255, 0.95) !important;
    color: #1e293b !important;
    border-color: rgba(249, 115, 22, 0.3) !important;
}

[data-theme="dark"] .welcome-theme-popup {
    background: rgba(22, 33, 42, 0.95) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

.welcome-theme-popup .swal2-title {
    font-size: 1.3rem !important;
    font-weight: 800 !important;
}

.welcome-theme-popup .swal2-timer-progress-bar {
    background: linear-gradient(90deg, #f97316, #ea580c) !important;
    height: 4px !important;
    border-radius: 2px !important;
}