/* ============================================
   HUKUMINAJA ADMIN PANEL
   CSS Variables | Mobile First | Production Ready
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
  /* Tema Warna */
  --primary: #D4AF37;
  --primary-hover: #B8941F;
  --primary-light: #F8EDBF;
  --primary-lighter: #FFF9E6;
  --secondary: #0F172A;
  --bg: #F8FAFC;
  --card: #FFFFFF;
  --text: #1E293B;
  --text-light: #64748B;
  --text-muted: #94a3b8;
  --border: #E2E8F0;
  --border-light: #f1f5f9;
  
  /* Status */
  --success: #10b981;
  --success-light: #d1fae5;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  
  /* Radius & Shadow */
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px 0 rgb(15 23 42 / 0.05);
  --shadow: 0 1px 3px 0 rgb(15 23 42 / 0.1), 0 1px 2px -1px rgb(15 23 42 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(15 23 42 / 0.1), 0 2px 4px -2px rgb(15 23 42 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(15 23 42 / 0.1), 0 4px 6px -4px rgb(15 23 42 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(15 23 42 / 0.1), 0 8px 10px -6px rgb(15 23 42 / 0.1);
  
  /* Transisi */
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Layout */
  --sidebar-width: 260px;
  --header-height: 72px;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Selection */
::selection {
  background-color: var(--primary-light);
  color: var(--primary);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  color: var(--secondary);
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-fast);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

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

.btn-primary {
  background-color: var(--primary);
  color: white;
  box-shadow: 0 4px 14px 0 rgb(212 175 55 / 0.39);
}
.btn-primary:hover:not(:disabled) {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px 0 rgb(212 175 55 / 0.23);
}

.btn-secondary {
  background-color: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover:not(:disabled) {
  background-color: var(--bg);
  border-color: var(--text-muted);
}

.btn-danger {
  background-color: var(--danger);
  color: white;
}
.btn-danger:hover:not(:disabled) {
  background-color: #dc2626;
}

.btn-ghost {
  background-color: transparent;
  color: var(--text-light);
}
.btn-ghost:hover {
  background-color: var(--border-light);
  color: var(--text);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.8125rem;
}

/* Button Ripple Effect */
.btn .ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: ripple 0.6s linear;
  background-color: rgba(255, 255, 255, 0.3);
  pointer-events: none;
}
@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

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

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 8px;
}

.form-label span {
  color: var(--danger);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  font-family: inherit;
  font-size: 0.9375rem;
  color: var(--text);
  background-color: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  outline: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2364748B' viewBox='0 0 16 16'%3E%3Cpath d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
}

/* Custom File Input */
.file-dropzone {
  width: 100%;
  padding: 32px 24px;
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background-color: var(--card);
}

.file-dropzone:hover,
.file-dropzone.dragover {
  border-color: var(--primary);
  background-color: var(--primary-lighter);
}

.file-dropzone i {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 12px;
  display: block;
}

.file-dropzone p {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 4px;
}

.file-dropzone small {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.file-preview {
  margin-top: 16px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: none;
  position: relative;
}

.file-preview img {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  display: block;
}

.file-preview .remove-file {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}
.file-preview .remove-file:hover {
  background: var(--danger);
}

/* Radio Group (Status) */
.radio-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.radio-card {
  position: relative;
  flex: 1;
  min-width: 140px;
}

.radio-card input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.radio-card label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.875rem;
  font-weight: 500;
  background: var(--card);
}

.radio-card label i {
  font-size: 1.125rem;
}

.radio-card input:checked + label {
  border-color: var(--primary);
  background-color: var(--primary-lighter);
  color: var(--primary);
}

.radio-card input:focus + label {
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* ---------- Cards ---------- */
.card {
  background-color: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  transition: var(--transition);
}

.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.badge-success {
  background-color: var(--success-light);
  color: #047857;
}

.badge-warning {
  background-color: var(--warning-light);
  color: #b45309;
}

/* ---------- Avatar ---------- */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0e7ff 50%, #f5f3ff 100%);
  position: relative;
  overflow: hidden;
}

/* Decorative background shapes */
.login-page::before,
.login-page::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  pointer-events: none;
}

.login-page::before {
  width: 400px;
  height: 400px;
  background: var(--primary-light);
  top: -100px;
  right: -100px;
}

.login-page::after {
  width: 300px;
  height: 300px;
  background: #ddd6fe;
  bottom: -80px;
  left: -80px;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(255, 255, 255, 0.6);
  position: relative;
  z-index: 1;
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo .logo-icon {
  width: 56px;
  height: 56px;
  background: var(--primary);
  color: #171717;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 16px;
  box-shadow: 0 8px 16px -4px rgb(212 175 55 / 0.3);
}

.login-logo h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 4px;
}

.login-logo p {
  font-size: 0.875rem;
  color: var(--text-light);
}

/* Password Field */
.password-field {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  font-size: 1rem;
  transition: var(--transition-fast);
}

.password-toggle:hover {
  color: var(--text);
}

/* Remember Me */
.remember-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text-light);
  user-select: none;
}

