/* ---------------------------------------------------------------
   CPD Portal — admin, applicant and auth surfaces.
   Overrides only; never edit tabler.min.css.

   Sizing note: Tabler expresses almost everything in rem against a
   16px root. Raising the root to 17px scales type AND spacing
   together, which is what "comfortable" actually means — bigger text
   in the same cramped box just looks worse. Everything below then
   adjusts hierarchy rather than raw size.
   --------------------------------------------------------------- */

html {
    font-size: 17px;
}

:root {
    --cpd-line: #e3e6e9;
    --cpd-surface: #ffffff;
    --cpd-canvas: #f6f7f9;

    /* Tabler's default secondary is too light against white at this size. */
    --tblr-secondary-color: #5d666f;
}

body {
    background-color: var(--cpd-canvas);
    line-height: 1.55;
}

/* ---------- Type scale -------------------------------------------------
   Real steps between levels. Previously everything sat within 2px of
   everything else, so nothing led the eye.
   ---------------------------------------------------------------------- */

h1, .h1 { font-size: 1.5rem;    font-weight: 600; letter-spacing: -0.01em; }
h2, .h2 { font-size: 1.3125rem; font-weight: 600; letter-spacing: -0.01em; }
h3, .h3 { font-size: 1.125rem;  font-weight: 600; }
h4, .h4 { font-size: 1rem;      font-weight: 600; }

.text-secondary { color: var(--tblr-secondary-color) !important; }

small, .small { font-size: 0.8125rem; }

/* ---------- Sidebar ---------- */

.navbar-vertical.navbar-expand-lg {
    background-color: var(--cpd-surface);
    border-right: 1px solid var(--cpd-line);
    box-shadow: none;
}

.navbar-vertical .navbar-brand {
    display: flex;
    align-items: center;
    padding: 1.375rem 1.125rem 1.125rem;
    height: auto;
}

