:root { --sk-tap: 44px; --sk-tab: 58px; }
body { font-size: 1rem; }
.app-sidebar { background: var(--sk-sidebar, #1e293b) !important; color: var(--sk-sidebar-text, #f8fafc); }
.app-sidebar .brand-link,
.app-sidebar .nav-link,
.app-sidebar .nav-header,
.app-sidebar .brand-text,
.sk-who, .sk-who span { color: var(--sk-sidebar-text, #f8fafc) !important; }
.app-sidebar .nav-link.active,
.app-sidebar .nav-link:hover { background: var(--sk-side-active, rgba(255,255,255,.14)) !important; }
.app-header { background: var(--sk-topbar, #fff) !important; color: var(--sk-top-text, #1f2937); }
.app-header .nav-link { color: var(--sk-top-text, #1f2937); }
.btn-primary, .btn, a.btn {
  background: var(--sk-primary, #0d6efd); border-color: var(--sk-primary, #0d6efd); color: #fff;
}
.btn { display: inline-flex; align-items: center; justify-content: center; border-radius: .5rem; padding: .55rem .9rem; min-height: var(--sk-tap); text-decoration: none; font-weight: 600; border: 1px solid transparent; cursor: pointer; }
.btn-ghost { background: transparent; color: var(--sk-primary, #0d6efd); border-color: var(--bs-border-color); }
.btn-block { width: 100%; }
.linkish { background: none; border: 0; color: var(--sk-primary); padding: .35rem .15rem; cursor: pointer; }
.sk-mark, .brand-image { width: 33px; height: 33px; border-radius: .4rem; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; background: rgba(255,255,255,.15); }
.sk-who { display: flex; flex-direction: column; padding: .8rem 1rem 1rem; font-size: .85rem; }
.sk-who span { opacity: .8; }
.app-main { padding-bottom: calc(var(--sk-tab) + 1rem); }
h1 { font-size: 1.45rem; margin: .2rem 0 .35rem; }
.lede, .muted, .text-secondary { color: var(--bs-secondary-color); }
.page-h, .panel-h { display: flex; justify-content: space-between; gap: .75rem; align-items: flex-start; flex-wrap: wrap; margin-bottom: .75rem; }
.panel { background: var(--bs-body-bg); border: 1px solid var(--bs-border-color); border-radius: .6rem; padding: .9rem 1rem; margin: .85rem 0; }
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; }
.stat { background: var(--bs-body-bg); border: 1px solid var(--bs-border-color); border-radius: .6rem; padding: .8rem; }
.stat-n { font-size: 1.45rem; font-weight: 700; }
.stat-l { color: var(--bs-secondary-color); font-size: .82rem; }
.stat.warn { background: #fff8ea; }
.stat.danger { background: #fdf2f2; }
.row2 { display: grid; gap: .75rem; }
@media (min-width: 700px) {
  .row2 { grid-template-columns: 1fr 1fr; }
}
.form-narrow, .auth-card { max-width: 40rem; }
.auth-card { margin: 1.5rem auto; background: var(--bs-body-bg); border: 1px solid var(--bs-border-color); border-radius: .75rem; padding: 1.2rem; }
.stack label, .auth-card label { display: flex; flex-direction: column; gap: .28rem; font-weight: 600; }
.stack input, .stack select, .stack textarea,
.auth-card input, .auth-card select, .filters input, .filters select, .count-card input {
  font-size: 16px; padding: .55rem .7rem; border: 1px solid var(--bs-border-color); border-radius: .5rem; background: var(--bs-body-bg); width: 100%;
}
.check { flex-direction: row; align-items: center; gap: .5rem; font-weight: 500; }
.check input { width: auto; }
.filters { display: flex; gap: .5rem; flex-wrap: wrap; margin: 0 0 .8rem; align-items: center; }
.filters input, .filters select { flex: 1 1 140px; min-width: 0; width: auto; }
.flash { padding: .75rem .85rem; border-radius: .6rem; margin: 0 0 .8rem; }
.flash-ok { background: #e6f3ec; color: #21533f; }
.flash-error { background: #fdecec; color: #7a2424; }
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { padding: .65rem 0; border-bottom: 1px solid var(--bs-border-color); }
.plain a { text-decoration: none; font-weight: 650; display: flex; justify-content: space-between; gap: .5rem; }
.table { width: 100%; }
.cards-m thead { display: none; }
.cards-m, .cards-m tbody { display: block; }
.cards-m tr { display: block; background: var(--bs-body-bg); border: 1px solid var(--bs-border-color); border-radius: .6rem; padding: .55rem .75rem; margin: 0 0 .55rem; }
.cards-m td { display: flex; justify-content: space-between; gap: .75rem; border: 0; padding: .28rem 0; }
.cards-m td::before { content: attr(data-label); color: var(--bs-secondary-color); flex: 0 0 42%; }
.cards-m td.primary { display: block; font-size: 1.05rem; font-weight: 650; }
.cards-m td.primary::before { display: none; }
.cards-m tr.row-low { background: #fff6f4; }
.count-list { display: grid; gap: .55rem; }
.count-card { display: grid; grid-template-columns: 1fr 7.2rem; gap: .6rem; align-items: center; border: 1px solid var(--bs-border-color); border-radius: .6rem; padding: .75rem; background: var(--bs-body-bg); }
.reader-box { width: 100%; min-height: 220px; background: #111; border-radius: .6rem; overflow: hidden; }
.reader-box video { width: 100%; }
.pill { display: inline-block; font-size: .75rem; padding: .12rem .45rem; border-radius: 999px; background: #ece7dc; }
.pill-in, .pill-ok, .pill-done, .pill-in_progress { background: #e1f0e8; color: #21533f; }
.pill-out, .pill-low, .pill-denied, .pill-cancelled { background: #f8ddd8; color: #7a2424; }
.pill-count, .pill-approved, .pill-assigned { background: #e4eaf6; color: #2c3d66; }
.pill-soon, .pill-submitted, .pill-with_admin { background: #fff0cc; color: #6b4b00; }
.thread { display: flex; flex-direction: column; gap: .55rem; margin-bottom: .9rem; }
.msg { background: var(--bs-tertiary-bg); border-radius: .6rem; padding: .7rem .8rem; }
.inline-form { display: inline; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; margin: .4rem 0 .8rem; }
.org-grid { display: grid; gap: .75rem; }
.org-card { display: block; text-decoration: none; color: inherit; border-radius: .75rem; padding: 1rem; border: 1px solid var(--bs-border-color); background: var(--bs-body-bg); }
.org-card strong { display: block; font-size: 1.15rem; }
.color-row { display: flex; gap: .75rem; flex-wrap: wrap; }
.color-row label input[type="color"] { width: 3.2rem; height: 2.6rem; padding: .15rem; }
.tabbar {
  display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1040;
  background: var(--bs-body-bg); border-top: 1px solid var(--bs-border-color);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a { flex: 1; text-align: center; text-decoration: none; color: var(--bs-secondary-color); font-size: .72rem; padding: .35rem 0 .45rem; min-height: var(--sk-tab); }
.tabbar a i { display: block; font-size: 1.15rem; }
.tabbar a.active { color: var(--sk-primary); font-weight: 700; }
.is-hidden { display: none !important; }
.sk-auth .app-main { padding-bottom: 1rem; }
.sk-dt { margin: 0 0 1rem; }
.sk-dt-bar { display: flex; gap: .5rem; align-items: center; margin: 0 0 .65rem; }
.sk-dt-search {
  flex: 1 1 auto; max-width: 22rem; min-width: 0;
  font-size: 16px; padding: .45rem .7rem; border: 1px solid var(--bs-border-color);
  border-radius: .5rem; background: var(--bs-body-bg); color: inherit;
}
.sk-dt-cols { position: relative; margin-left: auto; }
.sk-dt-btn {
  background: var(--bs-body-bg); color: inherit; border: 1px solid var(--bs-border-color);
  border-radius: .45rem; padding: .35rem .75rem; min-height: 36px; cursor: pointer; font-weight: 600;
}
.sk-dt-btn:disabled { opacity: .45; cursor: default; }
.sk-dt-menu {
  position: absolute; right: 0; top: calc(100% + .3rem); z-index: 30;
  min-width: 11rem; padding: .35rem .5rem; background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color); border-radius: .55rem;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .12);
}
.sk-dt-menu label { display: flex; align-items: center; gap: .45rem; padding: .28rem .15rem; font-weight: 500; }
.sk-dt-menu input { width: auto; }
.sk-dt-foot {
  display: flex; justify-content: space-between; align-items: center; gap: .6rem;
  margin-top: .7rem; font-size: .875rem; color: var(--bs-secondary-color);
}
.sk-dt-pages { display: flex; gap: .4rem; }
.sk-dt-empty { margin: .4rem 0 .2rem; color: var(--bs-secondary-color); }
.sk-col-off { display: none !important; }
.sk-sort { font-weight: 700; }
@media (min-width: 900px) {
  .cards { grid-template-columns: repeat(4, 1fr); }
  .cards-m, .cards-m tbody, .cards-m tr, .cards-m td { display: revert; }
  .cards-m td::before { display: none; }
  .cards-m tr { border: 0; border-radius: 0; padding: 0; margin: 0; background: transparent; }
  .tabbar { display: none; }
  .app-main { padding-bottom: 1.5rem; }
  .sk-dt {
    background: var(--bs-body-bg); border: 1px solid var(--bs-border-color);
    border-radius: .75rem; padding: .85rem .85rem .7rem;
  }
  .sk-dt .cards-m { border-collapse: collapse; }
  .sk-dt .cards-m th {
    font-size: .8125rem; font-weight: 600; text-align: left; padding: .6rem .5rem;
    border-bottom: 1px solid var(--bs-border-color); white-space: nowrap; user-select: none;
  }
  .sk-dt .cards-m th:not(.sk-nosort) { cursor: pointer; }
  .sk-dt .cards-m td {
    padding: .62rem .5rem; border-bottom: 1px solid var(--bs-border-color); vertical-align: middle;
  }
  .sk-dt .cards-m tbody tr:hover td { background: rgba(15, 23, 42, .03); }
  .sk-dt .cards-m tr.row-low td { background: #fff6f4; }
  .sk-dt .cards-m tr:last-child td { border-bottom: 0; }
}