.checkbox-wrapper input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* Error Message */
.error-message {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background-color: var(--danger-light);
  color: #991b1b;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin-bottom: 20px;
  animation: shake 0.5s ease;
}

.error-message.show {
  display: flex;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* Loading Spinner */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: none;
}

.spinner.show {
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================
   DASHBOARD LAYOUT
   ============================================ */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ---------- Sidebar ---------- */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header {
  padding: 24px;
  border-bottom: 1px solid var(--border-light);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-brand .brand-icon {
  width: 40px;
  height: 40px;
  background: var(--primary);
  color: #171717;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  font-weight: 700;
}

.sidebar-brand .brand-text {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--secondary);
}

.sidebar-brand .brand-text span {
  color: var(--primary);
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}

.nav-section {
  margin-bottom: 8px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-light);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: var(--transition-fast);
  margin-bottom: 4px;
}

.nav-link:hover {
  background-color: var(--bg);
  color: var(--text);
}

.nav-link.active {
  background-color: var(--primary-lighter);
  color: var(--primary);
  font-weight: 600;
}

.nav-link i {
  width: 20px;
  text-align: center;
  font-size: 1rem;
}

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--border-light);
}

/* Mobile Sidebar Overlay */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.sidebar-overlay.show {
  opacity: 1;
  visibility: visible;
}

/* ---------- Main Content ---------- */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: var(--transition);
}

/* ---------- Header ---------- */
.header {
  height: var(--header-height);
  background-color: var(--card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: none;
  background: var(--bg);
  color: var(--text);
  font-size: 1.125rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.menu-toggle:hover {
  background: var(--border);
}

.header-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--secondary);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-date {
  font-size: 0.875rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 4px 4px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
  transition: var(--transition-fast);
}

.header-profile:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.header-profile .profile-info {
  text-align: right;
  display: none;
}

.header-profile .profile-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

.header-profile .profile-role {
  font-size: 0.75rem;
  color: var(--text-light);
}

/* ---------- Content Area ---------- */
.content {
  flex: 1;
  padding: 32px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

.page-header {
  margin-bottom: 32px;
}

.page-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 4px;
}

.page-header p {
  color: var(--text-light);
  font-size: 0.9375rem;
}

/* ---------- Stats Grid ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.stat-icon.blue {
  background: var(--primary-lighter);
  color: var(--primary);
}

.stat-icon.green {
  background: var(--success-light);
  color: #047857;
}

.stat-icon.amber {
  background: var(--warning-light);
  color: #b45309;
}

.stat-icon.purple {
  background: var(--primary-lighter);
  color: var(--primary);
}

.stat-info h3 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--secondary);
  line-height: 1.2;
  margin-bottom: 4px;
}

.stat-info p {
  font-size: 0.875rem;
  color: var(--text-light);
}

/* ---------- Article List ---------- */
.articles-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.articles-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
}

.articles-count {
  font-size: 0.875rem;
  color: var(--text-light);
  font-weight: 400;
}

/* Article Card (List Item) */
.articles-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.article-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.article-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateX(4px);
}