.navbar-brand a {
    display: flex;
    align-items: center;
    gap: .6875rem;
    color: inherit;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.375rem;
    height: 2.375rem;
    border-radius: .5rem;
    background: var(--tblr-primary);
    color: #fff;
    font-weight: 700;
    font-size: .6875rem;
    letter-spacing: -.01em;
    flex: 0 0 auto;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: .9375rem; font-weight: 600; color: #15181c; }
.brand-text small  { font-size: .75rem; color: #858e97; }

.navbar-vertical .navbar-nav { padding: 0 .75rem; }

/* Section dividers keep the uppercase treatment — they are the only
   place it still earns its keep. */
.navbar-vertical .nav-heading {
    padding: 1.25rem .625rem .375rem;
    font-size: .6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: #9aa2aa;
}

.navbar-vertical .nav-link {
    border-radius: .5rem;
    padding: .625rem .75rem;
    margin-bottom: .125rem;
    font-size: .9375rem;
    color: #3f474f;
    transition: background-color .12s ease, color .12s ease;
}

.navbar-vertical .nav-link:hover { background-color: #f1f3f5; color: #15181c; }

.navbar-vertical .nav-item.active > .nav-link,
.navbar-vertical .nav-link.active {
    background-color: rgba(var(--tblr-primary-rgb), .09);
    color: var(--tblr-primary);
    font-weight: 600;
}

.navbar-vertical .nav-item.active > .nav-link .nav-link-icon { color: var(--tblr-primary); }

.navbar-vertical .nav-link-icon {
    font-size: 1.1875rem;
    opacity: 1;
    color: #949ca4;
    margin-right: .6875rem;
}

.navbar-vertical .nav-link.disabled { color: #c4c9ce; pointer-events: none; }
.navbar-vertical .nav-link.disabled .nav-link-icon { color: #d5d9dd; }

/* ---------- Page header ---------- */

.page-wrapper > .navbar {
    background-color: #fff;
    border-bottom: 1px solid var(--cpd-line);
    box-shadow: none;
    min-height: 4.5rem;
    padding-top: .75rem;
    padding-bottom: .75rem;
}

/* Sentence case, not uppercase micro-text. */
.page-header-inline .page-pretitle {
    font-size: .8125rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: #858e97;
    margin-bottom: .0625rem;
}

.page-header-inline .page-title {
    font-size: 1.375rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    margin: 0;
    color: #15181c;
}

.navbar .avatar { background: var(--tblr-primary); color: #fff; font-weight: 600; }

/* ---------- Page gutters ----------
   The fluid layout runs content flush to the edges. Real breathing room
   on both sides, growing with the viewport so a wide monitor does not
   stretch tables to the glass.
   ---------------------------------------------------------------- */

.page-wrapper > .navbar > .container-xl,
.page-body > .container-xl,
.page-wrapper > .footer > .container-xl {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    max-width: none;
}

@media (min-width: 992px) {
    .page-wrapper > .navbar > .container-xl,
    .page-body > .container-xl,
    .page-wrapper > .footer > .container-xl {
        padding-left: 2.25rem;
        padding-right: 2.25rem;
    }
}

@media (min-width: 1600px) {
    .page-wrapper > .navbar > .container-xl,
    .page-body > .container-xl,
    .page-wrapper > .footer > .container-xl {
        padding-left: 3.5rem;
        padding-right: 3.5rem;
    }
}

/* ---------- Content ---------- */

.page-body { margin-top: 1.75rem; }

.card {
    border: 1px solid var(--cpd-line);
    border-radius: .75rem;
    box-shadow: 0 1px 2px rgba(16, 20, 24, .03);
}

.card-header {
    border-bottom: 1px solid var(--cpd-line);
    min-height: 3.75rem;
    padding: 1rem 1.25rem;
}

.card-title { font-size: 1.0625rem; font-weight: 600; }

.card-body { padding: 1.25rem; }
.card-footer { padding: 1rem 1.25rem; }

/* ---------- Tables ----------
   Sentence-case headers and taller rows. The old 12px uppercase
   headers read as decoration rather than as column names.
   ---------------------------------------------------------------- */

.table { font-size: .9375rem; }

.table thead th {
    font-size: .8125rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    color: #6b747d;
    padding-top: .875rem;
    padding-bottom: .875rem;
    background: #fbfcfd;
}

.table tbody td {
    padding-top: .9375rem;
    padding-bottom: .9375rem;
    vertical-align: middle;
}

.table tbody tr:hover { background-color: #fafbfc; }

.card-table tbody td:first-child,
.card-table thead th:first-child { padding-left: 1.25rem; }

.card-table tbody td:last-child,
.card-table thead th:last-child { padding-right: 1.25rem; }

/* ---------- Forms ---------- */

.form-label {
    font-size: .9375rem;
    font-weight: 500;
    margin-bottom: .375rem;
    color: #2b3138;
}

.form-control, .form-select {
    font-size: .9375rem;
    padding-top: .5rem;
    padding-bottom: .5rem;
}

.form-control-sm, .form-select-sm { font-size: .875rem; }

.form-hint {
    font-size: .8125rem;
    color: #7a838c;
    margin-top: .3125rem;
}

.form-check-label { font-size: .9375rem; }

/* ---------- Buttons, badges ---------- */

.btn { font-size: .9375rem; padding: .5rem .875rem; font-weight: 500; }
.btn-sm { font-size: .875rem; padding: .375rem .625rem; }

.badge { font-size: .75rem; font-weight: 600; padding: .3125rem .5rem; }

/* ---------- Alerts & empty states ---------- */

.alert { font-size: .9375rem; border-radius: .625rem; padding: 1rem 1.125rem; }

.empty-title { font-size: 1.0625rem; }
.empty-subtitle { font-size: .9375rem; }

/* ---------- Timeline ---------- */

.timeline-event-card .card-body { padding: .875rem 1.125rem; }

/* ---------- Footer ---------- */

.footer { font-size: .875rem; padding-top: 1.5rem; padding-bottom: 1.5rem; }
/* ---------------------------------------------------------------
   Dashboard tiles
   --------------------------------------------------------------- */

.card-link {
    text-decoration: none;
    color: inherit;
    transition: border-color .12s ease, box-shadow .12s ease, transform .12s ease;
}

.card-link:hover {
    border-color: rgba(var(--tblr-primary-rgb), .4);
    box-shadow: 0 4px 14px rgba(16, 20, 24, .07);
    transform: translateY(-1px);
    color: inherit;
}

/* Nothing to do should look like nothing to do, not like an alert. */
.card-link.is-idle { background: #fcfcfd; }
.card-link.is-idle:hover { transform: none; box-shadow: none; }

.tile-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: .625rem;
    flex: 0 0 auto;
}

.tile-icon i { font-size: 1.375rem; }

.tile-value {
    font-size: 1.75rem;
    font-weight: 650;
    line-height: 1.1;
    color: #15181c;
}

/* ---------------------------------------------------------------
   Event edit — tabs, people lists, form sections
   --------------------------------------------------------------- */

.nav-tabs .nav-link { font-size: .9375rem; padding: .75rem 1rem; }

/* An outstanding requirement on a tab, using the same logic that gates
   Submit — so you see it before you try, not after. */
.tab-dot {
    display: inline-block;
    width: .4375rem;
    height: .4375rem;
    border-radius: 999px;
    background: #f59f00;
    margin-left: .3125rem;
    vertical-align: middle;
}

/* ---------- People lists ---------- */

.people-col { height: 100%; }

.people-head { margin-bottom: .875rem; }
.people-head h4 { margin-bottom: .125rem; }

.people-list { display: flex; flex-direction: column; gap: .375rem; }

.person-row {
    display: flex;
    align-items: center;
    gap: .625rem;
    padding: .5rem .625rem;
    border: 1px solid var(--cpd-line);
    border-radius: .5rem;
    background: #fff;
}

.person-order {
    flex: 0 0 1.25rem;
    font-size: .8125rem;
    font-weight: 600;
    color: #aab1b8;
    text-align: right;
}

.person-main { flex: 1 1 auto; min-width: 0; }

.person-tag {
    flex: 0 0 auto;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .02em;
    color: #6b747d;
    background: #f3f5f7;
    border-radius: .375rem;
    padding: .25rem .5rem;
    cursor: default;
}

.empty-line {
    padding: .875rem 0;
    color: #7a838c;
    font-size: .9375rem;
}

.person-name {
    font-size: .9375rem;
    font-weight: 500;
    color: #15181c;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.person-meta {
    font-size: .8125rem;
    color: #7a838c;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.person-role { flex: 0 0 11rem; }

.person-actions { display: flex; gap: .125rem; flex: 0 0 auto; }
.person-actions .btn { padding: .25rem .375rem; }

@media (max-width: 575px) {
    .person-row { flex-wrap: wrap; }
    .person-role { flex: 1 1 100%; }
}

/* ---------- Grouped form sections ---------- */

.form-section {
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--cpd-line);
}

.form-section-last { padding-bottom: 0; margin-bottom: 0; border-bottom: 0; }

.form-section-head { margin-bottom: 1rem; }

.form-section-head h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: .125rem;
    color: #15181c;
}

.form-section-head p {
    font-size: .8125rem;
    color: #7a838c;
    margin-bottom: 0;
}

/* ---------------------------------------------------------------
   Session calendar
   --------------------------------------------------------------- */

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    border-top: 1px solid var(--cpd-sidebar-border);
}

.cal-head {
    padding: .5rem .625rem;
    font-size: .6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #8a9199;
    background: #fbfcfc;
    border-bottom: 1px solid var(--cpd-sidebar-border);
    border-right: 1px solid var(--cpd-sidebar-border);
}

.cal-head:nth-child(7n) { border-right: 0; }

.cal-cell {
    min-height: 7.5rem;
    padding: .375rem;
    border-bottom: 1px solid var(--cpd-sidebar-border);
    border-right: 1px solid var(--cpd-sidebar-border);
    background: #fff;
}

.cal-cell:nth-child(7n) { border-right: 0; }

.cal-cell.is-outside { background: #fafbfb; }
.cal-cell.is-outside .cal-date { color: #c2c7cc; }

.cal-cell.is-today { background: rgba(var(--tblr-primary-rgb), .04); }

.cal-cell.is-today .cal-date {
    background: var(--tblr-primary);
    color: #fff;
    border-radius: 999px;
    width: 1.5rem;
    height: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cal-date {
    font-size: .8125rem;
    font-weight: 600;
    color: #4a5158;
    margin-bottom: .25rem;
}

.cal-item {
    display: block;
    font-size: .75rem;
    line-height: 1.3;
    padding: .1875rem .375rem;
    margin-bottom: .125rem;
    border-radius: 4px;
    background: rgba(var(--tblr-primary-rgb), .1);
    color: #1a1d21;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-left: 2px solid var(--tblr-primary);
}

.cal-item:hover { background: rgba(var(--tblr-primary-rgb), .2); color: #000; }

.cal-item.is-clash {
    background: rgba(245, 159, 0, .14);
    border-left-color: #f59f00;
}

.cal-item.is-clash:hover { background: rgba(245, 159, 0, .26); }

.cal-time {
    font-weight: 600;
    color: #5a636c;
    margin-right: .25rem;
}

.cal-more {
    font-size: .6875rem;
    color: #8a9199;
    padding: .125rem .375rem;
}

@media (max-width: 768px) {
    .cal-cell { min-height: 5rem; }
    .cal-item { font-size: .6875rem; }
    .cal-time { display: none; }
}
