/* =====================================================================
   gst_bridge.css -- loads AFTER theme_d.css (CADeskPro's theme, copied
   unchanged). Maps GST Suite's own class names onto CADeskPro's look so
   every tool page follows without per-page edits:
     .gst-card      -> CADeskPro .tally-box card
     .btn-accent    -> CADeskPro primary (brown) capsule button
     .badge-status-* -> CADeskPro dotted status capsules
     auth pages     -> CADeskPro login / standalone page look
   ===================================================================== */

/* Same Bootstrap variable re-scoping CADeskPro's base.html does, so tables,
   links, headings and muted text inside the page follow the theme. */
.content{
    --bs-body-color: var(--text);
    --bs-emphasis-color: var(--text);
    --bs-heading-color: var(--text);
    --bs-secondary-color: var(--text-muted);
    --bs-tertiary-color: var(--text-muted);
    --bs-tertiary-bg: var(--table-head);
    --bs-border-color: var(--border);
    --bs-border-color-translucent: var(--border);
    --bs-link-color: var(--primary);
    --bs-link-hover-color: var(--primary-hover);
}
a{ text-decoration:none; }
.content a:not(.btn):hover{ text-decoration:underline; text-underline-offset:2px; }

/* ---------- Shell bits that CADeskPro draws with Lucide SVGs ---------- */
.d-menu-btn i{ font-size:20px; line-height:1; }
.d-user > i.bi{ font-size:11px; color:var(--ink-400); }
.d-user-menu .sidebar-user-menu-item i.bi{ font-size:14px; color:var(--ink-500); }
.d-user-menu-note{ font-size:10.5px; color:var(--text-muted); padding:6px 10px 4px; }
.d-tabbar i.bi{ font-size:18px; line-height:1; }
.d-logo img{ width:24px; height:24px; border-radius:7px; }
.sidebar-backdrop{ display:none; }

/* ---------- Page header (first heading + its description) ---------- */
.content-inner > h3:first-of-type,
.content-inner > h4{
    font-size:17px !important; font-weight:700 !important; letter-spacing:-.015em; margin-bottom:2px !important;
}
.content-inner > h3:first-of-type + p.text-muted,
.content-inner > h4 + p.text-muted{ font-size:11.5px; margin-bottom:16px !important; }
/* CADeskPro shows no decorative icons in titles. */
.content-inner > h3 > .bi:first-child,
.content-inner > h4 > .bi:first-child,
.gst-card > h6 > .bi:first-child,
.gst-card h6.fw-bold > .bi:first-child{ display:none; }
/* "Back to <tool>" link above result pages reads like CADeskPro's breadcrumbs. */
.content-inner > a.small:first-child{ display:inline-flex; align-items:center; gap:4px; color:var(--text-muted); font-size:11.5px; }
.content-inner > a.small:first-child:hover{ color:var(--text); }
.content-inner > a.small:first-child + h4{ margin-top:6px !important; margin-bottom:14px !important; }

/* ---------- Cards ---------- */
.gst-card{
    background:var(--surface) !important; border:1px solid var(--ink-100) !important;
    border-radius:14px !important; box-shadow:none !important;
}
.gst-card.p-3{ padding:16px !important; }
.gst-card.p-4{ padding:18px !important; }
.gst-card h6.fw-bold, .gst-card > h6{ font-size:12.5px; font-weight:700; }
.gst-card + .gst-card{ margin-top:0; }

/* Dashboard tool tiles */
.tool-card{ transition:border-color .15s; }
.tool-card:hover{ border-color:var(--primary) !important; }
.tool-card .icon-badge{
    width:34px; height:34px; border-radius:999px; background:var(--ink-100); color:var(--text);
    display:flex; align-items:center; justify-content:center;
}
.tool-card .icon-badge .bi{ font-size:15px !important; }
.d-section-label{
    font-size:10px; font-weight:600; letter-spacing:.08em; text-transform:uppercase;
    color:var(--text-muted); margin:18px 0 8px;
}