.article-thumbnail {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg);
}

.article-info {
  flex: 1;
  min-width: 0;
}

.article-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--secondary);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.article-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  color: var(--text-light);
}

.article-meta-item i {
  font-size: 0.75rem;
}

.article-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  font-size: 0.875rem;
}

.btn-icon:hover {
  background: var(--bg);
  color: var(--text);
  border-color: var(--text-muted);
}

.btn-icon.delete:hover {
  background: var(--danger-light);
  color: var(--danger);
  border-color: var(--danger);
}

/* ---------- Empty State ---------- */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  display: none;
}

.empty-state.show {
  display: block;
}

.empty-state i {
  font-size: 3.5rem;
  color: var(--border);
  margin-bottom: 16px;
}

.empty-state h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 0.9375rem;
  color: var(--text-light);
  margin-bottom: 24px;
}

/* ---------- Skeleton Loading ---------- */
.skeleton {
  background: linear-gradient(90deg, var(--border-light) 25%, var(--border) 50%, var(--border-light) 75%);
  background-size: 200% 100%;
  animation: skeleton 1.5s infinite;
  border-radius: 8px;
}

@keyframes skeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.skeleton-thumb {
  width: 72px;
  height: 72px;
  border-radius: 12px;
}

.skeleton-lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skeleton-line {
  height: 12px;
}
.skeleton-line.short {
  width: 40%;
}

/* ---------- Floating Action Button ---------- */
.fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: #171717;
  border: none;
  box-shadow: 0 8px 24px rgb(212 175 55 / 0.35);
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  z-index: 90;
  transition: var(--transition);
}

.fab:hover {
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 12px 32px rgb(212 175 55 / 0.4);
}

/* ---------- Modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal.show {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease;
}

.modal-content {
  background: var(--card);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 420px;
  padding: 32px;
  position: relative;
  z-index: 1;
  box-shadow: var(--shadow-xl);
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
}

.modal-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--danger-light);
  color: var(--danger);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.modal-content h4 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.modal-content p {
  font-size: 0.9375rem;
  color: var(--text-light);
  margin-bottom: 24px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.modal-actions .btn {
  flex: 1;
}

/* ---------- Toast Notifications ---------- */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast {
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 320px;
  max-width: 420px;
  pointer-events: all;
  animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.toast.toast-exit {
  animation: slideOutRight 0.3s ease forwards;
}

.toast-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.toast-icon.success {
  background: var(--success-light);
  color: #047857;
}

.toast-icon.error {
  background: var(--danger-light);
  color: #991b1b;
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--secondary);
  margin-bottom: 2px;
}

.toast-message {
  font-size: 0.8125rem;
  color: var(--text-light);
}

.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  font-size: 1rem;
  transition: var(--transition-fast);
}

.toast-close:hover {
  color: var(--text);
}

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--primary);
  animation: progress 4s linear forwards;
}

.toast.success .toast-progress {
  background: var(--success);
}

.toast.error .toast-progress {
  background: var(--danger);
}

/* ---------- Rich Text Editor Placeholder ---------- */
.rich-editor {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: var(--transition);
}

.rich-editor:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.editor-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 12px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.editor-toolbar button {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  transition: var(--transition-fast);
}

.editor-toolbar button:hover {
  background: var(--card);
  color: var(--text);
}

.editor-toolbar button.active {
  background: var(--primary-lighter);
  color: var(--primary);
}

.editor-toolbar .toolbar-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 0 4px;
}

.editor-content {
  min-height: 280px;
  padding: 16px;
  outline: none;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--text);
}

.editor-content:empty::before {
  content: attr(data-placeholder);
  color: var(--text-muted);
  pointer-events: none;
}

