/* =========================================
   NOVA WORK — Admin Panel Styles
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@700;800;900&family=Barlow:wght@400;500;600;700&display=swap');

:root {
  --red: #DC1B2B; --red-dark: #B01420;
  --dark: #1A1D23; --darker: #0D0F14;
  --card: #1E2229; --border: rgba(255,255,255,.08);
  --white: #fff; --gray: #9CA3AF;
  --sidebar-w: 260px;
  --font-head: 'Barlow Condensed', sans-serif;
  --font: 'Barlow', sans-serif;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--darker); color: var(--white); overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
::-webkit-scrollbar { width: 5px; } ::-webkit-scrollbar-track { background: var(--darker); } ::-webkit-scrollbar-thumb { background: var(--red); border-radius: 3px; }

/* ── LOGIN ── */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: radial-gradient(ellipse 80% 60% at 50% 40%, rgba(220,27,43,.12) 0%, transparent 70%), var(--darker); padding: 24px; }
.login-card { background: var(--card); border: 1px solid var(--border); border-radius: 24px; padding: 48px 40px; width: 100%; max-width: 420px; }
.login-logo { text-align: center; margin-bottom: 32px; }
.login-logo img { height: 52px; margin: 0 auto 12px; }
.login-logo h1 { font-family: var(--font-head); font-size: 22px; font-weight: 800; }
.login-logo p { font-size: 13px; color: var(--gray); }
.login-form .form-group { margin-bottom: 16px; }
.login-form label { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: rgba(255,255,255,.6); margin-bottom: 6px; }
.login-form input { width: 100%; background: rgba(255,255,255,.05); border: 1px solid var(--border); border-radius: 10px; color: var(--white); font-family: var(--font); font-size: 15px; padding: 12px 16px; transition: border-color .2s; }
.login-form input:focus { outline: none; border-color: var(--red); background: rgba(220,27,43,.05); }
.login-form input::placeholder { color: rgba(255,255,255,.25); }
.btn-login { width: 100%; background: var(--red); color: var(--white); font-family: var(--font-head); font-size: 17px; font-weight: 700; padding: 14px; border: none; border-radius: 10px; cursor: pointer; text-transform: uppercase; letter-spacing: .5px; transition: background .2s, transform .2s; margin-top: 8px; }
.btn-login:hover { background: var(--red-dark); transform: translateY(-1px); }
.login-error { background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.3); border-radius: 10px; padding: 10px 14px; font-size: 13px; color: #f87171; margin-top: 12px; display: none; }
.login-back { text-align: center; margin-top: 20px; font-size: 13px; color: var(--gray); }
.login-back a { color: var(--red); }

/* ── ADMIN LAYOUT ── */
.admin-wrap { display: flex; min-height: 100vh; }

