/* Control panel additions; the rest is dashboard-ui.css (--eid-* tokens). */

/* ---------- header brand ---------- */
.portal-brand {
    font-weight: 700;
    color: var(--eid-ink, #17323a);
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}
.portal-brand .bi { color: var(--eid-primary, #0f7179); font-size: 1.2rem; }
.portal-area {
    font-weight: 500;
    font-size: .8rem;
    color: var(--eid-primary, #0f7179);
    background: rgba(15, 113, 121, .08);
    border-radius: var(--eid-radius-pill, 999px);
    padding: .15rem .7rem;
    margin-inline-start: .4rem;
}

/* ---------- status badges (tone: ok, info, warn, danger, wait) ---------- */
.status-badge { font-weight: 600; padding: .4em .75em; border-radius: var(--eid-radius-pill, 999px); }
.status-badge.tone-wait   { background: #fff4d6; color: #88672b; }
.status-badge.tone-info   { background: #e3f1f3; color: #0a5559; }
.status-badge.tone-ok     { background: #dff3e9; color: #1a7a54; }
.status-badge.tone-warn   { background: #fdecd8; color: #8a4b0f; }
.status-badge.tone-danger { background: #fbe4e1; color: #a5281b; }

/* ---------- KPI cards ---------- */
.stat-card .stat-icon {
    width: 52px; height: 52px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
}
.stat-icon.tone-primary { background: rgba(15,113,121,.10); color: #0f7179; }
.stat-icon.tone-success { background: rgba(26,122,84,.10);  color: #1a7a54; }
.stat-icon.tone-warning { background: rgba(171,131,55,.12); color: #88672b; }
.stat-icon.tone-danger  { background: rgba(192,57,43,.10);  color: #c0392b; }
.stat-card .stat-value { font-size: 1.6rem; font-weight: 700; color: var(--eid-ink, #17323a); }
.stat-card a.stretched-link { z-index: 1; }

/* ---------- details grid ---------- */
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem 1.5rem; }
.info-grid .info-label { font-size: .8rem; color: var(--eid-muted, #5b6b73); margin-bottom: .15rem; }
.info-grid .info-value { font-weight: 600; color: var(--eid-ink, #17323a); word-break: break-word; }
.ltr { direction: ltr; unicode-bidi: embed; }

/* ---------- timeline ---------- */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding: 0 1.5rem .9rem 0; border-right: 2px solid var(--eid-line, #e5e7eb); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
    content: ""; position: absolute; right: -7px; top: .3rem;
    width: 12px; height: 12px; border-radius: 50%;
    background: #fff; border: 2px solid var(--eid-primary, #0f7179);
}
.timeline li.ev-bad::before  { border-color: #c0392b; }
.timeline li.ev-good::before { border-color: #1a7a54; background: #1a7a54; }
.timeline .ev-msg { font-size: .8rem; overflow-wrap: anywhere; }
.timeline .ev-ref { display: inline-block; max-width: 100%; overflow-wrap: anywhere; text-align: left; }
.timeline .ev-time { font-size: .78rem; color: var(--eid-muted, #5b6b73); }

/* ---------- auth pages ---------- */
body.auth-page {
    min-height: 100vh;
    background: radial-gradient(circle at top, #e8f3f4 0%, #f5f7f8 55%);
}
.auth-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1.5rem; }
.auth-card {
    width: 100%; max-width: 420px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 12px 40px rgba(15, 113, 121, .12);
    padding: 2rem 2rem 1.75rem;
}
.auth-logo { text-align: center; margin-bottom: 1rem; }
.auth-logo img { max-height: 70px; }
.auth-title { font-size: 1.35rem; font-weight: 700; text-align: center; color: var(--eid-ink, #17323a); margin-bottom: .25rem; }
.auth-title .bi { color: var(--eid-primary, #0f7179); }
.auth-sub { text-align: center; color: var(--eid-muted, #5b6b73); font-size: .9rem; margin-bottom: 1.5rem; }
.auth-footer { margin-top: 1.25rem; color: var(--eid-muted, #5b6b73); font-size: .8rem; }

/* ---------- misc ---------- */
.form-hint { font-size: .8rem; color: var(--eid-muted, #5b6b73); }
.btn-busy { pointer-events: none; opacity: .75; }

@media print {
    .no-print, .side_menu, header, footer, .validation-messages-container { display: none !important; }
    .side_content, .page_wrap, .page_content { margin: 0 !important; padding: 0 !important; width: 100% !important; }
    body { background: #fff !important; }
}

/* Readable secondary badges on light alerts and dark headers. */
.eid-ui .badge.bg-secondary { background-color: #4b5563 !important; color: #fff !important; }

/* Print: logo header on paper only; tables print whole. */
.print-only { display: none; }
.print-head { display: none; align-items: center; gap: 14px; border-bottom: 3px solid #0f7179; padding-bottom: 10px; margin-bottom: 14px; }
.print-head img { height: 58px; }
.print-head-text { flex: 1; }
.print-title { font-size: 1.25rem; font-weight: 700; color: #0f7179; }
.print-sub { font-size: .9rem; color: #444; }
.print-meta { font-size: .75rem; color: #666; text-align: left; }
@media print {
    @page { size: A4; margin: 12mm; }
    .print-only { display: block !important; }
    .print-head { display: flex !important; }
    .table-responsive { overflow: visible !important; }
    a { color: inherit !important; text-decoration: none !important; }
}
/* print.css shows only #printableTable: these pages wrap their content in it. */
@media print {
    /* print.css pins #printableTable absolutely; a whole page must flow. */
    #printableTable { position: static !important; width: 100% !important; }
    .eid-page-header { display: none !important; }
    #printableTable .block-header { background: none !important; color: #0f7179 !important; box-shadow: none !important; padding: 0 0 .4rem !important; margin-bottom: .4rem !important; }
    #printableTable .block-header h5 { color: #0f7179 !important; font-size: 1rem !important; }
    #printableTable .block { box-shadow: none !important; }
}

/* Empty validation summary stays hidden until there is an error */
.validation-summary-valid { display: none; }

/* ---------- building photos (guide data page) ---------- */
.guide-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: .75rem; }
.guide-photo { position: relative; margin: 0; border: 1px solid var(--eid-line, #e2e8ea); border-radius: .6rem; overflow: hidden; background: #f6f8f9; }
.guide-photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.guide-photo figcaption { display: flex; align-items: center; gap: .4rem; padding: .4rem; background: #fff; }
.guide-photo-cover { position: absolute; inset-block-start: .4rem; inset-inline-start: .4rem; }

/* ---------- weekly timetable editor (hours-editor.js) ---------- */
.he-row { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; padding: .25rem 0; }
.he-row + .he-row { border-top: 1px solid var(--eid-line, #e5e7eb); }
.he-day { flex: 0 0 100%; font-size: .8rem; font-weight: 600; }
.he-row select { flex: 1 1 7rem; width: auto; }
.he-row input[type=time] { flex: 1 1 6rem; width: auto; direction: ltr; }
.he-wide .he-day { flex-basis: 6rem; }
.he-wide .he-row select { flex: 0 1 10rem; }
.he-wide .he-row input[type=time] { flex: 0 1 8rem; }
