/* Shared layout for /panel and /admin tabbed UIs */
.hidden { display: none !important; }

.wrap.panel-wide {
  max-width: 1520px;
  padding-top: 0;
}

.panel-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 768px) {
  .panel-layout { grid-template-columns: 1fr; }
}

.panel-nav {
  position: sticky;
  top: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}
@media (max-width: 768px) {
  .panel-nav {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px;
  }
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.1s;
}
.nav-icon {
  width: 1.35rem;
  text-align: center;
  font-size: 1rem;
  line-height: 1;
  opacity: 0.85;
  flex-shrink: 0;
}
.nav-btn.active .nav-icon { opacity: 1; }
.nav-btn:hover {
  background: var(--nav-hover-bg, rgba(15, 118, 110, 0.08));
  color: var(--primary-dark);
}
.nav-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
}
@media (max-width: 768px) {
  .nav-btn {
    width: auto;
    flex: 1 1 auto;
    justify-content: center;
    font-size: 0.82rem;
    padding: 8px 10px;
  }
}

.panel-main { min-width: 0; }
.tab-panel { display: none; }
.tab-panel.active {
  display: block;
  animation: tab-fade 0.2s ease;
}
@keyframes tab-fade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.panel-nav-foot {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--muted);
}
.panel-nav-foot a { color: var(--primary); text-decoration: none; }

.tab-intro {
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 16px;
  line-height: 1.45;
}

.nav-badge {
  margin-left: auto;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: #fef3c7;
  color: var(--warn, #b45309);
}
.nav-btn.active .nav-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* Admin duty browser */
.duty-toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: end;
  margin-bottom: 16px;
}
@media (max-width: 720px) {
  .duty-toolbar { grid-template-columns: 1fr; }
}
.duty-date-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.duty-date-nav input[type="date"] {
  margin-bottom: 0;
  width: auto;
  min-width: 150px;
}
.duty-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 16px;
  align-items: start;
}
@media (max-width: 720px) {
  .duty-layout { grid-template-columns: 1fr; }
}
.duty-dates {
  border: 1px solid var(--border);
  border-radius: 8px;
  max-height: 420px;
  overflow-y: auto;
  background: #f8fafc;
}
.duty-dates button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 12px;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  font-family: inherit;
  font-size: 0.84rem;
  cursor: pointer;
}
.duty-dates button:hover { background: #eef8f4; }
.duty-dates button.active {
  background: var(--accent, var(--primary));
  color: #fff;
  font-weight: 600;
}
.duty-dates button .duty-date-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.duty-dates button .duty-date-star {
  color: #f59e0b;
  font-size: 0.92rem;
  line-height: 1;
  flex-shrink: 0;
}
.duty-dates button.active .duty-date-star { color: #fde68a; }
.duty-dates button.duty-date-self {
  background: #fffbeb;
  border-left: 3px solid #f59e0b;
  padding-left: 9px;
}
.duty-dates button.duty-date-self:hover { background: #fef3c7; }
.duty-dates button.duty-date-self.active {
  background: var(--accent, var(--primary));
  border-left: 3px solid #f59e0b;
  padding-left: 9px;
}
.duty-dates button .duty-date-sub {
  display: block;
  font-size: 0.72rem;
  opacity: 0.85;
  margin-top: 2px;
}
.duty-meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.duty-empty {
  padding: 24px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: #f6fbf8;
}
