/* ==========================================================================
   Quebrada Paulista Staff
   Design: editorial dark, tipografia refinada, vermelho como acento
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&family=Instrument+Serif:ital@0;1&display=swap');

:root {
    --qp-red:        #ff2d4d;
    --qp-red-2:      #ff5568;
    --qp-red-deep:   #cc1d39;
    --qp-red-glow:   rgba(255, 45, 77, 0.35);
    --qp-gradient:   linear-gradient(135deg, #ff2d4d 0%, #ff5568 100%);

    --bg-0: #08090c;
    --bg-1: #0d0f14;
    --bg-2: #12151c;
    --bg-3: #181c26;
    --bg-4: #1f2431;

    --border-1: rgba(255, 255, 255, 0.06);
    --border-2: rgba(255, 255, 255, 0.10);
    --border-3: rgba(255, 255, 255, 0.14);

    --text-0: #ffffff;
    --text-1: #e8eaef;
    --text-2: #a8aeba;
    --text-3: #6b7180;
    --text-4: #474c59;

    --success: #00d67e;
    --warning: #ffb200;
    --info:    #3890ff;
    --danger:  #ff4757;

    --font-sans:  'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-serif: 'Instrument Serif', Georgia, serif;
    --font-mono:  'JetBrains Mono', 'SF Mono', Consolas, monospace;

    --r-sm: 6px;
    --r-md: 10px;
    --r-lg: 14px;
    --r-xl: 20px;

    --shadow-sm:  0 1px 2px rgba(0,0,0,.3);
    --shadow-md:  0 4px 12px rgba(0,0,0,.35);
    --shadow-lg:  0 16px 48px rgba(0,0,0,.5);
    --shadow-red: 0 8px 32px rgba(255, 45, 77, .25);

    --t-fast: 120ms cubic-bezier(0.2, 0, 0.2, 1);
    --t-med:  200ms cubic-bezier(0.2, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
html, body { height: 100%; }

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-1);
    background: var(--bg-1);
    min-height: 100vh;
    background-image:
        radial-gradient(ellipse 80% 40% at 20% -10%, rgba(255, 45, 77, 0.08), transparent 60%),
        radial-gradient(ellipse 60% 30% at 100% 0%, rgba(255, 85, 104, 0.04), transparent 60%),
        linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 400px);
    background-attachment: fixed;
}

a { color: var(--text-0); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--qp-red-2); }

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 .6em;
    font-weight: 600;
    color: var(--text-0);
    letter-spacing: -0.015em;
    line-height: 1.2;
}
h1 { font-size: 1.85rem; letter-spacing: -0.03em; font-weight: 700; }
h2 { font-size: 1.4rem; letter-spacing: -0.02em; }
h3 { font-size: 1.1rem; }

p { margin: 0 0 1em; color: var(--text-2); }
small { font-size: 12px; color: var(--text-3); }

code, pre, .mono { font-family: var(--font-mono); font-size: 0.88em; }
code { background: var(--bg-3); padding: 1px 6px; border-radius: 4px; color: var(--text-1); border: 1px solid var(--border-1); }

hr { border: 0; border-top: 1px solid var(--border-1); margin: 1.5rem 0; }

::selection { background: var(--qp-red); color: #fff; }

/* Lucide icons */
.icon {
    width: 16px; height: 16px;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    stroke: currentColor;
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
}
.icon-sm { width: 14px; height: 14px; }
.icon-lg { width: 20px; height: 20px; }
.icon-xl { width: 28px; height: 28px; stroke-width: 1.75; }
.icon-2xl { width: 40px; height: 40px; stroke-width: 1.5; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 10px; border: 2px solid var(--bg-1); }
::-webkit-scrollbar-thumb:hover { background: var(--border-3); }

/* Layout */
.app { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--bg-0);
    border-right: 1px solid var(--border-1);
    padding: 20px 14px 16px;
    position: sticky; top: 0;
    height: 100vh;
    flex-shrink: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
.sidebar .brand {
    padding: 4px 8px 16px;
    margin: 0 -14px 4px; padding-left: 22px; padding-right: 22px;
    border-bottom: 1px solid var(--border-1);
}
.sidebar .brand a {
    display: block;
    text-decoration: none;
    color: inherit;
}
.sidebar .brand .brand-logo {
    display: block;
    width: 100%;
    max-width: 200px;
    height: auto;
    margin-bottom: 2px;
}
.sidebar .brand .brand-tag {
    font-size: 10px; text-transform: uppercase;
    letter-spacing: 0.18em; color: var(--text-3);
    font-weight: 500; margin-top: 4px;
    font-family: var(--font-mono);
}

