/* ============================================================
   Aayush Payfiller 2026 - Light Theme Stylesheet
   ============================================================ */

:root {
    --sidebar-width: 255px;
    --sidebar-collapsed-width: 60px;
    --navbar-height: 56px;
    --footer-height: 42px;
    --primary-dark: #1e3a5f;
    --primary-mid: #2563eb;
    --primary-blue: #2563eb;
    --accent: #2563eb;
    --sidebar-bg: #ffffff;
    --sidebar-border: #e5e7eb;
    --sidebar-text: #4b5563;
    --sidebar-text-hover: #1e3a5f;
    --sidebar-hover: #eff6ff;
    --sidebar-active-bg: #eff6ff;
    --sidebar-active-text: #1e40af;
    --sidebar-section: #9ca3af;
    --content-bg: #f4f6fb;
    --card-shadow: 0 1px 8px rgba(0, 0, 0, 0.07);
    --border-radius: 10px;
    --navbar-bg: #ffffff;
    --navbar-border: #e5e7eb;
    
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Manrope', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--content-bg);
    font-size: .80rem;
}

.btn {
    font-size: 0.8rem;
}


/* ===== NAVBAR ===== */
.app-navbar {
    background: var(--navbar-bg) !important;
    height: var(--navbar-height);
    border-bottom: 1px solid var(--navbar-border);
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
    z-index: 1040;
}

.app-navbar .brand-text {
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 1rem;
}

.year-badge {
    background: var(--primary-blue);
    color: #fff;
    border-radius: 4px;
    padding: 1px 6px;
    font-size: .75rem;
    font-weight: 700;
    vertical-align: middle;
}

.sidebar-toggle {
    color: #6b7280 !important;
    padding: 4px 8px;
}

.sidebar-toggle:hover {
    color: var(--primary-dark) !important;
    background: #f3f4f6 !important;
    border-radius: 6px;
}

.user-btn {
    text-decoration: none;
    color: #374151 !important;
}

.user-btn:hover {
    color: var(--primary-dark) !important;
}

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

#navDateTime {
    font-size: .8rem;
    color: #9ca3af;
}

.navbar-nav .nav-link {
    color: #6b7280 !important;
    font-size: .8rem;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-dark) !important;
}

.dropdown-menu {
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-size: .8rem;
}

/* ===== SIDEBAR ===== */
.app-sidebar {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--navbar-height) - var(--footer-height));
    background: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1030;
    transition: width .25s ease, transform .25s ease;
    scrollbar-width: thin;
    scrollbar-color: #e5e7eb transparent;
}

.app-sidebar::-webkit-scrollbar {
    width: 4px;
}

.app-sidebar::-webkit-scrollbar-thumb {
    background: #e5e7eb;
    border-radius: 4px;
}

.sidebar-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.sidebar-nav {
    flex: 1;
    padding: .75rem 0;
}

.nav-section-label {
    padding: .9rem 1rem .35rem;
    font-size: .67rem;
    font-weight: 700;
    color: var(--sidebar-section);
    letter-spacing: .1em;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .52rem 1rem;
    margin: 1px .5rem;
    color: var(--sidebar-text);
    text-decoration: none;
    border-radius: 7px;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, color .15s;
    font-size: .8rem;
}

.sidebar-item i {
    font-size: .8rem;
    flex-shrink: 0;
    min-width: 18px;
    color: #9ca3af;
    transition: color .15s;
}

.sidebar-item:hover {
    background: var(--sidebar-hover);
    color: var(--sidebar-text-hover);
}

.sidebar-item:hover i {
    color: var(--primary-blue);
}

.sidebar-item.active {
    background: var(--sidebar-active-bg);
    color: var(--sidebar-active-text);
    font-weight: 600;
}

.sidebar-item.active i {
    color: var(--primary-blue);
}

.sidebar-item.active {
    border-left: 3px solid var(--primary-blue);
    margin-left: .5rem;
    padding-left: calc(1rem - 3px);
}