/* ---------- Animations ---------- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

@keyframes slideOutRight {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

@keyframes progress {
  from { width: 100%; }
  to { width: 0%; }
}

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

/* Tablet */
@media (min-width: 640px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .header-profile .profile-info {
    display: block;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Mobile Specific */
@media (max-width: 1023px) {
  .sidebar {
    transform: translateX(-100%);
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .menu-toggle {
    display: flex;
  }
  
  .header {
    padding: 0 20px;
  }
  
  .content {
    padding: 20px;
  }
  
  .fab {
    display: flex;
  }
  
  .article-card {
    flex-wrap: wrap;
  }
  
  .article-thumbnail {
    width: 100%;
    height: 160px;
  }
  
  .article-info {
    width: 100%;
  }
  
  .article-title {
    white-space: normal;
  }
  
  .article-actions {
    width: 100%;
    justify-content: flex-end;
    padding-top: 8px;
    border-top: 1px solid var(--border-light);
  }
  
  .modal-content {
    padding: 24px;
  }
  
  .toast-container {
    left: 16px;
    right: 16px;
    bottom: 80px; /* Space for FAB */
  }
  
  .toast {
    min-width: unset;
    max-width: unset;
    width: 100%;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* HUKUMINAJA gold theme polish */
.nav-link-site { color: var(--primary); }
.nav-link-site:hover { background: var(--primary-lighter); color: var(--primary-hover); }
.login-card { border-top: 3px solid var(--primary); }
.login-logo .logo-icon { background: var(--primary); color: #171717; box-shadow: 0 10px 28px rgb(212 175 55 / .24); }
.btn-primary { color: #171717; }
.btn-primary:hover:not(:disabled) { color: #171717; }

.article-editor{width:100%;min-height:560px;resize:vertical;padding:20px;border:1px solid rgba(212,175,55,.25);border-radius:14px;line-height:1.8;font-size:16px;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;background:#fffdf7;color:#252525;outline:none;transition:border-color .2s,box-shadow .2s}.article-editor:focus{border-color:#D4AF37;box-shadow:0 0 0 4px rgba(212,175,55,.12)}


/* ============================================
   ARTICLE EDITOR — RESPONSIVE / MOBILE UX
   ============================================ */
.article-editor-page {
  background:
    radial-gradient(circle at 90% 0%, rgba(212,175,55,.10), transparent 28rem),
    var(--bg);
}
.editor-main { margin-left: 0 !important; width: 100%; min-height: 100vh; }
.editor-shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 30px 0 70px; }
.editor-header { display:flex; align-items:flex-end; justify-content:space-between; gap:24px; margin-bottom:24px; }
.editor-header h1 { font-size: clamp(1.7rem, 3vw, 2.35rem); margin-top:8px; letter-spacing:-.025em; }
.editor-header p { color:var(--text-light); margin-top:7px; max-width:720px; }
.editor-back { display:inline-flex; align-items:center; gap:8px; color:var(--primary-hover); font-weight:700; font-size:.86rem; }
.editor-back:hover { transform:translateX(-2px); }
.editor-card {
  background:var(--card); border:1px solid var(--border); border-radius:24px;
  padding:clamp(20px, 3vw, 32px); margin-bottom:18px; box-shadow:var(--shadow-sm);
}
.editor-card-head { display:flex; align-items:flex-start; gap:14px; margin-bottom:24px; }
.editor-card-head h2 { font-size:1.08rem; margin:0; }
.editor-card-head p { color:var(--text-light); font-size:.84rem; margin-top:3px; }
.editor-step {
  flex:0 0 38px; height:38px; border-radius:12px; display:grid; place-items:center;
  background:var(--primary-lighter); color:var(--primary-hover); font-weight:800; font-size:.78rem;
}
.editor-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }
.editor-field { display:flex; flex-direction:column; gap:8px; min-width:0; }
.editor-field.full { grid-column:1/-1; }
.editor-field > span { font-size:.86rem; font-weight:700; color:var(--text); }
.editor-field > span b { color:var(--danger); }
.editor-field > span em { color:var(--text-muted); font-style:normal; font-weight:500; margin-left:5px; }
.editor-field small { color:var(--text-light); font-size:.76rem; line-height:1.5; }
.editor-field .form-input, .editor-field .form-select, .editor-field .form-textarea {
  font-size:1rem; min-height:50px; padding:14px 16px;
}
.author-preview {
  display:flex; align-items:center; gap:10px; min-height:48px; padding:12px 14px;
  border:1px solid var(--primary-light); background:var(--primary-lighter);
  border-radius:14px; color:var(--text-light); font-size:.86rem;
}
.author-preview i { color:var(--primary-hover); }
.author-preview strong { color:var(--text); }
.upload-zone {
  position:relative; display:flex; flex-direction:column; align-items:center; justify-content:center;
  min-height:190px; padding:28px; border:2px dashed var(--border); border-radius:20px;
  background:linear-gradient(180deg,#fff,var(--primary-lighter)); cursor:pointer; text-align:center;
  transition:var(--transition);
}
.upload-zone:hover { border-color:var(--primary); transform:translateY(-1px); box-shadow:0 10px 30px rgba(212,175,55,.12); }
.upload-zone input { position:absolute; inset:0; opacity:0; cursor:pointer; width:100%; height:100%; }
.upload-zone .upload-icon { width:54px; height:54px; border-radius:16px; display:grid; place-items:center; background:#fff; color:var(--primary); box-shadow:var(--shadow); font-size:1.25rem; margin-bottom:12px; }
.upload-zone strong { font-size:.95rem; }
.upload-zone span:not(.upload-icon) { color:var(--text-light); font-size:.8rem; margin-top:4px; }
.upload-zone small { color:var(--text-muted); margin-top:8px; }
.image-preview-card { display:flex; gap:16px; align-items:center; margin-top:14px; padding:12px; border:1px solid var(--border); border-radius:16px; background:#fff; }
.image-preview-card img { width:150px; height:92px; object-fit:cover; border-radius:12px; }
.image-preview-card div { display:flex; flex-direction:column; gap:5px; }
.image-preview-card small { color:var(--text-light); }
.content-field .article-editor { min-height:520px; resize:vertical; line-height:1.85; padding:20px; font-size:1rem; }
.summary-editor { min-height:140px !important; resize:vertical; line-height:1.7; }
.editor-actions {
  position:sticky; bottom:14px; z-index:20; display:flex; justify-content:flex-end; gap:12px;
  padding:14px; background:rgba(248,250,252,.88); backdrop-filter:blur(14px);
  border:1px solid rgba(226,232,240,.9); border-radius:18px; box-shadow:var(--shadow-lg);
}
.editor-save { min-width:210px; }
.editor-message { min-height:0; margin:0 0 14px; padding:0; border-radius:14px; font-size:.88rem; }
.editor-message.error, .editor-message.success { padding:12px 14px; }
.editor-message.error { color:#991b1b; background:var(--danger-light); border:1px solid #fecaca; }
.editor-message.success { color:#166534; background:var(--success-light); border:1px solid #bbf7d0; }

@media (max-width: 720px) {
  .editor-shell { width:min(100% - 20px, 680px); padding:16px 0 34px; }
  .editor-header { align-items:flex-start; flex-direction:column; gap:12px; }
  .editor-header h1 { font-size:1.65rem; }
  .editor-site-link { align-self:stretch; }
  .editor-card { border-radius:18px; padding:18px 15px; margin-bottom:12px; }
  .editor-card-head { margin-bottom:18px; }
  .editor-grid { grid-template-columns:1fr; gap:15px; }
  .editor-field.full { grid-column:auto; }
  .editor-field .form-input, .editor-field .form-select, .editor-field .form-textarea { min-height:52px; font-size:16px; }
  .content-field .article-editor { min-height:58vh; max-height:none; font-size:16px; line-height:1.8; padding:16px; }
  .summary-editor { min-height:150px !important; }
  .upload-zone { min-height:170px; padding:24px 15px; }
  .image-preview-card { align-items:flex-start; }
  .image-preview-card img { width:110px; height:78px; }
  .editor-actions { bottom:8px; margin:0 -5px; padding:9px; border-radius:16px; }
  .editor-actions .btn { min-height:50px; flex:1; padding:11px 12px; }
  .editor-save { min-width:0; }
}
@media (max-width: 420px) {
  .editor-actions { gap:8px; }
  .editor-actions .btn { font-size:.82rem; }
  .editor-step { flex-basis:34px; height:34px; border-radius:10px; }
}

/* ---------- Professional Article Editor v2 ---------- */
.article-editor-page .content-field { min-width: 0; }
.article-editor-page .rich-editor {
  width: 100%;
  background: #fff;
  border: 1px solid rgba(212,175,55,.30);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(42,35,20,.06);
}
.article-editor-page .rich-editor:focus-within {
  border-color: #D4AF37;
  box-shadow: 0 0 0 4px rgba(212,175,55,.12), 0 14px 34px rgba(42,35,20,.08);
}
.article-editor-page .editor-toolbar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 12px;
  min-height: 56px;
  background: rgba(255,253,247,.97);
  border-bottom: 1px solid rgba(212,175,55,.18);
  overflow-x: auto;
  scrollbar-width: thin;
}
.article-editor-page .editor-toolbar::-webkit-scrollbar { height: 4px; }
.article-editor-page .editor-toolbar button {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #5d5648;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  transition: .18s ease;
}
.article-editor-page .editor-toolbar button:hover { background: #f7f0d9; color: #8b6d12; border-color: rgba(212,175,55,.22); }
.article-editor-page .editor-toolbar button.active { background: #ead58b; color: #4d3c09; border-color: #d4af37; }
.article-editor-page .editor-toolbar .toolbar-divider { flex: 0 0 1px; width: 1px; height: 24px; background: rgba(0,0,0,.10); margin: 0 5px; }
.article-editor-page .editor-content {
  min-height: 620px;
  max-height: none;
  padding: 30px clamp(18px,4vw,54px) 70px;
  outline: none;
  color: #26231e;
  background: #fff;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 18px;
  line-height: 1.9;
  letter-spacing: .002em;
  overflow-wrap: anywhere;
}
.article-editor-page .editor-content:empty::before {
  content: attr(data-placeholder);
  color: #a49c8d;
  pointer-events: none;
}
.article-editor-page .editor-content p { margin: 0 0 1.15em; }
.article-editor-page .editor-content h2,
.article-editor-page .editor-content h3,
.article-editor-page .editor-content h4 { color: #28251f; line-height: 1.3; margin: 1.35em 0 .55em; font-family: inherit; }
.article-editor-page .editor-content h2 { font-size: 1.55em; }
.article-editor-page .editor-content h3 { font-size: 1.3em; }
.article-editor-page .editor-content h4 { font-size: 1.12em; }
.article-editor-page .editor-content ul,
.article-editor-page .editor-content ol { padding-left: 1.45em; margin: .6em 0 1.1em; }
.article-editor-page .editor-content li { margin: .35em 0; }
.article-editor-page .editor-content blockquote {
  margin: 1.25em 0;
  padding: .85em 1.1em;
  border-left: 4px solid #d4af37;
  background: #fffaf0;
  color: #5f584c;
  border-radius: 0 12px 12px 0;
}
.article-editor-page .editor-content a { color: #8b6d12; text-decoration: underline; text-underline-offset: 3px; }
.article-editor-page .editor-content hr { border: 0; border-top: 1px solid rgba(0,0,0,.12); margin: 2em 0; }
.article-editor-page .editor-helper-row { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; margin-top:9px; color:var(--text-light); }
.article-editor-page .editor-helper-row small { line-height:1.55; }
.article-editor-page .editor-word-count { white-space:nowrap; font-size:.75rem; font-weight:700; color:#8b806e; }

@media (max-width: 700px) {
  .article-editor-page .editor-toolbar { padding: 8px 9px; min-height: 52px; }
  .article-editor-page .editor-toolbar button { width: 36px; height: 36px; }
  .article-editor-page .editor-content {
    min-height: 64vh;
    padding: 22px 18px 80px;
    font-size: 17px;
    line-height: 1.82;
  }
  .article-editor-page .editor-helper-row { flex-direction: column; gap: 5px; }
  .article-editor-page .editor-word-count { white-space:normal; }
}

.brand-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 10px;
  background: #fff;
}

.brand-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}