@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800;900&display=swap");
:root{
  --bg:#f5f7fb;
  --panel:#ffffff;
  --panel-soft:#f8fafc;
  --text:#111827;
  --muted:#667085;
  --line:#e6eaf2;
  --line-strong:#d8e0ec;
  --blue:#0877ff;
  --blue-dark:#055fd1;
  --yellow:#ffd237;
  --yellow-soft:#fff7cf;
  --red:#dc2626;
  --green:#16a34a;
  --sidebar:#0b1220;
  --sidebar-soft:#111a2e;
  --sidebar-text:#d8e1ef;
  --shadow:0 18px 48px rgba(15,23,42,.08);
  --shadow-soft:0 10px 30px rgba(15,23,42,.06);
  --radius:20px;
  --radius-sm:14px;
}
*{box-sizing:border-box}
html{height:100%;scroll-behavior:smooth}
body{min-height:100%;margin:0;background:var(--bg);font-family:"DM Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;color:var(--text);font-size:14px;line-height:1.45;-webkit-font-smoothing:antialiased;text-rendering:geometricPrecision}
a{color:inherit;text-decoration:none!important}
button,input,select,textarea{font:inherit}
button{appearance:none}
img{max-width:100%;display:block}
.muted{color:var(--muted)!important}
.help{display:block;font-size:12px;color:var(--muted);margin-top:6px}

/* Login */
.login-page{min-height:100vh;display:grid!important;place-items:center!important;padding:28px;background:radial-gradient(circle at 18% 7%,rgba(255,210,55,.42),transparent 27%),radial-gradient(circle at 82% 10%,rgba(8,119,255,.16),transparent 30%),linear-gradient(135deg,#f8fbff 0%,#eef5ff 100%)}
.login-wrap{width:min(980px,100%);display:grid;grid-template-columns:1fr 430px;gap:26px;align-items:stretch}
.login-hero{position:relative;overflow:hidden;background:linear-gradient(135deg,#0b1220,#17233b);border-radius:32px;padding:34px;min-height:470px;color:#fff;box-shadow:0 30px 80px rgba(15,23,42,.16)}
.login-hero:before{content:"";position:absolute;right:-90px;bottom:-120px;width:320px;height:320px;border-radius:50%;background:rgba(255,210,55,.9)}
.login-hero:after{content:"";position:absolute;right:70px;top:70px;width:160px;height:160px;border-radius:42px;background:rgba(255,255,255,.08);transform:rotate(18deg)}
.login-brand{display:flex;align-items:center;gap:12px;font-size:22px;font-weight:950;letter-spacing:-.04em;position:relative;z-index:1}
.login-brand span,.admin-brand-mark{width:36px;height:36px;border-radius:12px;background:linear-gradient(135deg,var(--yellow),#fff1a4);box-shadow:0 14px 30px rgba(255,210,55,.24);display:inline-block;flex:0 0 auto}
.login-hero h2{position:relative;z-index:1;margin:82px 0 12px;font-size:42px;line-height:1.05;letter-spacing:-.07em;max-width:480px}
.login-hero p{position:relative;z-index:1;color:#c9d3e3;font-size:16px;max-width:500px;margin:0}
.login-pills{position:relative;z-index:1;display:flex;gap:10px;flex-wrap:wrap;margin-top:26px}
.login-pills span{padding:9px 12px;border-radius:999px;background:rgba(255,255,255,.09);border:1px solid rgba(255,255,255,.12);font-weight:800;font-size:12px;color:#f8fafc}
.login-card{width:100%;background:#fff;border:1px solid var(--line);border-radius:32px;padding:34px;box-shadow:0 24px 70px rgba(15,23,42,.12);align-self:center}
.login-card h1{margin:0 0 8px;font-size:36px;letter-spacing:-.07em;line-height:1.08}.login-card p{margin:0 0 26px}.login-card .field{margin-bottom:16px}.login-card .btn{width:100%;height:48px;margin-top:4px}

/* Admin layout */
.admin-shell{min-height:100vh;display:block!important;background:var(--bg)}
.sidebar{position:fixed!important;left:0!important;top:0!important;bottom:0!important;width:284px!important;height:100vh!important;overflow-y:auto!important;background:linear-gradient(180deg,#0b1220 0%,#111a2e 100%)!important;color:var(--sidebar-text)!important;padding:18px 14px!important;border-right:1px solid rgba(255,255,255,.08)!important;z-index:60!important;box-shadow:16px 0 45px rgba(15,23,42,.10)!important}
.sidebar::-webkit-scrollbar{width:8px}.sidebar::-webkit-scrollbar-thumb{background:rgba(255,255,255,.14);border-radius:999px}
.admin-brand{display:flex!important;align-items:center!important;gap:11px!important;padding:10px 10px 18px!important;margin:0 0 10px!important;color:#fff!important;font-size:21px!important;font-weight:950!important;letter-spacing:-.05em!important;text-decoration:none!important;border-bottom:1px solid rgba(255,255,255,.08)!important}
.admin-brand span{width:34px!important;height:34px!important;border-radius:12px!important;background:linear-gradient(135deg,var(--yellow),#fff2a0)!important;box-shadow:0 14px 30px rgba(255,210,55,.22)!important;flex:0 0 auto!important}
.nav-group{margin:18px 0!important}.nav-group small{display:block!important;color:#94a3b8!important;text-transform:uppercase!important;font-size:11px!important;font-weight:950!important;letter-spacing:.08em!important;margin:0 10px 8px!important}.nav-group a{display:flex!important;align-items:center!important;gap:9px!important;color:#d8e1ef!important;padding:11px 12px!important;border-radius:14px!important;font-weight:800!important;line-height:1.2!important;text-decoration:none!important;margin:2px 0!important;border:1px solid transparent!important}.nav-group a:hover{background:rgba(255,255,255,.08)!important;color:#fff!important}.nav-group a.active{background:rgba(255,210,55,.16)!important;color:#fff!important;border-color:rgba(255,210,55,.22)!important;box-shadow:inset 3px 0 0 var(--yellow)!important}
.nav-ico{width:20px;text-align:center;opacity:.95;font-size:15px;line-height:1}.nav-text{flex:1}
.admin-main{min-height:100vh;margin-left:284px!important;padding:28px 32px 48px!important;max-width:none!important}
.mobile-top{display:none!important}.topbar{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:18px!important;margin:0 0 24px!important}.topbar h1{margin:0!important;font-size:34px!important;line-height:1.08!important;letter-spacing:-.07em!important;color:var(--text)!important}.toolbar{display:flex!important;gap:10px!important;align-items:center!important;flex-wrap:wrap!important}.topbar .toolbar{background:#fff;border:1px solid var(--line);box-shadow:var(--shadow-soft);border-radius:999px;padding:9px 14px}.admin-title-kicker{display:block;color:var(--muted);font-size:13px;font-weight:800;margin-bottom:6px}.admin-overlay{display:none}

/* Cards / stats */
.card{background:#fff!important;border:1px solid var(--line)!important;border-radius:var(--radius)!important;box-shadow:var(--shadow-soft)!important;padding:22px!important;margin-bottom:20px!important}.card h2,.card h3{margin:0 0 14px!important;letter-spacing:-.04em!important;line-height:1.18!important}.card h2{font-size:22px}.card h3{font-size:18px}.stats{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:16px!important;margin-bottom:22px!important}.stat-card{position:relative;overflow:hidden;background:#fff!important;border:1px solid var(--line)!important;border-radius:22px!important;padding:20px!important;box-shadow:var(--shadow-soft)!important;min-height:118px!important}.stat-card:after{content:"";position:absolute;right:-36px;top:-42px;width:112px;height:112px;border-radius:32px;background:linear-gradient(135deg,rgba(8,119,255,.08),rgba(255,210,55,.18));transform:rotate(16deg)}.stat-card span{display:block;font-weight:850!important;font-size:13px!important;margin-bottom:8px!important}.stat-card b{display:block!important;font-size:36px!important;line-height:1!important;letter-spacing:-.07em!important;color:#0f172a!important}

/* Buttons */
.btn{border:0!important;border-radius:14px!important;padding:10px 15px!important;font-weight:900!important;cursor:pointer!important;display:inline-flex!important;gap:8px!important;align-items:center!important;justify-content:center!important;line-height:1.15!important;text-align:center!important;text-decoration:none!important;transition:transform .15s ease,box-shadow .15s ease,background .15s ease!important;min-height:40px!important}.btn:hover{transform:translateY(-1px)}.btn.primary{background:var(--blue)!important;color:#fff!important;box-shadow:0 10px 24px rgba(8,119,255,.22)!important}.btn.primary:hover{background:var(--blue-dark)!important}.btn.secondary{background:#eef4ff!important;color:#0b63ce!important;border:1px solid #d4e5ff!important}.btn.danger{background:#fee2e2!important;color:#991b1b!important}.btn.success{background:#dcfce7!important;color:#166534!important}.btn.small{padding:7px 10px!important;font-size:12px!important;min-height:32px!important;border-radius:11px!important}

/* Tables */
.table-wrap{width:100%;overflow:auto}.data-table{width:100%!important;border-collapse:separate!important;border-spacing:0 9px!important}.data-table th{text-align:left!important;font-size:12px!important;color:#667085!important;padding:0 12px!important;font-weight:950!important;white-space:nowrap!important}.data-table td{background:#fff!important;border-top:1px solid var(--line)!important;border-bottom:1px solid var(--line)!important;padding:13px 12px!important;vertical-align:middle!important;white-space:nowrap!important}.data-table tr td:first-child{border-left:1px solid var(--line)!important;border-radius:15px 0 0 15px!important}.data-table tr td:last-child{border-right:1px solid var(--line)!important;border-radius:0 15px 15px 0!important}.data-table tr:hover td{background:#fbfdff!important}.thumb{width:76px!important;height:54px!important;border-radius:14px!important;object-fit:cover!important;background:#e9eef6!important}.badge{display:inline-flex!important;align-items:center!important;gap:6px!important;border-radius:999px!important;padding:6px 10px!important;font-size:11px!important;font-weight:950!important;background:#fff7d6!important;color:#7a4a00!important;border:1px solid #ffe28b!important}.badge.blue{background:#eaf3ff!important;color:#0b63ce!important;border-color:#cfe5ff!important}.badge.green{background:#dcfce7!important;color:#166534!important;border-color:#bbf7d0!important}

/* Forms */
.flash{padding:13px 15px!important;border-radius:16px!important;margin-bottom:18px!important;font-weight:850!important;border:1px solid transparent!important}.flash.success{background:#dcfce7!important;color:#166534!important;border-color:#bbf7d0!important}.flash.error{background:#fee2e2!important;color:#991b1b!important;border-color:#fecaca!important}.form-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:16px!important}.form-grid.three{grid-template-columns:repeat(3,minmax(0,1fr))!important}.field{margin-bottom:16px!important}.field label{display:block!important;margin-bottom:7px!important;font-size:12px!important;font-weight:950!important;color:#344054!important;letter-spacing:.01em!important}.field input,.field select,.field textarea{width:100%!important;border:1px solid #d6deeb!important;border-radius:14px!important;padding:11px 12px!important;background:#fff!important;color:#111827!important;outline:0!important;min-height:43px!important;box-shadow:0 1px 0 rgba(15,23,42,.02)!important}.field textarea{min-height:118px!important;resize:vertical!important}.field input:focus,.field select:focus,.field textarea:focus{border-color:#8bc0ff!important;box-shadow:0 0 0 4px rgba(8,119,255,.10)!important}.field input[type="file"]{padding:9px!important;background:#fbfdff!important}.slug-row{display:flex!important;gap:10px!important;align-items:center!important}.slug-row input{flex:1!important}.actions-row{display:flex!important;gap:8px!important;flex-wrap:wrap!important}.seo-note{background:#f8fbff!important;border:1px dashed #b8c8dc!important;color:#344054!important;border-radius:16px!important;padding:13px!important;font-weight:700!important}

/* Repeaters / tabs */
.repeat-row{border:1px solid var(--line)!important;border-radius:18px!important;background:#fbfdff!important;padding:16px!important;margin-bottom:14px!important;box-shadow:0 6px 20px rgba(15,23,42,.035)!important}.repeat-head{display:flex!important;justify-content:space-between!important;align-items:center!important;gap:12px!important;margin-bottom:10px!important}.repeat-head strong{letter-spacing:-.02em!important}.mini-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important}.mini-grid.three{grid-template-columns:repeat(3,minmax(0,1fr))!important}.check-row{display:flex!important;gap:14px!important;align-items:center!important;flex-wrap:wrap!important}.check-row label{display:flex!important;align-items:center!important;gap:7px!important;font-weight:850!important;color:#344054!important}.preview{height:66px!important;width:96px!important;border-radius:13px!important;background:#e9eef6!important;object-fit:cover!important;margin-top:7px!important}.tabs{display:flex!important;gap:8px!important;flex-wrap:wrap!important;margin-bottom:18px!important;position:sticky!important;top:0!important;z-index:20!important;background:rgba(245,247,251,.9)!important;backdrop-filter:blur(10px)!important;padding:10px 0!important}.tab-btn{border:1px solid var(--line)!important;background:#fff!important;border-radius:999px!important;padding:10px 13px!important;font-weight:900!important;cursor:pointer!important;color:#344054!important}.tab-btn.active{background:#111827!important;color:#fff!important;border-color:#111827!important;box-shadow:0 10px 28px rgba(15,23,42,.14)!important}.tab-panel{display:none!important}.tab-panel.active{display:block!important}

@media(max-width:1180px){.stats{grid-template-columns:repeat(2,minmax(0,1fr))!important}.admin-main{padding:24px!important}}
@media(max-width:900px){.sidebar{left:-292px!important;transition:left .22s ease!important}.sidebar.open{left:0!important}.admin-main{margin-left:0!important;padding:18px!important}.mobile-top{display:flex!important;position:sticky!important;top:0!important;z-index:45!important;background:rgba(245,247,251,.92)!important;backdrop-filter:blur(12px)!important;align-items:center!important;justify-content:space-between!important;margin:-18px -18px 18px!important;padding:12px 18px!important;border-bottom:1px solid var(--line)!important}.menu-toggle{display:inline-flex!important}.admin-overlay{display:none;position:fixed;inset:0;background:rgba(15,23,42,.42);z-index:50}.sidebar.open~.admin-overlay{display:block}.topbar{display:block!important}.topbar .toolbar{display:inline-flex!important;margin-top:12px!important}.login-wrap{grid-template-columns:1fr}.login-hero{display:none}.login-card{max-width:460px;margin:auto}}
@media(max-width:720px){body{font-size:13px}.form-grid,.form-grid.three,.mini-grid,.mini-grid.three,.stats{grid-template-columns:1fr!important}.data-table{min-width:760px!important}.card{padding:16px!important}.topbar h1{font-size:29px!important}.login-page{padding:18px}.login-card{border-radius:24px;padding:24px}.login-card h1{font-size:31px}.slug-row{display:block!important}.slug-row .btn{margin-top:8px!important;width:100%}}


/* Own custom content editor */
.rh-editor{border:1px solid #d6deeb!important;border-radius:16px!important;background:#fff!important;overflow:hidden!important;box-shadow:0 1px 0 rgba(15,23,42,.02)!important}
.rh-editor-toolbar{display:flex!important;flex-wrap:wrap!important;gap:6px!important;align-items:center!important;background:#fbfdff!important;border-bottom:1px solid #e6eaf2!important;padding:9px!important}
.rh-editor-toolbar button{border:1px solid #d6deeb!important;background:#fff!important;color:#182230!important;border-radius:10px!important;min-height:32px!important;padding:7px 9px!important;font-size:12px!important;font-weight:900!important;cursor:pointer!important;line-height:1!important}
.rh-editor-toolbar button:hover{background:#eef6ff!important;border-color:#b9d9ff!important;color:#075fc8!important}
.rh-editor-sep{width:1px!important;height:24px!important;background:#dfe6f1!important;margin:0 3px!important}
.rh-editor-area{min-height:310px!important;padding:14px!important;outline:0!important;background:#fff!important;color:#111827!important;line-height:1.6!important;overflow:auto!important}
.rh-editor-area:focus{box-shadow:inset 0 0 0 3px rgba(8,119,255,.08)!important}
.rh-editor-area h1,.rh-editor-area h2,.rh-editor-area h3,.rh-editor-area h4,.rh-editor-area h5{line-height:1.18!important;margin:14px 0 8px!important;letter-spacing:-.03em!important}
.rh-editor-area h1{font-size:32px!important}.rh-editor-area h2{font-size:26px!important}.rh-editor-area h3{font-size:22px!important}.rh-editor-area h4{font-size:18px!important}.rh-editor-area h5{font-size:16px!important}
.rh-editor-area p{margin:0 0 10px!important}.rh-editor-area ul{margin:0 0 12px 22px!important}.rh-editor-area img{max-width:100%!important;height:auto!important;border-radius:14px!important;margin:10px 0!important;border:1px solid #e6eaf2!important}.rh-editor-area a{color:#0877ff!important;text-decoration:underline!important}.rh-editor-area table{width:100%!important;border-collapse:collapse!important;margin:12px 0!important}.rh-editor-area td,.rh-editor-area th{border:1px solid #d6deeb!important;padding:9px!important;min-width:80px!important}.rh-editor-code{display:none!important;width:100%!important;min-height:310px!important;border:0!important;border-top:1px solid #e6eaf2!important;border-radius:0!important;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace!important;font-size:13px!important;line-height:1.55!important;background:#0b1220!important;color:#dbeafe!important;padding:14px!important;resize:vertical!important;outline:0!important}.rh-editor.show-code .rh-editor-area{display:none!important}.rh-editor.show-code .rh-editor-code{display:block!important}.rh-editor-status{font-size:12px!important;color:#0877ff!important;font-weight:900!important;padding:6px 8px!important}


/* DM Sans global font override */
html, body, body *, button, input, select, textarea, option {
  font-family: "DM Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif !important;
}

/* Multi category checkbox UI */
.check-grid.category-check-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important;border:1px solid #d6deeb!important;border-radius:16px!important;background:#fbfdff!important;padding:10px!important;max-height:220px!important;overflow:auto!important}
.category-check-grid label{display:flex!important;align-items:center!important;gap:8px!important;background:#fff!important;border:1px solid #e6eaf2!important;border-radius:12px!important;padding:9px 10px!important;font-size:13px!important;font-weight:850!important;color:#344054!important;margin:0!important;cursor:pointer!important}
.category-check-grid input{width:auto!important;min-height:auto!important;box-shadow:none!important;margin:0!important}
.category-check-grid label:has(input:checked){border-color:#5A202A!important;background:#fff8ed!important;color:#5A202A!important}
@media(max-width:720px){.check-grid.category-check-grid{grid-template-columns:1fr!important}}

/* Frontend cache manager */
.cache-dashboard{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:16px!important;margin-bottom:20px!important}
.cache-stat-card{background:#fff!important;border:1px solid var(--line)!important;border-radius:20px!important;box-shadow:var(--shadow-soft)!important;padding:18px!important}
.cache-stat-card span{display:block!important;color:var(--muted)!important;font-size:12px!important;font-weight:950!important;margin-bottom:8px!important;text-transform:uppercase!important;letter-spacing:.06em!important}
.cache-stat-card strong{display:block!important;font-size:26px!important;line-height:1.1!important;letter-spacing:-.05em!important;color:#111827!important;word-break:break-word!important}
.cache-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:18px!important}
.cache-grid .card{margin-bottom:0!important}
@media(max-width:900px){.cache-dashboard,.cache-grid{grid-template-columns:1fr!important}}
