/*
 * ═══════════════════════════════════════════════════════════════════════
 *  Admin UI Kit — admin-ui.css
 *  Verzió:  1.0.0
 *  Dátum:   2026-08-28
 *
 *  Tartalom:
 *    01  Design Tokens (CSS Custom Properties)
 *    02  Reset & Base
 *    03  App Shell & Layout
 *    04  Sidebar & Navigation
 *    05  Topbar & Search
 *    06  Content Area & Page Head
 *    07  Buttons & Controls
 *    08  Metric Cards (klassz. widget)
 *    09  Panels & Dashboard Grid (klassz.)
 *    10  Task Table
 *    11  Status Pills & Tags
 *    12  Chart & Activity
 *    13  Toolbar & View Tabs
 *    14  Kanban Board
 *    15  Data Table
 *    16  Content Editor Shell
 *    17  Social / Calendar
 *    18  Media Library
 *    19  Integrations & API Panel
 *    20  Team & Permissions
 *    21  Dashboard v2 — Frame-within-Frame
 *    22  Responsive Breakpoints
 *    23  Utility & Interaction Classes
 * ═══════════════════════════════════════════════════════════════════════
 */


/* ═══════════════════════════════════════════════════════════════════════
   01  DESIGN TOKENS
   ═══════════════════════════════════════════════════════════════════════ */
:root {
  /* Colours */
  --ink:          #17203b;   /* primary text */
  --ink-2:        #35405f;   /* secondary text */
  --muted:        #727c96;   /* hint / placeholder */
  --line:         #e7e9f1;   /* dividers / borders */
  --paper:        #ffffff;   /* card / panel backgrounds */
  --canvas:       #f5f6fa;   /* page background */
  --nav:          #171c35;   /* sidebar background */

  /* Brand */
  --brand:        #6558e8;   /* primary brand purple */
  --brand-dark:   #5145cf;   /* brand hover state */
  --brand-soft:   #eeecff;   /* brand tint background */
  --lime:         #b9ed6d;   /* accent / highlight */

  /* Semantic */
  --green:        #20a875;   /* success */
  --red:          #e45c67;   /* error / urgent */
  --orange:       #e6974a;   /* warning */
  --blue:         #2c75b7;   /* info */

  /* Shadows */
  --shadow:       0 8px 30px rgba(35, 42, 78, 0.07);
  --shadow-md:    0 12px 40px rgba(35, 42, 78, 0.12);

  /* Radius scale */
  --radius-sm:    7px;
  --radius-md:    12px;
  --radius-lg:    16px;
  --radius-xl:    22px;

  /* Typography */
  --font-sans:    'Inter', ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --text-xs:      11px;
  --text-sm:      12px;
  --text-base:    13px;
  --text-md:      14px;
  --text-lg:      15px;
  --text-xl:      18px;
  --text-2xl:     22px;
  --text-3xl:     28px;
  --text-4xl:     36px;

  /* Spacing scale (use as padding/margin/gap) */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
}


/* ═══════════════════════════════════════════════════════════════════════
   02  RESET & BASE
   ═══════════════════════════════════════════════════════════════════════ */
* { box-sizing: border-box; }
html { background: var(--canvas); font-size: 15px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: var(--font-sans);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }


/* ═══════════════════════════════════════════════════════════════════════
   03  APP SHELL & LAYOUT
   ═══════════════════════════════════════════════════════════════════════ */
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
}
.main { grid-column: 2; min-width: 0; }


/* ═══════════════════════════════════════════════════════════════════════
   04  SIDEBAR & NAVIGATION
   ═══════════════════════════════════════════════════════════════════════ */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 264px;
  background: var(--nav); color: #fff;
  padding: 28px 18px 22px;
  display: flex; flex-direction: column; z-index: 20;
}

