/* Global Procurement & Supplier Portal - Executive Enterprise Theme */
/* Support for Dual Theme (Dark Mode & Light Mode) & Full Responsive Design */

:root, [data-theme="dark"] {
    --sidebar-width: 240px;
    --header-height: 56px;

    /* Dark Theme Palette */
    --bg-main: #080c14;
    --bg-card: #0e1726;
    --bg-card-header: #141f33;
    --border-color: #1e293b;
    --border-light: #2d3e59;
    --header-bg: #0d1424;

    /* Sidebar Dark Palette */
    --sidebar-bg: #0a0f1d;
    --sidebar-brand-text: #ffffff;
    --sidebar-section-text: #64748b;
    --sidebar-link-text: #94a3b8;
    --sidebar-link-icon: #64748b;
    --sidebar-link-hover-bg: rgba(14, 165, 233, 0.15);
    --sidebar-link-active-bg: rgba(14, 165, 233, 0.2);
    --sidebar-link-active-text: #ffffff;

    /* High-Contrast Text Palette for Dark Mode */
    --text-heading: #ffffff;
    --text-body: #e2e8f0;
    --text-muted: #94a3b8;

    /* Input & Table Backgrounds */
    --input-bg: #141f33;
    --input-text: #ffffff;
    --input-border: #2d3e59;
    --table-header-bg: #0b111c;
    --table-row-bg: #0e1726;
    --table-hover-bg: #1a273e;

    /* Accents */
    --accent-blue: #0ea5e9;
    --accent-blue-hover: #0284c7;
    --status-success-bg: rgba(16, 185, 129, 0.2);
    --status-success-text: #34d399;
    --status-warning-bg: rgba(245, 158, 11, 0.2);
    --status-warning-text: #fbbf24;
    --status-danger-bg: rgba(239, 68, 68, 0.2);
    --status-danger-text: #f87171;
    --status-info-bg: rgba(14, 165, 233, 0.2);
    --status-info-text: #38bdf8;
}

[data-theme="light"] {
    /* Light Theme Palette */
    --bg-main: #f1f5f9;
    --bg-card: #ffffff;
    --bg-card-header: #f8fafc;
    --border-color: #cbd5e1;
    --border-light: #e2e8f0;
    --header-bg: #ffffff;

    /* Sidebar Light Palette */
    --sidebar-bg: #ffffff;
    --sidebar-brand-text: #0f172a;
    --sidebar-section-text: #64748b;
    --sidebar-link-text: #334155;
    --sidebar-link-icon: #64748b;
    --sidebar-link-hover-bg: #f1f5f9;
    --sidebar-link-active-bg: #e0f2fe;
    --sidebar-link-active-text: #0284c7;

    /* High-Contrast Text Palette for Light Mode */
    --text-heading: #0f172a;
    --text-body: #1e293b;
    --text-muted: #64748b;

    /* Input & Table Backgrounds */
    --input-bg: #ffffff;
    --input-text: #0f172a;
    --input-border: #cbd5e1;
    --table-header-bg: #f8fafc;
    --table-row-bg: #ffffff;
    --table-hover-bg: #f1f5f9;

    /* Accents */
    --accent-blue: #0284c7;
    --accent-blue-hover: #0369a1;
    --status-success-bg: #dcfce7;
    --status-success-text: #15803d;
    --status-warning-bg: #fef3c7;
    --status-warning-text: #b45309;
    --status-danger-bg: #fee2e2;
    --status-danger-text: #b91c1c;
    --status-info-bg: #e0f2fe;
    --status-info-text: #0369a1;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-body);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-size: 0.85rem;
    line-height: 1.4;
    transition: background-color 0.2s, color 0.2s;
}

.cursor-pointer {
    cursor: pointer !important;
}

/* High-Contrast Input Placeholder Rules for Dark and Light Modes */
::placeholder {
    color: #94a3b8 !important;
    opacity: 1 !important;
}

