body {
  background-color: var(--color-bg);
  color: var(--color-text);
}

.app-shell {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

@media (min-width: 768px) {
  .app-shell {
    flex-direction: row;
  }
}

.main-content {
  flex: 1;
  padding: 16px;
  min-width: 0;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

@media (min-width: 768px) {
  .main-content {
    padding: 24px;
  }
}

@media (min-width: 1024px) {
  .main-content {
    padding: 32px;
  }
}

/* Bottom Bar for Mobile */
.bottom-bar {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  min-height: 56px;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-bar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  min-height: 48px;
}

.bottom-bar-item.active {
  color: var(--color-primary);
  font-weight: 700;
}

/* Sidebar & Rail for Desktop */
.sidebar {
  display: none;
}

@media (min-width: 768px) {
  .sidebar {
    display: flex;
    flex-direction: column;
    width: 240px;
    background: var(--color-surface);
    border-right: 1px solid var(--color-border);
    padding: 16px 12px;
    position: sticky;
    top: 0;
    height: 100vh;
  }
}

@media (min-width: 1440px) {
  .sidebar {
    width: 264px;
  }
}

.sidebar-brand {
  font-weight: bold;
  font-size: 1.125rem;
  color: var(--color-primary);
  margin-bottom: 4px;
}

.sidebar-sub {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-bottom: 24px;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 4px;
  color: var(--color-text);
  font-size: 0.875rem;
}

.sidebar-nav-item:hover {
  background: var(--color-primary-soft);
}

.sidebar-nav-item.active {
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-weight: 700;
}


.admin-bar a {
  color: #fff;
  text-decoration: underline;
}

/* Limit Notice Banner */
.limit-notice {
  background: var(--color-warning-bg);
  color: var(--color-warning-text);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.75rem;
  margin-bottom: 16px;
  border: 1px solid #E6CF8A;
}

/* Cards & Grids */
.app-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 768px) {
  .app-grid {
    grid-template-columns: repeat(3, minmax(168px, 1fr));
    gap: 16px;
  }
}

@media (min-width: 1024px) {
  .app-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1440px) {
  .app-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

.app-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 140px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.app-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--color-primary-soft);
  background: color-mix(in srgb, currentColor 14%, white);
  display: grid;
  place-items: center;
  color: var(--color-primary);
  margin-bottom: 8px;
  font-weight: bold;
  flex-shrink: 0;
}

.app-card-icon svg {
  display: block;
}

.app-card-title {
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.app-card-desc {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 8px;
  background: var(--color-primary);
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  width: 100%;
}

.btn-primary:hover {
  background: var(--color-primary-hover);
}

/* Form Controls */
.form-input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--color-border-input);
  border-radius: 8px;
  padding: 0 12px;
  font-size: 1rem;
  background: var(--color-surface);
  color: var(--color-text);
  margin-top: 6px;
  margin-bottom: 16px;
}

