/* Invatech admin panel (/mehas) — standalone styles, no frameworks. */
@font-face { font-family: "Google Sans"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../fonts/google-sans-latin.woff2") format("woff2"); }
@font-face { font-family: "SolaimanLipi"; font-weight: 400; font-display: swap; src: url("../fonts/solaimanlipi-normal.woff2") format("woff2"); }
:root {
  --navy: #044F80; --navy-900: #06263f; --coral: #E64746; --ink: #0b1b2b; --muted: #5a6b7d; --line: #e3eaf2; --bg: #f3f6fa; --tint: #eef4fa;
  --green: #16a34a; --amber: #b45309; --r: 14px; --font: "Google Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.55 var(--font); color: var(--ink); background: var(--bg); }
[lang="bn"] { font-family: "SolaimanLipi", var(--font); }
a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2 { margin: 0; line-height: 1.25; }
h2 { font-size: 1.05rem; margin-bottom: 12px; }
small, .small { font-size: .82rem; }
.muted { color: var(--muted); }
.block { display: block; }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
code, .mono { font-family: ui-monospace, Consolas, monospace; font-size: .85em; }
code { background: var(--tint); padding: 2px 6px; border-radius: 6px; }

/* Layout */
.has-side { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--navy-900); color: #c9d6e3; padding: 18px 14px; }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 18px; }
.side-brand span { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: #fbbf24; font-weight: 600; }
.side nav { display: grid; gap: 2px; }
.side nav a, .side-foot a, .side-foot button { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: #c9d6e3; font: 500 .93rem var(--font); background: none; border: 0; cursor: pointer; width: 100%; text-align: left; }
.side nav a:hover, .side-foot a:hover, .side-foot button:hover { background: rgba(255,255,255,.07); color: #fff; text-decoration: none; }
.side nav a.on { background: rgba(255,255,255,.12); color: #fff; }
.side-sep { border: 0; border-top: 1px solid rgba(255,255,255,.14); margin: 8px 10px; }
@media (max-width: 860px) { .side nav .side-sep { flex-basis: 100%; margin: 4px 0; } }
.side-foot { margin-top: auto; display: grid; gap: 2px; border-top: 1px solid rgba(255,255,255,.1); padding-top: 12px; }
.side-foot form { margin: 0; }
.main { padding: 22px 28px 60px; min-width: 0; }
.top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.top h1 { font-size: 1.45rem; }
.who { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); font-size: .9rem; }
.is-auth { display: grid; place-items: center; min-height: 100vh; background: radial-gradient(800px 400px at 80% 0%, rgba(14,165,233,.15), transparent), radial-gradient(600px 300px at 0% 100%, rgba(230,71,70,.12), transparent), var(--bg); }
.is-auth .main { padding: 20px; width: 100%; max-width: 420px; }
.auth-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 32px; box-shadow: 0 30px 60px -30px rgba(6,38,63,.3); }
.auth-card h1 { font-size: 1.3rem; margin: 18px 0 16px; }

/* Cards & grids */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: 0 1px 2px rgba(6,38,63,.04); }
.card + .card { margin-top: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.card-head h2 { margin: 0; }
.stack { display: grid; gap: 16px; align-content: start; min-width: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.narrow { max-width: 720px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 18px; color: var(--ink); }
.stat:hover { text-decoration: none; border-color: rgba(4,79,128,.35); }
.stat b { display: block; font-size: 1.8rem; color: var(--navy); }
.stat span { color: var(--muted); font-size: .9rem; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list li small { flex-basis: 100%; color: var(--muted); }
.editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.side-col { position: sticky; top: 16px; }
.crumbs { margin: 0 0 12px; }

/* Forms */
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 5px; }
.field > span, .label { font-weight: 600; font-size: .9rem; }
.input { width: 100%; padding: 9px 12px; border: 1px solid #cdd8e4; border-radius: 10px; font: inherit; background: #fff; color: var(--ink); }
.input:focus { outline: 2px solid rgba(4,79,128,.25); border-color: var(--navy); }
.input-lg { font-size: 1.15rem; font-weight: 600; }
.input-color { height: 42px; padding: 4px; width: 80px; }
textarea.input { resize: vertical; }
.hint { color: var(--muted); font-size: .8rem; }
.error { color: #c2302f; font-size: .85rem; font-weight: 500; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: .93rem; cursor: pointer; }
.check input { margin-top: 4px; }
.faq-row { display: grid; gap: 6px; padding-bottom: 12px; border-bottom: 1px dashed var(--line); }
.look-row { display: flex; align-items: end; gap: 18px; flex-wrap: wrap; }
.upload-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.upload-row .input { max-width: 340px; }
.upload-row .hint { flex-basis: 100%; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border-radius: 10px; border: 1px solid #cdd8e4; background: #fff; color: var(--ink); font: 600 .9rem var(--font); cursor: pointer; white-space: nowrap; }
.btn:hover { text-decoration: none; border-color: var(--navy); }
.btn:disabled { opacity: .4; cursor: default; }
.btn-primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-primary:hover { background: #033c62; }
.btn-danger { color: #c2302f; border-color: #f2c4c3; }
.btn-danger:hover { background: #c2302f; color: #fff; border-color: #c2302f; }
.btn-sm { padding: 5px 10px; font-size: .82rem; border-radius: 8px; }
.btn-block { width: 100%; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.danger { border-color: #f2c4c3; }

/* Alerts & badges */
.alert { padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; font-weight: 500; }
.alert-ok { background: #dcfce7; color: #14532d; }
.alert-error { background: #fde2e1; color: #7f1d1d; }
.alert-info { background: #e0f2fe; color: #0c4a6e; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: .75rem; font-weight: 600; background: var(--tint); color: var(--muted); text-transform: capitalize; }
.badge-published { background: #dcfce7; color: var(--green); }
.badge-scheduled { background: #e0f2fe; color: #0369a1; }
.badge-draft { background: #fef3c7; color: var(--amber); }
.badge-trash { background: #fde2e1; color: #c2302f; }

/* Tables & toolbar */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.toolbar p { margin: 0; }
.tabs { display: flex; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.tabs a { padding: 6px 14px; border-radius: 9px; color: var(--muted); font-weight: 500; font-size: .9rem; }
.tabs a.on { background: var(--navy); color: #fff; }
.tabs a:hover { text-decoration: none; }
.filters { display: flex; gap: 8px; margin-left: auto; }
.filters .input { width: auto; }
.table-card { padding: 0; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; padding: 11px 14px; background: #f8fafc; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--line); }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.actions { display: flex; gap: 6px; justify-content: flex-end; }
.actions form { margin: 0; }

/* Switch */
.switch { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; cursor: pointer; font: 500 .82rem var(--font); color: var(--muted); padding: 0; }
.switch i { position: relative; width: 38px; height: 22px; border-radius: 99px; background: #cbd5e1; transition: background .2s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch.on i { background: var(--green); }
.switch.on i::after { transform: translateX(16px); }
.switch.on { color: var(--green); }
.switch span { min-width: 34px; text-align: left; }

/* Portfolio logos */
.mini-logo { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: #fff; font-weight: 700; font-size: .85rem;
  background: linear-gradient(135deg, hsl(var(--h) 70% 45%), hsl(calc(var(--h) + 35) 75% 60%)); overflow: hidden; }
.mini-logo img { width: 80%; height: 80%; object-fit: contain; background: #fff; border-radius: 8px; padding: 3px; }
.brand-preview { position: relative; display: grid; place-items: center; gap: 10px; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; margin-bottom: 8px;
  background: radial-gradient(circle at 20% 15%, rgba(255,255,255,.35), transparent 45%), linear-gradient(135deg, hsl(var(--h) 72% 42%), hsl(calc(var(--h) + 40) 78% 58%)); }
.bp-logo { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 22px; background: #fff; color: hsl(var(--h) 70% 40%); font-size: 1.8rem; font-weight: 700; box-shadow: 0 20px 40px -18px rgba(0,0,0,.4); }
.bp-logo img { max-width: 70%; max-height: 70%; }
.bp-host { color: #fff; font-size: .85rem; background: rgba(0,0,0,.18); padding: 4px 12px; border-radius: 99px; }

/* Covers & media */
.covers { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; max-height: 330px; overflow-y: auto; padding: 2px; }
.cover { position: relative; display: block; border-radius: 10px; overflow: hidden; border: 2px solid transparent; cursor: pointer; aspect-ratio: 16 / 9; background: var(--tint); }
.cover input { position: absolute; opacity: 0; }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover:has(input:checked) { border-color: var(--navy); box-shadow: 0 0 0 2px rgba(4,79,128,.25); }
.cover-none { display: grid; place-items: center; color: var(--muted); font-size: .85rem; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-top: 16px; }
.media-item { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.media-item img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--tint); }
.media-item figcaption { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 8px 10px; }
.media-item form { margin: 0; }

/* Editor */
.editor { margin-top: 8px; border: 1px solid #cdd8e4; border-radius: 12px; overflow: hidden; }
.editor-bar { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; gap: 2px; padding: 6px; background: #f8fafc; border-bottom: 1px solid var(--line); }
.editor-bar button { border: 0; background: none; padding: 6px 9px; border-radius: 7px; font: 500 .85rem var(--font); color: var(--ink); cursor: pointer; }
.editor-bar button:hover, .editor-bar button.is-on { background: var(--tint); color: var(--navy); }
.editor-bar .sep { width: 1px; background: var(--line); margin: 4px 4px; }
.editor-area { min-height: 420px; padding: 18px 22px; outline: none; }
.editor-source { min-height: 420px; border: 0; border-radius: 0; }
.editor .hint { padding: 8px 12px; margin: 0; border-top: 1px solid var(--line); background: #fafcfe; }
.prose { font-size: 1rem; line-height: 1.75; }
.prose h2 { font-size: 1.35rem; margin: 1.2em 0 .5em; }
.prose h3 { font-size: 1.12rem; margin: 1em 0 .4em; }
.prose img { max-width: 100%; height: auto; border-radius: 10px; }
.prose figure { margin: 1.2em 0; }
.prose figcaption { text-align: center; color: var(--muted); font-size: .9em; }
.prose table { border-collapse: collapse; width: 100%; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 10px; }
.prose blockquote { margin: 1em 0; padding: .6em 1em; border-left: 4px solid var(--navy); background: var(--tint); border-radius: 0 10px 10px 0; }
.prose .callout { margin: 1em 0; padding: 1em 1.2em; border-radius: 12px; border-left: 4px solid #1677b8; background: rgba(22,119,184,.08); }

@media (max-width: 1100px) { .editor-layout { grid-template-columns: minmax(0, 1fr); } .side-col { position: static; } .stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) {
  .has-side { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px; }
  .side nav { display: flex; flex-wrap: wrap; gap: 2px; }
  .side nav a, .side-foot a, .side-foot button { padding: 7px 10px; font-size: .85rem; width: auto; }
  .side-foot { margin: 0; border: 0; padding: 0; display: flex; }
  .main { padding: 16px; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .filters { margin-left: 0; }
}

/* Portfolio: type picker, tab/category tree, tags, tabs page */
.kind-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.kind-opt input { position: absolute; opacity: 0; pointer-events: none; }
.kind-opt span { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 12px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-weight: 500; font-size: .92rem; transition: border-color .2s, background .2s, color .2s; }
.kind-opt input:checked + span { border-color: var(--navy); background: var(--navy); color: #fff; }
.kind-opt input:focus-visible + span { outline: 2px solid var(--navy); outline-offset: 2px; }
.tab-tree { display: grid; gap: 10px; }
.tab-tree fieldset { margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; display: grid; gap: 6px; }
.tab-tree .check.sub { padding-left: 22px; font-size: .88rem; }
.file-now { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.file-now img { width: 96px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.tags { max-width: 320px; }
.tag { display: inline-block; margin: 2px 3px 2px 0; padding: 1px 8px; border-radius: 99px; font-size: .74rem; background: var(--tint); color: var(--muted); }
.tag-tab { background: var(--navy); color: #fff; }
.mini-logo img.cover-img { width: 100%; height: 100%; object-fit: cover; padding: 0; border-radius: 12px; }
.toolbar .tabs { flex-wrap: wrap; }
.toolbar .tabs small { opacity: .7; }
/* Portfolio tabs page: tab bar on top, one tab's panel below */
.pt-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 5px; margin-bottom: 14px; }
.pt-tab-link { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 9px; color: var(--muted); font-weight: 600; font-size: .9rem; }
.pt-tab-link:hover { background: var(--tint); color: var(--ink); text-decoration: none; }
.pt-tab-link.on { background: var(--navy); color: #fff; }
.pt-tab-link small { font-size: .72rem; padding: 1px 7px; border-radius: 99px; background: rgba(0,0,0,.07); }
.pt-tab-link.on small { background: rgba(255,255,255,.2); }
.pt-num { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font-size: .68rem; background: rgba(0,0,0,.08); }
.pt-tab-link.on .pt-num { background: rgba(255,255,255,.22); }
.pt-addtab { margin-left: auto; position: relative; }
.pt-addtab summary { list-style: none; }
.pt-addtab summary::-webkit-details-marker { display: none; }
.pt-addtab-form { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; display: flex; gap: 6px; width: 320px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px; box-shadow: 0 16px 36px -18px rgba(6,38,63,.45); }
.pt-addtab-form .input { flex: 1; }
.pt-pos { display: flex; align-items: center; gap: 6px; }
.pt-panel .sub-title { margin: 14px 0 8px; }
.pt-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.pt-head .actions { margin-left: auto; }
.pt-rename { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pt-rename .input { width: auto; flex: 1; min-width: 160px; }
.pt-rename select.input { flex: 0 1 200px; min-width: 140px; }
.pt-add { margin-top: 10px; }
.actions form { display: inline; }
[hidden] { display: none !important; }

/* ---------- Compact panels (2026-11): smaller type and spacing in the admin (/mehas) and the client area (/client).
   The client area adds a few compact rules of its own at the end of portal.css. ---------- */
body { font-size: 14px; line-height: 1.5; }
body .main { padding: 16px 22px 40px; }
body .top { margin-bottom: 12px; }
body .top h1 { font-size: 1.2rem; }
body h2 { font-size: .95rem; margin-bottom: 8px; }
body .sub-title { font-size: .88rem; }
body .card { padding: 14px 16px; }
body .table-card { padding: 0; }
body .stack, body .grid-2, body .editor-layout { gap: 12px; }
body .stats { gap: 10px; margin-bottom: 12px; }
body .stat { padding: 11px 14px; }
body .stat b { font-size: 1.35rem; }
body .stat span { font-size: .8rem; }
body .table { font-size: .85rem; }
body .table th { padding: 8px 10px; font-size: .68rem; }
body .table td { padding: 7px 10px; }
body .list li { padding: 7px 0; }
body .form { gap: 10px; }
body .field { gap: 3px; }
body .field > span, body .label { font-size: .82rem; }
body .input { padding: 6px 10px; font-size: .88rem; border-radius: 8px; }
body .input-lg { font-size: 1rem; }
body .btn { padding: 6px 12px; font-size: .82rem; border-radius: 8px; }
body .btn-sm { padding: 4px 8px; font-size: .76rem; border-radius: 7px; }
body .hint { font-size: .75rem; }
body .badge { font-size: .68rem; padding: 1px 8px; }
body .alert { padding: 9px 13px; font-size: .88rem; margin-bottom: 12px; }
body .tabs a { padding: 5px 11px; font-size: .82rem; }
body .kind-opt span { padding: 6px 11px; font-size: .84rem; }
body .check { font-size: .86rem; }
body .muted, body p { font-size: inherit; }
body .side { padding: 14px 10px; }
body .side-brand { padding: 4px 8px 14px; }
body .side nav a, body .side-foot a, body .side-foot button { padding: 7px 10px; font-size: .86rem; gap: 9px; }
body .pt-tab-link { padding: 6px 11px; font-size: .84rem; }
body .pos-input { width: 56px; padding: 4px 6px; }
@media (min-width: 861px) { body.has-side { grid-template-columns: 220px minmax(0, 1fr); } }