[data-theme="dark"] ::placeholder,
[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder,
[data-theme="dark"] select::placeholder,
[data-theme="dark"] .form-control::placeholder,
[data-theme="dark"] .form-select::placeholder {
    color: #94a3b8 !important;
    opacity: 1 !important;
}

[data-theme="light"] ::placeholder,
[data-theme="light"] input::placeholder,
[data-theme="light"] textarea::placeholder,
[data-theme="light"] select::placeholder,
[data-theme="light"] .form-control::placeholder,
[data-theme="light"] .form-select::placeholder {
    color: #64748b !important;
    opacity: 1 !important;
}

/* Firefox */
[data-theme="dark"] ::-moz-placeholder { color: #94a3b8 !important; opacity: 1 !important; }
[data-theme="light"] ::-moz-placeholder { color: #64748b !important; opacity: 1 !important; }

/* WebKit (Chrome, Safari, Edge) */
[data-theme="dark"] ::-webkit-input-placeholder { color: #94a3b8 !important; opacity: 1 !important; }
[data-theme="light"] ::-webkit-input-placeholder { color: #64748b !important; opacity: 1 !important; }

/* Internet Explorer / Edge */
[data-theme="dark"] :-ms-input-placeholder { color: #94a3b8 !important; opacity: 1 !important; }
[data-theme="light"] :-ms-input-placeholder { color: #64748b !important; opacity: 1 !important; }

/* Fix Bootstrap Table Background Override */
.table {
    --bs-table-bg: transparent !important;
    --bs-table-color: var(--text-body) !important;
    color: var(--text-body) !important;
    border-color: var(--border-color) !important;
}

.table th {
    background-color: var(--table-header-bg) !important;
    color: var(--text-heading) !important;
    border-color: var(--border-color) !important;
}

.table td {
    background-color: var(--table-row-bg) !important;
    color: var(--text-body) !important;
    border-color: var(--border-color) !important;
}

.table tr:hover td {
    background-color: var(--table-hover-bg) !important;
}

.text-contrast-heading {
    color: var(--text-heading) !important;
}

.text-contrast-body {
    color: var(--text-body) !important;
}

/* App Layout Wrapper */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.app-sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s;
}

.sidebar-brand {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--sidebar-brand-text);
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    gap: 10px;
    transition: color 0.2s;
}

.sidebar-brand i {
    font-size: 1.25rem;
    color: var(--accent-blue);
}

.sidebar-nav {
    padding: 10px 8px;
    flex: 1;
    overflow-y: auto;
}

.nav-section-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--sidebar-section-text);
    padding: 10px 10px 4px 10px;
    letter-spacing: 0.8px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    color: var(--sidebar-link-text);
    text-decoration: none;
    font-size: 0.83rem;
    font-weight: 500;
    border-radius: 6px;
    margin-bottom: 2px;
    transition: all 0.15s ease;
}

.sidebar-link:hover {
    background-color: var(--sidebar-link-hover-bg);
    color: var(--sidebar-link-active-text);
}

.sidebar-link.active {
    background-color: var(--sidebar-link-active-bg);
    color: var(--sidebar-link-active-text);
    font-weight: 600;
    border-left: 3px solid var(--accent-blue);
}

.sidebar-link i {
    width: 18px;
    text-align: center;
    font-size: 0.95rem;
    color: var(--sidebar-link-icon);
}

.sidebar-link:hover i, .sidebar-link.active i {
    color: var(--accent-blue);
}

/* Header */
.app-header {
    height: var(--header-height);
    background-color: var(--header-bg);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    right: 0;
    left: var(--sidebar-width);
    z-index: 1030;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    transition: left 0.25s, background-color 0.2s;
}

.header-search {
    position: relative;
    width: 280px;
}

.header-search input {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--input-text);
    padding: 6px 12px 6px 32px;
    border-radius: 6px;
    font-size: 0.8rem;
    width: 100%;
}

.header-search i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.8rem;
}

.header-search .search-badge {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--border-color);
    color: var(--text-muted);
    font-size: 0.65rem;
    padding: 1px 5px;
    border-radius: 3px;
}

.header-user-profile {
    display: flex;
    align-items: center;
    gap: 14px;
}

.theme-toggle-btn {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text-heading);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.theme-toggle-btn:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-blue);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

/* Main Content */
.app-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--header-height);
    padding: 20px 20px 56px 20px;
    flex: 1;
    width: calc(100% - var(--sidebar-width));
    transition: margin-left 0.25s, width 0.25s;
}

.page-header-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-heading);
    margin: 0 0 2px 0;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

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

/* Pro Stat Cards */
.pro-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s, border-color 0.2s, transform 0.15s;
}

.pro-stat-card:hover {
    border-color: var(--accent-blue);
}

.pro-stat-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.pro-stat-value {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--text-heading);
    line-height: 1.1;
}

.pro-stat-badge {
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Pro Cards & Panels */
.pro-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
    transition: background-color 0.2s, border-color 0.2s;
}

