/* =====================================================================
   BestDSC.com — App Styles
   Navy + white base. Replace --brand-* tokens when logo lands.
   ===================================================================== */

:root {
    --brand-navy:    #0b2447;
    --brand-navy-2:  #19376d;
    --brand-blue:    #576cbc;
    --brand-pale:    #a5d7e8;
    --brand-bg:      #f5f7fb;
    --text-1:        #1a1a1a;
    --text-2:        #4a4a4a;
    --muted:         #6b7280;
    --border:        #e5e7eb;
    --row-expired:   #fde2e2;
    --row-7d:        #fde9d9;
    --row-30d:       #fff6e1;
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-1);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--brand-navy-2); text-decoration: none; }
a:hover { color: var(--brand-navy); text-decoration: underline; }

.btn-primary {
    background-color: var(--brand-navy);
    border-color: var(--brand-navy);
}
.btn-primary:hover { background-color: var(--brand-navy-2); border-color: var(--brand-navy-2); }
.btn-outline-primary {
    color: var(--brand-navy);
    border-color: var(--brand-navy);
}
.btn-outline-primary:hover { background-color: var(--brand-navy); border-color: var(--brand-navy); }

/* --------- Brand logo --------- */
.brand-logo {
    height: 36px;
    width: auto;
    display: block;
}
/* Fit the wide logo to the navbar height so it doesn't dominate the header */
.navbar-public .brand-logo { height: 57px; }
.brand-logo-dark {
    /* The logo art is dark-on-transparent, so on the navy sidebar/footer it
       would be near-invisible — render it solid white instead. Swap for a
       white-variant PNG later if brand colours must be preserved on dark. */
    height: 36px;
    filter: brightness(0) invert(1);
}

/* --------- Public navbar --------- */
.navbar-public {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 0.4rem 0;
}
.navbar-public .nav-link {
    color: var(--text-2);
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: color 0.15s;
}
.navbar-public .nav-link:hover,
.navbar-public .nav-link.active {
    color: var(--brand-navy);
}

/* --------- Public footer --------- */
.footer-public {
    background: var(--brand-navy);
    color: #fff;
}
.footer-public a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
}
.footer-public a:hover { color: #fff; }

/* --------- Hero --------- */
.hero {
    padding: 5rem 0 4rem;
    background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-navy-2) 100%);
    color: #fff;
}
.hero h1 {
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
}
.hero .lead { color: rgba(255,255,255,0.8); }

/* --------- Apply selector card --------- */
.apply-card {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 24px 48px -16px rgba(11, 36, 71, 0.25);
}
.pill-group { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.pill {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    color: var(--text-2);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}
.pill.active,
.pill:hover {
    background: var(--brand-navy);
    color: #fff;
    border-color: var(--brand-navy);
}
.price-row .mrp {
    text-decoration: line-through;
    color: var(--muted);
    font-size: 1rem;
    margin-right: 0.5rem;
}
.price-row .price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--brand-navy);
}

/* --------- Auth pages --------- */
.auth-body {
    background: linear-gradient(135deg, var(--brand-bg) 0%, #e8ecf4 100%);
    min-height: 100vh;
}
.auth-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}
.auth-card {
    background: #fff;
    border-radius: 12px;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}
.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

/* --------- Internal layout (sidebar + topbar) --------- */
.app-shell {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}
.app-sidebar {
    background: var(--brand-navy);
    color: rgba(255,255,255,0.85);
    padding: 1.25rem 0;
    overflow-y: auto;
}
.sidebar-brand {
    padding: 0 1.25rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 1rem;
}
.sidebar-section {
    padding: 1rem 1.25rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.5);
}
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 1.25rem;
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-size: 0.9rem;
    border-left: 3px solid transparent;
    transition: all 0.15s;
}
.sidebar-link:hover {
    background: rgba(255,255,255,0.05);
    color: #fff;
    text-decoration: none;
}
.sidebar-link.active {
    background: rgba(255,255,255,0.08);
    color: #fff;
    border-left-color: var(--brand-pale);
}
.sidebar-link i { font-size: 1rem; }

.app-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.app-topbar {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.user-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--brand-navy);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
}