/* ---------- Buttons ---------- */
.btn-accent{
    background:var(--primary) !important; border:1px solid var(--primary) !important; color:#fff !important;
}
.btn-accent:hover, .btn-accent:focus{ background:var(--primary-hover) !important; border-color:var(--primary-hover) !important; color:#fff !important; }
.btn .bi{ font-size:12px; line-height:1; }

/* ---------- Status capsules (job runs) ---------- */
.badge[class*="badge-status-"]{
    display:inline-flex !important; align-items:center; gap:5px;
    font-size:10.5px !important; font-weight:500 !important; padding:2px 9px 2px 8px !important;
    border-radius:999px !important; text-transform:capitalize;
}
.badge[class*="badge-status-"]::before{ content:""; width:6px; height:6px; border-radius:999px; flex-shrink:0; }
.badge-status-success{ background:var(--success-soft) !important; color:var(--success) !important; }
.badge-status-success::before{ background:#2E8A45; }
.badge-status-failed{ background:var(--danger-soft) !important; color:var(--danger) !important; }
.badge-status-failed::before{ background:var(--danger); }
.badge-status-pending{ background:var(--warn-soft) !important; color:var(--warn) !important; }
.badge-status-pending::before{ background:#C98A12; }

/* Overdue rows (notice tracker / dashboard) */
.table-danger > *{ --bs-table-bg:var(--danger-soft) !important; --bs-table-color:var(--text) !important; }
.alert-warning{ background:var(--warn-soft) !important; border-color:#E8CF9F !important; color:var(--warn) !important; }
.alert-info{ background:var(--info-soft) !important; border-color:#C3D1E6 !important; color:var(--info) !important; }
.alert .bi{ margin-right:2px; }
code{ color:var(--primary); }

/* =====================================================================
   SIGN-IN / STANDALONE PAGES -- CADeskPro's login look (_auth_theme.html)
   ===================================================================== */
body.d-auth{ background:#F9F3EC !important; font-size:13px; }
.d-auth-page{ min-height:100vh; }
.d-auth-flash{ position:fixed; top:16px; left:50%; transform:translateX(-50%); z-index:1080; width:min(560px, calc(100vw - 32px)); }
.d-auth-flash:empty{ display:none; }
.auth-wrap{ min-height:100vh; display:flex; align-items:center; justify-content:center; padding:32px 16px; }
.auth-card{
    display:flex; width:100%; max-width:900px; min-height:480px; overflow:hidden;
    background:#FCF7F1; border:1px solid #EADCCB; border-radius:18px; box-shadow:none;
}
.auth-form-panel{ order:1; flex:0 0 45%; padding:45px; display:flex; flex-direction:column; justify-content:center; }
.auth-form-panel h2{ font-size:22px; font-weight:600; color:#18181b; margin-bottom:4px; }
.auth-form-panel .subtitle{ color:#71717a; font-size:13px; margin-bottom:22px; }
.auth-side{
    order:2; flex:1; background:#F9F3EC; border-left:1px solid #EADCCB; color:#1A120C;
    padding:40px; display:flex; flex-direction:column; justify-content:space-between;
}
.auth-side .auth-logo{
    width:52px; height:52px; border-radius:14px; background:#7B4A2A; color:#FCF7F1;
    display:flex; align-items:center; justify-content:center; font-size:24px; margin-bottom:18px;
}
.auth-side h1{ font-size:26px; font-weight:600; letter-spacing:-.01em; color:#18181b; margin-bottom:8px; }
.auth-side p{ color:#71717a; font-size:13px; }
.auth-side ul{ list-style:none; padding:0; margin:22px 0 0; }
.auth-side ul li{ display:flex; align-items:center; gap:8px; padding:5px 0; font-size:12.5px; color:#5C4635; }
.auth-side ul li .bi{ color:#7B4A2A; }
.auth-side .foot{ font-size:11px; color:#9C8169; }
.d-auth .form-label{ font-size:12px !important; color:#3f3f46 !important; }
.d-auth .form-control, .d-auth .form-select{
    min-height:40px; padding:8px 12px !important; font-size:14px;
    background:#FCF7F1 !important; border:1px solid #E0CEB8 !important; border-radius:10px !important;
}
.d-auth .form-control:focus{ border-color:#71717a !important; box-shadow:0 0 0 3px rgba(24,24,27,.12) !important; }
.d-auth .btn-accent{
    min-height:40px; border-radius:999px !important; font-size:13px;
    background:#18181b !important; border:1px solid #18181b !important; color:#fff !important;
}
.d-auth .btn-accent:hover{ background:#27272a !important; border-color:#27272a !important; }
.d-auth .auth-form-panel a{ color:#18181b; text-decoration:underline; text-underline-offset:2px; }
.d-auth .auth-form-panel .text-muted{ color:#71717a !important; }
@media (max-width:900px){
    .auth-card{ flex-direction:column; max-width:440px; min-height:0; }
    .auth-form-panel{ flex:none; padding:28px; }
    .auth-side{ border-left:0; border-top:1px solid #EADCCB; padding:24px 28px; }
    .auth-side ul{ display:none; }
}
