/* =====================================================================
   TimeTracking page styles: sign-in, connection status, notices,
   lookups (two-pane lists), empty states, toasts.
   Uses tokens from theme.css; light and dark themes.
   ===================================================================== */

/* Signed-in status dot */
.tt-status-dot--online { background: #22C55E; box-shadow: 0 0 0 3px rgba(34, 197, 94, .18); }

/* Notice variants */
.tt-notice--warning { background: #FFFBEB; border-color: #FDE68A; color: #92400E; }
.tt-notice--warning i { background: #FEF3C7; color: #B45309; }
.tt-notice--danger { background: #FEF2F2; border-color: #FECACA; color: #991B1B; }
.tt-notice--danger i { background: #FEE2E2; color: #B91C1C; }
:root[data-theme="dark"] .tt-notice--warning { background: rgba(245, 158, 11, .10); border-color: rgba(245, 158, 11, .35); color: #FCD34D; }
:root[data-theme="dark"] .tt-notice--warning i { background: rgba(245, 158, 11, .18); color: #FBBF24; }
:root[data-theme="dark"] .tt-notice--danger { background: rgba(239, 68, 68, .10); border-color: rgba(239, 68, 68, .35); color: #FCA5A5; }
:root[data-theme="dark"] .tt-notice--danger i { background: rgba(239, 68, 68, .18); color: #F87171; }

/* PMO connection strip (dashboard) */
.tt-connection {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    margin-bottom: 14px;
    font-size: var(--tt-fs-sm);
    color: var(--tt-fg-muted);
}
.tt-connection b { color: var(--tt-fg); font-weight: 700; }
.tt-connection-dot { width: 8px; height: 8px; border-radius: 50%; background: #22C55E; box-shadow: 0 0 0 3px rgba(34, 197, 94, .18); }
.tt-connection.is-warning .tt-connection-dot { background: #F59E0B; box-shadow: 0 0 0 3px rgba(245, 158, 11, .2); }
.tt-connection-note { color: var(--tt-warning); font-weight: 600; }
.tt-env {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--tt-primary-tint);
    color: var(--tt-link);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

/* Empty state */
.tt-empty-state { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 48px 24px; text-align: center; }
.tt-empty-state h2 { margin: 6px 0 0; font-size: var(--tt-fs-lg); font-weight: 700; color: var(--tt-fg); }
.tt-empty-state p { max-width: 460px; margin: 0 0 8px; color: var(--tt-fg-muted); }
.tt-empty-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: var(--tt-primary-tint);
    color: var(--tt-link);
    font-size: 26px;
}

/* Two-pane page (list of lists + grid) */
.tt-split { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 991.98px) { .tt-split { grid-template-columns: 1fr; } }
.tt-typelist { position: sticky; top: calc(var(--tt-header-h) + 16px); }
@media (max-width: 991.98px) { .tt-typelist { position: static; } }
.tt-typelist-search { position: relative; padding: 12px 14px 6px; }
.tt-typelist-search input {
    width: 100%;
    height: 36px;
    padding: 0 12px 0 34px;
    border: 1px solid var(--tt-border);
    border-radius: var(--tt-radius-sm);
    background: var(--tt-surface-muted);
    color: var(--tt-fg);
    font-size: var(--tt-fs-sm);
}
.tt-typelist-search input:focus { outline: none; border-color: var(--tt-primary-bright); box-shadow: 0 0 0 4px var(--tt-ring); background: var(--tt-surface); }
.tt-typelist-search i { position: absolute; left: 26px; top: 23px; font-size: 12px; color: var(--tt-fg-subtle); }
.tt-typelist-items { list-style: none; margin: 0; padding: 6px 8px 10px; max-height: calc(100vh - 260px); overflow-y: auto; }
.tt-typelist-items a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 38px;
    padding: 0 10px;
    border-radius: var(--tt-radius-sm);
    color: var(--tt-fg-muted);
    font-size: var(--tt-fs-sm);
    font-weight: 500;
    text-decoration: none;
    transition: background-color var(--tt-fast) var(--tt-ease), color var(--tt-fast) var(--tt-ease);
}
.tt-typelist-items a:hover { background: var(--tt-surface-muted); color: var(--tt-fg); }
.tt-typelist-items a.is-active { background: var(--tt-primary-tint); color: var(--tt-link); font-weight: 700; }
.tt-count {
    min-width: 26px;
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--tt-surface-muted);
    border: 1px solid var(--tt-border);
    color: var(--tt-fg-subtle);
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    font-variant-numeric: tabular-nums;
}
.tt-typelist-items a.is-active .tt-count { background: var(--tt-primary); border-color: var(--tt-primary); color: #fff; }
.tt-card-sub .tt-badge { vertical-align: 1px; }

/* Toasts (tt.notify) */
.tt-toasts { position: fixed; right: 20px; bottom: 20px; z-index: 2000; display: flex; flex-direction: column; gap: 10px; max-width: min(420px, calc(100vw - 40px)); }
.tt-toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--tt-border);
    border-left: 4px solid var(--tt-primary);
    border-radius: var(--tt-radius);
    background: var(--tt-surface);
    box-shadow: var(--tt-shadow-pop);
    color: var(--tt-fg);
    font-size: var(--tt-fs-sm);
    white-space: pre-line;
    animation: tt-toast-in 220ms var(--tt-ease) both;
}
.tt-toast > i { margin-top: 2px; color: var(--tt-primary); }
.tt-toast--error { border-left-color: #DC2626; }
.tt-toast--error > i { color: #DC2626; }
.tt-toast--success { border-left-color: #059669; }
.tt-toast--success > i { color: #059669; }
.tt-toast-close { margin-left: auto; border: 0; background: none; color: var(--tt-fg-subtle); cursor: pointer; padding: 0 2px; }
@keyframes tt-toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------------
   Sign-in page
   --------------------------------------------------------------------- */
.tt-auth { margin: 0; min-height: 100vh; background: var(--tt-bg); color: var(--tt-fg); font-family: var(--tt-font); }
.tt-auth-shell { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; }
@media (max-width: 991.98px) {
    .tt-auth-shell { grid-template-columns: 1fr; }
    .tt-auth-brand { display: none !important; }
}

.tt-auth-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 44px 56px;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(70% 50% at 100% 0%, rgba(79, 70, 229, .45) 0%, rgba(79, 70, 229, 0) 70%),
        radial-gradient(60% 50% at 0% 100%, rgba(37, 99, 235, .40) 0%, rgba(37, 99, 235, 0) 70%),
        linear-gradient(160deg, #0B1220 0%, #0F172A 55%, #111C3A 100%);
}
.tt-auth-brand::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px);
    background-size: 22px 22px;
    -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, .6), transparent 70%);
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, .6), transparent 70%);
    pointer-events: none;
}
.tt-auth-brand > * { position: relative; z-index: 1; }
.tt-auth-brand-top { display: flex; align-items: center; gap: 12px; font-size: 19px; font-weight: 500; }
.tt-auth-brand-top b, .tt-auth-mobile-brand b { font-weight: 800; }
.tt-auth-brand-body h2 { margin: 0 0 18px; font-size: clamp(28px, 3vw, 40px); font-weight: 800; line-height: 1.15; letter-spacing: -.02em; }
.tt-auth-brand-body p { max-width: 460px; margin: 0 0 28px; color: #CBD5E1; font-size: var(--tt-fs-md); line-height: 1.6; }
.tt-auth-points { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.tt-auth-points li { display: flex; align-items: center; gap: 12px; color: #E2E8F0; font-size: var(--tt-fs-base); font-weight: 500; }
.tt-auth-points i {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .12);
    color: #93C5FD;
    font-size: 14px;
}
.tt-auth-brand-foot { color: #94A3B8; font-size: var(--tt-fs-xs); }

.tt-auth-main { display: grid; place-items: center; padding: 40px 20px; }
.tt-auth-card { width: 100%; max-width: 420px; }
.tt-auth-mobile-brand { display: none; align-items: center; gap: 10px; margin-bottom: 28px; font-size: 18px; color: var(--tt-fg); }
.tt-auth-mobile-brand .tt-logo-mark { color: #fff; }
@media (max-width: 991.98px) { .tt-auth-mobile-brand { display: flex; } }
.tt-auth-title { margin: 0 0 6px; font-size: 28px; font-weight: 800; letter-spacing: -.02em; color: var(--tt-fg); }
.tt-auth-sub { margin: 0 0 26px; color: var(--tt-fg-muted); }

.tt-auth-alert {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
    padding: 12px 14px;
    border: 1px solid #FECACA;
    border-radius: var(--tt-radius);
    background: #FEF2F2;
    color: #991B1B;
    font-size: var(--tt-fs-sm);
}
.tt-auth-alert > i { margin-top: 2px; }
.tt-auth-alert a { display: inline-block; margin-top: 6px; color: #991B1B; font-weight: 700; }
:root[data-theme="dark"] .tt-auth-alert { background: rgba(239, 68, 68, .10); border-color: rgba(239, 68, 68, .35); color: #FCA5A5; }
:root[data-theme="dark"] .tt-auth-alert a { color: #FCA5A5; }

.tt-field { margin-bottom: 16px; }
.tt-field label { display: block; margin-bottom: 6px; font-size: var(--tt-fs-sm); font-weight: 600; color: var(--tt-fg); }
.tt-input-icon { position: relative; }
.tt-input-icon > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--tt-fg-subtle); font-size: 14px; pointer-events: none; }
.tt-input-icon input {
    width: 100%;
    height: 46px;
    padding: 0 44px 0 40px;
    border: 1px solid var(--tt-border-strong);
    border-radius: var(--tt-radius-sm);
    background: var(--tt-surface);
    color: var(--tt-fg);
    font-size: var(--tt-fs-base);
    box-shadow: var(--tt-shadow-sm);
    transition: border-color var(--tt-fast) var(--tt-ease), box-shadow var(--tt-fast) var(--tt-ease);
}
.tt-input-icon input::placeholder { color: var(--tt-fg-subtle); }
.tt-input-icon input:focus { outline: none; border-color: var(--tt-primary-bright); box-shadow: 0 0 0 4px var(--tt-ring); }
.tt-input-icon input.input-validation-error { border-color: #DC2626; }
.tt-reveal {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: var(--tt-radius-sm);
    background: transparent;
    color: var(--tt-fg-subtle);
    cursor: pointer;
}
.tt-reveal:hover { color: var(--tt-link); }
.tt-reveal:focus-visible { outline: 2px solid var(--tt-primary-bright); }
.tt-field-error { display: block; margin-top: 6px; color: #DC2626; font-size: var(--tt-fs-xs); font-weight: 600; }
.tt-field-error:empty { display: none; }
:root[data-theme="dark"] .tt-field-error { color: #F87171; }

.tt-check { display: flex; align-items: center; gap: 10px; margin: 4px 0 22px; color: var(--tt-fg-muted); font-size: var(--tt-fs-sm); cursor: pointer; }
.tt-check input { width: 18px; height: 18px; accent-color: var(--tt-primary); }

.tt-auth-submit { width: 100%; height: 48px; justify-content: center; gap: 10px; font-size: var(--tt-fs-md); }
.tt-auth-submit i { transition: transform var(--tt-fast) var(--tt-ease); }
.tt-auth-submit:hover i { transform: translateX(3px); }
.tt-auth-submit.is-busy { opacity: .8; cursor: progress; }
.tt-auth-help { display: flex; gap: 8px; margin: 22px 0 0; color: var(--tt-fg-subtle); font-size: var(--tt-fs-xs); }

/* Badge with its own icon instead of the status dot */
.tt-badge--icon::before { display: none; }
.tt-badge--icon i { font-size: 10px; }

/* Grid name column: keep short names on one line */
#lookupsGrid td:first-child { min-width: 200px; }

/* Sign-in button: space between label and arrow (Kendo resets the flex gap) */
.tt-auth-submit .tt-submit-text { margin-right: 10px; }
