/* ==========================================
   ADMIN PANEL - Content Area
   Main content, buttons, cards, status bar
   ========================================== */

.content {
  padding: 14px 16px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
}

/* Buttons */
.btn {
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--bp-border-subtle);
  background: var(--bp-surface-elevated);
  color: var(--bp-text);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn:hover:not(:disabled) {
  border-color: var(--bp-primary);
  transform: translateY(-1px);
}

.btn-primary {
  border-color: var(--bp-accent);
  background: var(--bp-btn-primary-bg);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: var(--bp-btn-primary-hover);
  box-shadow: 0 4px 12px rgba(34,197,94,0.3);
}

.btn-ghost {
  background: transparent;
}

.btn-ghost:hover:not(:disabled) {
  background: var(--bp-surface-elevated);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Cards Grid */
.cards-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 10px;
  min-height: 0;
  align-items: stretch;
}

.card {
  border-radius: 14px;
  border: 1px solid var(--bp-border-subtle);
  background: var(--bp-card-bg);
  padding: 10px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.3s ease;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.card-title {
  font-size: 13px;
  font-weight: 600;
}

.card-actions {
  display: flex;
  gap: 4px;
}

/* Toggle Pills */
.panel-tools-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.card-toggle-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.toggle-pill {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--bp-border-subtle);
  background: var(--bp-surface-elevated);
  color: var(--bp-text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.toggle-pill.active {
  border-color: var(--bp-accent);
  color: var(--bp-accent);
  background: var(--bp-accent-soft);
}

/* Status Bar */
.status-bar {
  position: fixed;
  right: 18px;
  bottom: 18px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--bp-surface-elevated);
  border: 1px solid var(--bp-border-subtle);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  min-width: 230px;
  transition: all 0.3s ease;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--bp-text-muted);
}

.status-dot.busy {
  background: var(--bp-accent);
}

.status-dot.error {
  background: var(--bp-danger);
}

.status-text-main {
  font-size: 12px;
}

.status-text-sub {
  font-size: 11px;
  color: var(--bp-text-muted);
}

/* Footer */
.footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 11px;
  color: var(--bp-text-muted);
  border-top: 1px solid var(--bp-border-subtle);
  background: var(--bp-surface-elevated);
  transition: background 0.3s ease;
}

.footer a {
  color: var(--bp-text-muted);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* Pager */
.pager {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 2px 0;
  font-size: 11px;
}

.pager button {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid var(--bp-border-subtle);
  background: var(--bp-surface-elevated);
  color: var(--bp-text);
  cursor: pointer;
  transition: all 0.2s ease;
}

.pager button:hover {
  border-color: var(--bp-primary);
  color: var(--bp-primary);
}

/* Unit Items */
.unit-item {
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: all 0.15s ease;
  margin-bottom: 4px;
}

.unit-item:hover {
  background: var(--bp-surface-elevated);
}

.unit-item.active {
  background: var(--bp-surface-elevated);
  color: var(--bp-accent);
  border: 1px solid var(--bp-accent);
  font-weight: 600;
}

.unit-item-meta {
  font-size: 10px;
  color: var(--bp-text-muted);
  margin-top: 2px;
}

.btn-unit-add {
  align-self: flex-end;
}

/* Language Selector */
.language-selector {
  margin-right: 8px;
}

.lang-select {
  background: var(--bp-surface-elevated);
  border: 1px solid var(--bp-border-subtle);
  border-radius: 6px;
  color: var(--bp-text);
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-select:hover {
  border-color: var(--bp-primary);
}

.lang-select:focus {
  outline: none;
  border-color: var(--bp-primary);
}

/* Light Mode */
[data-theme="light"] .btn-primary:hover:not(:disabled) {
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

[data-theme="light"] .btn-ghost {
  border-color: var(--bp-primary);
  color: var(--bp-primary);
}

[data-theme="light"] .btn-ghost:hover:not(:disabled) {
  background: var(--bp-primary-soft);
}

[data-theme="light"] .toggle-pill.active {
  border-color: var(--bp-primary);
  color: var(--bp-primary);
  background: var(--bp-primary-soft);
}

[data-theme="light"] .status-bar {
  background: var(--bp-surface);
  border: 2px solid var(--bp-primary);
  box-shadow: 0 4px 16px rgba(14, 165, 233, 0.15);
}

[data-theme="light"] .pager button {
  border: 2px solid var(--bp-primary);
  background: var(--bp-surface);
  color: var(--bp-primary);
  font-weight: 700;
}

[data-theme="light"] .pager button:hover {
  background: var(--bp-primary);
  color: white;
}

[data-theme="light"] .unit-item:hover {
  background: var(--bp-primary-soft);
}

[data-theme="light"] .unit-item.active {
  background: var(--bp-primary-soft);
  color: var(--bp-primary);
  border: 2px solid var(--bp-primary);
}

[data-theme="light"] .lang-select {
  background: var(--bp-surface);
  border: 1px solid var(--bp-primary);
  color: var(--bp-text);
}

[data-theme="light"] .lang-select option {
  background: var(--bp-surface);
  color: var(--bp-text);
}

/* RTL Support */
[dir="rtl"] .card-actions {
  flex-direction: row-reverse;
}
