/**
 * Vicky Agency - Admin Panel Stylesheet
 * High quality, dark-themed control center
 */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Outfit:wght@500;600;700;800&display=swap');

:root {
  --admin-bg: #090a0d;
  --admin-sidebar: #101117;
  --admin-surface: #14151c;
  --admin-surface-hover: #1c1d27;
  --admin-border: rgba(255, 255, 255, 0.08);
  --admin-border-focus: rgba(229, 169, 60, 0.4);
  --admin-primary: #e5a93c;
  --admin-primary-glow: #e5a93c;
  --admin-text: #ffffff;
  --admin-muted: #9aa0ae;
  --admin-danger: #ef4444;
  --admin-success: #10b981;
  --admin-warning: #f59e0b;
}

body.admin-body {
  font-family: 'DM Sans', sans-serif;
  background-color: var(--admin-bg);
  color: var(--admin-text);
  margin: 0;
  display: flex;
  min-height: 100vh;
}

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

.admin-sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.admin-sidebar-header img {
  height: 32px;
}

.admin-sidebar-header span {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  color: #fff;
}

.admin-nav {
  padding: 1.25rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex-grow: 1;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  color: var(--admin-muted);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.admin-nav-item:hover, .admin-nav-item.active {
  background: rgba(229, 169, 60, 0.12);
  color: var(--admin-primary);
}

.admin-sidebar-footer {
  padding: 1.25rem;
  border-top: 1px solid var(--admin-border);
}

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

.admin-topbar {
  height: 64px;
  background: var(--admin-sidebar);
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
}

.admin-topbar h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
}

.admin-content {
  padding: 2rem;
  flex-grow: 1;
  overflow-y: auto;
}

/* Stat Cards */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.admin-stat-card {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.admin-stat-card .val {
  font-family: 'Outfit', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  margin-top: 0.35rem;
}

.admin-stat-card .lbl {
  font-size: 0.85rem;
  color: var(--admin-muted);
  text-transform: uppercase;
  font-weight: 600;
}

/* Card & Table */
.admin-card {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 2rem;
}

.admin-card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-card-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.admin-table th {
  padding: 0.85rem 1.25rem;
  background: rgba(0, 0, 0, 0.2);
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--admin-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--admin-border);
}

.admin-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--admin-border);
  font-size: 0.95rem;
  vertical-align: middle;
}

.admin-table tr:hover td {
  background: var(--admin-surface-hover);
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-new { background: rgba(0, 210, 255, 0.15); color: var(--admin-primary-glow); }
.badge-active { background: rgba(16, 185, 129, 0.15); color: var(--admin-success); }
.badge-in_progress { background: rgba(245, 158, 11, 0.15); color: var(--admin-warning); }
.badge-archived { background: rgba(255, 255, 255, 0.08); color: var(--admin-muted); }

/* Form Styles */
.admin-form-group {
  margin-bottom: 1.25rem;
}

.admin-form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--admin-text);
}

.admin-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(6, 12, 22, 0.7);
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  color: #fff;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
}

.admin-input:focus {
  border-color: var(--admin-primary-glow);
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.2);
}

textarea.admin-input {
  min-height: 100px;
  resize: vertical;
}

.admin-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

/* Login Page Box */
.admin-login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 1.5rem;
}

.admin-login-card {
  width: 100%;
  max-width: 420px;
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  text-align: center;
}

.admin-login-logo {
  height: 48px;
  margin: 0 auto 1.5rem auto;
}

/* Admin Language Switcher */
.admin-lang-switch {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}

.admin-lang-btn {
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 6px;
  text-decoration: none;
  color: var(--admin-muted);
  transition: all 0.2s ease;
  line-height: 1.2;
}

.admin-lang-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.admin-lang-btn.active {
  background: var(--admin-primary);
  color: #000;
  box-shadow: 0 0 10px rgba(229, 169, 60, 0.3);
}

/* Field Language Badges */
.admin-lang-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-left: 6px;
  vertical-align: middle;
}
.admin-lang-badge-en {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.3);
}
.admin-lang-badge-tr {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Tabs System */
.admin-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--admin-border);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
}

