/* assets/css/style.css */

/* Core Variables */
:root {
    --primary-color: #0B1D3F;
    --accent-color: #3D9CFF;
    --secondary-accent: #F0C96B;
    --bg-color: #08152D;
    --surface-color: #F7FAFF;
    --surface-border: rgba(11, 29, 63, 0.08);
    --text-color: #23324D;
    --text-muted-color: #6F7C92;
    --sidebar-width: 260px;
    --card-shadow: 0 10px 30px rgba(8, 21, 45, 0.08);
    --border-radius: 12px;
    --transition: 220ms ease;
    /* Dark mode overrides */
    --bg-color-dark: #0A0F1A;
    --surface-color-dark: #141C2B;
    --text-color-dark: #E0E4EB;
    --primary-color-dark: #4A90E2;
    --accent-color-dark: #61BFFF;
}

/* Base Styles */
body {
    background:
        radial-gradient(circle at top left, rgba(61, 156, 255, 0.18), transparent 24%),
        radial-gradient(circle at bottom right, rgba(240, 201, 107, 0.12), transparent 18%),
        linear-gradient(180deg, #eaf5ff 0%, #d8ecff 48%, #b9ddff 100%);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    min-height: 100vh;
    overflow-x: hidden;
    letter-spacing: 0.01em;
    position: relative;
    transition: background-color var(--transition), color var(--transition);
}

[data-theme="dark"] body {
    background-color: var(--bg-color-dark);
    background-image: none;
    color: var(--text-color-dark);
}

body::before {
    content: '';
    position: fixed;
    inset: -12% auto auto -8%;
    width: 32rem;
    height: 32rem;
    background: radial-gradient(circle, rgba(61, 156, 255, 0.18) 0%, rgba(61, 156, 255, 0) 70%);
    pointer-events: none;
    filter: blur(10px);
    z-index: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.02em;
}

p {
    line-height: 1.6;
}

a {
    color: var(--accent-color);
    transition: color var(--transition);
}

a:hover {
    color: #2d84e1;
}

/* Custom Layout Grid */
.app-container {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex-grow: 1;
    margin-left: var(--sidebar-width);
    padding: 32px 32px 24px;
    transition: all 0.3s ease;
    margin-top: 70px;
    height: calc(100vh - 70px);
    overflow-y: auto;
    position: relative;
}

.main-content::before {
    content: '';
    position: fixed;
    inset: 70px 24px 24px 284px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    pointer-events: none;
    opacity: 0.75;
}

/* Pages that should render flush to the top (no invisible header) */
.dashboard-page .main-content {
    margin-top: 0 !important;
    height: auto !important;
    padding-top: 24px !important;
}

.dashboard-page .main-content::before {
    inset: 24px 24px 24px 284px !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}



/* Header/Navbar Styles */


.brand-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
    color: #ffffff;
    text-decoration: none;
    letter-spacing: 0.5px;
}

.brand-star {
    color: var(--secondary-accent);
    margin-right: 5px;
    text-shadow: 0 0 10px rgba(201, 168, 76, 0.6);
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background-color: var(--primary-color);
    background-image: radial-gradient(circle at 20% 30%, rgba(30, 144, 255, 0.15) 0%, transparent 50%);
    color: #ffffff;
    z-index: 1010;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.15);
}

.sidebar-header {
    padding: 0 25px 25px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.sidebar-header .brand-text {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    justify-content: center;
    text-align: center;
}

.sidebar-header .brand-text span {
    width: 100%;
    text-align: center;
}

.sidebar-header .badge {
    margin: 0 auto;
}

.sidebar-menu {
    list-style: none;
    padding: 20px 0;
    margin: 0;
    flex-grow: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    scroll-behavior: smooth;
}

/* Custom scrollbar for sidebar menu */
.sidebar-menu::-webkit-scrollbar {
    width: 6px;
}

.sidebar-menu::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(30, 144, 255, 0.5);
    border-radius: 3px;
}

.sidebar-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(30, 144, 255, 0.8);
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 12px 25px;
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    border-left: 4px solid transparent;
    border-radius: 0 10px 10px 0;
    margin: 0 12px 4px 0;
    transition: all 0.2s ease-in-out;
}

.sidebar-link i {
    width: 25px;
    font-size: 1.1rem;
    margin-right: 12px;
}

.sidebar-link:hover {
    color: #ffffff;
    background: linear-gradient(90deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.03) 100%);
    transform: translateX(2px);
}

