/* =============================================================================
   TalentVelo - Desktop layout (update 15)
   -----------------------------------------------------------------------------
   Loaded AFTER talentvelo.css and talentvelo-extra.css by the pages login, dashboard and admin.
   It only changes how these pages are arranged on a desktop screen, so they fit on ONE screen as far as possible:

     1. Sign-in pages (candidate, recruiter, administrator)  - three columns without empty gaps, compact card
     2. Candidate dashboard                                  - profile + mobile number on the left, cards in pairs on the right
     3. Administrator page                                   - compact overview, equal-height live cards, scrolling user table
     4. Small shared pieces (mobile number row, status tiles)

   Phones and tablets (below 1101 px) keep the existing responsive layout; nothing here changes them, except
   that the theme button sits in the same row as the portal tabs on wide screens only.
   Every rule that changes the look of a whole page is scoped to  body.tv-desk  (set by the three pages).
   ============================================================================= */

/* ---------- 4. shared pieces (all screen sizes) ---------- */

/* Several cards side by side on desktop, stacked on small screens */
.tv-duo { display: flex; flex-direction: column; gap: 24px; min-width: 0; }

/* Row with the portal tabs and the theme button */
.tv-auth-head { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.tv-auth-head .tv-portal-tabs, .tv-auth-head .tv-back-row { flex: 1; min-width: 0; margin-bottom: 0; }
.tv-auth-head .tv-icon-btn { flex: none; margin: 0; }
@media (max-width: 820px) {           /* phones keep the old order: theme button on top, tabs below */
    .tv-auth-head { flex-direction: column-reverse; align-items: stretch; gap: 8px; margin-bottom: 0; }
    .tv-auth-head .tv-icon-btn { align-self: flex-end; }
    .tv-auth-head .tv-portal-tabs { margin-bottom: 22px; }
    .tv-auth-head .tv-back-row { margin-bottom: 14px; }
}

/* Mobile number inside the profile card */
.tv-mob-val { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px 8px; }
.tv-mob-val b { font-weight: 700; }
.tv-mob-val .tv-mob-badge { padding: 2px 10px; font-size: 11px; font-weight: 800; border-radius: 999px; border: 1px solid; }
.tv-mob-val .tv-mob-badge.ok    { color: #22C55E; background: rgba(34, 197, 94, 0.14); border-color: rgba(34, 197, 94, 0.45); }
.tv-mob-val .tv-mob-badge.warn  { color: #F59E0B; background: rgba(245, 158, 11, 0.14); border-color: rgba(245, 158, 11, 0.5); }
.tv-mob-val .tv-mob-badge.muted { color: #94A3B8; background: rgba(148, 163, 184, 0.14); border-color: rgba(148, 163, 184, 0.45); }
[data-theme="light"] .tv-mob-val .tv-mob-badge.ok   { color: #15803D; }
[data-theme="light"] .tv-mob-val .tv-mob-badge.warn { color: #B45309; }
.tv-mob-tools { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
.tv-mob-tools form { margin: 0; }
.tv-mob-edit { display: none; width: 100%; margin-top: 10px; padding: 12px; background: var(--tv-surface-2); border: 1px solid var(--tv-border); border-radius: 12px; text-align: left; }
.tv-mob-edit.open { display: block; }
.tv-mob-edit .tv-field { margin-bottom: 8px; }
.tv-mob-edit .tv-hint { display: block; margin-top: 6px; }

/* Status tiles of the candidate (applications, in review, interviews, offers) */
.tv-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tv-kpi { display: flex; align-items: center; gap: 12px; padding: 12px 14px; color: inherit; text-decoration: none; background: var(--tv-surface); border: 1px solid var(--tv-border); border-radius: 14px; min-width: 0; transition: border-color 0.2s; }
.tv-kpi:hover { border-color: var(--tv-primary); }
.tv-kpi i { flex: none; width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-size: 18px; background: rgba(59, 130, 246, 0.14); border-radius: 11px; }
.tv-kpi strong { display: block; font-size: 22px; font-weight: 800; line-height: 1.1; }
.tv-kpi span { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase; color: var(--tv-muted); }
.tv-kpi.hot { border-color: rgba(168, 85, 247, 0.55); }
.tv-kpi.good { border-color: rgba(34, 197, 94, 0.55); }
@media (max-width: 720px) { .tv-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* the label of a detail row never wraps ("Mobile No."), the value may */
.tv-detail-row { align-items: flex-start; }
.tv-detail-row > span:first-child { white-space: nowrap; }
.tv-session-strip .tv-detail-row { align-items: center; }

/* ---------- 1. sign-in pages: wide desktop (the two side panels are visible) ---------- */
@media (min-width: 1291px) {
    body.tv-auth-body { padding: 14px 24px; }
    .tv-auth-stage { max-width: 1500px; gap: 18px; grid-template-columns: minmax(230px, 290px) minmax(780px, 980px) minmax(230px, 290px); }
    .tv-auth-stage-solo { grid-template-columns: minmax(0, 980px); }
    .tv-auth-stage .tv-auth { min-height: 0; border-radius: 22px; }

}
/* the card itself (also on a medium desktop without side panels) */
@media (min-width: 821px) {
    /* left half of the card: brand on top, message in the middle, slogan at the bottom - no empty block */
    .tv-auth-hero { padding: 30px 34px; gap: 16px; }
    .tv-hero-copy { margin: auto 0; }
    .tv-hero-copy h1 { font-size: 28px; margin-bottom: 10px; }
    .tv-hero-copy p { font-size: 14px; line-height: 1.55; }
    .tv-hero-list { gap: 9px; margin-top: 16px; }

    /* right half of the card: the form fills the height evenly */
    .tv-auth-form { padding: 22px 34px; justify-content: center; }
    .tv-auth-head { margin-bottom: 14px; }
    .tv-auth-form h2 { font-size: 22px; margin-bottom: 4px; }
    .tv-auth-form .tv-lead { margin-bottom: 12px; }
    .tv-auth-form .tv-field { margin-bottom: 11px; }
    .tv-auth-form .tv-field input:not([type="checkbox"]) { padding: 10px 14px; }
    .tv-auth-links { margin: -2px 0 12px; }
    .tv-or { margin: 10px 0 8px; }
    .tv-auth-foot { margin-top: 10px; }
    .tv-connect { margin-top: 12px; padding-top: 10px; flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 8px 12px; }
    .tv-connect-label { width: 100%; text-align: center; }
    .tv-connect .tv-social { width: 32px; height: 32px; }
    .tv-connect .tv-social svg { width: 16px; height: 16px; }
    .tv-connect .tv-wa-btn { padding: 6px 14px; font-size: 12.5px; }
    .tv-auth-copy { margin-top: 10px; }
}
@media (min-width: 1291px) {
    /* side panels: compact cards, spread over the full height (no empty block above the first card) */
    .tv-side { justify-content: space-between; gap: 12px; }
    .tv-side-card { padding: 14px 16px; border-radius: 16px; }
    .tv-side-title { margin-bottom: 10px; }
    .tv-hello-title { font-size: 17px; }
    .tv-hello-clock { font-size: 26px; }
    .tv-why { gap: 9px; }
    .tv-tip { min-height: 0; }
    .tv-faq dt { margin-top: 9px; }
    .tv-steps { gap: 9px; }
    .tv-side-jobs { gap: 8px; }
    .tv-side-job { padding: 8px 10px; }
    .tv-say { padding: 8px 10px; margin-bottom: 8px; }
    .tv-say p { -webkit-line-clamp: 3; }
}
/* The side panels are shortened step by step when the window is not tall enough, so that the page fits on one screen:
     below 1160 px  the "Roles" card is hidden            below 1000 px  only two openings are listed
     below  880 px  the "Frequently asked" card is hidden  below  820 px  the testimonial is hidden too
     below  620 px  the quick tip is hidden               (heights are the height of the browser window area) */
@media (min-width: 1291px) and (max-height: 1159px) {
    .tv-side-card:has(.tv-chip-row) { display: none; }
}
@media (min-width: 1291px) and (max-height: 999px) {
    .tv-side-job:nth-child(n+3) { display: none; }
    .tv-say:nth-of-type(n+2) { display: none; }
}
@media (min-width: 1291px) and (max-height: 879px) {
    .tv-side-card:has(.tv-faq) { display: none; }
}
@media (min-width: 1291px) and (max-height: 819px) {
    .tv-side-card:has(.tv-say) { display: none; }
}
@media (min-width: 821px) and (max-height: 760px) {          /* 1366 x 768 laptops: the card itself becomes more compact */
    .tv-hero-badges { display: none; }
    .tv-auth-hero { padding: 24px 30px; }
    .tv-hero-copy h1 { font-size: 26px; margin-bottom: 8px; }
    .tv-hero-list { margin-top: 12px; gap: 7px; }
    .tv-auth-form { padding: 14px 32px; }
    .tv-auth-head { margin-bottom: 10px; }
    .tv-auth-form h2 { font-size: 20px; margin-bottom: 2px; }
    .tv-auth-form .tv-lead { margin-bottom: 8px; font-size: 13px; }
    .tv-auth-form .tv-field { margin-bottom: 8px; gap: 4px; }
    .tv-auth-form .tv-field input:not([type="checkbox"]) { padding: 8px 12px; }
    .tv-auth-links { margin: -2px 0 8px; }
    .tv-or { margin: 8px 0 6px; }
    .tv-auth-foot { margin-top: 6px; }
    .tv-connect { margin-top: 8px; padding-top: 8px; }
    .tv-connect-label { display: none; }
    .tv-auth-copy { margin-top: 6px; }
    body.tv-auth-body { padding-top: 10px; padding-bottom: 10px; }
}
@media (min-width: 1291px) and (max-height: 619px) {
    .tv-side-card:has(.tv-tip) { display: none; }
}
/* medium desktop and tablet landscape (no side panels): the card is not taller than needed */
@media (min-width: 821px) and (max-width: 1290px) {
    .tv-auth-stage .tv-auth { min-height: 0; }
    .tv-hero-copy { margin: auto 0; }
    .tv-auth-hero { gap: 16px; }
}

/* ---------- 2. candidate dashboard ---------- */
@media (min-width: 1101px) {
    body.tv-desk .tv-main { max-width: 1240px; width: 100%; margin: 0 auto; padding: 20px 24px 40px; gap: 18px; box-sizing: border-box; }
    body.tv-desk .tv-grid-2 { grid-template-columns: 330px minmax(0, 1fr); gap: 16px; }
    body.tv-desk .tv-col { gap: 16px; }
    body.tv-desk .tv-card { padding: 16px 18px; }
    body.tv-desk .tv-card-title { margin-bottom: 10px; font-size: 15px; }
    body.tv-desk .tv-card-head { margin-bottom: 10px; }

    body.tv-desk .tv-profile-card { padding: 20px 18px; }
    body.tv-desk .tv-profile-card .tv-avatar { width: 78px; height: 78px; margin-bottom: 10px; font-size: 26px; }
    body.tv-desk .tv-profile-card h2 { font-size: 19px; }
    body.tv-desk .tv-profile-card .tv-role-line { margin-bottom: 8px; }
    body.tv-desk .tv-session-pill { margin-bottom: 12px; }
    body.tv-desk .tv-details { gap: 10px; padding-top: 12px; font-size: 13px; }
    body.tv-desk .tv-edit-btn { top: 12px; right: 12px; width: 34px; height: 34px; }
    body.tv-desk .tv-progress { margin-bottom: 10px; height: 8px; }
    /* session activity as one slim row of four values */
    body.tv-desk .tv-session-strip { padding: 12px 18px; }
    body.tv-desk .tv-session-strip .tv-card-title { margin-bottom: 8px; }
    body.tv-desk .tv-session-strip .tv-details { flex-direction: row; flex-wrap: wrap; gap: 8px 32px; }
    body.tv-desk .tv-session-strip .tv-detail-row { flex-direction: column; align-items: flex-start; gap: 0; }
    body.tv-desk .tv-session-strip .tv-detail-row span:last-child { text-align: left; }

    /* cards in pairs on the right */
    .tv-duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
    .tv-duo > .tv-card { display: flex; flex-direction: column; }
    body.tv-desk .tv-job-list { gap: 8px; }
    body.tv-desk .tv-job-row { padding: 10px 12px; gap: 10px; }
    body.tv-desk .tv-job-main h4 { font-size: 14.5px; margin-bottom: 2px; }
    body.tv-desk .tv-job-meta { margin-bottom: 4px; font-size: 12px; }
    body.tv-desk .tv-job-desc { display: none; }
    body.tv-desk .tv-job-tags { margin-bottom: 3px; }
    body.tv-desk .tv-job-row .tv-chip-row { gap: 4px; }
    body.tv-desk .tv-badge-match { padding: 4px 10px; font-size: 11.5px; }
    .tv-duo .tv-job-list > :nth-child(n+4) { display: none; }       /* three rows per card are enough on the dashboard */
    body.tv-desk .tv-empty { padding: 18px; font-size: 13px; }
}

/* ---------- 3. administrator page ---------- */
@media (min-width: 1101px) {
    body.tv-desk .tv-welcome { padding: 14px 24px; border-radius: 16px; }
    body.tv-desk .tv-welcome h1 { font-size: 20px; margin-bottom: 2px; }
    body.tv-desk .tv-welcome p { font-size: 13px; }
    body.tv-desk .tv-stats { gap: 12px; }
    body.tv-desk .tv-stat { padding: 12px 16px; gap: 12px; border-radius: 14px; }
    body.tv-desk .tv-stat-icon { width: 40px; height: 40px; font-size: 19px; border-radius: 12px; }
    body.tv-desk .tv-stat p { font-size: 18px; }

    /* live cards: same height, database card on the left, the six metrics in three columns on the right */
    body.tv-desk .tv-grid-telemetry { grid-template-columns: minmax(300px, 360px) minmax(0, 1fr); gap: 16px; align-items: stretch; }
    body.tv-desk .tv-grid-telemetry > .tv-card { display: flex; flex-direction: column; }
    body.tv-desk .tv-grid-telemetry .tv-lead { margin-bottom: 10px; font-size: 12.5px; }
    body.tv-desk .tv-grid-telemetry > .tv-card:first-child .tv-health { flex: 1; margin-bottom: 8px; }
    body.tv-desk .tv-grid-telemetry > .tv-card:first-child .tv-health:last-child { margin-bottom: 0; }
    body.tv-desk .tv-health { padding: 10px 14px; }
    body.tv-desk .tv-metric-grid { flex: 1; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
    body.tv-desk .tv-metric { display: flex; flex-direction: column; justify-content: center; padding: 10px; }
    body.tv-desk .tv-updated { margin-top: 8px; }

    /* user table: scrolls inside its card, so the page itself stays short */
    body.tv-desk .tv-card .tv-table-wrap { max-height: none; overflow: auto; border: 1px solid var(--tv-border); border-radius: 12px; }
    body.tv-desk .tv-table th { position: sticky; top: 0; z-index: 1; padding: 9px 14px; }
    body.tv-desk .tv-table td { padding: 8px 14px; }
}

/* === TV-2026-DS-DESKTOP-SYNC === */
@media (min-width: 1024px) {
    body.tv-desk .tv-main {
        padding-top: 22px;
        gap: 16px;
    }
    body.tv-desk .tv-card {
        border-radius: 14px;
        padding: 16px 18px;
        border: 1px solid var(--tv-border, #E2E8F0);
    }
    body.tv-desk .tv-grid-2,
    body.tv-desk .tv-col,
    body.tv-desk .tv-duo,
    body.tv-desk .tv-grid-telemetry {
        gap: 16px;
    }
}
/* === END TV-2026-DS-DESKTOP-SYNC === */