.sidebar-nav { flex: 1; margin-top: 8px; }
.sidebar-section {
    font-family: var(--font-mono);
    font-size: 10px; text-transform: uppercase;
    letter-spacing: 0.12em; color: var(--text-4);
    padding: 16px 10px 6px; font-weight: 500;
}
.sidebar-nav ul { list-style: none; padding: 0; margin: 0 0 4px; }
.sidebar-nav a {
    display: flex; align-items: center; gap: 11px;
    padding: 9px 10px;
    border-radius: var(--r-sm);
    color: var(--text-2);
    font-weight: 500; font-size: 13.5px;
    transition: all var(--t-fast);
    margin-bottom: 1px;
    position: relative;
}
.sidebar-nav a:hover { background: var(--bg-3); color: var(--text-0); }
.sidebar-nav a.active {
    background: linear-gradient(90deg, rgba(255, 45, 77, 0.12), rgba(255, 85, 104, 0));
    color: var(--text-0);
}
.sidebar-nav a.active::before {
    content: ''; position: absolute;
    left: -14px; top: 6px; bottom: 6px;
    width: 3px; background: var(--qp-red);
    border-radius: 0 3px 3px 0;
    box-shadow: 0 0 8px var(--qp-red-glow);
}
.sidebar-nav a .icon { color: var(--text-3); transition: color var(--t-fast); }
.sidebar-nav a:hover .icon, .sidebar-nav a.active .icon { color: var(--qp-red-2); }
.sidebar-nav .counter {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 500;
    color: var(--text-0);
    background: var(--qp-red);
    padding: 1px 6px;
    border-radius: 100px;
    min-width: 20px;
    text-align: center;
}

.sidebar-user {
    display: flex; align-items: center; gap: 10px;
    padding: 10px;
    border-radius: var(--r-md);
    background: var(--bg-2);
    border: 1px solid var(--border-1);
    margin-top: 16px;
}
.sidebar-user img {
    width: 34px; height: 34px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 1px solid var(--border-2);
}
.sidebar-user .info { min-width: 0; flex: 1; }
.sidebar-user .name {
    font-weight: 600; color: var(--text-0);
    font-size: 13px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-user .role {
    font-family: var(--font-mono);
    font-size: 10px; text-transform: uppercase;
    letter-spacing: 0.1em; margin-top: 2px;
}
.sidebar-user .role.role-admin { color: var(--qp-red-2); }
.sidebar-user .role.role-staff { color: var(--info); }

.sidebar-user a.logout {
    padding: 7px; border-radius: var(--r-sm);
    color: var(--text-3); transition: all var(--t-fast);
}
.sidebar-user a.logout:hover { color: var(--danger); background: var(--bg-3); }

/* Main */
.main { flex: 1; padding: 28px 36px 48px; overflow-x: hidden; min-width: 0; }

.page-header {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-1);
    display: flex; justify-content: space-between;
    align-items: flex-end;
    gap: 20px; flex-wrap: wrap;
}
.page-header h1 {
    margin: 0; font-size: 1.85rem;
    display: flex; align-items: center; gap: 12px;
}
.page-header h1 .icon { color: var(--qp-red-2); }
.page-header .sub {
    color: var(--text-3); font-size: 13.5px;
    margin-top: 6px; max-width: 640px;
}
.page-header .actions {
    display: flex; align-items: center;
    gap: 10px; flex-shrink: 0;
}

.crumb {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--text-3); font-size: 12px;
    font-family: var(--font-mono);
    text-transform: uppercase; letter-spacing: 0.1em;
    margin-bottom: 8px;
}
.crumb a { color: var(--text-3); }
.crumb a:hover { color: var(--text-1); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center; justify-content: center;
    gap: 8px; padding: 10px 16px;
    border-radius: var(--r-sm);
    font-family: var(--font-sans);
    font-weight: 500; font-size: 13px;
    border: 1px solid var(--border-2);
    cursor: pointer;
    transition: all var(--t-fast);
    background: var(--bg-2);
    color: var(--text-1);
    text-decoration: none;
    line-height: 1.2;
    white-space: nowrap;
    user-select: none;
}
.btn:hover {
    background: var(--bg-3);
    border-color: var(--border-3);
    color: var(--text-0);
    transform: translateY(-1px);
}
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.btn-primary {
    background: var(--qp-gradient); color: #fff;
    border: 1px solid transparent;
    box-shadow: 0 4px 14px var(--qp-red-glow), inset 0 1px 0 rgba(255,255,255,0.2);
    font-weight: 600;
}
.btn-primary:hover {
    background: var(--qp-gradient); color: #fff;
    filter: brightness(1.08);
    box-shadow: 0 6px 20px var(--qp-red-glow), inset 0 1px 0 rgba(255,255,255,0.25);
}