/* --------- Data tables (CompuOffice-style) --------- */
.data-table {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}
.data-table table {
    margin: 0;
    font-size: 0.875rem;
}
.data-table thead th {
    background: #f8fafc;
    color: var(--text-1);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--border);
    padding: 0.75rem;
    position: sticky;
    top: 0;
    z-index: 2;
}
.data-table tbody td {
    padding: 0.6rem 0.75rem;
    border-top: 1px solid var(--border);
    vertical-align: middle;
}
.data-table tr.row-expired { background-color: var(--row-expired); }
.data-table tr.row-7d      { background-color: var(--row-7d); }
.data-table tr.row-30d     { background-color: var(--row-30d); }

/* --------- Count chips --------- */
.chip-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.85rem;
    color: var(--text-2);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s;
}
.chip:hover { border-color: var(--brand-navy); color: var(--brand-navy); text-decoration: none; }
.chip.active {
    background: var(--brand-navy);
    color: #fff;
    border-color: var(--brand-navy);
}
.chip .count {
    background: rgba(255,255,255,0.2);
    padding: 0 0.4rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.75rem;
}
.chip:not(.active) .count {
    background: var(--brand-bg);
    color: var(--brand-navy);
}

/* --------- Apply step progress bar --------- */
.apply-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    margin: 0 auto 0.5rem;
    max-width: 560px;
}
.apply-step { display: flex; flex-direction: column; align-items: center; gap: 0.35rem; }
.apply-step-dot {
    width: 32px; height: 32px;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: #fff;
    border: 2px solid var(--border);
    color: var(--muted);
    font-weight: 600; font-size: 0.85rem;
}
.apply-step.active .apply-step-dot { border-color: var(--brand-navy); color: var(--brand-navy); }
.apply-step.done .apply-step-dot { background: var(--brand-navy); border-color: var(--brand-navy); color: #fff; }
.apply-step-label { font-size: 0.75rem; color: var(--muted); }
.apply-step.active .apply-step-label,
.apply-step.done .apply-step-label { color: var(--brand-navy); font-weight: 600; }
.apply-step-bar { flex: 1; height: 2px; background: var(--border); margin: 0 0.25rem 1.1rem; min-width: 24px; }
.apply-step-bar.done { background: var(--brand-navy); }

/* --------- File upload drop zone --------- */
.upload-zone {
    border: 1.5px dashed var(--border);
    border-radius: 8px;
    padding: 0.55rem 0.75rem;
    background: var(--brand-bg);
    transition: border-color 0.15s, background 0.15s;
}
.upload-zone:hover,
.upload-zone:focus {
    border-color: var(--brand-blue);
    background: #fff;
}

/* --------- How-it-works step number --------- */
.step-num {
    width: 40px; height: 40px;
    margin: 0 auto;
    border-radius: 50%;
    background: var(--brand-navy);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
}

/* --------- Contact map placeholder --------- */
.map-placeholder {
    border: 1px dashed var(--border);
    border-radius: 8px;
    height: 160px;
    display: flex; align-items: center; justify-content: center;
    gap: 0.5rem;
    color: var(--muted);
    background: var(--brand-bg);
    font-size: 0.9rem;
}

/* --------- Product comparison table --------- */
.product-table { overflow-x: auto; }
.product-table table { min-width: 640px; }
.product-table .mrp { font-size: 0.85rem; }

/* --------- Portal stat cards --------- */
.stat-card {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem 1.1rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.stat-card:hover { border-color: var(--brand-navy); box-shadow: 0 4px 16px rgba(11,36,71,0.08); }
.stat-icon {
    width: 42px; height: 42px;
    border-radius: 10px;
    background: var(--brand-bg);
    color: var(--brand-navy);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
}
.stat-value { font-size: 1.5rem; font-weight: 700; line-height: 1; color: var(--brand-navy); }
.stat-label { font-size: 0.8rem; color: var(--muted); }
/* Icon accents: warning = action-required, info = informational (e.g. In Progress) */
.stat-icon-warning { background: #fff4e0; color: #b26a00; }
.stat-icon-info { background: #e6f1fb; color: #19376d; }

/* --------- Clickable table rows --------- */
.data-table tr.clickable { cursor: pointer; }
.data-table tr.clickable:hover { background: var(--brand-bg); }

/* Per-column search row sits just below the sticky header row */
.data-table thead tr.search-row th {
    top: 41px;
    padding: 0.3rem 0.5rem;
    background: #fff;
    text-transform: none;
}

/* --------- Wallet --------- */
.wallet-balance {
    background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-navy-2) 100%);
    color: #fff;
    border-radius: 12px;
    padding: 1.5rem 1.75rem;
}
.wallet-balance .text-muted { color: rgba(255,255,255,0.7) !important; }

/* --------- Status history timeline --------- */
.timeline li { border-left: 2px solid var(--border); padding-left: 0.9rem; }

/* --------- Impersonation banner (cannot be hidden) --------- */
.impersonation-bar {
    position: sticky;
    top: 0;
    z-index: 9999;
    background: #b91c1c;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}
.impersonation-bar a { color: #fff; }

/* --------- Responsive --------- */
@media (max-width: 768px) {
    .app-shell { grid-template-columns: 1fr; }
    .app-sidebar { display: none; }
    .apply-step-label { display: none; }
}

/* Phase 9.7 — professional service-directory cards (home + /dsc-types).
   Neutral, restrained B2B aesthetic. Whole card is a stretched link to the
   hub; the Apply pill sits above it (z-index) as an independent link. */
.service-card {
    display: flex;
    flex-direction: column;
    position: relative;
    height: 100%;
    min-height: 110px;
    padding: 16px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.2s ease;
}
.service-card:hover {
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
.service-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
    margin-bottom: 12px;
    background: var(--icon-bg, rgba(11, 36, 71, 0.06));
    color: var(--icon-fg, var(--brand-navy));
}
.service-card__icon--tax       { --icon-fg: #4f46e5; --icon-bg: rgba(79, 70, 229, 0.18); }
.service-card__icon--company   { --icon-fg: #059669; --icon-bg: rgba(5, 150, 105, 0.18); }
.service-card__icon--nonprofit { --icon-fg: #e11d48; --icon-bg: rgba(225, 29, 72, 0.18); }
.service-card__icon--license   { --icon-fg: #d97706; --icon-bg: rgba(217, 119, 6, 0.18); }
.service-card__icon--employer  { --icon-fg: #0284c7; --icon-bg: rgba(2, 132, 199, 0.18); }
.service-card__icon--tender    { --icon-fg: #7c3aed; --icon-bg: rgba(124, 58, 237, 0.18); }
.service-card__title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #111827;
}
.service-card__title a { color: inherit; text-decoration: none; }
.service-card__title a:hover { color: inherit; text-decoration: none; }
.service-card__subtitle {
    margin-top: 3px;
    font-size: 12.5px;
    font-weight: 400;
    color: var(--muted);
}
.service-card__spacer { flex-grow: 1; min-height: 8px; }
.service-card__apply {
    align-self: flex-end;
    position: relative;
    z-index: 2;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 500;
    color: var(--brand-navy);
    background: transparent;
    border: 1px solid var(--brand-navy);
    border-radius: 999px;
    text-decoration: none;
    transition: background-color 0.15s ease;
}
.service-card__apply:hover {
    background: rgba(11, 36, 71, 0.06);
    color: var(--brand-navy);
    text-decoration: none;
}
@media (max-width: 767.98px) {
    .service-card { padding: 12px; }
}

/* Rich variant — home "Popular DSC Services" only (emaster.in-style).
   The base .service-card stays compact for the dsc-types directory. */
.service-card--rich {
    min-height: 200px;
    padding: 20px;
}
.service-card--rich:hover {
    border-color: #94a3b8;
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(11, 36, 71, 0.12);
}
.service-card--rich .service-card__icon {
    width: 56px;
    height: 56px;
    font-size: 26px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 12px;
}
.service-card--rich .service-card__title {
    font-size: 17.5px;
    text-align: center;
    margin-bottom: 8px;
}
.service-card--rich .service-card__subtitle {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
    color: #475569;
}
.service-card--rich .service-card__spacer { min-height: 16px; }
.service-card--rich .service-card__apply {
    align-self: stretch;
    text-align: center;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    background: var(--brand-navy);
    border: 1px solid var(--brand-navy);
    border-radius: 8px;
    transition: background-color 0.15s ease, transform 0.15s ease;
}
.service-card--rich .service-card__apply:hover {
    background: #081a35;
    border-color: #081a35;
    color: #ffffff;
    transform: translateY(-1px);
}