.sidebar-link.active {
    color: #ffffff;
    background: linear-gradient(90deg, rgba(61, 156, 255, 0.2) 0%, rgba(61, 156, 255, 0.08) 100%);
    border-left-color: var(--accent-color);
    font-weight: 600;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.sidebar-footer {
    padding: 15px 25px 0 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Sidebar Scroll Buttons */
.sidebar-scroll-btn {
    width: 40px;
    height: 40px;
    margin: 5px auto;
    border: 1px solid rgba(30, 144, 255, 0.6);
    background: rgba(30, 144, 255, 0.1);
    color: var(--accent-color);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 1rem;
    padding: 0;
}

.sidebar-scroll-btn:hover {
    background: rgba(30, 144, 255, 0.2);
    border-color: var(--accent-color);
    transform: scale(1.05);
}

.sidebar-scroll-btn:active {
    transform: scale(0.95);
}

.sidebar-scroll-up {
    margin-top: 10px;
}

.sidebar-scroll-down {
    margin-bottom: 10px;
}

/* Custom Cards */
.action-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: rgba(61, 156, 255, 0.1);
    color: var(--accent-color);
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.card-metric {
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid var(--surface-border);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--card-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.page-title-block {
    background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(247,250,255,0.95) 100%);
    border: 1px solid rgba(11, 29, 63, 0.08);
    border-radius: 16px;
    padding: 20px 22px;
    box-shadow: 0 10px 24px rgba(8, 21, 45, 0.06);
    margin-bottom: 20px;
}

.card-metric:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(8, 21, 45, 0.12);
}

.card-metric::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background-color: var(--accent-color);
}

.card-metric.metric-gold::before {
    background-color: var(--secondary-accent);
}

.card-metric.metric-green::before {
    background-color: #198754;
}

.card-metric.metric-purple::before {
    background-color: #6f42c1;
}

.metric-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #7B8A9E;
    font-weight: 600;
    margin-bottom: 5px;
}

.metric-value {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0;
}

.metric-icon {
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.5rem;
    color: rgba(30, 144, 255, 0.1);
}

.card-metric.metric-gold .metric-icon {
    color: rgba(201, 168, 76, 0.1);
}

.card-metric.metric-green .metric-icon {
    color: rgba(25, 135, 84, 0.1);
}

.card-metric.metric-purple .metric-icon {
    color: rgba(111, 66, 193, 0.1);
}

/* Custom Table Design */
.custom-table-container {
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid var(--surface-border);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--card-shadow);
    backdrop-filter: blur(6px);
    position: relative;
}

.panel-surface {
    background: linear-gradient(135deg, rgba(255,255,255,0.96) 0%, rgba(247,250,255,0.96) 100%);
    border: 1px solid rgba(11, 29, 63, 0.08);
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(8, 21, 45, 0.06);
    padding: 20px;
}

.card {
    border: 1px solid var(--surface-border);
    box-shadow: var(--card-shadow);
    transition: box-shadow var(--transition), transform var(--transition);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.card:hover {
    box-shadow: 0 14px 32px rgba(8, 21, 45, 0.1);
    transform: translateY(-2px);
}

.table {
    margin-bottom: 0;
}

.table th {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #6A7488;
    border-bottom: 2px solid #E7ECF4;
    padding: 15px 10px;
    cursor: pointer;
    user-select: none;
    background: rgba(247,250,255,0.7);
}

.table th:hover {
    color: var(--primary-color);
}

.table td {
    padding: 15px 10px;
    vertical-align: middle;
    color: var(--text-color);
    font-size: 0.95rem;
    border-bottom: 1px solid #EDF2F7;
}

/* Status Badges */
.badge-status {
    padding: 6px 12px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    box-shadow: inset 0 0 0 1px rgba(8, 21, 45, 0.05);
}

.badge-status-new {
    background-color: #EDF2F7;
    color: #4A5568;
}

.btn-outline-primary {
    border-color: rgba(61, 156, 255, 0.24);
    color: var(--accent-color);
}

.btn-outline-primary:hover {
    background: linear-gradient(135deg, var(--accent-color), #2563eb);
    color: #ffffff;
    border-color: transparent;
}

.badge-status-review {
    background-color: rgba(30, 144, 255, 0.1);
    color: var(--accent-color);
}

.badge-status-interview {
    background-color: rgba(111, 66, 193, 0.1);
    color: #6F42C1;
}

.badge-status-offer {
    background-color: rgba(253, 126, 20, 0.1);
    color: #FD7E14;
}

.badge-status-hired {
    background-color: rgba(25, 135, 84, 0.1);
    color: #198754;
}

.badge-status-rejected {
    background-color: rgba(220, 53, 69, 0.1);
    color: #DC3545;
}

/* CSS Toast Notifications */
#toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

.custom-toast {
    min-width: 300px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    padding: 16px 20px;
    margin-top: 10px;
    border-left: 5px solid var(--accent-color);
    animation: slideIn 0.3s ease forwards;
    opacity: 0;
}

.custom-toast.toast-success {
    border-left-color: #198754;
}

.custom-toast.toast-error {
    border-left-color: #dc3545;
}

.toast-content {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-color);
}

.toast-close {
    background: none;
    border: none;
    color: #A0AEC0;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0;
    margin-left: 15px;
    transition: color 0.2s;
}

.toast-close:hover {
    color: var(--text-color);
}

/* Animations */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Custom Form Styles */
.form-control,
.form-select {
    padding: 10px 15px;
    border: 1px solid #D6DEEA;
    border-radius: 10px;
    font-size: 0.85rem;
    color: #000000;
    background-color: #ffffff;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
    box-shadow: inset 0 1px 2px rgba(8, 21, 45, 0.03);
}

.form-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;charset=UTF-8,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 4 5%27%3e%3cpath fill=%27%23333%27 d=%27M2 0L0 2h4z%27/%3e%3c/svg%3e');
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 0.75rem 0.75rem;
    padding-right: 2.5rem;
}