.sidebar-item.sub {
    padding-left: 2.5rem;
    font-size: .8rem;
}

.sidebar-item.sub.active {
    padding-left: calc(2.5rem - 3px);
}

.sidebar-group-btn {
    display: flex;
    align-items: center;
    gap: .7rem;
    width: calc(100% - 1rem);
    margin: 1px .5rem;
    padding: .52rem .9rem;
    background: none;
    border: none;
    color: var(--sidebar-text);
    cursor: pointer;
    text-align: left;
    font-size: .8rem;
    white-space: nowrap;
    border-radius: 7px;
    transition: background .15s, color .15s;
}

.sidebar-group-btn:hover {
    background: var(--sidebar-hover);
    color: var(--sidebar-text-hover);
}

.sidebar-group-btn:hover i {
    color: var(--primary-blue);
}

.sidebar-group-btn i {
    flex-shrink: 0;
    min-width: 18px;
    font-size: .8rem;
    color: #9ca3af;
    transition: color .15s;
}

.toggle-icon {
    font-size: .7rem;
    transition: transform .2s;
    margin-left: auto;
    color: #d1d5db !important;
}

.sidebar-group-btn[aria-expanded="false"] .toggle-icon {
    transform: rotate(-90deg);
}

.sidebar-footer {
    padding: .9rem 1.1rem;
    font-size: .75rem;
    color: #9ca3af;
    border-top: 1px solid #f3f4f6;
    white-space: nowrap;
    overflow: hidden;
}

/* ===== MAIN CONTENT ===== */
.app-main {
    margin-left: var(--sidebar-width);
    margin-top: var(--navbar-height);
    margin-bottom: var(--footer-height);
    min-height: calc(100vh - var(--navbar-height) - var(--footer-height));
    transition: margin-left .25s ease;
    padding: 1.4rem;
}

.content-body {
    animation: fadeIn .2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

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

/* ===== FOOTER ===== */
.app-footer {
    position: fixed;
    bottom: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--footer-height);
    background: #fff;
    border-top: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    font-size: .78rem;
    color: #6c757d;
    z-index: 1030;
    transition: left .25s ease;
    padding: 0 1.2rem;
}

/* Collapsed sidebar */
body.sidebar-collapsed .app-sidebar {
    width: var(--sidebar-collapsed-width);
}

body.sidebar-collapsed .app-main {
    margin-left: var(--sidebar-collapsed-width);
}

body.sidebar-collapsed .app-footer {
    left: var(--sidebar-collapsed-width);
}

body.sidebar-collapsed .nav-section-label,
body.sidebar-collapsed .sidebar-item span,
body.sidebar-collapsed .sidebar-group-btn span,
body.sidebar-collapsed .toggle-icon,
body.sidebar-collapsed .sidebar-footer {
    opacity: 0;
    pointer-events: none;
}

body.sidebar-collapsed .sidebar-item,
body.sidebar-collapsed .sidebar-group-btn {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

body.sidebar-collapsed .sidebar-item.sub {
    padding-left: 0;
}

/* ===== CARDS ===== */
.page-card {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    padding: 1.4rem;
    margin-bottom: 1.2rem;
}

.page-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.page-title .badge-dpdp {
    font-size: .68rem;
    background: #198754;
    color: #fff;
    border-radius: 20px;
    padding: 2px 10px;
    font-weight: 600;
}

/* ===== STATS CARDS ===== */
.stat-card {
    border-radius: var(--border-radius);
    padding: 1.2rem;
    color: #fff;
    position: relative;
    overflow: hidden;
    transition: transform .12s ease, box-shadow .12s ease;
}

.stat-card-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
}

.stat-card-link:focus-visible {
    outline: 3px solid rgba(255, 255, 255, .6);
    outline-offset: 2px;
}

