/**
 * Arquivo: public_html/assets/css/app.css
 * Funcionalidade: identidade visual responsiva do painel, login e gestão de rascunhos SocialPilota.
 * Direção visual: azul-marinho, azul e ciano da marca, superfícies claras e hierarquia tipográfica legível.
 * Codificação: UTF-8.
 */
:root {
  color-scheme: light;
  --navy: #071b52;
  --navy-2: #102b67;
  --blue: #0969f5;
  --blue-deep: #0754d4;
  --cyan: #00bde2;
  --violet: #5538f5;
  --ink: #172647;
  --muted: #64728e;
  --soft: #8a96ab;
  --line: #e5eaf3;
  --paper: #fff;
  --canvas: #f7f9fd;
  --blue-wash: #edf5ff;
  --shadow: 0 14px 34px rgba(18, 42, 88, .07);
  --font: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  --radius: 16px;
}
* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid rgba(9, 105, 245, .32); outline-offset: 3px; }
.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 30;
  display: flex; flex-direction: column; width: 268px; padding: 22px 18px 16px;
  background: var(--paper); border-right: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; min-height: 52px; width: fit-content; }
.brand-logo { display: block; width: 190px; height: auto; object-fit: contain; }
.workspace-label, .nav-section, .eyebrow, .form-eyebrow, .pitch-kicker, .setup-label {
  color: var(--soft); font-size: 11px; font-weight: 750; letter-spacing: .105em;
}
.workspace-label { margin: 25px 8px 9px; }
.workspace-card { display: flex; align-items: center; gap: 11px; padding: 11px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.workspace-avatar, .profile-avatar { display: grid; place-items: center; flex: none; border-radius: 11px; background: var(--blue-wash); color: var(--blue-deep); font-weight: 750; }
.workspace-avatar { width: 38px; height: 38px; }
.workspace-card strong, .profile-copy strong { display: block; color: var(--ink); font-size: 13px; font-weight: 700; line-height: 1.3; }
.workspace-card small, .profile-copy small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.chevron { margin-left: auto; color: var(--soft); }
.main-nav { padding-top: 17px; }
.nav-item { display: flex; align-items: center; gap: 11px; min-height: 45px; margin: 3px 0; padding: 0 12px; border-radius: 11px; color: #455574; font-size: 14px; font-weight: 560; transition: background .16s ease, color .16s ease; }
.nav-item:hover { background: #f5f8fd; color: var(--navy); }
.nav-item.active { background: #edf4ff; color: var(--blue-deep); font-weight: 700; }
.nav-icon { display: grid; place-items: center; width: 22px; color: #72809a; font-size: 19px; }
.nav-item.active .nav-icon { color: var(--blue); }
.nav-section { padding: 22px 10px 7px; }
.soon { margin-left: auto; padding: 3px 7px; border-radius: 20px; background: #f1f4f8; color: #7e8aa0; font-size: 10px; font-weight: 650; letter-spacing: 0; }
.nav-item.disabled { cursor: default; color: #8490a4; }
.nav-item.disabled:hover { background: transparent; }
.sidebar-bottom { margin-top: auto; }
.help-card { padding: 15px; border: 1px solid #d9e9ff; border-radius: 15px; background: linear-gradient(140deg, #f0f7ff, #f8fbff 72%); }
.help-icon { color: var(--blue); font-size: 18px; }
.help-card strong { display: block; margin: 6px 0 4px; font-size: 14px; }
.help-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.help-card a { display: inline-block; margin-top: 10px; color: var(--blue-deep); font-size: 12px; font-weight: 700; }
.profile-row { display: flex; align-items: center; gap: 10px; margin-top: 15px; padding: 13px 2px 0; border-top: 1px solid var(--line); }
.profile-avatar { width: 36px; height: 36px; }
.profile-copy { min-width: 0; flex: 1; }
.profile-copy strong, .profile-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-button { position: relative; display: inline-grid; place-items: center; min-width: 36px; min-height: 36px; border: 0; border-radius: 10px; background: transparent; color: #63718b; cursor: pointer; font-size: 19px; }
.icon-button:hover { background: #f2f6fc; color: var(--navy); }
.profile-row form { margin: 0; }
.main-content { min-height: 100vh; margin-left: 268px; }
.topbar { display: flex; align-items: center; justify-content: space-between; height: 68px; padding: 0 42px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.88); }
.breadcrumbs { display: flex; align-items: center; gap: 11px; color: var(--soft); font-size: 13px; }
.breadcrumbs strong { color: #334261; font-weight: 650; }
.crumb-sep { color: #c2cad7; }
.topbar-right { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.live-dot, .neutral-dot { width: 8px; height: 8px; border-radius: 50%; background: #00ad87; }
.system-status { margin-right: 12px; }

.mobile-menu { display: none; }
.page-wrap { width: min(100%, 1500px); margin: 0 auto; padding: 42px clamp(22px, 3.3vw, 50px) 26px; }
.welcome-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; margin-bottom: 27px; }
.eyebrow, .form-eyebrow { color: var(--blue-deep); }
.welcome-row h1 { margin: 8px 0 5px; color: var(--navy); font-size: clamp(28px, 2.4vw, 36px); font-weight: 720; letter-spacing: -.045em; line-height: 1.15; }
.wave { color: var(--blue); font-size: .72em; }
.subheading { margin: 0; color: var(--muted); font-size: 15px; }
.primary-button, .secondary-button, .outline-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 44px; padding: 0 17px; border: 1px solid transparent; border-radius: 11px;
  font-size: 14px; font-weight: 700; line-height: 1.25; cursor: pointer; transition: .16s ease;
}
.primary-button { background: linear-gradient(105deg, var(--blue), #168df5); color: #fff; box-shadow: 0 7px 16px rgba(9,105,245,.19); }
.primary-button:hover { background: linear-gradient(105deg, var(--blue-deep), #0878df); transform: translateY(-1px); }
.primary-button span { font-size: 19px; line-height: 1; }
.secondary-button, .outline-button { border-color: #dce4f0; background: #fff; color: #334261; }
.secondary-button:hover, .outline-button:hover { border-color: #a9caff; background: #f6faff; color: var(--blue-deep); }
.primary-button:disabled, .secondary-button:disabled { opacity: .65; cursor: not-allowed; transform: none; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat-card, .panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); }
.stat-card { min-height: 142px; padding: 18px 19px; }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #53627e; font-size: 13px; font-weight: 650; }
.stat-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; font-size: 16px; }
.stat-icon.purple { background: #f1efff; color: var(--violet); }
.stat-icon.green { background: #e8f8f2; color: #149b73; }
.stat-icon.blue { background: #eaf4ff; color: var(--blue); }
.stat-icon.amber { background: #fff5e7; color: #c88620; }
.stat-card > strong { display: block; margin: 8px 0 5px; color: var(--navy); font-size: 31px; font-weight: 730; letter-spacing: -.045em; line-height: 1.1; }
.stat-total { color: #8491a8; font-size: 15px; font-weight: 500; }
.stat-foot { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.stat-foot .neutral-dot { width: 6px; height: 6px; background: #aab5c7; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(300px, .9fr); gap: 17px; margin-top: 18px; }
.panel { min-width: 0; }
.recent-panel { min-height: 420px; padding: 23px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.panel-heading h2, .setup-panel h2 { margin: 0; color: var(--navy); font-size: 19px; font-weight: 700; letter-spacing: -.025em; }
.panel-heading p, .setup-panel > p { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.text-link { padding-top: 3px; color: var(--blue-deep); font-size: 13px; font-weight: 700; white-space: nowrap; }
.text-link:hover { text-decoration: underline; }
.text-link span { margin-left: 4px; }
.empty-state { display: flex; min-height: 315px; flex-direction: column; align-items: center; justify-content: center; padding: 25px 22px 12px; text-align: center; }
.empty-illustration { position: relative; width: 132px; height: 94px; margin-bottom: 15px; }
.empty-card { position: absolute; top: 21px; left: 25px; width: 79px; height: 60px; border: 1px solid #dbe5f3; border-radius: 11px; background: #f8fbff; transform: rotate(-8deg); }
.empty-card-back { top: 10px; left: 39px; background: #eef5ff; transform: rotate(8deg); }
.empty-card-front { padding: 10px; background: #fff; box-shadow: 0 10px 24px rgba(22,48,90,.12); }
.empty-card-front span { display: grid; place-items: center; width: 21px; height: 21px; border-radius: 7px; background: #eaf4ff; color: var(--blue); font-size: 16px; }
.empty-card-front i { display: block; width: 47px; height: 4px; margin-top: 6px; border-radius: 4px; background: #e5eaf2; }
.empty-card-front i:last-child { width: 33px; margin-top: 4px; }
.empty-sun { position: absolute; top: 1px; right: 3px; color: var(--cyan); font-size: 23px; }
.empty-state h3 { margin: 0 0 6px; color: var(--navy); font-size: 17px; font-weight: 700; letter-spacing: -.02em; }
.empty-state p { max-width: 390px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.empty-state .secondary-button { margin-top: 16px; }
.table-wrap { overflow-x: auto; margin-top: 22px; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: 11px 10px; border-bottom: 1px solid var(--line); color: #77849b; font-size: 11px; font-weight: 750; letter-spacing: .07em; }
td { padding: 14px 10px; border-bottom: 1px solid #edf0f5; color: #53627e; font-size: 13px; }
td strong { display: block; color: #243858; font-size: 13px; }
td small.row-id { display: block; margin-top: 3px; color: #8995a8; font-size: 11px; }
.destination-count { padding: 5px 8px; border-radius: 7px; background: #f3f6fa; color: #596983; font-size: 12px; white-space: nowrap; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 20px; background: #f1f3f7; color: #5c6980; font-size: 12px; white-space: nowrap; }
.status-pill i { width: 7px; height: 7px; border-radius: 50%; background: #8794a9; }
.status-scheduled { background: #f1efff; color: #5338d9; }
.status-scheduled i { background: var(--violet); }
.status-published { background: #e8f8f2; color: #16855f; }
.status-published i { background: #16a276; }
.status-failed { background: #fff0ef; color: #bb5149; }
.status-failed i { background: #cd5d54; }
.status-draft { background: #eef4ff; color: #315d9d; }
.status-draft i { background: var(--blue); }
.setup-panel { min-height: 420px; padding: 23px; }
.setup-label { display: flex; justify-content: space-between; font-size: 10px; }
.progress-count { color: var(--blue-deep); letter-spacing: 0; }
.setup-panel h2 { margin-top: 14px; font-size: 19px; }
.setup-panel > p { line-height: 1.6; }
.progress-track { height: 6px; margin-top: 18px; overflow: hidden; border-radius: 8px; background: #edf1f7; }
.progress-track span { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--blue), var(--cyan)); }
.setup-step { display: flex; align-items: center; gap: 11px; padding: 15px 0; border-bottom: 1px solid #edf0f5; }
.step-check, .step-number { display: grid; place-items: center; width: 29px; height: 29px; flex: none; border-radius: 50%; font-size: 12px; }
.step-check { background: #e8f8f2; color: #16855f; font-weight: 800; }
.step-number { background: #edf4ff; color: var(--blue-deep); font-weight: 750; }
.setup-step strong { display: block; color: #334462; font-size: 13px; }
.setup-step small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.step-arrow, .lock-mark { margin-left: auto; color: var(--soft); }
.setup-step.muted { opacity: .72; border: 0; }
.platform-strip { display: flex; align-items: center; gap: 7px; padding-top: 15px; }
.platform { display: grid; place-items: center; width: 25px; height: 25px; border: 1px solid var(--line); border-radius: 8px; font-size: 12px; font-weight: 750; }
.platform.ig { color: #c33f96; }.platform.fb { color: #3474ce; }.platform.tt { color: #171b25; }.platform.yt { color: #cf3d3a; font-size: 10px; }.platform.gb { color: #4285f4; font-size: 10px; }
.platform-caption { margin-left: auto; color: var(--muted); font-size: 11px; }
.page-footer { display: flex; justify-content: space-between; gap: 12px; margin-top: 22px; color: #77849b; font-size: 12px; }
.footer-dot { padding: 0 6px; color: #bcc5d2; }
.sidebar-scrim { display: none; }
/* Editor de rascunhos */
.page-intro { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 25px; }
.page-intro h1 { margin: 7px 0 4px; color: var(--navy); font-size: clamp(28px, 2.4vw, 36px); font-weight: 720; letter-spacing: -.045em; line-height: 1.15; }
.page-intro p { margin: 0; color: var(--muted); font-size: 15px; }
.composer-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(290px, .65fr); gap: 18px; align-items: start; }
.composer-panel, .drafts-panel { padding: 24px; }
.section-title { margin: 0; color: var(--navy); font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.section-description { margin: 5px 0 20px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.form-field { margin: 18px 0 0; }
.form-field label { display: block; margin-bottom: 7px; color: #2b3d5d; font-size: 13px; font-weight: 700; }
.form-field input, .form-field textarea { display: block; width: 100%; border: 1px solid #dce4f0; border-radius: 11px; background: #fff; color: var(--ink); font-size: 15px; outline: none; transition: border .16s, box-shadow .16s; }
.form-field input { min-height: 48px; padding: 0 13px; }
.form-field textarea { min-height: 200px; padding: 13px; resize: vertical; line-height: 1.6; }
.form-field input:focus, .form-field textarea:focus { border-color: #70a9ff; box-shadow: 0 0 0 4px rgba(9,105,245,.09); }
.form-field input::placeholder, .form-field textarea::placeholder { color: #99a4b6; }
.field-hint, .char-counter { display: flex; justify-content: space-between; gap: 10px; margin-top: 6px; color: var(--muted); font-size: 12px; }
.form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.info-note { padding: 14px 15px; border: 1px solid #dbeafe; border-radius: 12px; background: #f3f8ff; color: #365378; font-size: 13px; line-height: 1.6; }
.info-note strong { display: block; margin-bottom: 3px; color: var(--navy); }
.alert-success, .alert-error { margin: 0 0 18px; padding: 12px 14px; border-radius: 11px; font-size: 14px; line-height: 1.55; }
.alert-success { border: 1px solid #bfe9d7; background: #effaf5; color: #176346; }
.alert-error { border: 1px solid #f3cfcc; background: #fff5f4; color: #9c3932; }
.draft-list { display: grid; gap: 10px; margin-top: 16px; }
.draft-item { padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.draft-item:hover { border-color: #b9d5ff; background: #fbfdff; }
.draft-item-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.draft-item h3 { margin: 0; color: #263a5c; font-size: 14px; font-weight: 700; line-height: 1.4; }
.draft-item p { display: -webkit-box; overflow: hidden; margin: 7px 0 8px; color: var(--muted); font-size: 12px; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.draft-meta { color: #7a879c; font-size: 11px; }
.draft-empty { padding: 18px 12px; color: var(--muted); font-size: 13px; line-height: 1.6; text-align: center; }
.login-page { min-height: 100vh; background: #fff; }
.login-layout { display: grid; grid-template-columns: minmax(390px, .88fr) 1.12fr; min-height: 100vh; }
.login-brand-panel { position: relative; display: flex; overflow: hidden; flex-direction: column; padding: 30px 8%; background: radial-gradient(circle at 80% 22%, #0f3c91 0, transparent 36%), linear-gradient(145deg, #071844, #081f59 72%, #102d68); color: #fff; }
.brand-light-mode { padding: 4px 10px; border-radius: 12px; background: #fff; }
.brand-light-mode .brand-logo { width: 178px; }
.login-pitch { position: relative; z-index: 1; width: 100%; max-width: 470px; margin: auto 0; }
.pitch-kicker { display: flex; align-items: center; gap: 9px; color: #b8d8ff; }
.pitch-kicker span { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 13px rgba(0,189,226,.7); }
.login-pitch h1 { margin: 20px 0 14px; font-size: clamp(38px, 4vw, 58px); font-weight: 700; letter-spacing: -.055em; line-height: 1.05; }
.login-pitch h1 em { color: #59c9ff; font-style: normal; }
.login-pitch > p { max-width: 360px; color: #d2def3; font-size: 16px; line-height: 1.7; }
.orbit-art { position: relative; width: 270px; height: 190px; margin: 28px 0 0 8px; }
.orbit { position: absolute; top: 11px; left: 29px; width: 189px; height: 143px; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; transform: rotate(-24deg); }
.orbit-two { border-color: rgba(0,189,226,.38); transform: rotate(35deg); }
.orbit-core { position: absolute; top: 65px; left: 99px; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 18px; background: linear-gradient(145deg, var(--blue), var(--violet)); font-size: 22px; font-weight: 800; box-shadow: 0 10px 35px rgba(9,105,245,.38); }
.orbit-node { position: absolute; display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid rgba(255,255,255,.18); border-radius: 10px; background: #112a60; color: #fff; font-weight: 700; }
.node-one { top: 47px; left: 29px; color: #f0a1d1; }.node-two { top: 32px; right: 24px; color: #91caff; }.node-three { bottom: 17px; left: 59px; color: #ffaaaa; }.node-four { right: 51px; bottom: 3px; color: #c5efff; }
.login-brand-footer { color: #bdccec; font-size: 13px; }
.login-brand-panel:after { position: absolute; top: -230px; right: -260px; width: 460px; height: 460px; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; content: ""; box-shadow: 0 0 0 48px rgba(255,255,255,.025), 0 0 0 96px rgba(255,255,255,.018); }
.login-form-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 8% 22px; }
.login-form-wrap { width: min(100%, 410px); margin: auto; }
.mobile-brand { display: none; }
.login-form-wrap h2 { margin: 9px 0 5px; color: var(--navy); font-size: 30px; font-weight: 720; letter-spacing: -.04em; }
.form-intro { margin: 0 0 26px; color: var(--muted); font-size: 15px; }
.login-form label { display: block; margin: 0 0 7px; color: #334462; font-size: 13px; font-weight: 700; }
.login-form input:not([type="hidden"]) { display: block; width: 100%; height: 49px; margin-bottom: 18px; padding: 0 13px; border: 1px solid #dce4f0; border-radius: 10px; outline: 0; background: #fff; color: var(--ink); font-size: 15px; transition: border .15s, box-shadow .15s; }
.login-form input:focus { border-color: #70a9ff; box-shadow: 0 0 0 4px rgba(9,105,245,.09); }
.login-form input::placeholder { color: #9aa5b7; }
.password-label { display: flex; align-items: center; justify-content: space-between; }
.login-submit { width: 100%; height: 49px; justify-content: space-between; padding: 0 15px; }
.login-submit span { font-size: 19px; }
.login-legal { margin-top: 16px; color: #68758c; text-align: center; font-size: 12px; }
.login-bottom { width: 100%; max-width: 800px; padding-top: 18px; border-top: 1px solid #edf0f5; color: #68758c; font-size: 12px; text-align: center; }
.login-bottom span { padding: 0 6px; color: #b3bdcb; }
@media (max-width: 1120px) {
  .sidebar { width: 238px; }
  .main-content { margin-left: 238px; }
  .page-wrap { padding-inline: 26px; }
  .topbar { padding-inline: 26px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .content-grid { grid-template-columns: 1fr; }
  .setup-panel { min-height: 0; }
  .composer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .sidebar { width: min(300px, 86vw); padding: 18px 16px 13px; transform: translateX(-105%); transition: transform .22s ease; box-shadow: 14px 0 34px rgba(16,37,74,.17); }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar-scrim.is-visible { position: fixed; inset: 0; z-index: 25; display: block; background: rgba(8,22,54,.42); }
  .main-content { margin-left: 0; }
  .topbar { height: 60px; padding: 0 15px; }
  .mobile-menu { display: block; border: 0; background: transparent; color: #3d5277; cursor: pointer; font-size: 21px; padding: 6px 8px 6px 0; }
  .breadcrumbs { gap: 7px; margin-right: auto; margin-left: 7px; font-size: 12px; }
  .topbar-right { gap: 6px; }
  .system-status, .notification { display: none; }
  .page-wrap { padding: 28px 16px 20px; }
  .welcome-row { align-items: flex-start; flex-direction: column; gap: 13px; margin-bottom: 20px; }
  .welcome-row h1, .page-intro h1 { font-size: 29px; }
  .subheading, .page-intro p { font-size: 14px; }
  .welcome-row .primary-button { min-height: 42px; }
  .stats-grid { gap: 10px; }
  .stat-card { min-height: 128px; padding: 14px; }
  .stat-top { align-items: flex-start; font-size: 12px; }
  .stat-icon { width: 31px; height: 31px; }
  .stat-card > strong { font-size: 27px; }
  .stat-foot { font-size: 11px; }
  .content-grid { gap: 12px; margin-top: 12px; }
  .recent-panel, .setup-panel, .composer-panel, .drafts-panel { padding: 17px; }
  .panel-heading h2, .setup-panel h2, .section-title { font-size: 18px; }
  .panel-heading p { max-width: 260px; font-size: 12px; }
  .empty-state { min-height: 280px; padding: 18px 10px; }
  .empty-state h3 { font-size: 16px; }
  .page-intro { align-items: flex-start; flex-direction: column; margin-bottom: 18px; }
  .composer-grid { gap: 12px; }
  .form-field textarea { min-height: 180px; }
  .form-actions { align-items: stretch; flex-direction: column; }
  .form-actions .primary-button, .form-actions .outline-button { width: 100%; }
  .page-footer { font-size: 11px; }
  .login-layout { display: flex; min-height: 100vh; flex-direction: column; }
  .login-brand-panel { display: none; }
  .login-form-panel { min-height: 100vh; align-items: stretch; padding: 24px 22px 17px; }
  .login-form-wrap { width: min(100%, 430px); margin: auto; }
  .mobile-brand { display: inline-flex; margin: 0 0 48px; padding: 4px 10px; }
  .mobile-brand .brand-logo { width: 172px; }
  .login-form-wrap h2 { font-size: 28px; }
  .login-bottom { margin-top: auto; }
  .form-intro { margin-bottom: 24px; }
}
@media (max-width: 390px) {
  .stats-grid { gap: 8px; }
  .stat-card { padding: 11px; }
  .stat-top { gap: 5px; font-size: 11px; }
  .stat-icon { width: 28px; height: 28px; }
  .stat-foot { font-size: 10px; }
  .page-footer span:last-child { display: none; }
  .draft-item-head { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Navegação lateral compacta, rolável e adaptável (desktop + gaveta móvel). */
.sidebar {
  width: 82px;
  padding: 18px 12px 14px;
  overflow: visible;
  transition: width .2s ease, padding .2s ease, transform .22s ease;
}
.sidebar.is-expanded {
  width: 268px;
  padding: 20px 18px 15px;
}
.sidebar-brand-row {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  flex: none;
}
.sidebar.is-expanded .sidebar-brand-row { justify-content: flex-start; }
.sidebar .brand {
  display: grid;
  width: 42px;
  min-height: 42px;
  place-items: center;
  overflow: hidden;
}
.sidebar .brand-logo { display: none; }
.sidebar .brand-mark { display: block; width: 36px; height: 36px; object-fit: contain; }
.sidebar.is-expanded .brand { display: inline-flex; width: auto; min-height: 48px; overflow: visible; }
.sidebar.is-expanded .brand-logo { display: block; width: 190px; }
.sidebar.is-expanded .brand-mark { display: none; }
.sidebar-context { flex: none; }
.sidebar:not(.is-expanded) .sidebar-context { display: none; }
.sidebar.is-expanded .workspace-label { margin-top: 21px; }
.sidebar .main-nav {
  min-height: 0;
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #cbd6e7 transparent;
  padding: 14px 0 10px;
}
.sidebar .main-nav::-webkit-scrollbar { width: 5px; }
.sidebar .main-nav::-webkit-scrollbar-thumb { border-radius: 8px; background: #cbd6e7; }
.sidebar .nav-item {
  position: relative;
  justify-content: flex-start;
  min-width: 0;
  min-height: 44px;
  gap: 11px;
  margin: 3px 0;
  padding: 0 10px;
  white-space: nowrap;
}
.sidebar .nav-icon { width: 24px; min-width: 24px; flex: none; }
.sidebar .nav-label { overflow: hidden; text-overflow: ellipsis; }
.sidebar:not(.is-expanded) .nav-item {
  justify-content: center;
  gap: 0;
  padding: 0;
}
.sidebar:not(.is-expanded) .nav-label,
.sidebar:not(.is-expanded) .nav-section,
.sidebar:not(.is-expanded) .soon { display: none; }
.sidebar:not(.is-expanded) .nav-icon { width: 40px; min-width: 40px; font-size: 20px; }
.sidebar:not(.is-expanded) .nav-item[title]:hover::after,
.sidebar:not(.is-expanded) .nav-item[title]:focus-visible::after {
  position: absolute;
  z-index: 80;
  top: 50%;
  left: calc(100% + 9px);
  display: block;
  width: max-content;
  max-width: 220px;
  padding: 7px 10px;
  transform: translateY(-50%);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  background: #10213f;
  box-shadow: 0 8px 22px rgba(12,29,62,.18);
  color: #fff;
  content: attr(title);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.3;
  pointer-events: none;
}
.sidebar-bottom { flex: none; margin-top: 0; }
.sidebar:not(.is-expanded) .help-card,
.sidebar:not(.is-expanded) .profile-copy { display: none; }
.sidebar .profile-row {
  min-width: 0;
  gap: 8px;
  margin-top: 9px;
  padding: 11px 0 0;
}
.sidebar .profile-avatar { width: 34px; height: 34px; }
.profile-actions { display: flex; flex: none; align-items: center; gap: 2px; margin-left: auto; }
.profile-actions form { display: flex; margin: 0; }
.sidebar .profile-actions .icon-button { min-width: 34px; min-height: 34px; }
.sidebar:not(.is-expanded) .profile-row { flex-direction: column; gap: 7px; }
.sidebar:not(.is-expanded) .profile-actions { flex-direction: column; gap: 3px; margin: 0; }
.sidebar-collapse-icon { display: block; font-size: 25px; line-height: 1; transition: transform .18s ease; }
.sidebar:not(.is-expanded) .sidebar-collapse-icon { transform: rotate(180deg); }
.sidebar-collapse { color: #546480; }
.sidebar-collapse:hover { color: var(--blue-deep); }
.main-content { margin-left: 82px; transition: margin-left .2s ease; }
.sidebar.is-expanded ~ .main-content { margin-left: 268px; }
body.menu-open { overflow: hidden; }

@media (max-height: 720px) and (min-width: 721px) {
  .sidebar.is-expanded .help-card { display: none; }
  .sidebar .main-nav { padding-top: 8px; }
  .sidebar .nav-section { padding-top: 13px; }
}
@media (max-width: 1120px) and (min-width: 721px) {
  .sidebar.is-expanded { width: 250px; }
  .sidebar.is-expanded ~ .main-content { margin-left: 250px; }
}
@media (max-width: 720px) {
  .sidebar,
  .sidebar.is-expanded {
    width: min(300px, 86vw);
    padding: 18px 16px 13px;
    overflow: visible;
    transform: translateX(-105%);
    transition: transform .22s ease;
    box-shadow: 14px 0 34px rgba(16,37,74,.17);
  }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar .sidebar-brand-row { justify-content: flex-start; }
  .sidebar .brand { display: inline-flex; width: auto; min-height: 48px; overflow: visible; }
  .sidebar .brand-logo { display: block; width: 178px; }
  .sidebar .brand-mark { display: none; }
  .sidebar .sidebar-context { display: block; }
  .sidebar .workspace-label { margin: 20px 8px 9px; }
  .sidebar .main-nav { padding: 14px 0 10px; }
  .sidebar .nav-item { justify-content: flex-start; gap: 11px; padding: 0 10px; }
  .sidebar .nav-label, .sidebar .soon, .sidebar .nav-section { display: initial; }
  .sidebar .nav-section { display: block; }
  .sidebar .nav-icon { width: 24px; min-width: 24px; }
  .sidebar .profile-row { flex-direction: row; gap: 8px; margin-top: 15px; padding-top: 13px; }
  .sidebar .profile-copy { display: block; }
  .sidebar .profile-actions { flex-direction: row; gap: 2px; margin-left: auto; }
  .sidebar .sidebar-collapse { display: none; }
  .sidebar .help-card { display: block; }
  .sidebar .nav-item[title]:hover::after,
  .sidebar .nav-item[title]:focus-visible::after { display: none; }
  .sidebar-scrim.is-visible { position: fixed; inset: 0; z-index: 25; display: block; background: rgba(8,22,54,.42); }
  .main-content, .sidebar.is-expanded ~ .main-content { margin-left: 0; }
  .mobile-menu { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  .sidebar, .main-content, .sidebar-collapse-icon { transition: none; }
}

/* No mobile, a gaveta sempre apresenta os rótulos mesmo com preferência desktop compacta. */
@media (max-width: 720px) {
  .sidebar.is-open:not(.is-expanded) .brand-logo { display: block; }
  .sidebar.is-open:not(.is-expanded) .brand-mark { display: none; }
  .sidebar.is-open:not(.is-expanded) .sidebar-context,
  .sidebar.is-open:not(.is-expanded) .help-card,
  .sidebar.is-open:not(.is-expanded) .profile-copy { display: block; }
  .sidebar.is-open:not(.is-expanded) .nav-label { display: inline; }
  .sidebar.is-open:not(.is-expanded) .soon { display: inline-flex; }
  .sidebar.is-open:not(.is-expanded) .nav-section { display: block; }
  .sidebar.is-open:not(.is-expanded) .nav-item {
    justify-content: flex-start;
    gap: 11px;
    padding: 0 10px;
  }
  .sidebar.is-open:not(.is-expanded) .nav-icon { width: 24px; min-width: 24px; }
  .sidebar.is-open:not(.is-expanded) .profile-row { flex-direction: row; }
  .sidebar.is-open:not(.is-expanded) .profile-actions { flex-direction: row; margin-left: auto; }
}


/* Font Awesome local: icons are served from this project without external requests. */
.nav-icon { font-size: 16px; }
.help-icon { display: inline-block; }
.icon-button > .fa-solid,
.icon-button > .fa-regular { font-size: 15px; }
.notification-indicator {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 7px;
  height: 7px;
  border: 1px solid #fff;
  border-radius: 50%;
  background: var(--cyan);
}
.mobile-menu .fa-bars { font-size: 19px; }
.primary-button > .fa-solid,
.outline-button > .fa-solid { font-size: 14px; }
.text-link > .fa-solid { margin-left: 4px; font-size: 11px; }
.stat-icon > .fa-solid,
.stat-icon > .fa-regular { font-size: 15px; }
.step-arrow, .lock-mark { flex: none; font-size: 13px; }
.platform > .fa-brands { font-size: 13px; }
.platform.yt > .fa-brands { font-size: 14px; }
.orbit-core > .fa-solid { font-size: 21px; }
.orbit-node > .fa-brands { font-size: 14px; }
.login-submit > .fa-solid { font-size: 15px; }

/* Menu de conta do cabeçalho: detalhes da conta e encerramento de sessão com CSRF. */
.profile-menu {
  position: relative;
  flex: none;
  color: var(--ink);
}
.account-menu-trigger {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 9px;
  padding: 3px 9px 3px 4px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  list-style: none;
  text-align: left;
  transition: background .16s ease, border-color .16s ease;
}
.account-menu-trigger::-webkit-details-marker { display: none; }
.account-menu-trigger::marker { content: ""; }
.account-menu-trigger:hover,
.profile-menu[open] .account-menu-trigger {
  border-color: #e7edf6;
  background: #fff;
}
.account-menu-trigger:focus-visible { outline-offset: 2px; }
.account-avatar {
  display: grid;
  width: 36px;
  height: 36px;
  flex: none;
  place-items: center;
  border: 1px solid #dbe9ff;
  border-radius: 50%;
  background: linear-gradient(145deg, #e9f3ff, #e5fbff);
  color: var(--blue-deep);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
}
.account-trigger-copy { display: grid; gap: 1px; }
.account-trigger-copy strong { max-width: 120px; overflow: hidden; color: #2d3e5f; font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.account-trigger-copy small { color: var(--muted); font-size: 11px; line-height: 1.2; }
.account-menu-chevron { margin-left: 2px; color: #72809a; font-size: 11px; transition: transform .16s ease; }
.profile-menu[open] .account-menu-chevron { transform: rotate(180deg); }
.profile-menu-dropdown {
  position: absolute;
  z-index: 70;
  top: calc(100% + 9px);
  right: 0;
  width: 312px;
  max-width: min(312px, calc(100vw - 24px));
  overflow: hidden;
  border: 1px solid #e3eaf4;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(14, 35, 77, .18);
  animation: account-menu-enter .14s ease-out;
}
@keyframes account-menu-enter {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.profile-menu-account {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 18px 16px;
  background: linear-gradient(130deg, #f6faff, #fbfdff);
}
.account-avatar-large { width: 46px; height: 46px; font-size: 14px; }
.profile-menu-account-info { min-width: 0; }
.profile-menu-account-info strong {
  display: block;
  overflow: hidden;
  color: var(--navy);
  font-size: 15px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-menu-account-info small {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-menu-details { padding: 12px 18px 13px; }
.account-role {
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  gap: 7px;
  padding: 0 9px;
  border-radius: 20px;
  background: #eef5ff;
  color: #315c9b;
  font-size: 11px;
  font-weight: 700;
}
.account-role > .fa-solid { font-size: 11px; }
.profile-menu-divider { height: 1px; background: #edf0f5; }
.profile-menu-item {
  display: flex;
  min-height: 52px;
  align-items: center;
  gap: 11px;
  padding: 0 18px;
  color: #425371;
  font-size: 14px;
  font-weight: 600;
}
.profile-menu-item > .fa-regular { width: 18px; color: #74829a; text-align: center; }
.profile-menu-item-muted { color: #53627e; }
.profile-menu-item-muted small {
  margin-left: auto;
  color: #8894a8;
  font-size: 11px;
  font-weight: 550;
}
.account-menu-logout { margin: 0; padding: 10px 12px 12px; border-top: 1px solid #edf0f5; }
.account-menu-logout button {
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid #e3eaf4;
  border-radius: 10px;
  background: #fff;
  color: #425371;
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.account-menu-logout button:hover {
  border-color: #f0d3d1;
  background: #fff7f6;
  color: #a43f37;
}
.account-menu-logout button > .fa-solid { font-size: 13px; }

@media (max-width: 720px) {
  .account-menu-trigger { min-width: 42px; justify-content: center; padding: 2px; }
  .account-trigger-copy, .account-menu-chevron { display: none; }
  .profile-menu-dropdown { top: calc(100% + 8px); }
}
@media (prefers-reduced-motion: reduce) {
  .profile-menu-dropdown { animation: none; }
}

/* Modal compartilhado de confirmação para formulários que usam data-confirm. */
.app-confirm-modal {
  width: min(440px, calc(100vw - 32px));
  max-width: 440px;
  max-height: min(90vh, 620px);
  padding: 0;
  overflow: hidden;
  border: 1px solid #e0e7f1;
  border-radius: 18px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 28px 90px rgba(10, 28, 62, .3);
}
.app-confirm-modal::backdrop {
  background: rgba(10, 24, 49, .58);
  backdrop-filter: blur(2px);
}
.app-confirm-card { margin: 0; }
.app-confirm-header {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 20px 22px;
  border-bottom: 1px solid #edf0f5;
}
.app-confirm-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: none;
  place-items: center;
  border-radius: 12px;
  background: #fff5e7;
  color: #c88620;
  font-size: 17px;
}
.app-confirm-header h2 {
  margin: 0;
  color: var(--navy);
  font-size: 18px;
  font-weight: 720;
  letter-spacing: -.02em;
}
.app-confirm-body { padding: 20px 24px 22px; }
.app-confirm-body p {
  margin: 0;
  color: #53627e;
  font-size: 15px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.app-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 22px;
  border-top: 1px solid #edf0f5;
  background: #fbfcfe;
}
.app-confirm-actions button {
  min-width: 104px;
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid #dce4f0;
  border-radius: 10px;
  background: #fff;
  color: #425371;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
}
.app-confirm-actions button:hover { background: #f5f8fd; }
.app-confirm-actions .app-confirm-accept {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}
.app-confirm-actions .app-confirm-accept:hover {
  border-color: var(--blue-deep);
  background: var(--blue-deep);
}
.app-confirm-modal.is-danger .app-confirm-icon {
  background: #fff0ef;
  color: #bd4c44;
}
.app-confirm-modal.is-danger .app-confirm-accept {
  border-color: #c94e47;
  background: #c94e47;
}
.app-confirm-modal.is-danger .app-confirm-accept:hover {
  border-color: #a83c36;
  background: #a83c36;
}
@media (max-width: 480px) {
  .app-confirm-header { padding: 17px 18px; }
  .app-confirm-body { padding: 17px 19px 20px; }
  .app-confirm-actions { padding: 12px 18px; }
  .app-confirm-actions button { min-width: 0; flex: 1; }
}