.form-select option {
    background-color: #ffffff !important;
    color: #000000 !important;
}

.form-select:focus,
.form-control:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(30, 144, 255, 0.15);
    outline: none;
}

.form-control:hover,
.form-select:hover {
    border-color: rgba(61, 156, 255, 0.35);
}

/* Adjust heading font sizes for a more modern, compact look */
h1 {font-size: 1.8rem;}
h2 {font-size: 1.5rem;}
h3 {font-size: 1.3rem;}
h4 {font-size: 1.1rem;}
h5 {font-size: 1rem;}
h6 {font-size: 0.9rem;}

.form-control:focus, .form-select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(30, 144, 255, 0.15);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-color) 0%, #2f87e6 100%);
    border-color: var(--accent-color);
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 10px;
    box-shadow: 0 8px 18px rgba(61, 156, 255, 0.22);
    transition: all var(--transition);
    letter-spacing: 0.01em;
}

.btn-outline-secondary {
    border-radius: 10px;
    font-weight: 600;
    transition: all var(--transition);
}

.btn-primary:hover, .btn-primary:focus {
    background: linear-gradient(135deg, #2f87e6 0%, var(--accent-color) 100%);
    border-color: #2f87e6;
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(61, 156, 255, 0.28);
}

.alert {
    border: 1px solid rgba(13, 27, 62, 0.08);
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(8, 21, 45, 0.04);
}

.btn-gold {
    background: linear-gradient(135deg, var(--secondary-accent) 0%, #e4b74d 100%);
    border-color: var(--secondary-accent);
    color: #ffffff;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 10px;
    box-shadow: 0 8px 18px rgba(240, 201, 107, 0.26);
    transition: all var(--transition);
    letter-spacing: 0.01em;
}

.btn-gold:hover {
    background: linear-gradient(135deg, #e4b74d 0%, var(--secondary-accent) 100%);
    border-color: #e4b74d;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(240, 201, 107, 0.3);
}

.btn:hover {
    transform: translateY(-1px);
}

/* Custom styling for application wizard */
.application-page {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.application-card {
    max-width: 720px; /* slightly narrower */
    margin: 0 auto;
    width: 100%;
    overflow: hidden;
    border: 1px solid rgba(13, 27, 62, 0.08);
    padding: 0.8rem; /* reduced outer padding */
}

.application-header {
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, rgba(13, 27, 62, 0.04), rgba(37, 99, 235, 0.05));
}

.application-title {
    font-size: clamp(1.1rem, 1.6vw, 1.4rem);
    margin-bottom: 0.4rem;
    text-align: center;
    color: var(--primary-color);
    font-weight: 700;
}

.application-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.application-badge {
    border: 1px solid rgba(13, 27, 62, 0.12);
    border-radius: 999px;
    padding: 4px 8px;
    color: var(--primary-color);
    font-size: 0.78rem;
    background-color: rgba(255,255,255,0.9);
}

.application-badge-highlight {
    background-color: #fff3cd;
    font-weight: 700;
}

.application-heading {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.application-card .card-body {
    padding: 1rem 1rem 1.25rem;
}

.application-card .form-control,
.application-card .form-select {
    font-size: 0.78rem; /* smaller input text */
    padding: 6px 8px; /* tighter padding */
    border-radius: 6px;
}

.application-card .form-label {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.application-card .form-check-label {
    font-size: 0.9rem;
}

.application-card .mb-3 {
    margin-bottom: 0.7rem;
}

.application-card .btn {
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
    border-radius: 10px;
}

.action-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    background: rgba(61, 156, 255, 0.1);
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.8rem;
}

.application-card .alert {
    font-size: 0.95rem;
    padding: 0.75rem 1rem;
}

.app-footer {
    border-top: 1px solid rgba(255,255,255,0.08);
}

.footer-panel {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 1rem 1.1rem;
    height: 100%;
}

.footer-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: #fff;
}

.footer-item {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
    font-size: 0.92rem;
    color: rgba(255,255,255,0.85);
}

.footer-item i {
    margin-top: 0.2rem;
    color: #f1c84b;
}

@media (min-width: 768px) {
    .application-card .card-body {
        padding: 1.25rem 1.5rem 1.5rem;
    }
}

/* Login Page Specifics */
.login-body {
    background:
        radial-gradient(circle at top left, rgba(61, 156, 255, 0.42), transparent 28%),
        radial-gradient(circle at bottom right, rgba(240, 201, 107, 0.22), transparent 18%),
        linear-gradient(180deg, #0d1d3d 0%, #12315d 46%, #08152d 100%);
    background-attachment: fixed;
    background-size: cover;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 0;
}

.login-page-shell {
    width: 100%;
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 42px 20px;
    margin-bottom: 0;
}

.login-body .app-footer {
    width: 100%;
    max-width: 100%;
    margin: 0;
    background: linear-gradient(180deg, #101827 0%, #0d1420 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.login-body .app-footer .footer-inner {
    padding-top: 2.2rem;
    padding-bottom: 1.6rem;
}

.login-body .app-footer .container-fluid,
.login-body .app-footer .container {
    padding-left: 2.4rem;
    padding-right: 2.4rem;
}

.login-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.11) 0%, rgba(255, 255, 255, 0.05) 100%);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 22px;
    width: 100%;
    max-width: 440px;
    padding: 38px 36px 32px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.32);
    position: relative;
    z-index: 1;
}

.login-logo {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.15rem;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.login-subtitle {
    text-align: center;
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.92rem;
    margin-bottom: 24px;
    line-height: 1.5;
}

.login-card label {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.9rem;
    font-weight: 500;
}

.login-card .form-control {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #ffffff;
    padding: 12px 15px;
    border-radius: 12px;
}

.login-card .form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.login-card .form-control:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(30, 144, 255, 0.25);
}

.login-card .alert {
    border-radius: 10px;
    padding: 0.75rem 0.9rem;
}

/* Password Toggle Eyeball */
.password-container {
    position: relative;
}

.password-toggle-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    z-index: 10;
}