.form-input:focus {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

/* Tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  font-size: 0.8125rem;
}

.data-table th, .data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
}

.data-table th {
  background: var(--color-primary-soft);
  color: var(--color-text);
  font-weight: 600;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-primary);
  margin-right: 6px;
}

.status-dot.offline {
  background: var(--color-text-muted);
}

/* ===== Tambahan perbaikan frontend (t_f195e03f): tanpa style inline, target sentuh >= 44px ===== */
[hidden] { display: none !important; }
.muted { color: var(--color-text-muted); }
.center { text-align: center; }
.h2 { font-size: 1.375rem; line-height: 1.3; margin: 0 0 16px; }
.boot { display: grid; place-items: center; min-height: 100vh; text-align: center; }
.boot-logo { width: 64px; height: 64px; background: var(--color-primary); color: #fff; border-radius: 16px; display: grid; place-items: center; font-size: 1.75rem; font-weight: 700; margin: 0 auto 16px; }
.auth-card { max-width: 400px; margin: 40px auto; padding: 24px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 12px; box-shadow: 0 4px 12px rgba(0,0,0,.08); }
@media (max-width: 440px) { .auth-card { margin: 16px; padding: 20px; } }
.field label { display: block; font-size: 0.875rem; font-weight: 600; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 0.875rem; margin-bottom: 16px; min-height: 48px; }
.check input { width: 24px; height: 24px; flex: none; margin: 0; }
.text-link { display: inline-flex; align-items: center; min-height: 48px; padding: 0 8px; }
.btn-primary { text-decoration: none; }
.btn-primary:hover { text-decoration: none; }
.btn-primary:disabled, .btn-outline:disabled { opacity: .6; cursor: not-allowed; }
.btn-outline { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--color-border-input); color: var(--color-text); background: var(--color-surface); font-size: 0.875rem; font-weight: 600; width: 100%; }
.btn-outline:hover { background: var(--color-primary-soft); }

.msg { margin-top: 12px; }
.alert { padding: 10px 14px; border-radius: 8px; font-size: 0.875rem; margin-bottom: 12px; }
.alert-error { background: #FDECEA; color: var(--color-danger); border: 1px solid #f3b8b3; }
.alert-ok { background: var(--color-primary-soft); color: var(--color-primary); border: 1px solid #A9C9BC; }
.sidebar nav { flex: 1; }
.sidebar-nav-item, .bottom-bar-item { min-height: 48px; text-decoration: none; }
.sidebar-user { border-top: 1px solid var(--color-border); padding-top: 12px; }
.user-name { font-weight: 700; font-size: 0.875rem; overflow-wrap: anywhere; }
.user-role { font-size: 0.75rem; color: var(--color-text-muted); margin-bottom: 12px; text-transform: uppercase; }
.main-content { padding-bottom: 80px; }
@media (min-width: 768px) { .main-content { padding-bottom: 24px; } .bottom-bar, .only-mobile { display: none; } }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0 0 24px; }
.kv dt { color: var(--color-text-muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.app-card-title, .app-card-desc { overflow-wrap: anywhere; }
.app-card .btn-primary { margin-top: 8px; }
.tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.tab { display: inline-flex; align-items: center; min-height: 48px; padding: 0 16px; border-radius: 8px; background: var(--color-primary-soft); color: var(--color-text); text-decoration: none; font-size: 0.875rem; }
.tab.active { background: var(--color-primary); color: #fff; font-weight: 700; }
.table-wrap { overflow-x: auto; margin-bottom: 16px; }
.data-table th, .data-table td { white-space: nowrap; }
@media (min-width: 768px) and (max-width: 1023px) { .app-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); } }
.app-card, .app-grid > * { min-width: 0; }

/* ===== t_0405ff57: gaya Herbanusa v1.1, fokus, target 48, banner batas, ikon ===== */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.admin-bar { background: var(--color-admin); color: #fff; border-top: 4px solid var(--color-lime); padding: 8px 16px; margin-bottom: 16px; border-radius: 8px; font-size: 0.75rem; font-weight: 800; letter-spacing: .06em; }
.admin-bar :focus-visible, .admin-bar:focus-visible { outline-color: #fff; }
.boot-logo { background: none; border-radius: 16px; overflow: hidden; display: block; }
.boot-logo img { display: block; width: 100%; height: 100%; }
.sidebar-brand { display: flex; align-items: center; gap: 8px; }
.sidebar-brand img { width: 28px; height: 28px; border-radius: 6px; flex: none; }
.batas-data { background: var(--color-warning-bg); color: var(--color-warning-text); border: 1px solid #E6CF8A; border-radius: 8px; padding: 12px 14px; margin-bottom: 16px; font-size: 0.875rem; }
.batas-data strong { display: block; margin-bottom: 4px; }
.batas-data ul { margin: 0; padding-left: 18px; }
.batas-data li { margin-bottom: 2px; overflow-wrap: anywhere; }
.data-table td.ip { white-space: normal; overflow-wrap: anywhere; min-width: 9rem; }
.bottom-bar-item { text-align: center; padding: 4px; line-height: 1.2; overflow-wrap: anywhere; }
.tabs { flex-wrap: wrap; }
@media (orientation: landscape) and (max-height: 500px) { .main-content { padding-bottom: 72px; } .boot { min-height: 60vh; } }

/* ===== t_6f5333cc: kartu admin di HP (<768), bar segarkan, ikon login ===== */
.refresh-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 12px; font-size: 0.875rem; }
.refresh-bar > span { flex: 1 1 14rem; min-width: 0; overflow-wrap: anywhere; }
.btn-inline { width: auto; min-width: 48px; }
.online-summary { font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 767px) {
  .table-wrap { overflow: visible; }
  .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; box-sizing: border-box; }
  .data-table { border: 0; background: none; border-radius: 0; overflow: visible; }
  .data-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .data-table tr { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 8px; margin-bottom: 12px; padding: 4px 0; }
  .data-table td { white-space: normal; overflow-wrap: anywhere; border-bottom: 0; padding: 6px 14px; min-width: 0; }
  .data-table td.ip { min-width: 0; }
  .data-table td::before { content: attr(data-label); display: block; font-size: 0.75rem; font-weight: 600; color: var(--color-text-muted); }
  .btn-inline { width: 100%; }
}

/* ===== Pasang aplikasi, notifikasi, pengumuman (24 Okt 2026) ===== */
.alert-info { background: #EEF4FB; color: #1F3B5C; border: 1px solid #BCD3EA; }
.alert-info .btn-inline { margin-top: 8px; }
.h3 { font-size: 1.125rem; line-height: 1.3; margin: 0 0 12px; }
.small { font-size: 0.8125rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.btn-row > button { width: auto; min-width: 200px; }
.notif-section { border-top: 1px solid var(--color-border); padding-top: 20px; margin: 8px 0 24px; max-width: 640px; }
.announcements { margin-bottom: 24px; max-width: 760px; }
.announcement { background: var(--color-surface); border: 1px solid var(--color-border); border-left: 4px solid var(--color-primary); border-radius: 8px; padding: 12px 16px; margin-bottom: 10px; }
.announcement-title { font-weight: 700; overflow-wrap: anywhere; }
.announcement-body { margin: 4px 0 6px; white-space: pre-line; overflow-wrap: anywhere; }
.announce-form { max-width: 640px; }
.announce-form .field { margin-bottom: 16px; }
.form-textarea { min-height: 110px; padding-top: 10px; resize: vertical; font: inherit; }
@media (max-width: 600px) { .btn-row > button { width: 100%; } }
