/* ============================================================
   VERUNIX ADMIN PANEL — Premium Dark Theme
   ============================================================ */

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body,
.admin-body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
  background: #0f172a;
  color: #94a3b8;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Keyframes --- */
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Scrollbar (Dark Theme) --- */
.admin-wrapper ::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.admin-wrapper ::-webkit-scrollbar-track {
  background: transparent;
}

.admin-wrapper ::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 3px;
}

.admin-wrapper ::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

.admin-sidebar::-webkit-scrollbar {
  width: 4px;
}

.admin-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.admin-sidebar::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 2px;
}

/* ============================================================
   LAYOUT
   ============================================================ */

.admin-wrapper {
  display: flex;
  flex-direction: row;
  min-height: 100vh;
}

/* --- Sidebar --- */
.admin-sidebar {
  width: 260px;
  background: #0a0f1e;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #1e293b;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-logo {
  padding: 24px;
  border-bottom: 1px solid #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-shrink: 0;
}

.sidebar-logo img {
  height: 28px;
}

.sidebar-logo span {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #64748b;
}

/* --- Sidebar Navigation --- */
.sidebar-nav {
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.sidebar-nav-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #475569;
  padding: 16px 16px 8px;
  margin-top: 8px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
  text-decoration: none;
  transition: all 0.2s ease;
  position: relative;
}

.nav-link i {
  width: 20px;
  text-align: center;
  font-size: 14px;
  flex-shrink: 0;
}

.nav-link:hover {
  background: #1e293b;
  color: #f1f5f9;
}

.nav-link.active {
  background: #1e293b;
  color: #2563eb;
}

.nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 24px;
  background: #2563eb;
  border-radius: 0 3px 3px 0;
}

/* --- Main Content --- */
.main-content {
  margin-left: 260px;
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --- Topbar --- */
.main-topbar {
  height: 60px;
  background: #111827;
  border-bottom: 1px solid #1e293b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  flex-shrink: 0;
}

.main-topbar h2 {
  font-size: 18px;
  font-weight: 800;
  color: #f1f5f9;
  margin: 0;
}

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

/* --- Content Area --- */
.content-area {
  flex: 1;
  padding: 32px;
  overflow-y: auto;
  background: #0f172a;
  animation: fadeIn 0.3s ease;
}


/* ============================================================
   LOGIN SCREEN
   ============================================================ */

.login-screen {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f172a;
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.login-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 16px;
  padding: 48px 40px;
  width: 420px;
  max-width: 90vw;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.4s ease;
}

.login-card h1 {
  font-size: 24px;
  font-weight: 900;
  color: #f1f5f9;
  text-align: center;
  margin: 0 0 8px;
}

.login-card p {
  font-size: 14px;
  color: #64748b;
  text-align: center;
  margin: 0 0 32px;
}

.login-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
}

.login-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 13px;
  color: #ef4444;
  margin-bottom: 16px;
  display: none;
}

.login-error.show {
  display: block;
  animation: fadeIn 0.2s ease;
}


/* ============================================================
   FORM ELEMENTS
   ============================================================ */

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.form-input {
  width: 100%;
  padding: 11px 14px;
  background: #111827;
  border: 1.5px solid #334155;
  border-radius: 8px;
  font-size: 14px;
  color: #f1f5f9;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-input::placeholder {
  color: #475569;
}