body:not(.login-body) .password-toggle-btn {
    color: #7B8A9E;
}

/* ========================================
   Floating Scroll Button Styles
   ======================================== */
.floating-scroll-container {
    display: none !important;
}

.floating-scroll-container {
    position: fixed;
    left: 20px;
    bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 999;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.floating-scroll-container.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.scroll-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--accent-color);
    background: linear-gradient(135deg, var(--accent-color), #0D7FFF);
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(30, 144, 255, 0.3);
}

.scroll-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 25px rgba(30, 144, 255, 0.5);
    background: linear-gradient(135deg, #0D7FFF, var(--accent-color));
}

.scroll-btn:active {
    transform: scale(0.95);
}

.scroll-top {
    border-color: var(--secondary-accent) !important;
    background: linear-gradient(135deg, var(--secondary-accent), #e8b85a) !important;
    box-shadow: 0 4px 15px rgba(201, 168, 76, 0.4) !important;
}

.scroll-top:hover {
    box-shadow: 0 6px 25px rgba(201, 168, 76, 0.6) !important;
}

.scroll-up i,
.scroll-down i,
.scroll-top i {
    animation: none;
    transition: transform 0.2s ease;
}

.scroll-btn:hover i {
    transform: scale(1.2);
}

/* Responsive: Adjust position on mobile */
@media (max-width: 768px) {
    .floating-scroll-container {
        left: 10px;
        bottom: 20px;
    }

    .scroll-btn {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
}

/* ========================================
   End Floating Scroll Button
   ======================================== */

/* Responsive Overrides */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(79, 70, 229, 0.28);
    outline-offset: 2px;
}

button,
.btn,
.form-control,
.form-select {
    min-height: 44px;
}

.mobile-shell {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1200;
}

.mobile-sidebar-toggle {
    display: none;
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: #fff;
    box-shadow: 0 10px 24px rgba(11, 29, 63, 0.22);
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    transition: transform var(--transition), box-shadow var(--transition);
}

.mobile-sidebar-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(11, 29, 63, 0.28);
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(8, 21, 45, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition), visibility var(--transition);
    z-index: 1040;
}