.stat-card .stat-icon {
    position: absolute;
    right: 12px;
    top: 12px;
    font-size: 2rem;
    opacity: .25;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.stat-card .stat-label {
    font-size: .8rem;
    opacity: .85;
    margin-top: 4px;
}

.stat-bg-1 {
    background: linear-gradient(135deg, #e94560, #c0392b);
}

.stat-bg-2 {
    background: linear-gradient(135deg, #0f3460, #1a6eb5);
}

.stat-bg-3 {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
}

.stat-bg-4 {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

.stat-bg-5 {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
}

.stat-bg-6 {
    background: linear-gradient(135deg, #1abc9c, #16a085);
}

.stat-bg-7 {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.stat-bg-8 {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

/* ===== DATATABLES ===== */
.dataTables_wrapper {
    font-size: .8rem;
}

table.dataTable thead th {
    background: #f8fafc;
    color: #374151;
    font-weight: 600;
    border-bottom: 2px solid #e5e7eb !important;
    font-size: .8rem;
}

table.dataTable tbody tr:hover {
    background: #f0f4ff !important;
}

.dt-buttons .btn {
    font-size: .8rem;
    padding: .25rem .7rem;
    border-radius: 6px;
    margin-right: 4px;
}

/* ===== BADGES / STATUS ===== */
.status-badge {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .75rem;
    font-weight: 600;
}

.status-active {
    background: #d1fae5;
    color: #065f46;
}

.status-inactive {
    background: #fee2e2;
    color: #991b1b;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-approved {
    background: #d1fae5;
    color: #065f46;
}

.status-rejected {
    background: #fee2e2;
    color: #991b1b;
}

.status-paid {
    background: #d1fae5;
    color: #065f46;
}

.status-overdue {
    background: #fee2e2;
    color: #991b1b;
}

.status-open {
    background: #dbeafe;
    color: #1e40af;
}

.status-critical {
    background: #fee2e2;
    color: #991b1b;
}

.status-high {
    background: #fef3c7;
    color: #92400e;
}

.status-medium {
    background: #dbeafe;
    color: #1e40af;
}

.status-low {
    background: #d1fae5;
    color: #065f46;
}

.status-assigned {
    background: #d1fae5;
    color: #065f46;
}

.status-partial {
    background: #fef3c7;
    color: #92400e;
}

.status-not-assigned {
    background: #fee2e2;
    color: #991b1b;
}

.status-closed {
    background: #e5e7eb;
    color: #374151;
}

/* ===== DPDP COMPLIANCE BANNER ===== */
.dpdp-banner {
    background: linear-gradient(135deg, #064e3b, #065f46);
    color: #fff;
    border-radius: var(--border-radius);
    padding: .8rem 1.2rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: .8rem;
    font-size: .8rem;
}

.dpdp-banner .dpdp-icon {
    font-size: 1.5rem;
}

/* ===== FORMS ===== */
.form-label {
    font-weight: 500;
    color: #374151;
    font-size: .8rem;
}

.form-control,
.form-select {
    font-size: .8rem;
    border-radius: 7px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 .2rem rgba(37, 99, 235, .15);
}

/* ===== BUTTONS ===== */
.btn-app-primary {
    background: var(--primary-blue);
    color: #fff;
    border: none;
    border-radius: 7px;
}

.btn-app-primary:hover {
    background: #1d4ed8;
    color: #fff;
}

/* ===== LOADING OVERLAY ===== */
#pageLoader {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, .7);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== BREADCRUMB ===== */
.app-breadcrumb {
    font-size: .8rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.app-breadcrumb .current {
    color: var(--primary-dark);
    font-weight: 600;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .app-sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width) !important;
    }

    .app-main {
        margin-left: 0;
    }

    .app-footer {
        left: 0;
    }

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

    body.sidebar-collapsed .app-sidebar {
        transform: translateX(-100%);
    }
}
/* ============================================================
   Mind-The-Gap specific styles (layered on Payfiller theme)
   ============================================================ */

/* Simple top-navbar layout (no sidebar) */
.mtg-navbar .navbar-brand img.brand-pf { height: 34px; }
.mtg-navbar .nav-link { color: var(--sidebar-text) !important; font-weight: 500; }
.mtg-navbar .nav-link:hover,
.mtg-navbar .nav-link.active { color: var(--primary-dark) !important; }
.mtg-content { margin-top: calc(var(--navbar-height) + 1.2rem); margin-bottom: calc(var(--footer-height) + 1rem); }
.mtg-footer { left: 0 !important; }
.mtg-footer img.brand-gr { height: 22px; vertical-align: middle; margin-left: 6px; }

.logo-thumb { max-height:44px; max-width:120px; object-fit:contain; }
.kw-pill { cursor:pointer; user-select:none; }

/* Respondent flow */
.respondent-wrap { max-width:520px; margin:0 auto; }
.answer-opt { cursor:pointer; border:2px solid var(--sidebar-border); border-radius:.75rem; padding:1rem; margin-bottom:.75rem; transition:.15s; background:#fff; }
.answer-opt:hover { border-color:#93c5fd; }
.answer-opt.selected { border-color:var(--primary-blue); background:var(--sidebar-hover); }
.kw-word { font-size:2rem; font-weight:800; text-align:center; margin:1.5rem 0; color:var(--primary-dark); }
.dot { width:12px; height:12px; border-radius:50%; display:inline-block; background:#d1d5db; margin:2px; }
.dot.answered { background:#198754; }
.dot.current { outline:2px solid var(--primary-blue); }

/* Quadrant board */
.quadrant-board { position:relative; width:100%; aspect-ratio:1/1; max-width:720px; margin:0 auto;
  background:
    linear-gradient(#000,#000) center/2px 100% no-repeat,
    linear-gradient(#000,#000) center/100% 2px no-repeat; }
.quad { position:absolute; width:50%; height:50%; padding:1rem; overflow:auto; }
.quad.q1 { top:0; right:0; }
.quad.q2 { top:0; left:0; }
.quad.q3 { bottom:0; right:0; }
.quad.q4 { bottom:0; left:0; }
.axis-label { position:absolute; font-weight:700; font-size:.85rem; color:var(--primary-dark); }
.axis-top { top:2px; left:50%; transform:translateX(-50%); }
.axis-bottom { bottom:2px; left:50%; transform:translateX(-50%); }
.axis-left { left:4px; top:50%; transform:translateY(-50%); }
.axis-right { right:4px; top:50%; transform:translateY(-50%); }

.kw-chip { display:inline-block; margin:.15rem; padding:.25rem .6rem; border-radius:1rem; background:#e9ecef; font-size:.85rem; }
.kw-chip.processed { background:#c9f7d0; }
.sidebar-kw { cursor:pointer; padding:.25rem .3rem; }
.sidebar-kw.processed { color:#198754; font-weight:600; }

/* Login card (Payfiller style) */
.mtg-login-body { min-height:100vh; background:#f0f4ff; display:flex; align-items:center; justify-content:center; }
.mtg-login-wrapper { width:100%; max-width:420px; padding:1rem; }
.mtg-login-card { background:#fff; border-radius:16px; box-shadow:0 4px 24px rgba(37,99,235,0.10); border:1px solid #e0e7ff; padding:2.5rem 2rem; }
.mtg-brand-logo { display:flex; align-items:center; justify-content:center; margin-bottom:1.5rem; }
.mtg-brand-logo img { height:46px; }
.mtg-login-title { font-size:1.05rem; font-weight:700; color:#111827; text-align:center; margin-bottom:.3rem; }
.mtg-login-sub { font-size:.84rem; color:#6b7280; text-align:center; margin-bottom:1.5rem; }
.mtg-powered-by { text-align:center; margin-top:1.2rem; font-size:.78rem; color:#9ca3af; }
.mtg-powered-by img { height:22px; vertical-align:middle; margin-left:4px; }
