/* =========================================================================
   Stratus Teams — CMS admin theme
   ========================================================================= */
:root {
  --blue: #004B87;
  --blue-700: #003460;
  --green: #4CAF7A;
  --red: #DC2626;
  --ink: #002D4D;
  --body: #3B4A63;
  --muted: #6B7890;
  --line: #E3E9F2;
  --bg: #F4F7FC;
  --panel: #ffffff;
  --sidebar: #002D4D;
  --radius: 12px;
  --font: "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--body); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--blue-700); text-decoration: none; }
h1, h2, h3, h4 { color: var(--ink); margin: 0 0 .5em; line-height: 1.25; }
img { max-width: 100%; display: block; }

.admin { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }

/* Sidebar */
.sidebar { background: var(--sidebar); color: #A9B6CC; padding: 1.5rem 1rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar .brand { display: flex; align-items: center; gap: .6rem; padding: .3rem .5rem 1.5rem; }
.sidebar .brand img { height: 34px; }
.sidebar .brand b { color: #fff; font-size: 1.05rem; letter-spacing: -0.01em; }
.sidebar nav { display: flex; flex-direction: column; gap: .2rem; }
.sidebar nav a {
  display: flex; align-items: center; gap: .7rem; padding: .7rem .8rem; border-radius: 9px;
  color: #A9B6CC; font-size: .92rem; font-weight: 500; transition: background .15s ease, color .15s ease;
}
.sidebar nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar nav a.is-active { background: var(--blue); color: #fff; }
.sidebar nav .group-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .14em; color: #6B7FA3; padding: 1.2rem .8rem .4rem; }
.sidebar .badge-count { margin-left: auto; background: var(--red); color: #fff; border-radius: 999px; font-size: .7rem; padding: .1rem .45rem; font-weight: 700; }
.sidebar .foot { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.1); }
.sidebar .foot a { font-size: .85rem; }

/* Main */
.main { padding: 1.75rem 2rem 3rem; min-width: 0; }
.topline { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.75rem; flex-wrap: wrap; }
.topline h1 { font-size: 1.5rem; margin: 0; }
.topline .who { font-size: .85rem; color: var(--muted); }

/* Cards / panels */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.panel + .panel { margin-top: 1.5rem; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.1rem; flex-wrap: wrap; }
.panel-head h2 { font-size: 1.1rem; margin: 0; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; margin-bottom: 1.5rem; }
.stat-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.4rem; }
.stat-card b { display: block; font-size: 1.9rem; color: var(--ink); font-weight: 800; letter-spacing: -0.02em; }
.stat-card span { font-size: .82rem; color: var(--muted); }
.stat-card.accent-blue { border-top: 3px solid var(--blue); }
.stat-card.accent-green { border-top: 3px solid var(--green); }
.stat-card.accent-red { border-top: 3px solid var(--red); }

/* Table */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.data th, table.data td { text-align: left; padding: .85rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data th { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
table.data tr:last-child td { border-bottom: 0; }
table.data tr:hover td { background: #f8fbfc; }
table.data .title-cell a { color: var(--ink); font-weight: 600; }
table.data .title-cell a:hover { color: var(--blue-700); }
table.data .muted { color: var(--muted); font-size: .82rem; }
tr.is-unread td { background: #f0f9fc; }
tr.is-unread .title-cell a { font-weight: 700; }

/* Pills */
.pill { display: inline-flex; align-items: center; gap: .3rem; padding: .22rem .6rem; border-radius: 999px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.pill--published { background: #e3f5e8; color: #2f8f47; }
.pill--draft { background: #fdeeda; color: #b9791a; }
.pill--news { background: #e7f6fa; color: var(--blue-700); }
.pill--event { background: #eef0f2; color: #55636a; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: .45rem; font: inherit; font-weight: 600; font-size: .88rem; padding: .6rem 1.1rem; border-radius: 9px; border: 1.5px solid transparent; cursor: pointer; transition: background .15s ease, border-color .15s ease, color .15s ease; }
.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-700); }
.btn--outline { border-color: var(--line); color: var(--ink); background: #fff; }
.btn--outline:hover { border-color: var(--blue); color: var(--blue-700); }
.btn--danger { background: #fff; border-color: #f0c4c7; color: var(--red); }
.btn--danger:hover { background: var(--red); color: #fff; border-color: var(--red); }
.btn--sm { padding: .4rem .7rem; font-size: .8rem; }
.btn--ghost { background: transparent; color: var(--muted); }
.btn--ghost:hover { color: var(--ink); }

.row-actions { display: flex; gap: .4rem; justify-content: flex-end; }

/* Forms */
.form-grid { display: grid; grid-template-columns: 1fr 320px; gap: 1.5rem; align-items: start; }
.field { margin-bottom: 1.1rem; }
.field:last-child { margin-bottom: 0; }
.field label { display: block; font-weight: 600; font-size: .85rem; color: var(--ink); margin-bottom: .4rem; }
.field .hint { font-weight: 400; color: var(--muted); font-size: .8rem; }
.input, .textarea, .select { width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1.5px solid var(--line); border-radius: 9px; padding: .7rem .85rem; }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(26,160,200,.14); }
.textarea { min-height: 320px; resize: vertical; font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .9rem; line-height: 1.7; }
.field-error { color: var(--red); font-size: .8rem; margin-top: .3rem; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.check-row { display: flex; align-items: center; gap: .5rem; font-size: .9rem; }
.image-preview { border: 1px solid var(--line); border-radius: 9px; overflow: hidden; margin-bottom: .6rem; background: var(--bg); }
.image-preview img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }

.alert { padding: .85rem 1.1rem; border-radius: 9px; font-size: .9rem; margin-bottom: 1.25rem; }
.alert--success { background: #e3f5e8; color: #2f8f47; border: 1px solid #bfe6c9; }
.alert--error { background: #fdeaeb; color: var(--red); border: 1px solid #f4c9cc; }

.tabs { display: flex; gap: .3rem; margin-bottom: 1.25rem; border-bottom: 1px solid var(--line); }
.tabs a { padding: .7rem 1.1rem; font-size: .9rem; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.is-active { color: var(--blue-700); border-bottom-color: var(--blue); }

.filters { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.filters .input, .filters .select { width: auto; padding: .5rem .7rem; font-size: .85rem; }

.empty { text-align: center; padding: 3rem 1rem; color: var(--muted); }

.pagination { display: flex; gap: .3rem; justify-content: center; margin-top: 1.5rem; list-style: none; padding: 0; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 36px; height: 36px; display: grid; place-items: center; padding: 0 .5rem; border: 1px solid var(--line); border-radius: 8px; font-size: .85rem; background: #fff; color: var(--body); }
.pagination .active span { background: var(--blue); border-color: var(--blue); color: #fff; }
.pagination .disabled span { opacity: .4; }

/* Login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 2rem; background: radial-gradient(circle at 92% 8%,rgba(76,175,122,.28) 0,rgba(76,175,122,.28) 200px,transparent 201px),radial-gradient(circle at 4% 96%,rgba(253,216,53,.16) 0,rgba(253,216,53,.16) 150px,transparent 151px),linear-gradient(135deg,#004B87 0%,#003D6B 55%,#002D4D 100%); }
.login-card { background: #fff; border-radius: 16px; padding: 2.5rem; width: 100%; max-width: 400px; box-shadow: 0 30px 70px rgba(0,0,0,.25); }
.login-card .brand { display: flex; align-items: center; gap: .6rem; margin-bottom: 1.5rem; }
.login-card .brand img { height: 38px; }
.login-card .brand b { font-size: 1.15rem; color: var(--blue-700); }
.login-card h1 { font-size: 1.3rem; }
.login-card p.sub { color: var(--muted); font-size: .9rem; margin-top: 0; }

@media (max-width: 1000px) {
  .admin { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; display: flex; flex-direction: column; }
  .sidebar nav { flex-flow: row wrap; }
  .form-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Stratus Teams additions */
.pill--open, .pill--new { background: #e0f2fe; color: #0369a1; }
.pill--closed, .pill--rejected { background: #eef0f2; color: #55636a; }
.pill--reviewing { background: #fdeeda; color: #b9791a; }
.pill--shortlisted { background: #ede9fe; color: #6d28d9; }
.pill--hired { background: #dcfce7; color: #15803d; }
.filters { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }
.filters .select { width: auto; min-width: 180px; }
.avatar-sm { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; display: inline-grid; place-items: center; background: #004B87; color: #fff; font-size: .8rem; font-weight: 700; flex-shrink: 0; }
.name-cell { display: flex; align-items: center; gap: .7rem; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: .5rem 1rem; font-size: .92rem; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; color: var(--ink); word-break: break-word; }
.letter { white-space: pre-wrap; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.2rem; font-size: .94rem; }
.sidebar .brand img { height: 30px; }
.sidebar .brand b { font-family: "Barlow Condensed", var(--font); font-size: 1.25rem; font-weight: 700; color: #fff; }
.sidebar { border-right: 4px solid; border-image: linear-gradient(180deg, #004B87 0 33.3%, #FDD835 33.3% 66.6%, #4CAF7A 66.6% 100%) 1; }

/* =========================================================================
   CMS upgrade (WordPress-style): admin bar, editor screen, media library,
   lists, revisions, dashboard widgets
   ========================================================================= */
.main { padding: 0 0 3rem; }
.main-inner { padding: 1.5rem 2rem 0; }
.adminbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 1rem; padding: .7rem 2rem; background: rgba(255,255,255,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.adminbar h1 { font-size: 1.3rem; margin: 0; }
.adminbar-right { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.adminbar-toggle { display: none; border: 0; background: none; color: var(--ink); cursor: pointer; padding: .3rem; }
.dropdown { position: relative; }
.dropdown > summary { list-style: none; cursor: pointer; }
.dropdown > summary::-webkit-details-marker { display: none; }
.dropdown-menu { position: absolute; top: calc(100% + 6px); left: 0; min-width: 210px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 16px 40px -12px rgba(0,45,77,.25); padding: .4rem; z-index: 40; display: grid; }
.dropdown--right .dropdown-menu { left: auto; right: 0; }
.dropdown-menu a, .dropdown-menu button { display: block; width: 100%; text-align: left; padding: .5rem .7rem; border-radius: 7px; font: inherit; font-size: .88rem; color: var(--ink); background: none; border: 0; cursor: pointer; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--bg); color: var(--blue); }
.dropdown-menu form { margin: 0; }
.dropdown-head { padding: .5rem .7rem .7rem; border-bottom: 1px solid var(--line); margin-bottom: .3rem; }
.dropdown-head b { display: block; color: var(--ink); }
.dropdown-head small { color: var(--muted); font-size: .78rem; }
.user-chip { display: flex; align-items: center; gap: .5rem; font-size: .88rem; font-weight: 600; color: var(--ink); padding: .25rem .6rem .25rem .25rem; border-radius: 999px; }
.user-chip:hover { background: var(--bg); }

.avatar { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, #004B87, #4CAF7A); color: #fff; font-weight: 700; font-size: .8rem; flex-shrink: 0; }
.avatar--sm { width: 28px; height: 28px; font-size: .7rem; }
.avatar--lg { width: 56px; height: 56px; font-size: 1.1rem; }
.user-cell { display: flex; align-items: center; gap: .7rem; }
tr.is-muted td { opacity: .6; }

.alert--info { background: #e0f2fe; color: #075985; border: 1px solid #bae6fd; padding: .85rem 1.1rem; border-radius: 10px; margin-bottom: 1.25rem; }
.alert--info a { color: #075985; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--blue-700); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.linklike--danger { color: var(--red); }
.hint { font-weight: 400; color: var(--muted); font-size: .8rem; }

/* Lists: status links, bulk bar, hover row actions */
.subsubsub { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .2rem .9rem; font-size: .88rem; }
.subsubsub a { color: var(--blue-700); }
.subsubsub a.is-active { color: var(--ink); font-weight: 700; }
.subsubsub span { color: var(--muted); font-weight: 400; }
.bulkbar { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .8rem; }
.bulkbar .select { width: auto; padding: .45rem .7rem; font-size: .85rem; }
.row-links { font-size: .8rem; color: var(--muted); margin-top: .25rem; visibility: hidden; }
.row-links a, .row-links .linklike { font-size: .8rem; text-decoration: none; }
tr.has-row-actions:hover .row-links, tr.has-row-actions:focus-within .row-links { visibility: visible; }
@media (hover: none) { .row-links { visibility: visible; } }

/* Editor screen */
.editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1.5rem; align-items: start; }
.editor-layout > div:first-child { display: grid; gap: 1.25rem; min-width: 0; }
.editor-side { position: sticky; top: 76px; display: grid; gap: 1.25rem; }
.editor-layout .panel + .panel { margin-top: 0; }
.editor-side .panel h2 { font-size: .95rem; margin: 0 0 .8rem; }
.input--title { font-size: 1.5rem; font-weight: 700; padding: .65rem .9rem; font-family: "Barlow", var(--font); }
.permalink { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; font-size: .84rem; margin: -.4rem 0 1.1rem; }
.input--inline { width: auto; min-width: 200px; flex: 1; max-width: 360px; padding: .35rem .55rem; font-size: .84rem; }
.publish-box .pb-actions-top { display: flex; justify-content: space-between; gap: .5rem; }
.pb-meta { list-style: none; margin: 1rem -1.5rem; padding: .9rem 1.5rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; gap: .55rem; font-size: .86rem; }
.pb-meta li { display: flex; gap: .5rem; align-items: flex-start; }
.pb-meta .icon { color: var(--muted); margin-top: .2rem; flex-shrink: 0; }
.pb-date { display: grid !important; gap: .35rem; }
.pb-date[hidden] { display: none !important; }
.pb-actions { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.tox-tinymce { border-radius: 9px !important; border-color: var(--line) !important; }
.role-option { display: flex; gap: .7rem; align-items: flex-start; padding: .7rem .8rem; border: 1.5px solid var(--line); border-radius: 10px; margin-bottom: .5rem; cursor: pointer; }
.role-option:has(input:checked) { border-color: var(--blue); background: #f0f6fc; }
.role-option b { display: block; color: var(--ink); font-size: .9rem; }
.role-option small { color: var(--muted); font-size: .8rem; line-height: 1.4; display: block; }
.role-option input { margin-top: .25rem; }

/* SEO preview */
.serp { border: 1px solid var(--line); border-radius: 10px; padding: .9rem 1rem; margin-bottom: 1rem; background: #fff; font-family: Arial, sans-serif; }
.serp-url { font-size: .8rem; color: #202124; }
.serp-title { color: #1a0dab; font-size: 1.15rem; line-height: 1.3; margin: .15rem 0; }
.serp-desc { color: #4d5156; font-size: .85rem; line-height: 1.5; }

/* Media library */
.dropzone { position: relative; border: 2px dashed #c6d3e3; border-radius: 12px; background: var(--bg); margin-bottom: 1.25rem; transition: border-color .15s, background .15s; }
.dropzone.is-over { border-color: var(--blue); background: #eaf2fb; }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.dropzone label { display: grid; justify-items: center; gap: .25rem; padding: 1.6rem 1rem; text-align: center; color: var(--muted); font-size: .85rem; pointer-events: none; }
.dropzone label b { color: var(--ink); font-size: 1rem; }
.dropzone .icon { color: var(--blue); }
.dz-progress { height: 4px; background: var(--line); border-radius: 0 0 10px 10px; overflow: hidden; }
.dz-progress span { display: block; height: 100%; width: 0; background: var(--green); transition: width .2s; }
.media-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .9rem; }
.media-tile { position: relative; }
.media-check { position: absolute; top: .45rem; left: .45rem; z-index: 2; width: 18px; height: 18px; }
.media-thumb { display: block; width: 100%; aspect-ratio: 1; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--bg); cursor: pointer; transition: box-shadow .15s, border-color .15s; }
.media-thumb:hover, .media-thumb:focus-visible { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,75,135,.18); outline: none; }
.media-tile:has(.media-check:checked) .media-thumb { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue); }
.media-thumb img { width: 100%; height: 100%; object-fit: cover; }
.media-name { display: block; font-size: .74rem; color: var(--muted); margin-top: .3rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-ico { display: grid; place-items: center; align-content: center; gap: .3rem; width: 100%; height: 100%; color: var(--muted); }
.file-ico b { font-size: .72rem; letter-spacing: .08em; background: var(--blue); color: #fff; padding: .1rem .45rem; border-radius: 4px; }
.file-ico.big { min-height: 260px; }
.file-ico.big b { font-size: 1.2rem; padding: .4rem .9rem; }
.media-modal { border: 0; border-radius: 14px; padding: 0; width: min(1100px, 94vw); max-height: 90vh; box-shadow: 0 40px 100px -20px rgba(0,0,0,.5); }
.media-modal::backdrop { background: rgba(0,25,45,.6); }
.mm-body { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, 1fr); max-height: 90vh; position: relative; }
.mm-preview { background: #0f172a; display: grid; place-items: center; min-height: 320px; padding: 1rem; }
.mm-preview img, .mm-preview video { max-width: 100%; max-height: 80vh; object-fit: contain; }
.mm-side { padding: 1.5rem; overflow-y: auto; }
.mm-side .kv { grid-template-columns: 95px 1fr; font-size: .82rem; margin-bottom: 1rem; }
.mm-close { position: absolute; top: .6rem; right: .7rem; width: 36px; height: 36px; border-radius: 50%; border: 0; background: #fff; color: var(--ink); font-size: 1.4rem; line-height: 1; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.picker-modal[open] { display: grid; grid-template-rows: auto 1fr auto; height: 82vh; }
.mp-head { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); }
.mp-head .filters { margin: 0; }
.mp-grid { overflow-y: auto; padding: 1rem 1.25rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .7rem; align-content: start; }
.mp-item { aspect-ratio: 1; padding: 0; border: 2px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--bg); cursor: pointer; }
.mp-item img { width: 100%; height: 100%; object-fit: cover; }
.mp-item.is-picked { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,75,135,.3); }
.mp-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .9rem 1.25rem; border-top: 1px solid var(--line); }

/* Activity */
.activity-list { list-style: none; margin: 0; padding: 0; }
.activity-list li { display: flex; align-items: center; gap: .8rem; padding: .7rem 0; border-bottom: 1px solid var(--line); font-size: .88rem; }
.activity-list li:last-child { border-bottom: 0; }
.activity-list li > div { flex: 1; min-width: 0; }
.activity-list b { color: var(--ink); font-weight: 600; }

/* Revisions */
.rev-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.rev-layout .panel + .panel { margin-top: 0; }
.rev-list ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; max-height: 70vh; overflow-y: auto; }
.rev-list a { display: flex; gap: .6rem; align-items: center; padding: .55rem .6rem; border-radius: 8px; color: var(--ink); font-size: .85rem; }
.rev-list a:hover { background: var(--bg); }
.rev-list a.is-active { background: #eaf2fb; box-shadow: inset 3px 0 0 var(--blue); }
.rev-list small { display: block; color: var(--muted); font-size: .75rem; }
.rev-field { border-top: 1px solid var(--line); padding: .9rem 0; }
.rev-field h3 { font-size: .9rem; margin: 0 0 .5rem; }
.rev-field.is-same h3 { color: var(--muted); font-weight: 500; }
.diff { font-family: ui-monospace, Consolas, monospace; font-size: .8rem; border: 1px solid var(--line); border-radius: 8px; overflow: auto; max-height: 520px; }
.diff > div { padding: .15rem .7rem; white-space: pre-wrap; word-break: break-word; }
.diff-del { background: #fde8e8; color: #9b1c1c; }
.diff-add { background: #e3f5e8; color: #14532d; }
.diff-same { color: #64748b; }
.diff-key { display: inline-block; padding: .05rem .5rem; border-radius: 4px; font-size: .75rem; }

/* Dashboard */
.welcome { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; background: linear-gradient(120deg, #f0f6fc, #fff 60%); }
.welcome h2 { font-size: 1.35rem; margin: 0 0 .2rem; }
.welcome-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; }
.dash-col { display: grid; gap: 1.5rem; min-width: 0; }
.dash-col .panel + .panel { margin-top: 0; }
.glance { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .4rem 1rem; }
.glance a { display: flex; align-items: center; gap: .5rem; padding: .35rem 0; color: var(--blue-700); font-size: .92rem; }
.glance b { color: var(--ink); }
.dash-sub { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: .8rem 0 .4rem; }
.dash-sub:first-child { margin-top: 0; }
.dash-list { list-style: none; margin: 0; padding: 0; font-size: .88rem; }
.dash-list li { padding: .45rem 0; border-bottom: 1px solid var(--line); display: flex; gap: .5rem; flex-wrap: wrap; align-items: baseline; }
.dash-list li:last-child { border-bottom: 0; }
.dash-list li.is-unread { font-weight: 600; }

@media (max-width: 1200px) {
  .editor-layout { grid-template-columns: minmax(0, 1fr) 270px; }
}
@media (max-width: 1000px) {
  .admin { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 270px; height: 100vh; z-index: 60; transform: translateX(-100%); transition: transform .25s; display: block; }
  .sidebar nav { flex-flow: column; }
  body.sidebar-open .sidebar { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.4); }
  .adminbar { padding: .6rem 1rem; }
  .adminbar-toggle { display: inline-grid; }
  .main-inner { padding: 1.25rem 1rem 0; }
  .editor-layout, .dash-grid, .rev-layout, .mm-body { grid-template-columns: 1fr; }
  .editor-side { position: static; }
  .hide-sm { display: none; }
}

/* Plain text areas use the normal font (the visual editor replaced Markdown) */
.textarea { font-family: var(--font); }