.sidebar-backdrop.show {
    opacity: 1;
    visibility: visible;
}

body.sidebar-open {
    overflow: hidden;
}

@media (max-width: 991.98px) {
    .mobile-sidebar-toggle {
        display: flex;
    }

    .sidebar {
        position: fixed;
        left: 0;
        transform: translateX(-110%);
        width: 100% !important;
        max-width: 100% !important;
        height: 100%;
        top: 0;
        z-index: 1050;
        transition: transform 0.28s ease;
        box-shadow: 14px 0 40px rgba(0, 0, 0, 0.18);
        background: #0B1D3F !important;
        color: #ffffff !important;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        box-sizing: border-box;
        padding: 20px;
    }

    .sidebar.show {
        transform: translateX(0) !important;
    }

    .sidebar-close-btn {
        display: flex;
    }

    .sidebar-link,
    .sidebar-header,
    .sidebar-footer,
    .sidebar-menu,
    .sidebar-footer a {
        color: #ffffff !important;
    }

    .sidebar-link {
        color: rgba(255, 255, 255, 0.92) !important;
    }

    .sidebar-link:hover,
    .sidebar-link.active {
        color: #ffffff !important;
    }

    .sidebar-backdrop {
        display: block;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        background: rgba(0, 0, 0, 0.55);
    }

    .sidebar-backdrop.show {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .main-content {
        padding-top: 5rem;
        margin-top: 0;
        margin-left: 0;
        min-height: 100vh;
    }

    .sourcing-action-buttons {
        width: 100%;
    }

    .sourcing-action-buttons .btn,
    .sourcing-action-buttons .btn:focus,
    .sourcing-action-buttons .btn:hover {
        width: 100% !important;
        min-width: 0 !important;
        flex: 1 1 auto;
    }

    .main-content::before {
        display: none;
    }

    /* Mobile: stack common action buttons and ensure full-width tappable areas */
    .mobile-btn-stack {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }

    .card-header .mobile-btn-stack,
    .page-title-block .mobile-btn-stack,
    .card-header .d-flex.flex-wrap,
    .page-title-block .d-flex.flex-wrap,
    .d-flex.flex-wrap.gap-2,
    .d-flex.flex-wrap.gap-3,
    .d-flex.gap-2,
    .d-flex.gap-3,
    .d-flex.justify-content-between,
    .btn-group {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .card-header .btn,
    .page-title-block .btn,
    .d-flex.flex-wrap.gap-2 .btn,
    .d-flex.gap-2 .btn,
    .btn-group .btn {
        width: 100% !important;
        min-width: 0 !important;
    }

    .card-metric {
        padding: 1rem;
    }

    /* Mobile helper: stack action buttons and make them full width */
    .mobile-action-stack {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }

    .mobile-action-stack .btn,
    .mobile-action-stack a.btn {
        width: 100% !important;
        min-width: 0 !important;
        flex: 1 1 auto;
    }

    .metric-value {
        font-size: clamp(1.25rem, 4vw, 1.8rem);
    }

    .sidebar-link {
        padding: 0.95rem 1rem;
        font-size: 0.95rem;
    }

    .sidebar-header,
    .sidebar-footer,
    .sidebar-menu {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .sidebar-header {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center;
    }

    .sidebar-header .brand-text {
        width: 100%;
        max-width: 100%;
        justify-content: center;
    }

    .sidebar-header .brand-text span {
        width: 100%;
        max-width: 100%;
        text-align: center;
    }

    .sidebar-header .badge {
        margin: 0 auto;
    }

    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table {
        min-width: 720px;
    }
}


button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(79, 70, 229, 0.28);
    outline-offset: 2px;
}

button,
.btn,
.form-control,
.form-select {
    min-height: 44px;
}
