/* Admin — Hamanieh Flash Net */
* { box-sizing: border-box; }
body { margin: 0; font-family: 'Inter', system-ui, sans-serif; background: #f1f5f9; color: #0f172a; }
a { color: #1e40af; text-decoration: none; }
a:hover { text-decoration: underline; }

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #1e40af, #0f172a); padding: 20px; }
.login-card { background: white; padding: 40px; border-radius: 12px; box-shadow: 0 20px 40px rgba(0,0,0,.2); width: 100%; max-width: 400px; }
.login-card h1 { margin: 0 0 8px; font-size: 24px; font-family: 'Playfair Display', serif; }
.login-card p { color: #64748b; margin: 0 0 24px; font-size: 14px; }

.admin-layout { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.sidebar { background: #0f172a; color: #cbd5e1; padding: 20px 0; }
.sidebar .logo { padding: 0 20px 20px; border-bottom: 1px solid rgba(255,255,255,.1); margin-bottom: 20px; }
.sidebar .logo strong { color: white; font-family: 'Playfair Display', serif; font-size: 18px; display: block; }
.sidebar .logo small { color: #94a3b8; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
.sidebar nav a { display: block; padding: 10px 20px; color: #cbd5e1; font-size: 14px; border-left: 3px solid transparent; }
.sidebar nav a:hover { background: rgba(255,255,255,.05); color: white; text-decoration: none; }
.sidebar nav a.active { background: rgba(30,64,175,.3); color: white; border-left-color: #3b82f6; }
.sidebar nav .group-title { padding: 12px 20px 6px; font-size: 10px; color: #64748b; text-transform: uppercase; letter-spacing: 1.5px; }

.main { padding: 24px; overflow-x: auto; }
.topbar-admin { background: white; padding: 12px 20px; border-radius: 8px; margin-bottom: 20px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.topbar-admin h1 { margin: 0; font-size: 20px; font-family: 'Playfair Display', serif; }
.topbar-admin .user { font-size: 13px; color: #64748b; }
.topbar-admin .user a { margin-left: 10px; color: #dc2626; }

.card { background: white; padding: 20px; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.05); margin-bottom: 20px; }
.card h2 { margin: 0 0 16px; font-size: 16px; font-family: 'Inter', sans-serif; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat { background: white; padding: 20px; border-radius: 8px; border-left: 4px solid #1e40af; }
.stat .num { font-size: 28px; font-weight: 700; color: #0f172a; }
.stat .label { font-size: 12px; color: #64748b; text-transform: uppercase; letter-spacing: 1px; margin-top: 4px; }
.stat.red { border-left-color: #dc2626; }
.stat.green { border-left-color: #059669; }
.stat.gold { border-left-color: #f59e0b; }

table { width: 100%; border-collapse: collapse; background: white; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #e5e7eb; font-size: 14px; }
th { background: #f8fafc; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; color: #64748b; }
tr:hover { background: #f8fafc; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; text-transform: uppercase; }
.badge-published { background: #dcfce7; color: #166534; }
.badge-draft { background: #fef3c7; color: #92400e; }
.badge-archived { background: #e5e7eb; color: #374151; }
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-approved { background: #dcfce7; color: #166534; }
.badge-rejected { background: #fee2e2; color: #991b1b; }

.btn { display: inline-block; padding: 8px 16px; background: #1e40af; color: white; border: none; border-radius: 6px; cursor: pointer; font-size: 14px; text-decoration: none; }
.btn:hover { background: #1e3a8a; color: white; text-decoration: none; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-danger { background: #dc2626; }
.btn-danger:hover { background: #b91c1c; }
.btn-success { background: #059669; }
.btn-outline { background: white; color: #1e40af; border: 1px solid #1e40af; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: #374151; }
.form-group input[type=text], .form-group input[type=email], .form-group input[type=password], .form-group input[type=url], .form-group input[type=number], .form-group input[type=datetime-local], .form-group select, .form-group textarea {
  width: 100%; padding: 9px 12px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 14px; font-family: inherit;
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-actions { margin-top: 20px; display: flex; gap: 10px; }

.alert { padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; font-size: 14px; }
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.alert-info { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }

.pagination { display: flex; gap: 4px; margin: 20px 0; justify-content: center; }
.pagination a, .pagination span { padding: 6px 12px; border: 1px solid #d1d5db; border-radius: 4px; background: white; font-size: 13px; }
.pagination .current { background: #1e40af; color: white; border-color: #1e40af; }

.thumb { width: 60px; height: 40px; object-fit: cover; border-radius: 4px; background: #e5e7eb; }
.actions-cell { white-space: nowrap; }
.actions-cell .btn-sm { margin-right: 4px; }

.filters { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.filters input, .filters select { padding: 8px 12px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 13px; }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.media-item { background: white; border: 1px solid #e5e7eb; border-radius: 6px; overflow: hidden; }
.media-item img { width: 100%; height: 100px; object-fit: cover; display: block; }
.media-item .info { padding: 8px; font-size: 11px; color: #64748b; word-break: break-all; }

@media (max-width: 900px) {
  .admin-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .form-row { grid-template-columns: 1fr; }
}