/* Input with prefix */
.form-input-with-prefix {
  display: flex;
  align-items: center;
  background: #111827;
  border: 1.5px solid #334155;
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input-with-prefix:focus-within {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-input-prefix {
  padding: 11px 14px;
  background: #0f172a;
  border-right: 1px solid #334155;
  font-size: 13px;
  color: #64748b;
  white-space: nowrap;
  flex-shrink: 0;
}

.form-input-with-prefix input {
  border: none;
  background: transparent;
  padding: 11px 14px;
  flex: 1;
  color: #f1f5f9;
  outline: none;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
}

.form-input-with-prefix input::placeholder {
  color: #475569;
}

/* Textarea */
.form-textarea {
  width: 100%;
  padding: 11px 14px;
  background: #111827;
  border: 1.5px solid #334155;
  border-radius: 8px;
  font-size: 14px;
  color: #f1f5f9;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  min-height: 120px;
  resize: vertical;
}

.form-textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-textarea::placeholder {
  color: #475569;
}

/* Select */
.form-select {
  width: 100%;
  padding: 11px 14px;
  background: #111827;
  border: 1.5px solid #334155;
  border-radius: 8px;
  font-size: 14px;
  color: #f1f5f9;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}

.form-select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-select option {
  background: #111827;
  color: #f1f5f9;
}

/* Hint */
.form-hint {
  font-size: 11px;
  color: #475569;
  margin-top: 4px;
}


/* ============================================================
   BUTTONS
   ============================================================ */

.btn-admin {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Inter', sans-serif;
  text-decoration: none;
  line-height: 1;
}

.btn-admin:active {
  transform: scale(0.97);
}

/* Primary */
.btn-admin-primary {
  background: #2563eb;
  color: #fff;
}

.btn-admin-primary:hover {
  background: #3b82f6;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-admin-primary:active {
  transform: translateY(0) scale(0.97);
}

/* Success */
.btn-admin-success {
  background: #10b981;
  color: #fff;
}

.btn-admin-success:hover {
  background: #059669;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Danger */
.btn-admin-danger {
  background: #ef4444;
  color: #fff;
}

.btn-admin-danger:hover {
  background: #dc2626;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Ghost */
.btn-admin-ghost {
  background: transparent;
  color: #94a3b8;
  border: 1.5px solid #334155;
}

.btn-admin-ghost:hover {
  border-color: #475569;
  color: #f1f5f9;
  background: rgba(30, 41, 59, 0.5);
}

/* Sizes */
.btn-admin-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-admin-lg {
  padding: 14px 28px;
  font-size: 15px;
}


/* ============================================================
   CARDS & PANELS
   ============================================================ */

.admin-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 24px;
  animation: fadeIn 0.3s ease;
}

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

.admin-card-title {
  font-size: 15px;
  font-weight: 800;
  color: #f1f5f9;
  margin: 0;
}

/* --- Stat Grid --- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.stat-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 20px;
  transition: all 0.2s ease;
}

.stat-card:hover {
  border-color: #475569;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.stat-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  margin-bottom: 12px;
}

.stat-card-icon.blue {
  background: rgba(37, 99, 235, 0.15);
  color: #3b82f6;
}

.stat-card-icon.green {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.stat-card-icon.amber {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.stat-card-icon.purple {
  background: rgba(147, 51, 234, 0.15);
  color: #9333ea;
}

.stat-card-value {
  font-size: 28px;
  font-weight: 900;
  color: #f1f5f9;
  margin: 0 0 4px;
  line-height: 1;
}

.stat-card-label {
  font-size: 12px;
  color: #64748b;
  margin: 0;
}


/* ============================================================
   TABLE
   ============================================================ */

.admin-table-wrapper {
  overflow-x: auto;
}

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

.admin-table th {
  font-size: 11px;
  font-weight: 800;
  color: #64748b;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid #334155;
  background: #111827;
  white-space: nowrap;
}

.admin-table td {
  padding: 14px 16px;
  font-size: 13px;
  color: #94a3b8;
  border-bottom: 1px solid #1e293b;
  transition: background 0.15s ease;
}

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

.admin-table tr:last-child td {
  border-bottom: none;
}

/* --- Status Badges --- */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}

.status-badge.published {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.status-badge.draft {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.status-badge.active {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.status-badge.inactive {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.status-badge.pending {
  background: rgba(37, 99, 235, 0.15);
  color: #3b82f6;
}


/* ============================================================
   BLOG EDITOR LAYOUT
   ============================================================ */

.editor-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  align-items: start;
}

.editor-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.editor-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 92px; /* topbar 60px + padding 32px */
}


/* ============================================================
   SEO ANALYSIS PANEL
   ============================================================ */

.seo-score-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  position: relative;
  background: conic-gradient(
    #10b981 calc(var(--seo-score, 0) * 1%),
    #1e293b calc(var(--seo-score, 0) * 1%)
  );
}

.seo-score-circle::before {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: #1e293b;
}

.seo-score-value {
  font-size: 24px;
  font-weight: 900;
  color: #f1f5f9;
  position: relative;
  z-index: 1;
}

.seo-score-label {
  font-size: 12px;
  color: #64748b;
  text-align: center;
  margin-bottom: 16px;
}

.seo-check-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.seo-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.4;
  transition: background 0.15s ease;
}

.seo-check:hover {
  background: #111827;
}

.seo-check .seo-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

.seo-icon.pass {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.seo-icon.warn {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.seo-icon.fail {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}


/* ============================================================
   KEYWORDS / TAGS INPUT
   ============================================================ */

.tags-input-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 12px;
  background: #111827;
  border: 1.5px solid #334155;
  border-radius: 8px;
  min-height: 42px;
  align-items: center;
  cursor: text;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tags-input-wrapper:focus-within {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.tag-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #334155;
  color: #94a3b8;
  padding: 3px 8px 3px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  animation: fadeIn 0.15s ease;
}

.tag-item .tag-remove {
  cursor: pointer;
  font-size: 10px;
  padding: 2px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  border: none;
  background: transparent;
  color: #94a3b8;
  line-height: 1;
}

.tag-item .tag-remove:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.tags-input {
  border: none;
  background: transparent;
  outline: none;
  color: #f1f5f9;
  font-size: 13px;
  min-width: 80px;
  flex: 1;
  font-family: 'Inter', sans-serif;
  padding: 0;
}

.tags-input::placeholder {
  color: #475569;
}


/* ============================================================
   TOAST / NOTIFICATION
   ============================================================ */

.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 14px 20px;
  font-size: 13px;
  color: #f1f5f9;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  animation: slideInRight 0.3s ease;
  min-width: 300px;
  pointer-events: auto;
}

.toast.success {
  border-left: 3px solid #10b981;
}

.toast.error {
  border-left: 3px solid #ef4444;
}

.toast.info {
  border-left: 3px solid #2563eb;
}

.toast .toast-close {
  margin-left: auto;
  cursor: pointer;
  color: #64748b;
  font-size: 14px;
  background: none;
  border: none;
  padding: 2px;
  transition: color 0.15s ease;
}

.toast .toast-close:hover {
  color: #f1f5f9;
}


/* ============================================================
   MODAL
   ============================================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 16px;
  padding: 32px;
  width: 500px;
  max-width: 90vw;
  max-height: 80vh;
  overflow-y: auto;
  animation: fadeIn 0.25s ease;
}

.modal h3 {
  font-size: 18px;
  font-weight: 800;
  color: #f1f5f9;
  margin: 0 0 8px;
}

.modal p {
  font-size: 14px;
  color: #64748b;
  margin: 0 0 24px;
}

.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}


/* ============================================================
   IMAGE UPLOAD
   ============================================================ */

.image-upload-area {
  border: 2px dashed #334155;
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.image-upload-area:hover {
  border-color: #2563eb;
  background: rgba(37, 99, 235, 0.05);
}

.image-upload-area i {
  font-size: 32px;
  color: #475569;
  margin-bottom: 12px;
  display: block;
}

.image-upload-area p {
  font-size: 13px;
  color: #64748b;
  margin: 0;
}

.image-preview {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #334155;
}

.image-preview img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.image-preview .remove-image {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  backdrop-filter: blur(4px);
}

.image-preview .remove-image:hover {
  background: rgba(239, 68, 68, 0.8);
}


/* ============================================================
   PAGE / CODE EDITOR
   ============================================================ */

.code-editor-wrapper {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 12px;
  overflow: hidden;
}

.code-editor-toolbar {
  background: #1e293b;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #334155;
}

.code-editor-toolbar span {
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
}

.code-editor-textarea {
  width: 100%;
  min-height: 500px;
  background: #0f172a;
  color: #e2e8f0;
  border: none;
  padding: 16px;
  font-family: 'Fira Code', 'Consolas', monospace;
  font-size: 13px;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  tab-size: 2;
  -moz-tab-size: 2;
}

.code-editor-textarea::placeholder {
  color: #475569;
}


/* ============================================================
   MISCELLANEOUS
   ============================================================ */

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  animation: fadeIn 0.3s ease;
}

.empty-state i {
  font-size: 48px;
  color: #334155;
  margin-bottom: 16px;
  display: block;
}

.empty-state h3 {
  font-size: 16px;
  color: #64748b;
  margin: 0 0 8px;
  font-weight: 700;
}

.empty-state p {
  font-size: 13px;
  color: #475569;
  margin: 0;
}

/* Divider */
.divider {
  height: 1px;
  background: #1e293b;
  margin: 20px 0;
  border: none;
}

/* Badge Count */
.badge-count {
  background: #2563eb;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 999px;
  margin-left: 8px;
  line-height: 1.4;
}

/* Text utilities */
.text-success { color: #10b981; }
.text-warning { color: #f59e0b; }
.text-danger  { color: #ef4444; }
.text-primary { color: #2563eb; }
.text-muted   { color: #64748b; }
.text-white   { color: #f1f5f9; }

/* Flex utilities */
.d-flex       { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8   { gap: 8px; }
.gap-12  { gap: 12px; }
.gap-16  { gap: 16px; }
.gap-20  { gap: 20px; }

/* Margin / Padding utilities */
.mb-0  { margin-bottom: 0; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.mt-0  { margin-top: 0; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1200px) {
  .editor-layout {
    grid-template-columns: 1fr;
  }

  .editor-sidebar {
    position: static;
  }

  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .admin-sidebar {
    transform: translateX(-100%);
  }

  .admin-sidebar.open {
    transform: translateX(0);
    box-shadow: 8px 0 24px rgba(0, 0, 0, 0.5);
  }

  .main-content {
    margin-left: 0;
  }

  .main-topbar {
    padding: 0 16px;
  }

  .content-area {
    padding: 16px;
  }

  .stat-grid {
    grid-template-columns: 1fr;
  }

  .login-card {
    padding: 32px 24px;
  }

  .modal {
    padding: 24px;
    margin: 16px;
  }
}

/* ============================================================
   MISSING UI COMPONENTS
   ============================================================ */

/* --- View Sections Switcher --- */
.view-section {
  display: none;
}

.view-section.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* --- Password Toggle --- */
.password-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}

.password-toggle:hover {
  color: #f1f5f9;
}

/* --- Sidebar Footer --- */
.sidebar-footer {
  padding: 16px 24px;
  border-top: 1px solid #1e293b;
  flex-shrink: 0;
}

.sidebar-footer-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #475569;
  font-weight: 600;
}

/* --- Topbar User --- */
.topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-user span {
  font-size: 13px;
  font-weight: 700;
  color: #f1f5f9;
}

.topbar-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

/* --- Recent Post Items --- */
.recent-post-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #111827;
  border: 1px solid #1e293b;
  border-radius: 10px;
  margin-bottom: 8px;
}

.recent-post-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.recent-post-info strong {
  color: #f1f5f9;
  font-size: 13px;
}

.recent-post-info span {
  font-size: 11px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* --- Quick Actions --- */
.quick-action {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: #1e293b;
  border: 1.5px solid #334155;
  border-radius: 12px;
  color: #94a3b8;
  text-decoration: none;
  transition: all 0.2s ease;
  margin-bottom: 12px;
}

.quick-action:hover {
  border-color: #2563eb;
  transform: translateY(-2px);
  background: rgba(30, 41, 59, 0.8);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.quick-action-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.quick-action div strong {
  display: block;
  color: #f1f5f9;
  font-size: 14px;
  margin-bottom: 2px;
}

.quick-action div span {
  font-size: 12px;
  color: #64748b;
}

/* --- Collapse Icon --- */
.collapse-icon {
  font-size: 12px;
  color: #64748b;
  transition: transform 0.2s ease;
}

/* --- Image Tabs --- */
.image-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid #1e293b;
  padding-bottom: 10px;
}

.image-tab {
  background: transparent;
  border: 1.5px solid #334155;
  color: #94a3b8;
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.image-tab:hover {
  border-color: #475569;
  color: #f1f5f9;
  background: rgba(30, 41, 59, 0.3);
}

.image-tab.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

/* --- Schema Preview --- */
.schema-preview {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 12px;
  max-height: 200px;
  overflow-y: auto;
}

/* --- Page Info Items --- */
.page-info-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #1e293b;
  font-size: 13px;
}

.page-info-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.page-info-label {
  color: #64748b;
  font-weight: 500;
}

.page-info-value {
  color: #f1f5f9;
  font-weight: 600;
}

/* --- Category Management Items --- */
.category-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #111827;
  border: 1px solid #1e293b;
  border-radius: 8px;
  margin-bottom: 6px;
}

/* --- Toggle Switch Styles --- */
.switch-toggle input:checked + .slider {
  background-color: #2563eb !important;
}
.switch-toggle .slider::before {
  content: "";
  position: absolute;
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .2s;
  border-radius: 50%;
}
.switch-toggle input:checked + .slider::before {
  transform: translateX(20px);
}

/* ============================================================
   MOBILE RESPONSIVE ENHANCEMENTS
   ============================================================ */

/* Hamburger sadece mobilde görünür */
.sidebar-toggle-btn { display: none !important; }

/* Sidebar arkaplan örtüsü (mobil) */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 90;
}
.sidebar-overlay.show { display: block; }

/* Tablet ve altı: tüm inline çok-sütunlu grid'leri tek sütuna indir */
@media (max-width: 1024px) {
  .content-area [style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 768px) {
  /* Hamburger görünür */
  .sidebar-toggle-btn { display: inline-flex !important; }

  /* Sidebar ekranı taşmasın */
  .admin-sidebar { max-width: 84vw; }

  /* Topbar sıkıştır */
  .main-topbar { padding: 0 14px; }
  .main-topbar h2 {
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 40vw;
  }
  .topbar-actions { gap: 8px; }
  .topbar-actions .btn-admin { padding: 6px 10px; font-size: 12px; }
  .topbar-user span { display: none; } /* "Admin" yazısını gizle, avatar kalsın */

  /* Kart başlıkları (arama + filtre + buton) dikey istiflensin */
  .admin-card-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .admin-card-header > div { flex-wrap: wrap; }
  .admin-card-header [style*="280px"] { width: 100% !important; }
  .admin-card-header .form-select { flex: 1; }

  /* Editör üst aksiyon satırları (Taslak/Yayınla vb.) alta sarsın */
  .view-section > [style*="justify-content:space-between"] {
    flex-wrap: wrap;
    gap: 12px;
  }

  /* Genel boşlukları daralt */
  .content-area { padding: 14px; }
  .admin-card { padding: 16px; }

  /* Tablolar yatay kaydırılabilir + kompakt */
  .admin-table-wrapper { -webkit-overflow-scrolling: touch; }
  .admin-table th,
  .admin-table td { padding: 10px 8px !important; }

  /* Modal mobil uyumlu */
  .modal {
    max-height: 88vh;
    overflow-y: auto;
  }
}

@media (max-width: 480px) {
  .stat-card-value { font-size: 26px; }
  .login-card { padding: 28px 20px; }
  .main-topbar h2 { max-width: 34vw; }
}