.admin-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  color: var(--admin-muted);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.admin-tab-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.admin-tab-btn.active {
  background: var(--admin-primary);
  color: #000;
  border-color: var(--admin-primary);
  box-shadow: 0 0 15px rgba(229, 169, 60, 0.25);
  font-weight: 700;
}

.admin-tab-panel {
  display: none;
}

.admin-tab-panel.active {
  display: block;
}

/* Summernote Dark Theme Overrides */
.note-editor.note-frame {
  border: 1px solid var(--admin-border) !important;
  border-radius: 10px !important;
  background: #0d0f15 !important;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.note-toolbar {
  background: #14151c !important;
  border-bottom: 1px solid var(--admin-border) !important;
  color: #e2e8f0 !important;
  padding: 8px 10px !important;
}

.note-toolbar .note-btn-group {
  margin-right: 6px !important;
}

.note-btn {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #e2e8f0 !important;
  border-radius: 6px !important;
  padding: 6px 10px !important;
  font-size: 0.85rem !important;
  transition: all 0.15s ease !important;
}

.note-btn:hover,
.note-btn.active,
.note-btn:focus {
  background: rgba(229, 169, 60, 0.2) !important;
  color: var(--admin-primary) !important;
  border-color: rgba(229, 169, 60, 0.4) !important;
}

.note-editable {
  background: #090a0e !important;
  color: #f1f5f9 !important;
  font-family: 'DM Sans', -apple-system, sans-serif !important;
  font-size: 1rem !important;
  line-height: 1.75 !important;
  min-height: 380px !important;
  padding: 24px !important;
}

.note-editable h1,
.note-editable h2,
.note-editable h3,
.note-editable h4 {
  color: #fff !important;
  font-family: 'Outfit', sans-serif !important;
  font-weight: 700 !important;
  margin-top: 1.25rem !important;
  margin-bottom: 0.75rem !important;
}

.note-editable a {
  color: var(--admin-primary) !important;
  text-decoration: underline !important;
}

.note-editable img {
  max-width: 100% !important;
  height: auto !important;
  border-radius: 8px !important;
  margin: 1rem 0 !important;
}

.note-editable blockquote {
  border-left: 3px solid var(--admin-primary) !important;
  margin: 1rem 0 !important;
  padding: 0.5rem 1rem !important;
  background: rgba(255, 255, 255, 0.03) !important;
  color: var(--admin-muted) !important;
  font-style: italic !important;
}

.note-statusbar {
  background: #14151c !important;
  border-top: 1px solid var(--admin-border) !important;
}

.note-statusbar .note-resizebar .note-icon-bar {
  border-top: 1px solid var(--admin-border) !important;
}

.note-dropdown-menu {
  background: #161822 !important;
  border: 1px solid var(--admin-border) !important;
  border-radius: 8px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7) !important;
  padding: 6px !important;
}

.note-dropdown-item,
.note-dropdown-menu a {
  color: #cbd5e1 !important;
  padding: 6px 12px !important;
  border-radius: 4px !important;
  display: block !important;
  text-decoration: none !important;
}

.note-dropdown-item:hover,
.note-dropdown-menu a:hover {
  background: rgba(229, 169, 60, 0.15) !important;
  color: var(--admin-primary) !important;
}

.note-modal-content {
  background: #14151c !important;
  color: #fff !important;
  border: 1px solid var(--admin-border) !important;
  border-radius: 12px !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8) !important;
}

.note-modal-header {
  border-bottom: 1px solid var(--admin-border) !important;
  padding: 1rem 1.5rem !important;
}

.note-modal-title {
  color: #fff !important;
  font-family: 'Outfit', sans-serif !important;
  font-weight: 700 !important;
}

.note-modal-footer {
  border-top: 1px solid var(--admin-border) !important;
  padding: 1rem 1.5rem !important;
}

.note-input {
  background: #090a0e !important;
  border: 1px solid var(--admin-border) !important;
  color: #fff !important;
  border-radius: 6px !important;
  padding: 8px 12px !important;
  width: 100% !important;
}

.note-form-label {
  color: var(--admin-muted) !important;
  margin-bottom: 4px !important;
  font-size: 0.85rem !important;
}