/* SIDEBAR */
.admin-sidebar { width: var(--sidebar-w); background: var(--dark); border-right: 1px solid var(--border); position: fixed; top: 0; left: 0; bottom: 0; z-index: 100; display: flex; flex-direction: column; overflow-y: auto; transition: transform .3s; }
.sidebar-logo { padding: 24px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; }
.sidebar-logo img { height: 36px; }
.sidebar-logo span { font-family: var(--font-head); font-size: 16px; font-weight: 800; }
.sidebar-section { padding: 16px 12px 8px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.5px; color: rgba(255,255,255,.3); }
.sidebar-nav { padding: 0 12px; flex: 1; }
.sidebar-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; font-size: 14px; font-weight: 600; color: rgba(255,255,255,.6); cursor: pointer; transition: all .2s; margin-bottom: 2px; border: none; background: none; width: 100%; text-align: left; }
.sidebar-item:hover { background: rgba(255,255,255,.06); color: var(--white); }
.sidebar-item.active { background: rgba(220,27,43,.15); color: var(--white); }
.sidebar-item .si-icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }
.sidebar-item .si-badge { margin-left: auto; background: var(--red); color: #fff; font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 10px; }
.sidebar-footer { padding: 16px 12px; border-top: 1px solid var(--border); }

/* MAIN CONTENT */
.admin-main { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; min-height: 100vh; }
.admin-topbar { height: 64px; background: var(--dark); border-bottom: 1px solid var(--border); display: flex; align-items: center; padding: 0 28px; gap: 16px; position: sticky; top: 0; z-index: 50; }
.topbar-title { font-family: var(--font-head); font-size: 20px; font-weight: 800; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.admin-content { padding: 28px; flex: 1; }

/* PAGE SECTIONS */
.admin-page { display: none; }
.admin-page.active { display: block; }
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.page-header h2 { font-family: var(--font-head); font-size: 28px; font-weight: 900; }
.page-header p { font-size: 14px; color: var(--gray); }

/* CARDS */
.admin-card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 24px; margin-bottom: 20px; }
.admin-card-title { font-family: var(--font-head); font-size: 18px; font-weight: 800; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }

/* STAT CARDS */
.stat-cards { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 20px; }
.stat-card-icon { font-size: 28px; margin-bottom: 10px; }
.stat-card-val { font-family: var(--font-head); font-size: 32px; font-weight: 900; color: var(--red); }
.stat-card-label { font-size: 13px; color: var(--gray); margin-top: 4px; }

/* FORM CONTROLS */
.a-form-group { margin-bottom: 16px; }
.a-label { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: rgba(255,255,255,.6); margin-bottom: 6px; }
.a-input, .a-textarea, .a-select { width: 100%; background: rgba(255,255,255,.05); border: 1px solid var(--border); border-radius: 10px; color: var(--white); font-family: var(--font); font-size: 14px; padding: 10px 14px; transition: border-color .2s; }
.a-input:focus, .a-textarea:focus, .a-select:focus { outline: none; border-color: var(--red); }
.a-textarea { resize: vertical; min-height: 80px; }
.a-select option { background: var(--dark); }
.a-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* BUTTONS */
.a-btn { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-head); font-size: 15px; font-weight: 700; padding: 10px 20px; border-radius: 10px; cursor: pointer; border: 1px solid transparent; transition: all .2s; text-transform: uppercase; letter-spacing: .3px; }
.a-btn-primary { background: var(--red); color: #fff; }
.a-btn-primary:hover { background: var(--red-dark); }
.a-btn-dark { background: rgba(255,255,255,.06); border-color: var(--border); color: var(--white); }
.a-btn-dark:hover { background: rgba(255,255,255,.1); }
.a-btn-danger { background: rgba(239,68,68,.15); border-color: rgba(239,68,68,.3); color: #f87171; }
.a-btn-danger:hover { background: rgba(239,68,68,.25); }
.a-btn-sm { font-size: 12px; padding: 6px 14px; }
.a-btn-outline { background: transparent; border-color: rgba(255,255,255,.2); color: var(--white); }
.a-btn-outline:hover { border-color: var(--red); color: var(--red); }

/* TABS */
.a-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.a-tab { padding: 10px 18px; font-size: 14px; font-weight: 700; color: var(--gray); cursor: pointer; border-bottom: 2px solid transparent; transition: all .2s; background: none; border-top: none; border-left: none; border-right: none; }
.a-tab:hover { color: var(--white); }
.a-tab.active { color: var(--red); border-bottom-color: var(--red); }

/* MEDIA GRID */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); gap: 12px; }
.media-item { background: var(--card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; position: relative; cursor: pointer; transition: border-color .2s; }
.media-item:hover { border-color: rgba(220,27,43,.4); }
.media-item img, .media-item video { width: 100%; height: 120px; object-fit: cover; display: block; }
.media-item .media-type { position: absolute; top: 6px; left: 6px; background: rgba(0,0,0,.7); color: #fff; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 6px; text-transform: uppercase; }
.media-item .media-del { position: absolute; top: 6px; right: 6px; background: rgba(239,68,68,.8); color: #fff; border: none; border-radius: 6px; padding: 3px 7px; font-size: 12px; cursor: pointer; opacity: 0; transition: opacity .2s; }
.media-item:hover .media-del { opacity: 1; }
.media-name { padding: 8px; font-size: 12px; color: var(--gray); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* UPLOAD ZONE */
.upload-zone { border: 2px dashed rgba(255,255,255,.2); border-radius: 14px; padding: 40px; text-align: center; cursor: pointer; transition: all .2s; position: relative; }
.upload-zone:hover, .upload-zone.dragover { border-color: var(--red); background: rgba(220,27,43,.05); }
.upload-zone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-zone-icon { font-size: 40px; margin-bottom: 12px; }
.upload-zone-text { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.upload-zone-sub { font-size: 13px; color: var(--gray); }

/* PDF LIST */
.pdf-admin-list { display: flex; flex-direction: column; gap: 10px; }
.pdf-admin-item { display: flex; align-items: center; gap: 14px; background: rgba(255,255,255,.03); border: 1px solid var(--border); border-radius: 12px; padding: 14px; }
.pdf-admin-icon { font-size: 28px; flex-shrink: 0; }
.pdf-admin-name { flex: 1; font-size: 14px; font-weight: 600; }
.pdf-admin-size { font-size: 12px; color: var(--gray); }
.pdf-admin-actions { display: flex; gap: 6px; }

/* PLAN CARDS ADMIN */
.plan-admin-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.plan-admin-card { background: rgba(255,255,255,.03); border: 1px solid var(--border); border-radius: 14px; padding: 20px; }
.plan-admin-card h4 { font-family: var(--font-head); font-size: 20px; font-weight: 800; margin-bottom: 12px; }

/* TESTIMONIAL ADMIN */
.testimonial-admin-list { display: flex; flex-direction: column; gap: 12px; }
.testimonial-admin-item { display: flex; align-items: flex-start; gap: 14px; background: rgba(255,255,255,.03); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.testimonial-admin-avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--red), var(--red-dark)); display: flex; align-items: center; justify-content: center; font-family: var(--font-head); font-size: 18px; font-weight: 800; flex-shrink: 0; }

/* SWITCH */
.switch-wrap { display: flex; align-items: center; gap: 10px; }
.switch { width: 44px; height: 24px; border-radius: 12px; position: relative; cursor: pointer; transition: background .2s; border: none; }
.switch.on { background: var(--red); }
.switch.off { background: rgba(255,255,255,.2); }
.switch::after { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; background: #fff; top: 3px; transition: left .2s; }
.switch.on::after { left: 23px; }
.switch.off::after { left: 3px; }

/* MODAL */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 1000; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.open { display: flex; }
.modal-box { background: var(--card); border: 1px solid var(--border); border-radius: 20px; padding: 32px; width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; }
.modal-title { font-family: var(--font-head); font-size: 24px; font-weight: 800; margin-bottom: 20px; }
.modal-footer { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

/* SAVE BAR */
.save-bar { position: fixed; bottom: 24px; right: 24px; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 14px 20px; display: flex; align-items: center; gap: 12px; box-shadow: 0 8px 32px rgba(0,0,0,.4); z-index: 200; transform: translateY(80px); opacity: 0; transition: all .3s; }
.save-bar.show { transform: translateY(0); opacity: 1; }
.save-bar-text { font-size: 14px; font-weight: 600; }

/* TOAST */
.admin-toast { position: fixed; top: 80px; right: 24px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px; display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,.3); z-index: 9999; transform: translateX(120%); transition: transform .3s; }
.admin-toast.show { transform: translateX(0); }
.admin-toast.success { border-color: rgba(34,197,94,.4); }
.admin-toast.error { border-color: rgba(239,68,68,.4); }

/* RESPONSIVE */
@media (max-width: 1024px) { .stat-cards { grid-template-columns: repeat(2,1fr); } .plan-admin-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 768px) {
  .admin-sidebar { transform: translateX(-100%); }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .a-row { grid-template-columns: 1fr; }
  .stat-cards { grid-template-columns: 1fr 1fr; }
  .plan-admin-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) { .stat-cards { grid-template-columns: 1fr; } .login-card { padding: 32px 24px; } }
