/* Phoenix skin on AdminLTE 3: charcoal sidebar, ember accent. */
:root { --phx: #d9480f; --phx-dark: #b93c0b; --phx-tint: #fff1ea; --phx-ink: #1d1f20; }
body { font-family: "Source Sans Pro", "Segoe UI", system-ui, -apple-system, "Noto Sans Tamil", "Nirmala UI", sans-serif; }
.main-sidebar { background: #17191a; }
.brand-link { border-bottom: 1px solid #2a2d2f !important; display: flex; align-items: center; gap: 10px; }
.brand-mark { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; background: var(--phx); color: #fff; font-weight: 700; margin-left: 4px; flex: none; }
.brand-mark.lg { width: 40px; height: 40px; font-size: 1.3rem; vertical-align: middle; }
.sidebar-dark-primary .nav-sidebar > .nav-item > .nav-link.active { background: var(--phx); color: #fff; box-shadow: none; }
.nav-sidebar .nav-header { color: #8b9094; font-size: .72rem; text-transform: none; padding-top: 1rem; }
.nav-sidebar .nav-link p { white-space: normal; }
.content-header h1 { font-size: 1.55rem; font-weight: 600; }
.btn-phx, .bg-phx { background: var(--phx); border-color: var(--phx); color: #fff; }
.btn-phx:hover, .btn-phx:focus { background: var(--phx-dark); border-color: var(--phx-dark); color: #fff; }
.btn-dark { background: var(--phx-ink); border-color: var(--phx-ink); }
.text-phx { color: var(--phx); }
a { color: #b93c0b; } a:hover { color: #8f2e08; }
.page-item.active .page-link, .nav-pills .nav-link.active { background: var(--phx); border-color: var(--phx); }
.card { box-shadow: 0 0 0 1px rgba(0,0,0,.07); }
.card-title { font-weight: 600; font-size: 1rem; }
.phx-auth { background: #eceae6; }
.phx-auth .login-logo a { color: var(--phx-ink); }

/* assessment tabs */
.phx-tabs { border-bottom: 1px solid #dee2e6; overflow-x: auto; flex-wrap: nowrap; white-space: nowrap; }
.phx-tabs .nav-link { color: #5f6368; border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: .55rem .9rem; }
.phx-tabs .nav-link.active { color: var(--phx-ink); border-bottom-color: var(--phx); font-weight: 600; background: transparent; }
.phx-tabs .nav-link small { color: #868e96; }

/* choice chips: real checkboxes and radios, styled as buttons */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; margin: 0; }
.chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; margin: 0; }
.chip span { display: inline-flex; align-items: center; min-height: 34px; padding: 4px 14px; border: 1px solid #ced4da; border-radius: 6px; background: #fff; font-weight: 400; transition: background-color .12s, border-color .12s; }
.chip input:checked + span { background: var(--phx-tint); border-color: var(--phx); color: #8a2c08; font-weight: 600; }
.chip input:focus-visible + span { outline: 2px solid var(--phx); outline-offset: 2px; }
.chip input:disabled + span { opacity: .65; cursor: not-allowed; }
.chip.device span { min-height: 44px; }
.chip.device span i { margin-right: 8px; color: #868e96; }
.chip.device input:checked + span i { color: var(--phx); }

.q-card .q-text { font-weight: 600; font-size: .98rem; }
.q-card .q-score { color: #1e7e34; font-weight: 600; white-space: nowrap; }
.q-card .q-sub { background: #f8f9fa; border-radius: 6px; padding: 12px 14px; margin-top: 12px; }
.q-saved { color: #1e7e34; font-size: .8rem; opacity: 0; transition: opacity .2s; }
.q-saved.show { opacity: 1; }
.guide { background: #f4f6f8; border-left: 3px solid #adb5bd; padding: 8px 12px; margin-top: 10px; border-radius: 0 4px 4px 0; }

.kv-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 10px 0; border-bottom: 1px solid #f0f1f2; }
.kv-row:last-child { border-bottom: 0; }
.kv-row > label, .kv-row > .kv-label { margin: 0; font-weight: 400; flex: 1 1 50%; }
.kv-row > .chips { flex: 0 0 auto; }
.kv-row .form-control, .kv-row .custom-select { max-width: 280px; }
.kv-row .val { text-align: right; }

.table td, .table th { vertical-align: middle; }
.table thead th { border-top: 0; border-bottom-width: 1px; font-weight: 600; color: #5f6368; font-size: .82rem; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi .label { color: #5f6368; }
.kpi .value { font-size: 1.6rem; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.kpi .value small { font-size: .85rem; color: #5f6368; font-weight: 400; }
.kpi .cap { color: #6c757d; font-size: .8rem; }
.chart-box { position: relative; height: 260px; }
.product-card .thumb { height: 92px; display: grid; place-items: center; background: #f1f3f5; color: #868e96; font-size: 2.2rem; border-radius: 4px 4px 0 0; }
.product-card .cat { font-size: .72rem; letter-spacing: .02em; color: #1e7e34; font-weight: 600; }
.flag-up { color: #c4242a; } .flag-ok { color: #6c757d; }
.cert { max-width: 820px; margin: 0 auto; background: #fff; border: 6px double var(--phx-ink); padding: 48px; }
@media print { .main-header, .main-sidebar, .main-footer, .content-header, .no-print { display: none !important; } .content-wrapper { margin: 0 !important; background: #fff !important; } }
@media (max-width: 576px) { .kv-row { flex-direction: column; align-items: stretch; } .kv-row .form-control, .kv-row .custom-select { max-width: none; } .kv-row .val { text-align: left; } }

/* cards in one row share a height */
.row-eq > [class*="col-"] { display: flex; }
.row-eq > [class*="col-"] > .card { flex: 1 1 auto; width: 100%; }
/* compact file control for table rows: the real input stays in the tab order */
.file-pick { display: inline-flex; align-items: center; max-width: 100%; }
.file-pick input:focus-visible + label { outline: 2px solid var(--phx); outline-offset: 2px; }
.file-pick input:disabled + label { opacity: .6; pointer-events: none; }
.file-pick .file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 130px; }
/* accordion headers */
.acc-head { display: flex; width: 100%; justify-content: space-between; align-items: center; text-align: left; }
.acc-head .fa-chevron-down { transition: transform .15s; color: #868e96; }
.acc-head[aria-expanded="true"] .fa-chevron-down { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .acc-head .fa-chevron-down, .chip span { transition: none; } }
/* visually hidden labels and inputs inside a scrolling table must scroll with it, not widen the page */
.table-responsive, .file-pick { position: relative; }
