
:root{
  --bg:#f5f7fb;
  --panel:#ffffff;
  --panel-2:#f8fafc;
  --border:#e6ebf3;
  --text:#152033;
  --muted:#667085;
  --primary:#16a34a;
  --primary-2:#22c55e;
  --accent:#0ea5e9;
  --danger:#ef4444;
  --warning:#f59e0b;
  --radius:22px;
  --shadow:0 10px 30px rgba(16,24,40,.06);
}
*{box-sizing:border-box}
html,body{margin:0;padding:0;background:linear-gradient(180deg,#f6f8fc 0%,#eef3f7 100%);color:var(--text);font-family:Inter,Segoe UI,Arial,sans-serif}
a{color:inherit;text-decoration:none}
code,pre{font-family:ui-monospace,SFMono-Regular,Consolas,monospace}
.public-wrapper{max-width:1180px;margin:0 auto;padding:40px 20px 24px}
.site-footer{max-width:1180px;margin:10px auto 40px;padding:0 20px;display:flex;justify-content:space-between;gap:16px;color:var(--muted);font-size:.9rem}
.footer-links{display:flex;gap:16px;flex-wrap:wrap}
.footer-links a{color:var(--muted)}
.app-layout{display:grid;grid-template-columns:290px 1fr;min-height:calc(100vh - 90px)}
.sidebar{padding:28px 22px;border-right:1px solid var(--border);background:rgba(255,255,255,.75);backdrop-filter:blur(18px);display:flex;flex-direction:column;gap:24px}
.brand{display:flex;align-items:center;gap:14px}
.brand-mark{width:48px;height:48px;border-radius:16px;background:linear-gradient(135deg,var(--accent),var(--primary-2));display:grid;place-items:center;color:#fff;font-weight:800;box-shadow:var(--shadow)}
.brand small{display:block;color:var(--muted);margin-top:3px}
.side-nav{display:flex;flex-direction:column;gap:10px}
.side-link{padding:14px 16px;border-radius:16px;color:var(--muted);font-weight:600}
.side-link:hover,.side-link.active{background:#fff;color:var(--text);box-shadow:var(--shadow)}
.sidebar-footer{margin-top:auto;display:grid;gap:16px}
.mini-user{display:flex;gap:12px;align-items:center;padding:14px;background:#fff;border:1px solid var(--border);border-radius:18px}
.avatar{width:42px;height:42px;border-radius:14px;background:linear-gradient(135deg,#dbeafe,#bbf7d0);display:grid;place-items:center;font-weight:800}
.ghost-link{padding:12px 14px;border:1px solid var(--border);border-radius:14px;text-align:center;background:#fff;color:var(--muted)}
.main-panel{padding:22px 24px 30px}
.topbar{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;margin-bottom:20px}
.topbar h1{margin:0;font-size:2rem}
.topbar p{margin:6px 0 0;color:var(--muted)}
.topbar-actions{display:flex;gap:12px;flex-wrap:wrap}
.content{display:grid;gap:18px}
.panel{background:var(--panel);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);padding:22px}
.panel-public{padding:34px}
.panel.narrow{max-width:740px;margin:0 auto}
.center{text-align:center}
.hero-public{display:grid;grid-template-columns:1.3fr .9fr;gap:22px;align-items:center;min-height:58vh}
.hero-public h1{font-size:3rem;margin:10px 0}
.hero-card{background:#fff;border:1px solid var(--border);border-radius:28px;padding:24px;box-shadow:var(--shadow)}
.eyebrow{display:inline-flex;padding:8px 12px;border-radius:999px;background:#ecfeff;color:#0f766e;font-weight:700;font-size:.85rem}
.lead{font-size:1.12rem;color:var(--muted)}
.promo-highlight{display:inline-block;margin:14px 0;padding:12px 18px;border-radius:16px;background:linear-gradient(135deg,#dcfce7,#dbeafe);font-weight:800;font-size:1.4rem}
.cards{display:grid;gap:16px}
.cards.three{grid-template-columns:repeat(3,1fr)}
.cards.four{grid-template-columns:repeat(4,1fr)}
.stat-card{background:linear-gradient(180deg,#fff,#f7fbff);border:1px solid var(--border);border-radius:22px;box-shadow:var(--shadow);padding:20px;display:grid;gap:8px}
.stat-card span{color:var(--muted);font-size:.92rem}
.stat-card strong{font-size:2rem}
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.panel-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:18px}
.panel-head h2,.panel h2,.panel h3{margin:0}
.field{display:grid;gap:8px}
.field label{font-weight:700;font-size:.95rem}
.field input,.field select,.field textarea,.code-box{
  width:100%;background:#fff;border:1px solid var(--border);border-radius:16px;padding:14px 16px;color:var(--text);font:inherit
}
.field textarea{resize:vertical}
.checkbox-field label{display:flex;align-items:center;gap:10px;font-weight:600}
.checkbox-field input{width:auto}
.grid-form{display:grid;gap:16px}
.grid-form.two{grid-template-columns:1fr 1fr}
.grid-form .full{grid-column:1/-1}
.inline-fields{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.stack{display:grid;gap:16px}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:10px;border-radius:16px;padding:12px 16px;font-weight:700;border:1px solid transparent;cursor:pointer}
.btn-primary{background:linear-gradient(135deg,var(--primary),var(--primary-2));color:#fff;box-shadow:0 10px 24px rgba(34,197,94,.25)}
.btn-soft{background:#fff;border-color:var(--border);color:var(--text)}
.btn-block{width:100%}
.filters .filter-form{display:grid;grid-template-columns:1.2fr 1fr 1fr auto;gap:14px;align-items:end}
.filters .grow{grid-column:auto}
.actions{align-self:end}
.table-wrap{overflow:auto}
table{width:100%;border-collapse:separate;border-spacing:0}
th,td{padding:14px 12px;border-bottom:1px solid var(--border);text-align:left;vertical-align:top}
th{font-size:.88rem;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}
.item-row,.agenda-row{display:flex;justify-content:space-between;gap:16px;align-items:center;padding:14px 0;border-bottom:1px solid var(--border)}
.item-row:last-child,.agenda-row:last-child{border-bottom:none}
.item-card{padding:16px;border:1px solid var(--border);border-radius:18px;background:var(--panel-2);display:grid;gap:8px;margin-bottom:14px}
.item-card p{margin:0;color:var(--muted)}
.dot{width:12px;height:12px;border-radius:999px;display:inline-block;flex:none}
.badge{display:inline-flex;align-items:center;justify-content:center;padding:6px 10px;border-radius:999px;background:#dcfce7;color:#166534;font-size:.8rem;font-weight:700}
.badge-soft{background:#eff6ff;color:#1d4ed8}
.alert{padding:14px 16px;border-radius:16px;border:1px solid var(--border);margin-bottom:16px}
.alert-success{background:#f0fdf4;color:#166534;border-color:#bbf7d0}
.alert-danger{background:#fef2f2;color:#991b1b;border-color:#fecaca}
.alert-warning{background:#fffbeb;color:#92400e;border-color:#fde68a}
.calendar-toolbar{display:flex;justify-content:space-between;align-items:center;gap:18px}
.calendar-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:10px}
.calendar-head{padding:10px 12px;color:var(--muted);font-weight:700}
.calendar-day{min-height:170px;background:#fff;border:1px solid var(--border);border-radius:20px;padding:12px;display:grid;grid-template-rows:auto 1fr}
.calendar-day header{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}
.muted-day{opacity:.55}
.calendar-events{display:grid;gap:8px;align-content:start}
.event-pill{display:grid;gap:4px;border-radius:14px;padding:10px;background:color-mix(in srgb, var(--pill-color) 12%, white);border-left:4px solid var(--pill-color)}
.event-pill span{font-size:.78rem;color:var(--muted)}
.event-pill strong{font-size:.9rem}
.company-hero{display:flex;justify-content:space-between;gap:18px;align-items:flex-start}
.hero-actions{display:flex;gap:12px;flex-wrap:wrap}
.subtabs{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}
.subtabs a{padding:10px 14px;border-radius:14px;background:#f8fafc;color:var(--muted);font-weight:700}
.subtabs a.active{background:#111827;color:#fff}
.subtabs.vertical{flex-direction:column;margin-top:0}
.details-list{display:grid;gap:14px}
.details-list div{padding:12px 0;border-bottom:1px solid var(--border)}
.details-list dt{font-size:.82rem;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}
.details-list dd{margin:6px 0 0;font-weight:700}
.sep{border:none;border-top:1px solid var(--border);margin:18px 0}
.qr-preview{max-width:280px;width:100%;height:auto;border-radius:22px;border:1px solid var(--border);padding:10px;background:#fff}
.prose{line-height:1.7}
.prose.small{font-size:.92rem}
.prose h1,.prose h2,.prose h3{margin-top:0}
.muted{color:var(--muted)}
.code-box{background:#0f172a;color:#e2e8f0;overflow:auto}
@media (max-width:1100px){
  .cards.four,.cards.three,.grid-2,.hero-public,.grid-form.two,.filters .filter-form{grid-template-columns:1fr}
  .app-layout{grid-template-columns:1fr}
  .sidebar{border-right:none;border-bottom:1px solid var(--border)}
  .calendar-grid{grid-template-columns:repeat(2,1fr)}
}
@media (max-width:720px){
  .calendar-grid{grid-template-columns:1fr}
  .topbar,.company-hero,.site-footer{flex-direction:column}
  .main-panel{padding:18px 14px 26px}
  .public-wrapper{padding:24px 14px}
  .hero-public h1{font-size:2.1rem}
}


.role-chip{
  display:inline-flex;align-items:center;gap:8px;padding:6px 10px;border-radius:999px;font-size:.78rem;font-weight:800;line-height:1;border:1px solid transparent
}
.role-super_admin,.tone-admin{background:#ede9fe;color:#5b21b6;border-color:#ddd6fe}
.role-admin{background:#eff6ff;color:#1d4ed8;border-color:#bfdbfe}
.role-director,.tone-creative{background:#fdf2f8;color:#be185d;border-color:#fbcfe8}
.role-pr,.tone-pr{background:#ecfeff;color:#0f766e;border-color:#a5f3fc}
.role-creative{background:#fff1f2;color:#e11d48;border-color:#fecdd3}
.role-designer,.tone-design{background:#f5f3ff;color:#7c3aed;border-color:#ddd6fe}
.role-copywriter,.tone-copy{background:#fff7ed;color:#c2410c;border-color:#fed7aa}
.role-consultant,.tone-consulting{background:#f0fdf4;color:#15803d;border-color:#bbf7d0}
.role-advertiser,.tone-adv{background:#eff6ff;color:#0369a1;border-color:#bae6fd}
.role-client{background:#f8fafc;color:#334155;border-color:#cbd5e1}
.role-readonly{background:#f8fafc;color:#475569;border-color:#e2e8f0}
.role-cards{margin-top:2px}
.role-card{
  border-radius:24px;border:1px solid var(--border);padding:20px;display:grid;gap:8px;box-shadow:var(--shadow);background:#fff
}
.role-card span{font-size:.88rem;font-weight:700;opacity:.9}
.role-card strong{font-size:2rem;line-height:1}
.role-card small{color:var(--muted)}
.task-card{
  border:1px solid var(--border);border-radius:22px;padding:18px 18px 16px;background:linear-gradient(180deg,#fff, #fbfdff);display:grid;gap:10px;margin-bottom:14px
}
.task-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}
.task-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.task-meta{color:var(--muted);font-size:.92rem}
.status-chip{
  display:inline-flex;align-items:center;padding:8px 11px;border-radius:999px;background:#f8fafc;border:1px solid var(--border);font-size:.78rem;font-weight:800;text-transform:uppercase;letter-spacing:.04em
}
.status-todo,.status-proposed,.status-planned{background:#fff7ed;color:#9a3412;border-color:#fed7aa}
.status-assigned,.status-writing,.status-active,.status-in_progress,.status-shared{background:#eff6ff;color:#1d4ed8;border-color:#bfdbfe}
.status-draft_ready,.status-review,.status-to_verify,.status-paused{background:#fefce8;color:#854d0e;border-color:#fde68a}
.status-approved,.status-done,.status-completed,.status-ready_to_publish{background:#f0fdf4;color:#166534;border-color:#bbf7d0}
.status-delivered,.status-published,.status-archived{background:#f8fafc;color:#475569;border-color:#cbd5e1}
.status-rejected,.status-blocked,.status-cancelled{background:#fef2f2;color:#991b1b;border-color:#fecaca}
.side-link[href*="design"]{border-left:4px solid #a855f7}
.side-link[href*="copy"]{border-left:4px solid #f97316}
.side-link[href*="consulting"]{border-left:4px solid #22c55e}
.side-link[href*="ads"]{border-left:4px solid #0ea5e9}
.side-link[href*="movements"]{border-left:4px solid #14b8a6}
.side-link[href*="calendar"]{border-left:4px solid #111827}
.task-card p{margin:0;color:var(--text);line-height:1.55}
@media (max-width:720px){
  .task-head{flex-direction:column}
}