.btn-ghost { background: transparent; border-color: var(--border-2); }
.btn-ghost:hover { background: var(--bg-2); }

.btn-danger  { background: var(--bg-2); color: var(--danger); border-color: rgba(255, 71, 87, 0.3); }
.btn-danger:hover { background: rgba(255, 71, 87, 0.1); border-color: var(--danger); color: var(--danger); }
.btn-success { background: var(--bg-2); color: var(--success); border-color: rgba(0, 214, 126, 0.3); }
.btn-success:hover { background: rgba(0, 214, 126, 0.1); border-color: var(--success); color: var(--success); }
.btn-warning { background: var(--bg-2); color: var(--warning); border-color: rgba(255, 178, 0, 0.3); }
.btn-warning:hover { background: rgba(255, 178, 0, 0.1); border-color: var(--warning); color: var(--warning); }
.btn-info    { background: var(--bg-2); color: var(--info); border-color: rgba(56, 144, 255, 0.3); }
.btn-info:hover { background: rgba(56, 144, 255, 0.1); border-color: var(--info); color: var(--info); }

.btn-sm { padding: 7px 12px; font-size: 12.5px; }
.btn-xs { padding: 5px 10px; font-size: 12px; }
.btn-block { width: 100%; }

.btn-discord {
    display: inline-flex; align-items: center; gap: 10px;
    background: #5865F2; color: #fff;
    padding: 14px 28px;
    border-radius: var(--r-md);
    font-weight: 600; font-size: 14px;
    transition: all var(--t-med);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 8px 24px rgba(88, 101, 242, 0.3);
}
.btn-discord:hover {
    background: #4752c4; color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(88, 101, 242, 0.4);
}

/* Cards */
.card {
    background: var(--bg-2);
    border: 1px solid var(--border-1);
    border-radius: var(--r-md);
    padding: 22px;
    margin-bottom: 18px;
    position: relative;
}
.card-header {
    display: flex; justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-1);
    gap: 12px;
}
.card-header h3 {
    margin: 0; font-size: 12px;
    text-transform: uppercase; letter-spacing: 0.1em;
    font-weight: 600; color: var(--text-2);
    font-family: var(--font-mono);
    display: flex; align-items: center; gap: 8px;
}
.card-header h3 .icon { color: var(--qp-red-2); }

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 28px;
}
.stat-card {
    background: var(--bg-2);
    border: 1px solid var(--border-1);
    border-radius: var(--r-md);
    padding: 22px 24px;
    position: relative; overflow: hidden;
    transition: all var(--t-med);
}
.stat-card:hover {
    border-color: var(--border-2);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.stat-card::after {
    content: ''; position: absolute;
    top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-2), transparent);
}
.stat-card .stat-label {
    font-family: var(--font-mono);
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-3);
    margin-bottom: 8px;
    display: flex; align-items: center; gap: 7px;
}
.stat-card .stat-label .icon { color: var(--text-3); width: 13px; height: 13px; }
.stat-card .stat-value {
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: 2.8rem;
    line-height: 1;
    color: var(--text-0);
    letter-spacing: -0.02em;
}
.stat-card .stat-value.stat-red    { color: var(--qp-red-2); }
.stat-card .stat-value.stat-green  { color: var(--success); }
.stat-card .stat-value.stat-blue   { color: var(--info); }
.stat-card .stat-value.stat-yellow { color: var(--warning); }
.stat-card .stat-trend {
    margin-top: 8px; font-size: 11.5px;
    color: var(--text-3);
    display: flex; align-items: center; gap: 5px;
}