/* Brand logo */
.brand { display: flex; align-items: center; gap: 12px; padding: 0 9px 28px; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  color: #15192f; background: var(--lime);
  font-size: 14px; font-weight: 900; letter-spacing: -.04em;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35);
}
.brand-name { font-size: 18px; font-weight: 760; letter-spacing: -.02em; }
.brand-name span { color: #aeb6cd; font-weight: 500; }

/* Workspace switcher */
.workspace-switch {
  background: #222945; border: 1px solid #303857; border-radius: 13px;
  padding: 12px 13px; margin: 0 4px 22px;
  display: flex; align-items: center; gap: 10px;
  width: calc(100% - 8px); color: inherit; text-align: left; cursor: pointer;
}
.workspace-avatar {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, #766afa, #a29aff);
  display: grid; place-items: center; font-size: 12px; font-weight: 800;
}
.workspace-copy { min-width: 0; flex: 1; }
.workspace-copy strong { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.workspace-copy small { color: #939cb8; font-size: 11px; }
.workspace-caret { color: #8e97b1; font-size: 13px; }

/* Nav sections */
.nav-section {
  color: #727d9c; font-size: 11px; text-transform: uppercase;
  letter-spacing: .13em; font-weight: 750; padding: 8px 13px 9px;
}
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav-link {
  min-height: 46px; display: flex; align-items: center; gap: 12px;
  padding: 0 13px; border-radius: 11px;
  color: #abb3ca; font-size: 14px; font-weight: 560;
  transition: .18s ease;
}
.nav-link svg { width: 18px; height: 18px; flex: none; }
.nav-link:hover { color: #fff; background: #222945; }
.nav-link.active { color: #fff; background: #2a3152; box-shadow: inset 3px 0 var(--lime); }
.nav-badge {
  margin-left: auto; min-width: 22px; height: 21px; padding: 0 7px;
  border-radius: 10px; display: grid; place-items: center;
  background: #383f61; color: #cdd4e8; font-size: 11px;
}
.nav-link.active .nav-badge { color: #1e2440; background: var(--lime); }

/* Sidebar footer help block */
.sidebar-spacer { flex: 1; }
.sidebar-help {
  margin: 20px 4px 0; padding: 16px; border-radius: 14px;
  background: linear-gradient(145deg, #252d4b, #202640);
  border: 1px solid #303858;
}
.sidebar-help strong { font-size: 13px; display: block; }
.sidebar-help p { color: #929bb6; font-size: 12px; line-height: 1.5; margin: 6px 0 11px; }
.sidebar-help a { color: var(--lime); font-size: 12px; font-weight: 700; }


/* ═══════════════════════════════════════════════════════════════════════
   05  TOPBAR & SEARCH
   ═══════════════════════════════════════════════════════════════════════ */
.topbar {
  height: 76px; padding: 0 38px;
  background: rgba(255,255,255,.86); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  display: flex; align-items: center; gap: 22px;
  position: sticky; top: 0; z-index: 10;
}
.mobile-logo { display: none; }

.search { max-width: 500px; flex: 1; position: relative; }
.search svg { position: absolute; width: 18px; height: 18px; left: 14px; top: 50%; transform: translateY(-50%); color: #8a93aa; }
.search input {
  width: 100%; height: 44px; padding: 0 42px;
  border: 1px solid #e4e6ee; border-radius: 12px;
  color: var(--ink); background: #f7f8fb; outline: none; font-size: 13px;
}
.search input:focus { border-color: #a9a2ef; box-shadow: 0 0 0 3px var(--brand-soft); background: #fff; }
.search-shortcut {
  position: absolute; right: 10px; top: 10px; height: 24px; min-width: 28px;
  border: 1px solid #dfe2eb; border-radius: 7px;
  background: #fff; color: #8b94a9; display: grid; place-items: center; font-size: 11px;
}

.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-button {
  width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 11px;
  display: grid; place-items: center; color: #65708a; background: #fff;
  cursor: pointer; position: relative;
}
.icon-button svg { width: 18px; height: 18px; }
.notification-dot {
  position: absolute; width: 8px; height: 8px; border-radius: 50%;
  background: var(--red); right: 8px; top: 8px; box-shadow: 0 0 0 2px #fff;
}

.profile { display: flex; align-items: center; gap: 10px; padding-left: 8px; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, #f2bb91, #b96949);
  display: grid; place-items: center; color: #fff; font-size: 13px; font-weight: 800;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.3);
}
.profile-copy strong { display: block; font-size: 13px; }
.profile-copy small { color: var(--muted); font-size: 11px; }


/* ═══════════════════════════════════════════════════════════════════════
   06  CONTENT AREA & PAGE HEAD
   ═══════════════════════════════════════════════════════════════════════ */
.content { padding: 36px 40px 52px; max-width: 1600px; margin: 0 auto; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.eyebrow { margin: 0 0 7px; color: var(--brand); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
.page-head h1 { margin: 0; font-size: 28px; line-height: 1.15; letter-spacing: -.035em; }
.page-head p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.head-actions { display: flex; gap: 9px; }


/* ═══════════════════════════════════════════════════════════════════════
   07  BUTTONS & CONTROLS
   ═══════════════════════════════════════════════════════════════════════ */
.button {
  min-height: 44px; border: 0; border-radius: 11px; padding: 0 18px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 13px; font-weight: 730; cursor: pointer; transition: .18s ease;
}
.button svg { width: 16px; height: 16px; }
.button.full { width: 100%; }

.button-primary { color: #fff; background: var(--brand); box-shadow: 0 6px 16px rgba(101,88,232,.22); }
.button-primary:hover { background: var(--brand-dark); transform: translateY(-1px); }

.button-secondary { color: var(--ink-2); background: #fff; border: 1px solid var(--line); }
.button-secondary:hover { border-color: #cfd3df; background: #fafafd; }

.button-link { border: 0; background: transparent; cursor: pointer; }

/* Compact button (toolbar, table actions) */
.row-action {
  min-height: 31px; padding: 0 11px;
  border: 1px solid #dedaFA; border-radius: 8px;
  color: var(--brand); background: var(--brand-soft);
  cursor: pointer; font-size: 11px; font-weight: 750;
}

/* Toolbar controls */
.toolbar {
  min-height: 58px; margin-bottom: 18px; padding: 7px 8px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border: 1px solid var(--line); border-radius: 14px;
  background: #fff; box-shadow: var(--shadow);
}
.view-tabs { display: flex; align-items: center; gap: 4px; }
.view-tabs button, .chip-button {
  border: 1px solid transparent; border-radius: 9px;
  background: transparent; color: var(--muted);
  cursor: pointer; font-size: 13px; font-weight: 700;
}
.view-tabs button { height: 40px; padding: 0 15px; }
.view-tabs button.active { color: var(--brand); background: var(--brand-soft); }
.toolbar-right { display: flex; align-items: center; gap: 8px; }
.chip-button { min-height: 38px; padding: 0 14px; border-color: var(--line); color: var(--ink-2); background: #fff; }
.chip-button:hover { border-color: #cdd1df; }

/* Search inputs */
.compact-search { width: 210px; height: 38px; position: relative; display: flex; align-items: center; }
.compact-search svg { position: absolute; left: 11px; width: 15px; height: 15px; color: #9098aa; }
.compact-search input {
  width: 100%; height: 100%; padding: 0 10px 0 34px;
  border: 1px solid var(--line); border-radius: 9px;
  outline: none; color: var(--ink); background: #fafbfc; font-size: 13px;
}
.compact-search input:focus { border-color: #aaa4ec; background: #fff; }

/* Text link */
.text-link { color: var(--brand); font-size: 12px; font-weight: 750; display: flex; align-items: center; gap: 5px; }
.text-link svg { width: 14px; height: 14px; }


/* ═══════════════════════════════════════════════════════════════════════
   08  METRIC CARDS (klassz. widget — alternatív a KPI striphez)
   ═══════════════════════════════════════════════════════════════════════ */
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.metric-card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow);
  min-height: 148px; padding: 22px 22px 18px; position: relative; overflow: hidden;
}
.metric-top { display: flex; align-items: center; justify-content: space-between; }
.metric-icon {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center; color: var(--brand); background: var(--brand-soft);
}
.metric-icon svg { width: 18px; height: 18px; }
.metric-card:nth-child(2) .metric-icon { color: #3a8d6f; background: #e7f7f0; }
.metric-card:nth-child(3) .metric-icon { color: #d07830; background: #fff0e3; }
.metric-card:nth-child(4) .metric-icon { color: #2c75b7; background: #e8f3fc; }
.trend { display: flex; align-items: center; gap: 3px; color: var(--green); font-size: 12px; font-weight: 750; }
.trend.neutral { color: var(--muted); }
.metric-value { margin-top: 14px; font-size: 30px; font-weight: 780; letter-spacing: -.03em; }
.metric-label { margin-top: 4px; color: var(--muted); font-size: 13px; }


/* ═══════════════════════════════════════════════════════════════════════
   09  PANELS & DASHBOARD GRID (klassz.)
   ═══════════════════════════════════════════════════════════════════════ */
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); min-width: 0; overflow: hidden; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(340px, .75fr); gap: 18px; }
.panel-head {
  min-height: 68px; padding: 0 22px; border-bottom: 1px solid #edf0f5;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.panel-head h2 { margin: 0; font-size: 15px; letter-spacing: -.01em; }
.panel-head p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }


/* ═══════════════════════════════════════════════════════════════════════
   10  TASK TABLE
   ═══════════════════════════════════════════════════════════════════════ */
.task-table { width: 100%; border-collapse: collapse; }
.task-table th {
  padding: 14px 20px; color: #8b93a7; background: #fafbfc;
  font-size: 11px; font-weight: 700; text-align: left;
  text-transform: uppercase; letter-spacing: .06em;
}
.task-table td { padding: 16px 20px; border-top: 1px solid #eff1f5; font-size: 13px; vertical-align: middle; }
.task-cell { display: flex; align-items: center; gap: 12px; }
.task-type {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center; flex: none;
}
.task-type svg { width: 16px; height: 16px; }
.task-type.social { color: #2577b8; background: #e7f4ff; }
.task-type.article { color: #d57b34; background: #fff0e3; }
.task-cell strong { display: block; max-width: 280px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13px; }
.task-cell small { color: var(--muted); font-size: 11px; display: block; margin-top: 2px; }

.assignee { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 13px; }
.mini-avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 10px; font-weight: 800; }
.mini-avatar.purple { background: #8074dc; }
.mini-avatar.orange { background: #d68b51; }
.mini-avatar.green  { background: #53a281; }

.due { color: var(--ink-2); white-space: nowrap; font-size: 13px; }
.due.urgent { color: var(--red); font-weight: 700; }


/* ═══════════════════════════════════════════════════════════════════════
   11  STATUS PILLS & TAGS
   ═══════════════════════════════════════════════════════════════════════ */
/* Pill — állapotjelző badge */
.pill {
  height: 28px; width: max-content; padding: 0 10px; border-radius: 8px;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; white-space: nowrap;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.progress { color: #6b57c9; background: #f1effd; }
.pill.review   { color: #c0762f; background: #fff1e4; }
.pill.ready    { color: #218661; background: #e8f7f1; }
.pill.done     { color: #8b96a9; background: #f0f2f7; }

/* Tag — kis kategória jelölő */
.tag {
  height: 23px; padding: 0 9px; border-radius: 7px;
  display: inline-flex; align-items: center;
  color: #6757c8; background: #f0edff;
  font-size: 11px; font-weight: 750;
}
.tag.blue   { color: #287aaf; background: #e8f5fd; }
.tag.orange { color: #b46f29; background: #fff0df; }
.tag.green  { color: #22825f; background: #e7f6ef; }


/* ═══════════════════════════════════════════════════════════════════════
   12  CHART & ACTIVITY (klassz. dashboard widget)
   ═══════════════════════════════════════════════════════════════════════ */
.chart-area { padding: 20px 22px 18px; }
.chart-summary { display: flex; align-items: flex-start; justify-content: space-between; }
.chart-big { font-size: 28px; font-weight: 780; }
.chart-caption { color: var(--muted); font-size: 12px; }
.chart-legend { display: flex; gap: 12px; font-size: 11px; color: var(--muted); }
.legend-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; }

.chart {
  height: 140px; margin-top: 10px; position: relative;
  display: flex; align-items: flex-end; gap: 8px;
  border-bottom: 1px solid #eceef3;
}
.chart::before, .chart::after { content: ""; position: absolute; inset: 32% 0 auto; border-top: 1px dashed #e5e8ef; }
.chart::after { inset: 66% 0 auto; }
.bar {
  flex: 1; max-width: 24px; min-width: 10px; border-radius: 5px 5px 0 0;
  background: linear-gradient(to top, var(--brand), #958cef); z-index: 1; position: relative;
}
.bar:hover::after {
  content: attr(data-value); position: absolute; left: 50%; transform: translateX(-50%); top: -28px;
  padding: 4px 7px; border-radius: 6px; color: #fff; background: var(--ink);
  font-size: 11px; white-space: nowrap;
}
.chart-labels { display: flex; justify-content: space-between; margin-top: 8px; color: #9aa1b2; font-size: 11px; }

.activity-list { padding: 8px 22px 12px; }
.activity {
  display: grid; grid-template-columns: 34px 1fr auto;
  gap: 11px; align-items: start; padding: 14px 0;
  border-bottom: 1px solid #eff1f5;
}
.activity:last-child { border-bottom: 0; }
.activity-icon {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center; color: var(--brand); background: var(--brand-soft);
}
.activity-icon svg { width: 15px; height: 15px; }
.activity p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.activity p strong { color: var(--ink); }
.activity small { color: #9aa1b4; font-size: 11px; white-space: nowrap; }


/* ═══════════════════════════════════════════════════════════════════════
   13  KANBAN BOARD
   ═══════════════════════════════════════════════════════════════════════ */
.kanban { display: grid; grid-template-columns: repeat(4,minmax(240px,1fr)); align-items: start; gap: 14px; overflow-x: auto; padding-bottom: 14px; }
.kanban-col { min-width: 240px; padding: 12px; border: 1px solid #e5e8ef; border-radius: 15px; background: #eff1f6; }
.kanban-col > header { height: 44px; padding: 0 4px 10px; display: flex; align-items: center; gap: 8px; }
.kanban-col h2 { margin: 0; font-size: 13px; }
.kanban-col .count { min-width: 22px; height: 22px; border-radius: 8px; display: grid; place-items: center; color: var(--muted); background: #fff; font-size: 11px; }
.kanban-col header button, .task-card button { margin-left: auto; border: 0; color: #8a93a8; background: transparent; cursor: pointer; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #9ca5b8; }
.status-dot.purple { background: var(--brand); }.status-dot.orange { background: var(--orange); }.status-dot.green { background: var(--green); }
.kanban-stack { display: flex; flex-direction: column; gap: 10px; }
.task-card { padding: 16px; border: 1px solid #e2e5ed; border-radius: 12px; background: #fff; box-shadow: 0 4px 13px rgba(32,39,74,.045); }
.card-top, .card-foot { display: flex; align-items: center; justify-content: space-between; }
.task-card h3 { margin: 13px 0 6px; font-size: 13px; line-height: 1.38; }
.task-card > p { margin: 0 0 16px; color: var(--muted); font-size: 12px; }
.card-foot { padding-top: 12px; border-top: 1px solid #eef0f4; }
.card-foot > span:first-child { display: flex; align-items: center; gap: 5px; color: #7d869d; font-size: 11px; }
.card-foot svg { width: 13px; height: 13px; }
.add-card { min-height: 42px; border: 1px dashed #cbd0dc !important; border-radius: 10px; color: #758097 !important; background: transparent !important; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; }
.add-card svg { width: 14px; height: 14px; }


/* ═══════════════════════════════════════════════════════════════════════
   14  DATA TABLE (kereshetővel)
   ═══════════════════════════════════════════════════════════════════════ */
.data-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { height: 46px; padding: 0 20px; color: #8991a4; background: #fafbfc; text-align: left; text-transform: uppercase; letter-spacing: .05em; font-size: 11px; }
.data-table td { height: 62px; padding: 0 20px; border-top: 1px solid #eff1f5; color: var(--ink-2); font-size: 13px; }
.data-table td:first-child strong, .data-table td:first-child small { display: block; }
.data-table td:first-child strong { color: var(--ink); font-size: 13px; }
.data-table td:first-child small { margin-top: 4px; color: #8d95a8; font-size: 11px; }
.difficulty { min-width: 58px; height: 25px; padding: 0 9px; border-radius: 7px; display: inline-grid; place-items: center; color: #bc712b; background: #fff0e2; font-size: 11px; font-weight: 700; }
.difficulty.easy { color: #25805e; background: #e9f7f1; }
.difficulty.hard { color: #c1515a; background: #fdecee; }
.positive { color: var(--green); font-weight: 700; }
.table-actions { display: flex; gap: 8px; }


/* ═══════════════════════════════════════════════════════════════════════
   15  CONTENT EDITOR SHELL
   ═══════════════════════════════════════════════════════════════════════ */
.editor-shell {
  min-height: 700px; display: grid; grid-template-columns: 240px minmax(440px,1fr) 270px;
  border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  background: #fff; box-shadow: var(--shadow);
}
.document-list { padding: 16px 13px; border-right: 1px solid var(--line); background: #fafbfc; }
.document-list-head { height: 40px; padding: 0 5px; display: flex; align-items: center; justify-content: space-between; font-size: 13px; }
.document-list-head button { width: 28px; height: 28px; border: 0; border-radius: 8px; display: grid; place-items: center; color: #fff; background: var(--brand); cursor: pointer; }
.document-list-head svg { width: 14px; height: 14px; }
.document-list .compact-search { width: 100%; margin-bottom: 12px; }
.doc-item { width: 100%; min-height: 66px; padding: 10px 8px; border: 0; border-radius: 10px; display: grid; grid-template-columns: 8px 1fr; align-items: start; gap: 9px; text-align: left; color: var(--ink); background: transparent; cursor: pointer; }
.doc-item.active { background: #fff; box-shadow: 0 4px 14px rgba(40,46,80,.08); }
.doc-status { width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: #a1a8b8; }
.doc-status.purple { background: var(--brand); }.doc-status.orange { background: #e89543; }.doc-status.green { background: var(--green); }
.doc-item strong,.doc-item small { display: block; }
.doc-item strong { font-size: 13px; line-height: 1.35; }
.doc-item small { margin-top: 5px; color: var(--muted); font-size: 11px; }
.editor { min-width: 0; display: flex; flex-direction: column; }
.editor-top { min-height: 82px; padding: 16px 24px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.editor-top h2 { margin: 5px 0 0; font-size: 15px; }
.breadcrumb { color: var(--muted); font-size: 11px; }
.editor-top > div:last-child { display: flex; gap: 8px; }
.formatbar { height: 48px; padding: 0 24px; display: flex; align-items: center; gap: 5px; border-bottom: 1px solid var(--line); }
.formatbar button { width: 32px; height: 30px; border: 0; border-radius: 7px; color: #626d86; background: transparent; cursor: pointer; font-size: 12px; }
.formatbar button:hover { background: #f0f1f6; }
.formatbar span { height: 20px; margin: 0 5px; border-left: 1px solid var(--line); }
.editor-body { flex: 1; padding: 36px 48px 50px; outline: 0; }
.editor-body h1 { margin: 0 0 18px; font-size: 26px; line-height: 1.2; letter-spacing: -.035em; }
.editor-body h2 { margin: 32px 0 12px; font-size: 17px; }
.editor-body p { color: #414c67; font-family: Georgia, serif; font-size: 14px; line-height: 1.8; }
.editor-body .lead { color: #59637a; font-size: 15px; }
.editor-footer { height: 44px; padding: 0 24px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 18px; color: var(--muted); font-size: 11px; }
.save-state { margin-left: auto; color: #4a8d72; }
.ai-side { min-width: 0; border-left: 1px solid var(--line); background: #fbfbfe; display: flex; flex-direction: column; }
.ai-side-head { height: 62px; padding: 0 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.ai-side-head span { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 750; }
.ai-side-head svg { width: 15px; color: var(--brand); }
.ai-side-head button { border: 0; background: transparent; color: #8991a5; }
.score-card { margin: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.score-card > span { color: var(--muted); font-size: 11px; }
.score-card > div:nth-child(2) { margin-top: 9px; }
.score-card strong { font-size: 26px; }
.score-card small { color: var(--muted); font-size: 12px; }
.score-card p { margin: 10px 0 0; color: #6b758c; font-size: 11px; line-height: 1.55; }
.progress-line { height: 6px; margin-top: 9px; border-radius: 3px; overflow: hidden; background: #eaecf2; }
.progress-line i { height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg,var(--brand),#9d93f4); }
.ai-section { padding: 0 16px; }
.ai-section h3 { margin: 5px 0 9px; font-size: 12px; }
.ai-section button { width: 100%; min-height: 40px; padding: 0 10px; margin-bottom: 6px; border: 1px solid var(--line); border-radius: 9px; display: flex; align-items: center; gap: 8px; color: var(--ink-2); background: #fff; font-size: 12px; text-align: left; }
.ai-section button span { color: var(--brand); font-size: 15px; }
.ai-chat { margin-top: auto; padding: 16px; border-top: 1px solid var(--line); }
.ai-chat p { margin: 0 0 9px; color: var(--muted); font-size: 11px; }
.ai-chat label { height: 42px; padding: 0 5px 0 11px; display: flex; align-items: center; border: 1px solid #daddea; border-radius: 10px; background: #fff; }
.ai-chat input { min-width: 0; flex: 1; border: 0; outline: 0; font-size: 12px; }
.ai-chat button { width: 32px; height: 32px; border: 0; border-radius: 8px; display: grid; place-items: center; color: #fff; background: var(--brand); }
.ai-chat svg { width: 14px; }
.inline-suggestion { margin: 20px 0; padding: 12px 14px; display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 10px; border: 1px solid #ddd8ff; border-radius: 10px; background: #f6f4ff; font-size: 12px; }
.inline-suggestion svg { width: 18px; color: var(--brand); }
.inline-suggestion span strong { display: block; margin-bottom: 3px; }
.inline-suggestion button { height: 29px; border: 0; border-radius: 7px; color: #fff; background: var(--brand); font-size: 11px; font-weight: 700; }


/* ═══════════════════════════════════════════════════════════════════════
   16  SOCIAL / CALENDAR
   ═══════════════════════════════════════════════════════════════════════ */
.social-summary { min-height: 68px; margin-bottom: 16px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; display: flex; align-items: center; gap: 24px; box-shadow: var(--shadow); }
.account-switch { min-width: 240px; display: flex; align-items: center; gap: 10px; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.social-logo { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: #2878db; font-size: 18px; font-weight: 800; }
.account-switch strong,.account-switch small { display: block; }
.account-switch strong { font-size: 13px; }
.account-switch small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.mini-kpis { flex: 1; display: flex; justify-content: center; gap: 28px; color: var(--muted); font-size: 12px; }
.mini-kpis strong { color: var(--ink); font-size: 15px; }
.social-grid { display: grid; grid-template-columns: minmax(0,1.9fr) minmax(300px,.68fr); gap: 16px; }
.calendar-panel { padding: 13px; }
.week-grid { display: grid; grid-template-columns: repeat(7,minmax(115px,1fr)); gap: 8px; min-height: 620px; overflow-x: auto; }
.day-col { min-width: 115px; padding: 8px; border: 1px solid #eceef3; border-radius: 11px; background: #fafbfc; }
.day-col.today { border-color: #c9c3f8; background: #f8f7ff; }
.day-col > header { min-height: 42px; display: flex; align-items: center; justify-content: space-between; }
.day-col header strong { font-size: 11px; }
.day-col header span { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; color: var(--muted); font-size: 11px; }
.day-col.today header span { color: #fff; background: var(--brand); }
.day-stack { display: flex; flex-direction: column; gap: 8px; }
.post-card { min-height: 148px; padding: 11px; border: 1px solid #dedaf8; border-left: 3px solid var(--brand); border-radius: 9px; background: #fff; }
.post-card.green { border-color: #d6ece3; border-left-color: var(--green); }
.post-card.orange { border-color: #f2e1d1; border-left-color: var(--orange); }
.post-card.gray { border-color: #e3e6ec; border-left-color: #9aa2b3; }
.post-card small { color: var(--muted); font-size: 10px; }
.post-card h3 { min-height: 40px; margin: 9px 0 8px; font-size: 12px; line-height: 1.4; }
.post-card > span { font-size: 10px; color: #6c5bc8; }
.post-card.green > span { color: #25815f; }
.post-card.orange > span { color: #b87431; }
.post-card footer { margin-top: 16px; display: flex; align-items: center; justify-content: space-between; }
.social-dot { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: #2878db; font-size: 10px; font-style: normal; }
.empty-slot { width: 100%; min-height: 54px; border: 1px dashed #bdb6f0; border-radius: 9px; display: flex; align-items: center; justify-content: center; gap: 5px; color: var(--brand); background: #f5f3ff; font-size: 11px; }
.empty-slot svg { width: 13px; }
.composer .panel-head { min-height: 68px; }
.composer-body { padding: 18px; }
.composer-body > label { color: var(--ink-2); font-size: 12px; font-weight: 700; }
.composer textarea { width: 100%; height: 105px; margin-top: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; resize: none; outline: 0; color: var(--ink-2); font-size: 13px; line-height: 1.55; }
.tone-row { margin: 10px 0; display: flex; gap: 6px; }
.tone-row button { height: 29px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: #fff; font-size: 11px; }
.tone-row button.active { color: var(--brand); border-color: #d4cff8; background: var(--brand-soft); }
.post-preview { margin-top: 17px; padding: 15px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.preview-head { display: flex; align-items: center; gap: 9px; }
.preview-head .social-logo { width: 32px; height: 32px; font-size: 12px; }
.preview-head strong,.preview-head small { display: block; }
.preview-head strong { font-size: 12px; }
.preview-head small { color: var(--muted); font-size: 10px; }
.post-preview p { margin: 11px 0 0; color: #3e4860; font-size: 13px; line-height: 1.55; }
.preview-media { height: 130px; margin-top: 12px; border-radius: 9px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #7c73c4; background: linear-gradient(135deg,#e8f3e5,#eeeaff); font-size: 11px; }
.preview-media svg { width: 26px; }


/* ═══════════════════════════════════════════════════════════════════════
   17  MEDIA LIBRARY
   ═══════════════════════════════════════════════════════════════════════ */
.media-layout { display: grid; grid-template-columns: 230px 1fr; gap: 16px; }
.folder-panel { align-self: start; padding-bottom: 10px; }
.folder-panel .panel-head { min-height: 60px; }
.folder-panel .icon-button { width: 32px; height: 32px; }
.folder-panel > button { width: calc(100% - 18px); min-height: 44px; margin: 2px 9px; padding: 0 11px; border: 0; border-radius: 9px; display: flex; align-items: center; gap: 9px; color: var(--ink-2); background: transparent; font-size: 13px; text-align: left; }
.folder-panel > button.active { color: var(--brand); background: var(--brand-soft); font-weight: 700; }
.folder-panel > button svg { width: 16px; }
.folder-panel > button span { flex:1; }
.upload-zone { min-height: 80px; margin-bottom: 16px; padding: 12px 22px; border: 1px dashed #c9c4eb; border-radius: 14px; display: flex; align-items: center; gap: 13px; color: var(--ink-2); background: #f8f7ff; cursor: pointer; }
.upload-zone > span { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; color: var(--brand); background: #eae7ff; }
.upload-zone svg { width: 19px; }
.upload-zone strong,.upload-zone small { display: block; }
.upload-zone strong { font-size: 13px; }
.upload-zone small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.asset-grid { display: grid; grid-template-columns: repeat(3,minmax(180px,1fr)); gap: 14px; }
.asset-card { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: var(--shadow); }
.asset-thumb { height: 165px; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: rgba(49,54,82,.6); }
.asset-thumb { background: linear-gradient(135deg,#dfe9db,#cbdabf); }
.asset-thumb.art-1 { background: linear-gradient(135deg,#f4d9c5,#eeb4a7); }
.asset-thumb.art-2 { background: linear-gradient(135deg,#b9d1bd,#89afa1); }
.asset-thumb.art-3 { background: linear-gradient(135deg,#dae1f2,#b9bce8); }
.asset-thumb.art-4 { background: linear-gradient(135deg,#d4d1cf,#9b9a9b); }
.asset-thumb.art-5 { background: linear-gradient(135deg,#eeebff,#dcd7fb); }
.asset-thumb svg { width: 32px; }
.asset-thumb span { font-size: 11px; font-weight: 800; letter-spacing: .1em; }
.asset-thumb button { position: absolute; top: 9px; right: 9px; width: 28px; height: 28px; border: 0; border-radius: 8px; color: var(--ink-2); background: rgba(255,255,255,.8); }
.asset-card > div:last-child { padding: 12px 13px; }
.asset-card strong,.asset-card small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asset-card strong { font-size: 13px; }
.asset-card small { margin-top: 5px; color: var(--muted); font-size: 11px; }


/* ═══════════════════════════════════════════════════════════════════════
   18  INTEGRATIONS & API PANEL
   ═══════════════════════════════════════════════════════════════════════ */
.security-banner { min-height: 88px; margin-bottom: 16px; padding: 16px 20px; display: flex; align-items: center; gap: 14px; border: 1px solid #cfe8dd; border-radius: 14px; background: #eef9f4; }
.security-banner > svg { width: 28px; height: 28px; padding: 5px; border-radius: 9px; color: #267b5d; background: #d8f0e5; }
.security-banner div { flex:1; }
.security-banner strong { font-size: 13px; }
.security-banner p { margin: 4px 0 0; color: #627f73; font-size: 12px; }
.integration-grid { display: grid; grid-template-columns: repeat(3,minmax(240px,1fr)); gap: 14px; margin-bottom: 16px; }
.integration-card { min-height: 140px; padding: 20px; display: grid; grid-template-columns: 44px 1fr; gap: 13px; position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.service-logo { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: #7165d2; background: #ebe8ff; font-size: 16px; font-weight: 800; }
.service-logo.green { color:#27815f;background:#e5f5ee; }
.service-logo.orange { color:#b7712d;background:#fff0e2; }
.service-logo.gray { color:#788197;background:#eceef3; }
.integration-copy h2 { margin: 2px 0 5px; font-size: 14px; }
.integration-copy p { min-height: 30px; margin: 0 0 10px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.connection { color: var(--green); font-size: 11px; font-weight: 700; }
.connection.purple { color:var(--brand); }
.connection.orange { color:#b87431; }
.connection.gray { color:#8b94a7; }
.integration-card > button { grid-column: 1 / -1; margin-top: 2px; }
.api-panel { margin-bottom: 22px; }
.api-row { min-height: 58px; padding: 0 20px; border-top: 1px solid #eef0f4; display: grid; grid-template-columns: 50px 1fr 120px 75px; align-items: center; gap: 12px; font-size: 13px; }
.method { width: 42px; height: 24px; border-radius: 7px; display: grid; place-items: center; color: #257d5d; background: #e6f6ef; font-size: 10px; font-weight: 800; }
.method.post { color:#6859c8;background:#eeebff; }
.api-row code { color: var(--ink-2); font-size: 12px; }
.scope { color: var(--muted); font-size: 12px; }
.api-row button { border: 0; color: var(--brand); background: transparent; font-size: 12px; font-weight: 700; }


/* ═══════════════════════════════════════════════════════════════════════
   19  TEAM & PERMISSIONS
   ═══════════════════════════════════════════════════════════════════════ */
.team-layout { display: grid; grid-template-columns: minmax(0,1.7fr) minmax(300px,.75fr); gap: 16px; margin-bottom: 16px; }
.member-list { padding: 0 20px; }
.member-row { min-height: 76px; display: grid; grid-template-columns: 38px minmax(160px,1fr) 145px 90px 28px; align-items: center; gap: 12px; border-bottom: 1px solid #eef0f4; }
.member-row:last-child { border:0; }
.member-avatar { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color:#fff;background:#8074dc;font-size:11px;font-weight:800; }
.member-avatar.green { background:#53a281; }
.member-avatar.orange { background:#d68b51; }
.member-name strong,.member-name small { display:block; }
.member-name strong { font-size:13px; }
.member-name small { margin-top:4px;color:var(--muted);font-size:11px; }
.role-badge { width:max-content;height:28px;padding:0 10px;border-radius:8px;display:flex;align-items:center;color:#6659c2;background:#f0edff;font-size:12px;font-weight:700; }
.role-badge.admin { color:#914e66;background:#faeaf0; }
.last-active { color:var(--muted);font-size:12px; }
.member-row>button { border:0;color:#929aad;background:transparent; }
.permission-panel { margin-bottom:26px; }
.permission-grid { display:grid;grid-template-columns:minmax(160px,1.4fr) repeat(4,1fr);border:1px solid var(--line);border-radius:13px;overflow:hidden; }
.permission-row { display:grid;grid-template-columns:minmax(160px,1.4fr) repeat(4,1fr);border-top:1px solid var(--line); }
.permission-head { height:46px;padding:0 18px;background:#fafbfc;align-items:center;font-size:11px;font-weight:700;color:#8991a4;text-transform:uppercase;letter-spacing:.05em; }
.permission-row>div:first-child { padding:16px 18px;font-size:13px; }
.permission-row>div:not(:first-child) { display:grid;place-items:center;font-size:13px; }


/* ═══════════════════════════════════════════════════════════════════════
   20  DASHBOARD v2 — FRAME-WITHIN-FRAME DESIGN
   ═══════════════════════════════════════════════════════════════════════ */

/* Page greeting */
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.dash-head h1 { margin: 0; font-size: 30px; line-height: 1.15; letter-spacing: -.04em; }
.dash-head p { margin: 9px 0 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.dash-head p strong { color: var(--ink); }

/* The big inner frame */
.dash-surface {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 1px 0 #e0e3ef, 0 10px 40px rgba(23,32,59,.07);
  overflow: hidden;
}

/* KPI Strip */
.kpi-strip { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); }
.kpi-cell {
  padding: 26px 28px 22px; border-right: 1px solid var(--line);
  position: relative; transition: background .18s ease; cursor: default;
}
.kpi-cell:last-child { border-right: 0; }
.kpi-cell:hover { background: #fafbff; }
.kpi-cell::after {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--brand);
  transform: scaleX(0); transform-origin: left; transition: transform .22s ease;
}
.kpi-cell:hover::after { transform: scaleX(1); }
.kpi-cell:nth-child(2)::after { background: var(--green); }
.kpi-cell:nth-child(3)::after { background: var(--orange); }
.kpi-cell:nth-child(4)::after { background: var(--blue); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.kpi-icon-wrap { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.kpi-icon-wrap svg { width: 19px; height: 19px; }
.kpi-cell:nth-child(2) .kpi-icon-wrap { background: #e7f7f0; color: #3a8d6f; }
.kpi-cell:nth-child(3) .kpi-icon-wrap { background: #fff0e3; color: #d07830; }
.kpi-cell:nth-child(4) .kpi-icon-wrap { background: #e8f3fc; color: #2c75b7; }
.kpi-badge { font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 20px; color: var(--green); background: #eaf7f2; white-space: nowrap; }
.kpi-badge.neutral { color: var(--muted); background: #f0f2f7; }
.kpi-badge.warn    { color: #d07830; background: #fff3e8; }
.kpi-badge.info    { color: #2c75b7; background: #e8f3fc; }
.kpi-value { font-size: 36px; font-weight: 820; letter-spacing: -.05em; line-height: 1; margin-bottom: 5px; }
.kpi-label { font-size: 13px; color: var(--muted); }

/* Dashboard body grid */
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; min-height: 480px; }
.dash-main { min-width: 0; border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.dash-aside { min-width: 0; display: flex; flex-direction: column; }

/* Section header inside surface */
.sect-head { min-height: 66px; padding: 0 26px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); flex: none; }
.sect-head h2 { margin: 0; font-size: 15px; letter-spacing: -.01em; }
.sect-head p  { margin: 4px 0 0; font-size: 12px; color: var(--muted); }

/* Enhanced task table (inside surface) */
.task-table-v2 { width: 100%; border-collapse: collapse; }
.task-table-v2 th { height: 44px; padding: 0 22px; background: #f9fafb; color: #8d96ab; font-size: 11px; font-weight: 700; text-align: left; text-transform: uppercase; letter-spacing: .07em; border-bottom: 1px solid #eff1f5; }
.task-table-v2 td { padding: 16px 22px; border-top: 1px solid #f0f2f7; vertical-align: middle; font-size: 13px; transition: background .14s; }
.task-row:hover td { background: #fafbff; }
.task-row-urgent td:first-child { box-shadow: inset 3px 0 0 var(--red); }

/* Inline performance strip */
.perf-strip { padding: 22px 26px; border-top: 1px solid var(--line); margin-top: auto; }
.perf-strip-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.perf-strip-head > span { font-size: 13px; color: var(--muted); }
.perf-strip-head .perf-num { font-size: 24px; font-weight: 820; letter-spacing: -.04em; }
.perf-strip-head .perf-sub { font-size: 13px; color: var(--muted); margin-left: 5px; }
.mini-bars { height: 88px; display: flex; align-items: flex-end; gap: 7px; }
.mini-bar { flex: 1; border-radius: 5px 5px 0 0; background: #ece9fc; position: relative; min-width: 10px; cursor: default; transition: background .18s; }
.mini-bar:hover { background: #d9d4f8; }
.mini-bar.hi { background: linear-gradient(to top, var(--brand) 0%, #9589f4 100%); }
.mini-bar.hi:hover { background: linear-gradient(to top, var(--brand-dark) 0%, #8a7fec 100%); }
.mini-bar:hover::after { content: attr(data-v); position: absolute; left: 50%; top: -30px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 4px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; white-space: nowrap; pointer-events: none; z-index: 5; }
.mini-bar-labels { display: flex; justify-content: space-between; margin-top: 8px; font-size: 11px; color: #9aa2b5; }

/* Right aside blocks */
.aside-block { padding: 22px 24px; border-bottom: 1px solid var(--line); }
.aside-block:last-child { border-bottom: 0; flex: 1; }
.aside-title { font-size: 14px; font-weight: 700; color: var(--ink); margin: 0 0 18px; display: flex; align-items: center; justify-content: space-between; }
.aside-title .text-link { font-size: 12px; }

/* Quick-stat 2×2 grid */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat-pill { padding: 16px 14px; border: 1px solid var(--line); border-radius: 14px; background: #fafbfc; transition: border-color .18s, background .18s; }
.stat-pill:hover { border-color: #c8cde0; background: #fff; }
.sp-value { font-size: 26px; font-weight: 820; letter-spacing: -.04em; line-height: 1; }
.sp-label { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* Activity timeline */
.timeline { position: relative; padding-left: 24px; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 1px; background: linear-gradient(to bottom, var(--brand-soft), var(--line)); }
.tl-item { position: relative; padding-bottom: 20px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot { position: absolute; left: -20px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.tl-dot.green  { border-color: var(--green);  box-shadow: 0 0 0 3px #e8f7f1; }
.tl-dot.orange { border-color: var(--orange); box-shadow: 0 0 0 3px #fff3e8; }
.tl-dot.muted  { border-color: #b0b8cc; box-shadow: 0 0 0 3px #f0f2f7; }
.tl-body { font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.tl-body strong { color: var(--ink); }
.tl-time { font-size: 11px; color: #9aa1b4; margin-top: 4px; }


/* ═══════════════════════════════════════════════════════════════════════
   21  UTILITY & INTERACTION
   ═══════════════════════════════════════════════════════════════════════ */
.toast {
  position: fixed; right: 22px; bottom: 22px; z-index: 70;
  max-width: min(450px, calc(100vw - 44px));
  padding: 15px 18px; border-radius: 13px;
  display: flex; align-items: center; gap: 14px;
  color: #fff; background: #171c35; box-shadow: 0 12px 35px rgba(23,28,53,.28);
  font-size: 13px; opacity: 0; transform: translateY(12px);
  pointer-events: none; transition: opacity .2s ease, transform .2s ease;
}
.toast.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.toast-message { flex: 1; line-height: 1.55; }
.toast button { border: 0; color: var(--lime); background: transparent; cursor: pointer; font-size: 12px; font-weight: 750; }

.sidebar-backdrop { display: none; }
.is-hidden { display: none !important; }
.search-empty { margin: 22px 0; padding: 32px; border: 1px dashed #cfd3df; border-radius: 13px; color: var(--muted); background: #fff; text-align: center; font-size: 13px; }
.formatbar button.active, .tone-row button.active { color: var(--brand); background: var(--brand-soft); }
.copy-success { color: var(--green) !important; }
.folder-icon { display: grid; place-items: center; }
.ai-label { height: 27px; width: max-content; padding: 0 10px; border-radius: 8px; display: inline-flex; align-items: center; gap: 6px; color: #4b3fac; background: #e9e6ff; font-size: 11px; font-weight: 800; }
.ai-label svg { width: 13px; height: 13px; }
.mobile-nav { display: none; }

/* Modal / Dialog */
.content-preview { width: min(800px, calc(100vw - 32px)); max-height: 88vh; padding: 44px 54px; border: 0; border-radius: 18px; color: var(--ink); background: #fff; box-shadow: 0 30px 80px rgba(18,24,51,.3); }
.content-preview::backdrop { background: rgba(18,24,51,.58); backdrop-filter: blur(3px); }
.content-preview h1 { font-size: 32px; letter-spacing: -.035em; }
.content-preview h2 { margin-top: 30px; font-size: 21px; }
.content-preview p { font-family: Georgia, serif; font-size: 15px; line-height: 1.8; }
.content-preview .inline-suggestion { display: none; }
.dialog-close { position: sticky; float: right; top: 0; width: 36px; height: 36px; border: 0; border-radius: 10px; color: var(--muted); background: #f0f1f5; cursor: pointer; font-size: 22px; }

/* Calendar placeholder */
.calendar-placeholder { min-height: 360px; display: grid; place-items: center; padding: 32px; text-align: center; }
.calendar-placeholder > div { max-width: 440px; color: var(--muted); }
.calendar-placeholder svg { width: 46px; height: 46px; margin-bottom: 15px; color: var(--brand); }
.calendar-placeholder strong { display: block; color: var(--ink); font-size: 18px; }
.calendar-placeholder p { font-size: 14px; line-height: 1.6; }


/* ═══════════════════════════════════════════════════════════════════════
   22  RESPONSIVE BREAKPOINTS
   ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 1200px) {
  .app-shell { grid-template-columns: 240px minmax(0, 1fr); }
  .sidebar { width: 240px; }
  .dash-grid { grid-template-columns: minmax(0, 1fr) 300px; }
  .kpi-cell { padding: 22px 20px 18px; }
  .kpi-value { font-size: 30px; }
}
@media (max-width: 1100px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .editor-shell { grid-template-columns: 210px minmax(400px,1fr); }
  .ai-side { display: none; }
  .social-grid { grid-template-columns: 1fr; }
  .integration-grid { grid-template-columns: repeat(2,minmax(240px,1fr)); }
  .team-layout { grid-template-columns: 1fr; }
  .kpi-strip { grid-template-columns: repeat(2, 1fr); }
  .kpi-cell:nth-child(2) { border-right: 0; }
  .kpi-cell:nth-child(1), .kpi-cell:nth-child(2) { border-bottom: 1px solid var(--line); }
  .dash-grid { grid-template-columns: 1fr; }
  .dash-main { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 780px) {
  .app-shell { display: block; padding-bottom: 72px; }
  .sidebar { display: flex; transform: translateX(-102%); transition: transform .22s ease; box-shadow: 20px 0 50px rgba(12,18,42,.22); }
  body.menu-open { overflow: hidden; }
  body.menu-open .sidebar { transform: translateX(0); }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: 19; border: 0; background: rgba(16,21,42,.48); opacity: 0; pointer-events: none; transition: opacity .22s ease; }
  body.menu-open .sidebar-backdrop { display: block; opacity: 1; pointer-events: auto; }
  .main { display: block; }
  .topbar { height: 64px; padding: 0 18px; gap: 12px; }
  .mobile-logo { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none; background: var(--nav); color: var(--lime); font-size: 11px; font-weight: 900; }
  .search { max-width: none; }
  .search-shortcut, .profile-copy, .top-actions .icon-button:first-child { display: none; }
  .profile { padding: 0; }
  .content { padding: 24px 18px 32px; }
  .page-head { align-items: flex-start; }
  .page-head h1 { font-size: 24px; }
  .head-actions .button-secondary { display: none; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .metric-card { min-height: 128px; padding: 16px; }
  .metric-value { font-size: 24px; }
  .task-table th:nth-child(3), .task-table td:nth-child(3),
  .task-table th:nth-child(4), .task-table td:nth-child(4) { display: none; }
  .task-table th, .task-table td { padding-left: 14px; padding-right: 14px; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .view-tabs { overflow-x: auto; }
  .toolbar-right { flex-wrap: wrap; }
  .compact-search { flex:1; min-width:160px; }
  .editor-shell { grid-template-columns:1fr; }
  .document-list { display:none; }
  .editor-top { align-items:flex-start;flex-direction:column; }
  .editor-body { padding:28px 22px; }
  .editor-top>div:last-child { width:100%; }
  .editor-top .button { flex:1; }
  .formatbar { overflow-x:auto; }
  .social-summary { align-items:flex-start;flex-direction:column; }
  .mini-kpis { width:100%;justify-content:flex-start;flex-wrap:wrap; }
  .social-grid { display:block; }
  .composer { margin-top:14px; }
  .week-grid { grid-template-columns:repeat(7,130px);min-height:520px; }
  .media-layout { grid-template-columns:1fr; }
  .folder-panel { display:none; }
  .asset-grid { grid-template-columns:repeat(2,minmax(140px,1fr)); }
  .asset-thumb { height:130px; }
  .integration-grid { grid-template-columns:1fr; }
  .security-banner { align-items:flex-start;flex-wrap:wrap; }
  .api-row { grid-template-columns:48px 1fr 65px; }
  .api-row .scope { display:none; }
  .member-row { grid-template-columns:38px 1fr 28px; }
  .role-badge,.last-active { display:none; }
  .permission-grid,.permission-row { grid-template-columns:minmax(130px,1.4fr) repeat(4,70px);overflow-x:auto; }
  .permission-grid { min-width:540px; }
  .permission-panel { overflow-x:auto; }
  .mobile-nav { position: fixed; inset: auto 0 0; height: 68px; padding: 8px 8px 6px; display: grid; grid-template-columns: repeat(5, 1fr); background: rgba(255,255,255,.96); border-top: 1px solid var(--line); z-index: 40; backdrop-filter: blur(10px); }
  .mobile-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; color: #8a92a6; font-size: 11px; }
  .mobile-nav a svg { width: 20px; height: 20px; }
  .mobile-nav a.active { color: var(--brand); font-weight: 700; }
  .dash-head { flex-direction: column; align-items: flex-start; }
  .toast { right: 14px; bottom: 80px; max-width: calc(100vw - 28px); }
  .content-preview { padding: 30px 24px; }
}
@media (max-width: 620px) {
  .kpi-strip { grid-template-columns: 1fr 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 460px) {
  .metric-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 118px; }
  .page-head p { max-width: 280px; line-height: 1.5; }
  .button { padding: 0 14px; }
  .asset-grid { grid-template-columns:1fr; }
  .asset-thumb { height:160px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
