/* ==========================================================================
   ADMIN DASHBOARD & CMS — PE33 ANKETA
   Čistý, moderní a přehledný styl sladěný s tématem CB radiostanice
   ========================================================================== */

:root {
  --admin-bg: #f4f1eb;
  --admin-card-bg: #ffffff;
  --admin-sidebar-bg: #2b221b;
  --admin-sidebar-hover: #3d3128;
  --admin-sidebar-active: #438771;
  --admin-primary: #438771;
  --admin-primary-hover: #356b5a;
  --admin-accent: #d96654;
  --admin-text-main: #27211e;
  --admin-text-muted: #6b615a;
  --admin-border: #ded7c9;
  --admin-shadow: 0 4px 16px rgba(40, 30, 20, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background: var(--admin-bg);
  color: var(--admin-text-main);
  line-height: 1.5;
}

/* Layout */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
  width: 260px;
  background: var(--admin-sidebar-bg);
  color: #f1ede6;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-right: 1px solid #1f1712;
}

.admin-sidebar-brand {
  padding: 24px 20px 20px 20px;
  border-bottom: 1px solid #3d3128;
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #438771 0%, #2f6050 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.admin-brand-title {
  font-family: 'Space Mono', monospace;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
  margin: 0;
}

.admin-brand-sub {
  font-size: 11px;
  color: #bfa99b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-nav {
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  color: #d8cec4;
  text-decoration: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.admin-nav-item:hover {
  background: var(--admin-sidebar-hover);
  color: #fff;
}

.admin-nav-item.is-active {
  background: var(--admin-sidebar-active);
  color: #fff;
  box-shadow: 0 2px 8px rgba(67, 135, 113, 0.35);
}

.admin-sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid #3d3128;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  color: #a89a8f;
}

.admin-logout-btn {
  color: #e58b7c;
  text-decoration: none;
  font-weight: 700;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s;
}

.admin-logout-btn:hover {
  background: rgba(229, 139, 124, 0.15);
  color: #ff9b8c;
}

/* Main Area */
.admin-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.admin-topbar {
  background: #fff;
  border-bottom: 1px solid var(--admin-border);
  padding: 16px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-page-title {
  margin: 0;
  font-size: 22px;
  font-family: 'DM Serif Display', Georgia, serif;
  color: var(--admin-text-main);
}

.admin-topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

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

.admin-btn-secondary {
  background: #fff;
  border-color: var(--admin-border);
  color: var(--admin-text-main);
}
.admin-btn-secondary:hover {
  background: #f8f6f0;
}

.admin-btn-danger {
  background: #fff;
  border-color: #e8a497;
  color: var(--admin-accent);
}
.admin-btn-danger:hover {
  background: #fbeee9;
}

.admin-content {
  padding: 32px;
  flex: 1;
}

/* KPI Cards */
.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.admin-kpi-card {
  background: #fff;
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  padding: 20px;
  box-shadow: var(--admin-shadow);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-kpi-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--admin-text-muted);
  letter-spacing: 0.5px;
}

.admin-kpi-val {
  font-family: 'Space Mono', monospace;
  font-size: 32px;
  font-weight: 700;
  color: var(--admin-primary);
  margin-top: 4px;
}

.admin-kpi-note {
  font-size: 12px;
  color: var(--admin-text-muted);
}

/* Cards & Sections */
.admin-card {
  background: #fff;
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  padding: 24px;
  box-shadow: var(--admin-shadow);
  margin-bottom: 28px;
}

.admin-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f0eae1;
}

.admin-card-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--admin-text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Tables */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.admin-table th {
  text-align: left;
  padding: 12px 14px;
  background: #faf7f2;
  border-bottom: 2px solid var(--admin-border);
  color: var(--admin-text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #eee7dd;
  vertical-align: middle;
}

.admin-table tr:hover td {
  background: #faf8f5;
}

/* CMS Tabs */
.cms-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid var(--admin-border);
  margin-bottom: 24px;
  overflow-x: auto;
}

.cms-tab-btn {
  padding: 10px 18px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--admin-text-muted);
  cursor: pointer;
  margin-bottom: -2px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.cms-tab-btn:hover {
  color: var(--admin-text-main);
}

.cms-tab-btn.is-active {
  color: var(--admin-primary);
  border-bottom-color: var(--admin-primary);
}

.cms-section {
  display: none;
}
.cms-section.is-active {
  display: block;
}

/* Form inputs in CMS */
.cms-form-group {
  margin-bottom: 20px;
}

.cms-label {
  display: block;
  font-weight: 700;
  font-size: 13.5px;
  margin-bottom: 6px;
  color: var(--admin-text-main);
}

.cms-hint {
  font-size: 12px;
  color: var(--admin-text-muted);
  margin-bottom: 6px;
}

.cms-input, .cms-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  background: #fffefb;
  color: var(--admin-text-main);
  transition: border-color 0.2s ease;
}

.cms-input:focus, .cms-textarea:focus {
  outline: none;
  border-color: var(--admin-primary);
  box-shadow: 0 0 0 3px rgba(67, 135, 113, 0.15);
}

/* Alert Boxes */
.admin-alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
}
.admin-alert-success {
  background: #edf7f3;
  border: 1px solid #b8dfd1;
  color: #276350;
}
.admin-alert-error {
  background: #fceae6;
  border: 1px solid #f5b7ab;
  color: #a83623;
}

/* Responsive */
@media (max-width: 860px) {
  .admin-layout {
    flex-direction: column;
  }
  .admin-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #3d3128;
  }
  .admin-content {
    padding: 18px;
  }
}