.pro-card-header {
    background: var(--bg-card-header);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pro-card-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-heading);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pro-card-body {
    padding: 16px;
}

/* High-Density Enterprise Tables */
.pro-table {
    width: 100%;
    color: var(--text-body);
    border-collapse: separate;
    border-spacing: 0;
}

.pro-table th {
    background: var(--table-header-bg) !important;
    color: var(--text-muted) !important;
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.pro-table td {
    background: var(--table-row-bg) !important;
    color: var(--text-body) !important;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.82rem;
    vertical-align: middle;
    white-space: nowrap;
}

.pro-table tr:hover td {
    background: var(--table-hover-bg) !important;
}

/* Status Badges */
.badge-pro {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-verified { background: var(--status-success-bg); color: var(--status-success-text); }
.badge-pending-pro { background: var(--status-warning-bg); color: var(--status-warning-text); }
.badge-risk { background: var(--status-danger-bg); color: var(--status-danger-text); }
.badge-info-pro { background: var(--status-info-bg); color: var(--status-info-text); }

/* Table search inputs inside cards */
.table-search {
    background: var(--input-bg) !important;
    border: 1px solid var(--input-border) !important;
    color: var(--input-text) !important;
}

/* Form Inputs globally styled */
.form-control, .form-select {
    background-color: var(--input-bg) !important;
    border-color: var(--input-border) !important;
    color: var(--input-text) !important;
}

.form-control:focus, .form-select:focus {
    border-color: var(--accent-blue) !important;
    box-shadow: 0 0 0 0.2rem rgba(14, 165, 233, 0.25) !important;
}

/* RED FLAG Warning Banner */
.red-flag-pro {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid #ef4444;
    border-left: 5px solid #dc2626;
    border-radius: 6px;
    padding: 10px 14px;
    color: var(--status-danger-text);
    margin-bottom: 16px;
}

.red-flag-pro h6 {
    color: #ef4444;
    font-weight: 800;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 2px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Buttons */
.btn-pro-primary {
    background: var(--accent-blue);
    color: #ffffff;
    font-weight: 700;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.8rem;
    transition: all 0.15s;
}

.btn-pro-primary:hover {
    background: var(--accent-blue-hover);
    color: #ffffff;
}

/* Modal Content Theme Support */
.modal-content {
    background-color: var(--bg-card) !important;
    color: var(--text-body) !important;
    border-color: var(--border-color) !important;
}

.modal-header, .modal-footer {
    background-color: var(--bg-card-header) !important;
    border-color: var(--border-color) !important;
    color: var(--text-heading) !important;
}

/* Progress Bars */
.progress-dark {
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-blue { background: #0ea5e9; }
.progress-bar-green { background: #10b981; }
.progress-bar-amber { background: #f59e0b; }
.progress-bar-red { background: #ef4444; }

/* Universal Application Processing Graphic Overlay (Vibrant Neon Glow Effect) */
#globalProcessingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(4, 7, 13, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    pointer-events: none;
}

#globalProcessingOverlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.processing-card {
    background: #090d16;
    border: 1px solid rgba(0, 243, 255, 0.3);
    border-radius: 20px;
    padding: 36px 44px;
    text-align: center;
    box-shadow: 0 0 35px rgba(0, 243, 255, 0.2), 0 0 70px rgba(217, 70, 239, 0.15), 0 25px 70px rgba(0, 0, 0, 0.95);
    max-width: 440px;
    width: 90%;
    position: relative;
    overflow: hidden;
}

.processing-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #00f3ff, #d946ef, #fbbf24, #10b981, #00f3ff);
    background-size: 200% 100%;
    box-shadow: 0 0 12px #00f3ff, 0 0 20px #d946ef;
    animation: gradientMove 1.5s linear infinite;
}

@keyframes gradientMove {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}

.processing-spinner-box {
    position: relative;
    width: 90px;
    height: 90px;
    margin: 0 auto 24px auto;
}

.processing-ring-outer {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-top-color: #00f3ff;
    border-bottom-color: #d946ef;
    border-radius: 50%;
    filter: drop-shadow(0 0 8px #00f3ff) drop-shadow(0 0 12px #d946ef);
    animation: spinClockwise 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.processing-ring-inner {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 66px;
    height: 66px;
    border: 3.5px solid transparent;
    border-left-color: #fbbf24;
    border-right-color: #10b981;
    border-radius: 50%;
    filter: drop-shadow(0 0 8px #fbbf24) drop-shadow(0 0 10px #10b981);
    animation: spinCounterClockwise 0.85s linear infinite;
}

.processing-brand-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.6rem;
    color: #00f3ff;
    text-shadow: 0 0 12px #00f3ff, 0 0 24px #00f3ff, 0 0 40px #00f3ff;
    animation: pulseNeonIcon 1.5s ease-in-out infinite;
}

@keyframes spinClockwise {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes spinCounterClockwise {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(-360deg); }
}

@keyframes pulseNeonIcon {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.85; filter: drop-shadow(0 0 6px #00f3ff); }
    50% { transform: translate(-50%, -50%) scale(1.22); opacity: 1; filter: drop-shadow(0 0 18px #00f3ff); }
}

.processing-title {
    color: #ffffff;
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: 1px;
    margin-bottom: 6px;
    text-transform: uppercase;
    text-shadow: 0 0 12px rgba(0, 243, 255, 0.7);
}

.processing-message {
    color: #94a3b8;
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 0;
}

/* Universal Graphical Alert Presentation Overlay */
#globalGraphicToastOverlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(6, 9, 17, 0.85) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    z-index: 999999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 16px !important;
    box-sizing: border-box !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#globalGraphicToastOverlay.active {
    opacity: 1 !important;
    visibility: visible !important;
}

.graphic-toast-card {
    background: #0e1726 !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 20px !important;
    padding: 32px 28px 24px 28px !important;
    text-align: center !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8) !important;
    max-width: 420px !important;
    width: 100% !important;
    margin: auto !important;
    position: relative !important;
    overflow: hidden !important;
    transform: scale(0.85);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#globalGraphicToastOverlay.active .graphic-toast-card {
    transform: scale(1);
}

.graphic-toast-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.graphic-toast-card.success::before { background: linear-gradient(90deg, #10b981, #059669); }
.graphic-toast-card.danger::before { background: linear-gradient(90deg, #ef4444, #dc2626); }
.graphic-toast-card.warning::before { background: linear-gradient(90deg, #f59e0b, #d97706); }
.graphic-toast-card.info::before { background: linear-gradient(90deg, #0ea5e9, #0284c7); }

.graphic-toast-icon-wrap {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    margin: 0 auto 16px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
}

.graphic-toast-card.success .graphic-toast-icon-wrap { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.graphic-toast-card.danger .graphic-toast-icon-wrap { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.graphic-toast-card.warning .graphic-toast-icon-wrap { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.graphic-toast-card.info .graphic-toast-icon-wrap { background: rgba(14, 165, 233, 0.15); color: #38bdf8; }

.graphic-toast-title {
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 8px;
    color: var(--text-heading);
}

.graphic-toast-message {
    color: var(--text-body);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 24px;
}

.graphic-toast-timer-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    width: 100%;
}

.graphic-toast-card.success .graphic-toast-timer-bar { background: #10b981; }
.graphic-toast-card.danger .graphic-toast-timer-bar { background: #ef4444; }
.graphic-toast-card.warning .graphic-toast-timer-bar { background: #f59e0b; }
.graphic-toast-card.info .graphic-toast-timer-bar { background: #0ea5e9; }

@keyframes toastProgress {
    0% { width: 100%; }
    100% { width: 0%; }
}

.graphic-toast-timer-bar.animate {
    animation: toastProgress 4.5s linear forwards;
}

/* Mobile & Tablet Full Responsive Design Rules */
@media (max-width: 991px) {
    .app-sidebar {
        transform: translateX(-100%);
        box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
        z-index: 1050;
    }
    
    body.sidebar-open .app-sidebar {
        transform: translateX(0);
    }

    body.sidebar-open::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.65);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        z-index: 1045;
    }
    
    .app-header {
        left: 0;
        padding: 0 12px;
    }
    
    .app-content {
        margin-left: 0;
        width: 100%;
        padding: 12px;
    }

    .page-header-title {
        font-size: 1.05rem;
    }

    .pro-stat-value {
        font-size: 1.2rem;
    }

    /* Touch-friendly horizontal table scroll */
    .table-responsive {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 8px;
    }

    .pro-table {
        min-width: 600px;
    }
}

@media (max-width: 576px) {
    .header-search {
        display: none !important;
    }

    .theme-toggle-btn {
        padding: 4px 8px;
        font-size: 0.75rem;
    }

    .pro-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .pro-card-body {
        padding: 12px;
    }

    .modal-dialog {
        margin: 8px;
    }
}

/* Enterprise Persistent App Fullscreen Mode (Stays 100% Fullscreen Across All Menu Navigations) */
html.app-fullscreen-mode,
body.app-fullscreen-mode {
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    overflow-x: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.app-fullscreen-mode .app-sidebar {
    height: 100vh !important;
}

body.app-fullscreen-mode .app-main-content {
    min-height: 100vh !important;
}

/* Enterprise Fixed Application Footer Bar */
.app-static-footer {
    position: fixed !important;
    bottom: 0 !important;
    left: var(--sidebar-width) !important;
    right: 0 !important;
    z-index: 1020 !important;
    background: rgba(14, 23, 38, 0.94) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-top: 1px solid var(--border-color) !important;
    border-radius: 0 !important;
    padding: 8px 24px !important;
    margin: 0 !important;
    font-size: 0.78rem;
    color: var(--text-muted);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4) !important;
    transition: left 0.25s ease, background-color 0.2s;
}

[data-theme="light"] .app-static-footer {
    background: rgba(255, 255, 255, 0.94) !important;
}

/* Resolution-Responsive Compact Button Scaling System */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.btn-sm {
    padding: 0.35rem 0.75rem !important;
    font-size: 0.78rem !important;
    border-radius: 6px !important;
}

.btn-xs {
    padding: 0.25rem 0.55rem !important;
    font-size: 0.72rem !important;
    border-radius: 5px !important;
}

@media (max-width: 1400px) {
    .btn-sm {
        padding: 0.3rem 0.65rem !important;
        font-size: 0.76rem !important;
    }
}

@media (max-width: 1199px) {
    .btn-sm {
        padding: 0.26rem 0.55rem !important;
        font-size: 0.73rem !important;
    }
}

@media (max-width: 768px) {
    .btn-sm {
        padding: 0.22rem 0.48rem !important;
        font-size: 0.7rem !important;
    }
}

@media (max-width: 991px) {
    .app-static-footer {
        left: 0 !important;
    }
}

@media (max-width: 767px) {
    .app-static-footer {
        padding: 6px 12px !important;
    }

    .footer-container {
        justify-content: center !important;
        width: 100% !important;
    }

    .footer-left,
    .footer-divider,
    .system-status-indicator {
        display: none !important;
    }

    .footer-right {
        justify-content: center !important;
        width: 100% !important;
        gap: 0 !important;
    }

    .session-timer-box {
        padding: 4px 16px !important;
        font-size: 0.82rem !important;
    }
}

/* Global Search Auto-Suggest Box */
.global-search-suggest-box {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 420px;
    max-width: 90vw;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    z-index: 1050;
    max-height: 400px;
    overflow-y: auto;
    padding: 6px 0;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.search-suggest-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 16px;
    text-decoration: none;
    color: var(--text-body);
    transition: background 0.15s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.search-suggest-item:hover,
.search-suggest-item.active {
    background: rgba(13, 202, 240, 0.12);
    color: var(--text-heading);
}

.search-suggest-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(13, 202, 240, 0.15);
    color: #0dcaf0;
    flex-shrink: 0;
    margin-top: 2px;
}

.footer-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    max-width: 100%;
}

.footer-left, .footer-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.footer-divider {
    color: var(--border-light);
    opacity: 0.5;
}

.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: #38bdf8;
    text-decoration: underline;
}

/* Session Timer Countdown Badge */
.session-timer-box {
    display: inline-flex;
    align-items: center;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 20px;
    padding: 3px 12px;
    font-family: 'Inter', monospace, sans-serif;
}

.session-countdown-badge {
    font-weight: 700;
    color: #34d399;
    letter-spacing: 0.5px;
}

.session-timer-box.warning {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.4);
}

.session-timer-box.warning .session-countdown-badge {
    color: #fbbf24;
    animation: blinkWarning 1s infinite alternate;
}

.session-timer-box.danger {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.5);
}

.session-timer-box.danger .session-countdown-badge {
    color: #f87171;
    animation: blinkWarning 0.5s infinite alternate;
}

@keyframes blinkWarning {
    0% { opacity: 1; }
    100% { opacity: 0.4; }
}

.system-status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.status-pulse-dot {
    width: 7px;
    height: 7px;
    background-color: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 6px #10b981;
}