/* Forms */
.form-group { margin-bottom: 18px; }
.form-label {
    display: block; margin-bottom: 8px;
    color: var(--text-1);
    font-weight: 500; font-size: 13px;
}
.form-label .required { color: var(--qp-red); margin-left: 3px; }
.form-help {
    color: var(--text-3); font-size: 12px;
    margin-top: 6px; line-height: 1.4;
}

.form-control {
    display: block; width: 100%;
    background: var(--bg-1);
    border: 1px solid var(--border-2);
    color: var(--text-0);
    border-radius: var(--r-sm);
    padding: 11px 13px;
    font-size: 14px;
    font-family: inherit;
    transition: all var(--t-fast);
    outline: none;
}
.form-control::placeholder { color: var(--text-4); }
.form-control:hover { border-color: var(--border-3); }
.form-control:focus {
    border-color: var(--qp-red);
    background: var(--bg-2);
    box-shadow: 0 0 0 3px rgba(255, 45, 77, 0.12);
}
textarea.form-control { resize: vertical; min-height: 110px; line-height: 1.6; }

.form-check {
    display: inline-flex; align-items: center; gap: 9px;
    cursor: pointer; user-select: none;
    font-size: 13.5px; color: var(--text-1);
}
.form-check input[type="checkbox"],
.form-check input[type="radio"] {
    width: 16px; height: 16px;
    accent-color: var(--qp-red); cursor: pointer;
}

.form-row { display: grid; gap: 14px; }
.form-row.cols-2 { grid-template-columns: 1fr 1fr; }
.form-row.cols-3 { grid-template-columns: repeat(3, 1fr); }

