.v2-layout,.v2-form,.v2-results { display:grid; gap:16px; min-width:0; }
.v2-layout { margin:0 0 20px; }
.v2-card,.v2-metric { padding:clamp(14px,2vw,24px); border:1px solid #dce5f7; border-radius:14px; background:#fff; color:#0b235c; min-width:0; overflow-wrap:anywhere; }
.v2-card h2,.v2-card h3 { margin:0 0 12px; }
.v2-kpis { display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,170px),1fr));gap:12px; }
.v2-metric { display:grid;gap:.35rem;border-top:3px solid #1746a2; }
.v2-metric strong { font-size:clamp(1.55rem,3vw,2.25rem); font-variant-numeric:tabular-nums; }
.v2-metric small { color:#536489; }
.v2-filters { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,138px),1fr));align-items:end;gap:12px; }
.v2-filters input,.v2-form input,.v2-form textarea,.v2-filters select { min-width:0; max-width:100%; }
.v2-form textarea { resize:vertical; }
.v2-form .field:has(input[type="checkbox"]) { display:flex; align-items:center; justify-content:flex-start; gap:10px; }
.v2-form input[type="checkbox"],.v2-permissions input[type="checkbox"] { width:18px;height:18px;order:-1;accent-color:#15449c; }
.v2-permissions,.v2-option { display:grid;gap:12px;padding:14px;border:1px solid #dce5f7;border-radius:10px;min-width:0; }
.v2-permission-row { display:grid;grid-template-columns:minmax(95px,1fr) auto auto;gap:10px;align-items:center; }
.v2-list { display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px; }
.v2-list button,.v2-form .button { justify-self:start;white-space:normal; }
.v2-chart { display:block;width:100%;height:auto; }
.v2-chart-area { position:relative; }
.v2-chart-tooltip {
  position:absolute; inset:8px 8px auto auto; z-index:1; display:grid; gap:4px;
  max-width:calc(100% - 16px); padding:8px 11px; border-radius:8px;
  background:#0b235c; color:#fff; pointer-events:none; font-size:12px;
}
.v2-chart-tooltip span { color:#dbe6ff; font-variant-numeric:tabular-nums; }
.v2-chart-legend { display:flex; flex-wrap:wrap; gap:6px 12px; margin:8px 0 12px; padding:0; list-style:none; }
.v2-chart-legend li { min-width:0; max-width:100%; }
.v2-chart-key {
  display:inline-flex; align-items:center; gap:7px; max-width:100%; min-height:36px; padding:4px 7px;
  border:1px solid transparent; border-radius:6px; background:#fff; color:#0b235c;
  text-align:start; font:inherit; font-size:12px; cursor:pointer; overflow-wrap:anywhere;
}
.v2-chart-key:hover { background:#eef3ff; }
.v2-chart-key:focus-visible { outline:2px solid #2057b6; outline-offset:2px; }
.v2-chart-swatch { width:12px; height:12px; flex:none; border:1px solid rgba(14,37,91,.22); border-radius:3px; }
.v2-seo-fields { min-width:0; margin:0; padding:0; border:0; }
.v2-seo-preview { display:grid; gap:4px; padding:14px; border:1px solid #dbe4f7; border-radius:10px; background:#f6f9ff; overflow-wrap:anywhere; }
.v2-seo-preview strong { color:#174290; font-size:16px; }
.v2-seo-preview p { margin:0; }
.v2-site-icon { width:48px; height:48px; object-fit:contain; border-radius:10px; }
.v2-data { overflow:auto; }
.v2-data table { border-collapse:collapse;width:100%;text-align:left; }
.v2-data th,.v2-data td { border-bottom:1px solid #dce5f7;padding:8px;font-variant-numeric:tabular-nums; }
.v2-form-message:empty { display:none; }
.v2-logo { width:min(100%,180px); max-height:100px;object-fit:contain; }
.v2-service-thumbnail { width:64px; height:64px; object-fit:cover; border-radius:10px; background:#edf2ff; }
.service-context,[data-service-editor] { margin-bottom:16px; }
.v2-hero-preview { width:min(100%,640px); max-height:240px; object-fit:cover; border-radius:10px; }
.v2-copy-group { padding:12px; border:1px solid #dce5f7; border-radius:10px; }
.v2-copy-group summary { font-weight:750; cursor:pointer; }
.v2-copy-group .field { margin-top:10px; }
.v2-brand-preview { padding:16px; background:linear-gradient(90deg,#fff 50%,#0b235c 50%); }
.news-library, .news-editor-workspace, .news-editor-form, .news-editor-settings { display:grid; gap:16px; min-width:0; }
.news-library-tools {
  display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:center; gap:10px;
  padding:12px; border:1px solid var(--line); border-radius:12px; background:#fff;
}
.news-library-tools :is(input,select) {
  min-width:0; width:100%; min-height:44px; padding:8px 12px; font:inherit; font-size:13px;
  color:var(--ink); background:#fbfcff; border:1px solid var(--line); border-radius:8px;
}
.news-library .button, .news-editor-workspace .button { min-height:40px; font-size:12px; text-decoration:none; }
.news-library-tools .button { min-height:44px; }
.news-library-tabs { display:flex; flex-wrap:wrap; gap:7px; }
.news-library-tabs .button { min-height:36px; border-color:transparent; background:transparent; color:var(--muted); }
.news-library-tabs .button[aria-pressed="true"] {
  color:var(--madani-blue); background:#e5edff; border-color:#c3d2f3; box-shadow:inset 0 -2px var(--madani-blue);
}
.news-library :is(button,a,input,select):focus-visible,
.news-editor-workspace :is(button,a,summary):focus-visible { outline:2px solid var(--madani-blue); outline-offset:2px; }
.news-library-status { margin:-4px 0; color:var(--muted); font-size:12px; }
.news-library-status:empty, .news-library-pagination:empty { display:none; }
.news-library-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,240px),1fr)); gap:16px; }
.news-library-post {
  display:flex; flex-direction:column; min-width:0; overflow:hidden; background:#fff; border:1px solid var(--line);
  border-radius:14px; box-shadow:0 6px 18px rgba(7,27,99,.045);
}
.news-post-cover {
  position:relative; display:grid; place-items:center; aspect-ratio:16/9; min-width:0; overflow:hidden;
  background:linear-gradient(140deg,#e8eefc,#f5f7fc);
}
.news-post-cover img { position:absolute; inset:0; display:block; width:100%; height:100%; object-fit:cover; }
.news-cover-placeholder { padding:10px; color:#515f7a; font-size:12px; font-weight:650; text-align:center; }
.news-library-copy { display:flex; flex:1; flex-direction:column; align-items:flex-start; gap:8px; padding:15px 16px 10px; overflow-wrap:anywhere; }
.news-library-copy h2 { margin:0; color:var(--navy-950); font-size:clamp(1rem,1.8vw,1.16rem); line-height:1.25; }
.news-library-copy p { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3; overflow:hidden; margin:0; color:#4a5976; font-size:13px; line-height:1.55; }
.news-post-status {
  display:inline-block; max-width:100%; padding:4px 8px; border-radius:6px; background:#eef2f7; color:#4a5670;
  font-size:11px; font-weight:750; line-height:1.35;
}
.news-post-status[data-state="published"] { background:#e5f6ed; color:#126340; }
.news-post-status[data-state="scheduled"] { background:#e4eeff; color:#1b4691; }
.news-post-status[data-state="trash"] { background:#feecee; color:#9e2435; }
.news-post-meta { display:flex; flex-wrap:wrap; gap:4px 10px; margin-top:auto; padding-top:6px; color:#596681; font-size:11px; }
.news-post-meta time { white-space:normal; }
.news-post-actions { display:flex; flex-wrap:wrap; gap:8px; padding:12px 16px; border-top:1px solid var(--line); }
.news-post-actions button { color:var(--madani-blue); background:#eff4ff; border-color:#d7e3fc; }
.news-post-actions a { border-color:transparent; }
.news-library-pagination { display:flex; flex-wrap:wrap; justify-content:space-between; gap:10px; }
.news-library-pagination .button:last-child { margin-inline-start:auto; }
.news-library-empty { grid-column:1/-1; display:grid; justify-items:center; gap:14px; padding:36px 12px; border:1px dashed #bdc9e3; border-radius:12px; color:#4a5976; background:#fff; }

.news-editor-header, .news-editor-tools, .news-editor-heading { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.news-editor-header { justify-content:space-between; }
.news-editor-heading { gap:12px; overflow-wrap:anywhere; }
.news-editor-heading h2 { margin:0; font-size:clamp(1.34rem,2.5vw,1.9rem); color:var(--navy-950); }
.news-editor-grid { display:grid; grid-template-columns:minmax(0,1fr); gap:16px; align-items:start; min-width:0; }
.news-editor-form .field { min-width:0; }
.news-editor-form .field :is(input,textarea,select) { min-width:0; font-size:13px; }
.news-editor-form .field > span { font-size:12px; }
.news-editor-content input[name="title"] { font-weight:720; font-size:16px; }
.news-editor-form textarea[name="summary"] { min-height:78px; }
.news-settings-card h3 { margin:0; font-size:1rem; }
.news-settings-card .news-post-cover { border-radius:8px; }
.news-settings-details summary { color:var(--ink); font-weight:750; cursor:pointer; }
.news-settings-details > div { margin-top:12px; }
.news-editor-footer {
  display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:10px;
  padding:13px 16px; background:white; border:1px solid var(--line); border-radius:12px;
}
.news-save-status { margin-inline-end:auto; color:var(--muted); }
.news-editor-footer .v2-form-message { flex-basis:100%; margin:0; }
@media(min-width:1160px) {
  .news-editor-grid { grid-template-columns:minmax(0,1fr) minmax(220px,285px); }
}
@media(max-width:620px) {
  .news-library-tools { grid-template-columns:minmax(0,1fr) auto; }
  .news-library-tools input { grid-column:1/-1; }
  .news-library-tabs .button { min-height:40px; }
}
@media(max-width:380px) {
  .news-library-tools { grid-template-columns:minmax(0,1fr); }
}
@media(max-width:430px){.v2-permission-row {grid-template-columns:1fr 1fr}.v2-permission-row strong{grid-column:1/-1}.v2-card,.v2-metric{padding:14px}}
.article-editor { margin:0; padding:0; min-width:0; border:0; }
.article-editor legend { margin-bottom:7px; font-size:12px; font-weight:750; }
.article-toolbar, .article-link-panel { display:flex; flex-wrap:wrap; align-items:center; gap:6px; padding:10px; background:var(--blue-soft); }
.article-toolbar { border:1px solid var(--line); border-bottom:0; border-radius:10px 10px 0 0; }
.article-toolbar :is(button, select), .article-link-panel :is(input, button) {
  min-height:36px; padding:5px 9px; color:var(--ink); background:white; border:1px solid #c8d3e8;
  border-radius:6px; font-family:inherit; font-size:12px; font-weight:600; line-height:1.2;
}
.article-toolbar :is(button, select), .article-link-panel button { cursor:pointer; }
.article-toolbar button[data-mark] { min-width:36px; font-size:14px; }
.article-toolbar button[data-mark="em"] { font-style:italic; }
.article-toolbar button[data-mark="u"] { text-decoration:underline; }
.article-toolbar button[data-mark="s"] { text-decoration:line-through; }
.article-toolbar button[aria-pressed="true"] { color:white; border-color:var(--madani-blue); background:var(--madani-blue); }
.article-toolbar button:not(:disabled):hover, .article-link-panel button:hover { border-color:var(--madani-blue); }
.article-toolbar :disabled { opacity:.45; cursor:default; }
.article-editor :is(button, select, input):focus-visible { outline:2px solid var(--madani-blue); outline-offset:2px; }
.article-link-panel { align-items:end; border:1px solid var(--line); border-bottom:0; background:var(--paper); }
.article-link-panel label { display:grid; flex:1 1 220px; gap:5px; font-size:12px; font-weight:750; }
.article-link-status:not(:empty) { flex-basis:100%; color:var(--coral); font-size:12px; }
.article-editable {
  position:relative; min-height:240px; padding:clamp(12px, 3vw, 20px); border:1px solid var(--line); border-radius:0 0 10px 10px;
  background:white; color:#0b235c; line-height:1.6; white-space:pre-wrap; overflow-wrap:anywhere;
}
.article-editable > :first-child { margin-block-start:0; }
.article-editable > :last-child { margin-block-end:0; }
.article-editable[contenteditable="true"]:has(> p:only-child > br.ProseMirror-trailingBreak:only-child)::before {
  position:absolute; content:attr(data-placeholder); pointer-events:none; color:var(--muted);
}
.article-editable:focus-visible { outline:2px solid #2057b6; outline-offset:2px; }
.article-editable[aria-readonly="true"] { border-radius:10px; background:#f7f9fc; }
.article-editable ul, .article-editable ol { padding-inline-start:25px; }
.article-editable li > p { margin-block:0; }
.article-editable blockquote { margin-inline:0; padding-inline-start:12px; border-inline-start:3px solid #dbac28; }
.article-editable a { color:var(--madani-blue); text-decoration:underline; }
.article-toolbar select { max-width:100%; }
.editor-media-block {
  position:relative; display:block; padding:10px; margin-block:12px;
  background:var(--blue-soft); border:1px solid var(--line); border-radius:8px;
}
.editor-media-block.ProseMirror-selectednode { outline:2px solid var(--madani-blue); outline-offset:1px; }
.editor-media-block .article-gallery { margin:0 0 8px; }
.editor-media-block .article-gallery-grid img { aspect-ratio:4/3; height:auto; }
.editor-media-block > button, .article-media-dialog button {
  min-height:36px; padding:6px 10px; color:var(--ink); background:#fff; border:1px solid #b4c3df;
  border-radius:7px; font:inherit; font-weight:700; cursor:pointer;
}
.editor-media-block.editor-formula { display:inline-flex; align-items:center; gap:7px; max-width:100%; margin:0; padding:4px 7px; }
.editor-formula > button { min-height:30px; padding:3px 7px; font-size:11px; }
.editor-video { display:inline-block; margin-inline-end:12px; font-weight:700; }
.article-media-dialog {
  width:min(660px, calc(100vw - 24px)); max-width:none; max-height:calc(100dvh - 24px);
  padding:clamp(14px, 4vw, 24px); border:1px solid #aabada; border-radius:14px; color:var(--ink); background:#f7f9ff;
}
.article-media-dialog::backdrop { background:rgba(5,15,48,.64); }
.article-media-dialog h3 { margin:0 0 14px; }
.article-media-fields, .article-media-items, .article-media-details { display:grid; gap:10px; min-width:0; }
.article-media-dialog label { display:grid; gap:5px; min-width:0; font-weight:700; font-size:12px; }
.article-media-dialog :is(input,select) { width:100%; padding:7px 9px; border:1px solid #b4c3df; border-radius:7px; font:inherit; background:white; }
.article-media-fields > label:has(select) { max-width:180px; }
.article-media-item { display:grid; grid-template-columns:72px minmax(0,1fr); gap:10px; padding:10px; background:#fff; border:1px solid var(--line); border-radius:8px; }
.article-media-item img { width:72px; height:54px; object-fit:cover; border-radius:6px; }
.article-media-actions { display:flex; flex-wrap:wrap; gap:6px; }
.article-media-dialog > .article-media-actions { margin-top:14px; }
.article-media-dialog > .article-media-actions button:first-child { color:#fff; background:var(--madani-blue); }
.article-media-dialog button:disabled { opacity:.55; cursor:wait; }
.article-media-status { margin:10px 0 0; }
.article-media-status:empty { display:none; }
@media (max-width:480px) {
  .article-toolbar :is(button, select), .article-link-panel :is(input, button) { min-height:44px; }
  .article-toolbar button[data-mark] { min-width:44px; }
  .article-media-item { grid-template-columns:1fr; }
}