/* Alerts */
.alert {
    padding: 13px 18px;
    border-radius: var(--r-md);
    margin-bottom: 16px;
    font-size: 13.5px;
    display: flex; align-items: flex-start; gap: 12px;
    border: 1px solid;
    background: var(--bg-2);
    line-height: 1.5;
}
.alert .icon { margin-top: 1px; flex-shrink: 0; }
.alert-success { border-color: rgba(0, 214, 126, 0.3); color: #5ae3ad; background: rgba(0, 214, 126, 0.06); }
.alert-error   { border-color: rgba(255, 71, 87, 0.3);  color: #ff8f98; background: rgba(255, 71, 87, 0.06); }
.alert-info    { border-color: rgba(56, 144, 255, 0.3); color: #8ab9ff; background: rgba(56, 144, 255, 0.06); }
.alert-warning { border-color: rgba(255, 178, 0, 0.3);  color: #ffd066; background: rgba(255, 178, 0, 0.06); }

/* Badges */
.badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 9px;
    border-radius: 100px;
    font-family: var(--font-mono);
    font-size: 10.5px; font-weight: 500;
    text-transform: uppercase; letter-spacing: 0.08em;
    background: var(--bg-3);
    color: var(--text-2);
    border: 1px solid var(--border-1);
}
.badge .icon { width: 10px; height: 10px; }
.badge-status-sent         { background: rgba(168, 174, 186, 0.1); color: var(--text-2); border-color: rgba(168, 174, 186, 0.2); }
.badge-status-reviewing    { background: rgba(56, 144, 255, 0.12); color: #8ab9ff; border-color: rgba(56, 144, 255, 0.25); }
.badge-status-pre_approved { background: rgba(255, 178, 0, 0.12);  color: #ffd066; border-color: rgba(255, 178, 0, 0.3); }
.badge-status-approved     { background: rgba(0, 214, 126, 0.12);  color: #5ae3ad; border-color: rgba(0, 214, 126, 0.3); }
.badge-status-rejected     { background: rgba(255, 71, 87, 0.12);  color: #ff8f98; border-color: rgba(255, 71, 87, 0.3); }

.badge-admin { background: var(--qp-gradient); color: #fff; border: none; box-shadow: 0 2px 6px var(--qp-red-glow); }
.badge-staff   { background: rgba(56, 144, 255, 0.15); color: #8ab9ff; border-color: rgba(56, 144, 255, 0.3); }
.badge-flagged { background: rgba(255, 71, 87, 0.15); color: #ff8f98; border-color: rgba(255, 71, 87, 0.3); }

/* Table */
.table-card { background: var(--bg-2); border: 1px solid var(--border-1); border-radius: var(--r-md); overflow: hidden; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table th {
    padding: 11px 18px;
    text-align: left;
    font-family: var(--font-mono);
    font-size: 10.5px; font-weight: 500;
    text-transform: uppercase; letter-spacing: 0.1em;
    color: var(--text-3);
    background: var(--bg-1);
    border-bottom: 1px solid var(--border-1);
}
table td { padding: 13px 18px; border-bottom: 1px solid var(--border-1); color: var(--text-1); }
table tbody tr { transition: background var(--t-fast); }
table tbody tr:hover { background: var(--bg-3); }
table tbody tr:last-child td { border-bottom: 0; }
table tbody tr.clickable { cursor: pointer; }

/* Kanban */
.kanban {
    display: grid;
    grid-template-columns: repeat(5, minmax(260px, 1fr));
    gap: 12px;
    align-items: start;
}
.kanban-col {
    background: var(--bg-2);
    border: 1px solid var(--border-1);
    border-radius: var(--r-md);
    padding: 12px 10px;
    min-height: 500px;
    transition: all var(--t-med);
}
.kanban-col.drag-over {
    background: var(--bg-3);
    border-color: var(--qp-red);
    box-shadow: inset 0 0 0 1px var(--qp-red-glow);
}
.kanban-col-header {
    display: flex; justify-content: space-between;
    align-items: center;
    padding: 4px 6px 12px;
    border-bottom: 1px solid var(--border-1);
    margin-bottom: 10px;
    gap: 8px;
}
.kanban-col-header h4 {
    margin: 0; font-size: 11px;
    text-transform: uppercase; letter-spacing: 0.1em;
    font-weight: 600;
    font-family: var(--font-mono);
    display: flex; align-items: center; gap: 7px;
}
.kanban-col-header .count {
    font-family: var(--font-mono);
    color: var(--text-3);
    padding: 1px 8px;
    border-radius: 100px;
    font-size: 11px;
    background: var(--bg-1);
    border: 1px solid var(--border-1);
    min-width: 24px;
    text-align: center;
}

.kanban-card {
    background: var(--bg-1);
    border: 1px solid var(--border-1);
    border-radius: var(--r-md);
    padding: 13px;
    margin-bottom: 8px;
    cursor: grab;
    transition: all var(--t-fast);
    position: relative;
}
.kanban-card:hover {
    border-color: var(--border-3);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}
.kanban-card:active { cursor: grabbing; }
.kanban-card.dragging { opacity: .4; transform: rotate(2deg); }

.kanban-card .kc-head { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.kanban-card .kc-head img {
    width: 32px; height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border-2);
    flex-shrink: 0;
}
.kanban-card .kc-name {
    font-weight: 600; color: var(--text-0);
    font-size: 13px; line-height: 1.2;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.kanban-card .kc-id { color: var(--text-4); font-size: 11px; font-family: var(--font-mono); margin-top: 2px; }
.kanban-card .kc-badges { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0; }
.kanban-card .kc-meta {
    display: flex; justify-content: space-between;
    align-items: center;
    font-size: 11.5px; color: var(--text-3);
    padding-top: 10px;
    border-top: 1px solid var(--border-1);
}
.kanban-card .kc-score {
    font-weight: 600; color: var(--text-1);
    font-family: var(--font-mono);
    display: flex; align-items: center; gap: 5px;
}
.kanban-card .kc-select {
    position: absolute; top: 12px; right: 12px;
    accent-color: var(--qp-red);
    cursor: pointer; opacity: 0;
    transition: opacity var(--t-fast);
}
body.publish-mode .kanban-col[data-status="pre_approved"] .kc-select { opacity: 1; }

/* Chart */
.chart-wrap { position: relative; height: 280px; }

/* Landing */
.landing-wrap {
    display: flex; min-height: 100vh;
    align-items: center; justify-content: center;
    padding: 24px;
    background:
        radial-gradient(ellipse 60% 40% at 50% 0%, rgba(255, 45, 77, 0.15), transparent 70%),
        radial-gradient(ellipse 80% 30% at 50% 100%, rgba(255, 85, 104, 0.08), transparent 70%),
        var(--bg-0);
    position: relative; overflow: hidden;
}
.landing-wrap::before {
    content: ''; position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, #000 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, #000 30%, transparent 70%);
    pointer-events: none;
}

.landing-card {
    background: var(--bg-2);
    border: 1px solid var(--border-2);
    border-radius: var(--r-xl);
    padding: 48px 42px;
    max-width: 460px; width: 100%;
    box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    text-align: center;
    position: relative; overflow: hidden;
    z-index: 1;
}
.landing-card::before {
    content: ''; position: absolute;
    inset: -1px -1px auto -1px;
    height: 3px;
    background: var(--qp-gradient);
    border-radius: var(--r-xl) var(--r-xl) 0 0;
}
.landing-brand {
    margin: 0 auto 18px;
    padding: 18px 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-1);
    border-radius: var(--r-md);
}
.landing-logo-img {
    display: block;
    width: 100%;
    max-width: 280px;
    height: auto;
    margin: 0 auto;
}
.landing-logo {
    width: 84px; height: 84px;
    border-radius: 22px;
    background: var(--qp-gradient);
    display: grid; place-items: center;
    margin: 0 auto 24px;
    color: #fff;
    font-size: 2.2rem;
    box-shadow: var(--shadow-red), inset 0 2px 0 rgba(255, 255, 255, 0.2);
    position: relative; overflow: hidden;
}
.landing-logo::after {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(ellipse at top, rgba(255, 255, 255, 0.2), transparent 60%);
}
.landing-card h1 {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 2.2rem; font-weight: 400;
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}
.landing-card .tagline {
    font-family: var(--font-mono);
    font-size: 11px; color: var(--text-3);
    text-transform: uppercase; letter-spacing: 0.25em;
}
.landing-card .divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-2), transparent);
    margin: 28px 0;
}
.landing-card .desc {
    color: var(--text-2);
    font-size: 14px; line-height: 1.65;
}

/* Form público */
.form-public-wrap {
    max-width: 780px;
    margin: 0 auto;
    padding: 28px 24px 60px;
}
.form-public-header {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-1);
}
.form-public-header .tag {
    font-family: var(--font-mono);
    font-size: 10px;
    text-transform: uppercase; letter-spacing: 0.2em;
    color: var(--qp-red-2);
    font-weight: 500;
    margin-bottom: 10px;
}
.form-public-header h1 {
    font-weight: 700;
    font-size: 1.9rem;
    margin: 0;
    letter-spacing: -0.02em;
    color: var(--text-0);
}

.question-card {
    background: var(--bg-2);
    border: 1px solid var(--border-1);
    border-radius: var(--r-md);
    padding: 24px;
    margin-bottom: 14px;
    transition: all var(--t-med);
}
.question-card:focus-within {
    border-color: var(--border-3);
    box-shadow: 0 0 0 3px rgba(255, 45, 77, 0.08);
}
.question-card .q-num {
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--qp-red-2);
    font-weight: 500;
    font-size: 1.3rem;
    margin-right: 8px;
}
.question-card .q-label {
    display: block;
    font-weight: 600; color: var(--text-0);
    font-size: 15.5px;
    letter-spacing: -0.01em;
    margin-bottom: 4px;
    line-height: 1.4;
}
.question-card .q-desc {
    color: var(--text-3); font-size: 13px;
    margin: 6px 0 16px; line-height: 1.55;
}
.question-card .q-desc:empty { display: none; }

.choice-options { display: grid; gap: 8px; }
.choice-options label {
    display: flex; align-items: center; gap: 11px;
    padding: 12px 14px;
    background: var(--bg-1);
    border: 1px solid var(--border-1);
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: all var(--t-fast);
    font-size: 13.5px;
}
.choice-options label:hover {
    border-color: var(--border-3);
    background: var(--bg-3);
}
.choice-options label:has(input:checked) {
    border-color: var(--qp-red);
    background: rgba(255, 45, 77, 0.06);
    color: var(--text-0);
}
.choice-options input[type="radio"] { accent-color: var(--qp-red); }

/* Application detail */
.answer-block {
    background: var(--bg-1);
    border-left: 3px solid var(--qp-red);
    padding: 16px 20px;
    margin-bottom: 12px;
    border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.answer-block .q-label {
    font-weight: 600; color: var(--text-0);
    margin-bottom: 6px;
    font-size: 13.5px; line-height: 1.4;
}
.answer-block .q-answer {
    color: var(--text-1);
    white-space: pre-wrap;
    font-size: 13.5px;
    line-height: 1.6;
}

/* Comments */
.comment {
    display: flex; gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-1);
}
.comment:last-child { border-bottom: 0; padding-bottom: 0; }
.comment img {
    width: 32px; height: 32px;
    border-radius: 50%; flex-shrink: 0;
    border: 1px solid var(--border-2);
}
.comment .author { font-weight: 600; color: var(--text-0); font-size: 13px; }
.comment .time {
    color: var(--text-4); font-size: 11.5px;
    margin-left: 8px;
    font-family: var(--font-mono);
}
.comment .body {
    color: var(--text-1); font-size: 13.5px;
    margin-top: 4px; white-space: pre-wrap;
    line-height: 1.55;
}

/* Timeline */
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before {
    content: ''; position: absolute;
    top: 8px; bottom: 8px; left: 7px;
    width: 1px; background: var(--border-2);
}
.timeline li {
    position: relative;
    padding-left: 30px;
    padding-bottom: 16px;
}
.timeline li::before {
    content: ''; position: absolute;
    left: 3px; top: 5px;
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--qp-red);
    border: 2px solid var(--bg-2);
    box-shadow: 0 0 0 1px var(--qp-red);
}
.timeline .t-action {
    font-weight: 600; color: var(--text-0);
    font-family: var(--font-mono);
    text-transform: uppercase; letter-spacing: 0.05em;
    font-size: 12px;
}
.timeline .t-time {
    color: var(--text-4); font-size: 11px;
    font-family: var(--font-mono); margin-top: 2px;
}

/* Score meter */
.score-meter {
    background: var(--bg-1);
    border-radius: 100px;
    height: 8px;
    overflow: hidden;
    border: 1px solid var(--border-1);
}
.score-meter > span {
    display: block; height: 100%;
    background: var(--qp-gradient);
    transition: width 600ms cubic-bezier(0.2, 0, 0.2, 1);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.25);
}

.big-score {
    font-family: var(--font-serif);
    font-size: 3.5rem; font-weight: 400;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--text-0);
}
.big-score.s-high { color: var(--success); }
.big-score.s-low  { color: var(--danger); }

/* Modal */
.modal {
    display: none;
    position: fixed; inset: 0;
    background: rgba(5, 6, 9, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9998;
    align-items: center; justify-content: center;
    padding: 20px;
    animation: fadeIn 200ms ease;
}
.modal.open { display: flex; }
.modal-dialog {
    background: var(--bg-2);
    border: 1px solid var(--border-2);
    border-radius: var(--r-lg);
    padding: 30px;
    max-width: 520px; width: 100%;
    box-shadow: var(--shadow-lg);
    position: relative;
    animation: modalIn 300ms cubic-bezier(0.2, 0, 0.2, 1);
}
.modal-dialog h3 {
    margin-top: 0;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.5rem; font-weight: 400;
    letter-spacing: -0.01em;
    margin-bottom: 6px;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Helpers */
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; justify-content: center; align-items: center; }
.gap-4 { gap: 4px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.text-muted { color: var(--text-3); }
.text-dim { color: var(--text-4); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.w-100 { width: 100%; }
.small { font-size: 12px; }
.mono { font-family: var(--font-mono); }
.serif { font-family: var(--font-serif); font-style: italic; font-weight: 400; }

.pill {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 9px;
    border-radius: 100px;
    background: var(--bg-3);
    color: var(--text-2);
    font-size: 11px;
    font-family: var(--font-mono);
    border: 1px solid var(--border-1);
}
.pill .icon { width: 11px; height: 11px; }

/* Toast */
#toast-holder {
    position: fixed;
    top: 20px; right: 20px;
    z-index: 9999;
    display: flex; flex-direction: column; gap: 10px;
    max-width: 380px;
}
.toast {
    padding: 12px 16px;
    border-radius: var(--r-md);
    background: var(--bg-2);
    border: 1px solid var(--border-2);
    color: var(--text-1);
    box-shadow: var(--shadow-lg);
    animation: toastIn 250ms cubic-bezier(0.2, 0, 0.2, 1);
    font-size: 13.5px;
    display: flex; align-items: center; gap: 10px;
}
.toast.toast-success { border-color: rgba(0, 214, 126, 0.4); }
.toast.toast-success .icon { color: var(--success); }
.toast.toast-error   { border-color: rgba(255, 71, 87, 0.4); }
.toast.toast-error .icon { color: var(--danger); }
.toast.toast-info .icon { color: var(--info); }
@keyframes toastIn {
    from { transform: translateX(20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-3);
}
.empty-state .icon {
    width: 48px; height: 48px;
    color: var(--text-4);
    margin-bottom: 14px;
    stroke-width: 1.5;
}
.empty-state h4 { color: var(--text-1); margin-bottom: 6px; }
.empty-state p { font-size: 13px; margin-bottom: 0; }

/* Responsive */
@media (max-width: 1024px) {
    .kanban { grid-template-columns: repeat(3, minmax(250px, 1fr)); overflow-x: auto; }
    .main { padding: 24px 20px; }
}
@media (max-width: 768px) {
    .sidebar {
        width: 100%; position: relative;
        height: auto; border-right: 0;
        border-bottom: 1px solid var(--border-1);
    }
    .app { flex-direction: column; }
    .kanban { grid-template-columns: 1fr; }
    .form-row.cols-2, .form-row.cols-3 { grid-template-columns: 1fr; }
    .page-header { flex-direction: column; align-items: flex-start; }
    h1 { font-size: 1.5rem; }
    .stat-card .stat-value { font-size: 2.2rem; }
}

/* ==========================================================================
   Melhorias v2 — progresso, contadores, análise de IA, acessibilidade, mobile
   ========================================================================== */

/* Checkboxes de seleção do board agora são sempre visíveis */
.kanban-card .kc-select { opacity: 1 !important; }

/* Seletor de status (fallback de toque) — escondido no desktop */
.kc-status-mobile {
    display: none;
    width: 100%;
    margin-top: 10px;
    background: var(--bg-1);
    color: var(--text-1);
    border: 1px solid var(--border-2);
    border-radius: var(--r-sm);
    padding: 7px 8px;
    font-family: var(--font-sans);
    font-size: 12px;
}

/* Barra de progresso do formulário */
.form-progress {
    position: sticky; top: 0; z-index: 5;
    background: var(--bg-1);
    padding: 14px 0 16px;
    margin-bottom: 8px;
}
.form-progress-bar {
    height: 6px; border-radius: 100px;
    background: var(--bg-3); overflow: hidden;
    border: 1px solid var(--border-1);
}
.form-progress-bar > span {
    display: block; height: 100%;
    background: var(--qp-gradient);
    width: 0%;
    transition: width 300ms cubic-bezier(0.2, 0, 0.2, 1);
}
.form-progress-label {
    margin-top: 7px;
    font-family: var(--font-mono);
    font-size: 11px; color: var(--text-3);
    letter-spacing: 0.03em;
}
.form-progress-label .done { color: var(--text-1); font-weight: 500; }

/* Contador de caracteres */
.q-meta-row {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; margin-top: 6px;
}
.char-counter {
    font-family: var(--font-mono);
    font-size: 11px; color: var(--text-3);
    white-space: nowrap;
}
.char-counter.under { color: var(--warning); }
.char-counter.ok    { color: var(--success); }

/* Análise (IA / heurístico) — critérios e listas */
.score-meter.sm { height: 6px; }
.criteria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}
.criterion-top {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 12px; color: var(--text-1); font-weight: 500;
    margin-bottom: 6px;
}
.criterion-top .mono { font-family: var(--font-mono); color: var(--text-2); }
.sc-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
}
.sc-list {
    list-style: none; padding: 0; margin: 8px 0 0;
}
.sc-list li {
    position: relative; padding-left: 16px; margin-bottom: 6px;
    font-size: 13px; color: var(--text-2); line-height: 1.5;
}
.sc-list li::before {
    content: "›"; position: absolute; left: 2px; color: var(--text-4);
}

/* Acessibilidade: foco visível consistente */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--qp-red-2);
    outline-offset: 2px;
    border-radius: var(--r-sm);
}

@media (max-width: 720px) {
    .kc-status-mobile { display: block; }   /* mostra o seletor no celular */
    .kanban-card[draggable] { cursor: default; }
    .sc-grid { grid-template-columns: 1fr; }
}

/* Utilitários extraídos de estilos inline repetidos (refactor v2) */
.text-left   { text-align: left; }
.flex-1      { flex: 1; }
.min-w-0     { min-width: 0; }
.d-inline    { display: inline; }
.jc-start    { justify-content: flex-start; }
.text-0      { color: var(--text-0); }
.text-success{ color: var(--success); }
.text-warning{ color: var(--warning); }
.grid-gap-8  { display: grid; gap: 8px; }
.avatar-xs   { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border-2); }
.pill-approve{ background: rgba(0,214,126,.1); color: #5ae3ad; border-color: rgba(0,214,126,.3); }
.pill-reject { background: rgba(255,71,87,.1); color: #ff8f98; border-color: rgba(255,71,87,.3); }
