* {
    box-sizing: border-box;
}
:root {
    --bg: #f4f6f8;
    --surface: #ffffff;
    --text: #17212b;
    --muted: #687582;
    --line: #e2e7eb;
    --accent: #1f4f78;
    --accent-dark: #173c5d;
    --success: #247a4b;
    --warning: #9a6a16;
    --danger: #b42318;
    --shadow: 0 10px 30px rgba(23, 33, 43, .08);
}
html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}
body {
    background: var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
}
a { color: inherit; }

/* Login */
.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}
.login-card {
    width: min(100%, 430px);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 34px;
    box-shadow: var(--shadow);
}
.brand {
    display: flex;
    align-items: center;
    gap: 13px;
    text-decoration: none;
}
.brand-login {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
}
.logo-login {
    display: block;
    width: 160px;
    height: auto;
}
.logo-header {
    display: block;
    height: 40px;
    width: auto;
}
.brand-name {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: .08em;
}
.brand-subtitle {
    color: var(--muted);
    font-size: 13px;
    margin-top: 3px;
}
.login-title {
    margin: 28px 0 24px;
    text-align: center;
}
.login-title h1,
.welcome h1 {
    margin: 0 0 8px;
    font-size: 28px;
}
.login-title p,
.welcome p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

/* Forms */
label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    margin: 17px 0 7px;
}
input, select {
    width: 100%;
    border: 1px solid #ccd5dc;
    border-radius: 10px;
    padding: 13px 14px;
    font-size: 16px;
    outline: none;
    background: #fff;
    font-family: inherit;
}
input:focus, select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(31, 79, 120, .10);
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 100px;
    gap: 12px;
}
.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 9px;
    text-decoration: none;
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .02em;
    cursor: pointer;
    transition: .15s ease;
    font-family: inherit;
    background: transparent;
}
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-dark); }
.btn.secondary {
    background: #fff;
    color: var(--accent);
    border-color: #ccd5dc;
}
.btn.danger {
    background: #fff;
    color: var(--danger);
    border-color: #f0caca;
}
.btn.danger:hover { background: #fff5f5; }
.btn.full { width: 100%; margin-top: 24px; }
.btn.small {
    min-height: 34px;
    padding: 6px 12px;
    font-size: 12px;
}

/* Alerts */
.alert {
    padding: 12px 14px;
    border-radius: 9px;
    font-size: 14px;
    margin-bottom: 20px;
}
.alert.error {
    background: #fff0f0;
    border: 1px solid #f0caca;
    color: #8a2d2d;
}
.alert.success {
    background: #edf8f1;
    border: 1px solid #c6e6d1;
    color: #1f6b3c;
}
.security-note {
    text-align: center;
    color: var(--muted);
    font-size: 12px;
    margin: 22px 0 0;
}

/* Topbar */
.topbar {
    background: #fff;
    border-bottom: 1px solid var(--line);
}
.topbar-inner {
    width: min(1120px, calc(100% - 32px));
    min-height: 72px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.compact .brand-name { font-size: 16px; }
.logout {
    color: var(--accent);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid var(--line);
    padding: 9px 13px;
    border-radius: 8px;
}

/* Layout */
.container {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 44px 0 60px;
}
.welcome { margin-bottom: 38px; }
.compact-welcome { margin-bottom: 28px; }
.eyebrow {
    display: inline-block;
    color: var(--accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .12em;
    margin-bottom: 8px;
}
.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 15px;
}
.section-heading h2 { margin: 0; font-size: 20px; }
.count { color: var(--muted); font-size: 13px; }

/* Cards grid */
.expositor-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}
.expositor-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 15px;
    padding: 22px;
    box-shadow: 0 5px 18px rgba(23, 33, 43, .04);
}
.card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.expositor-icon {
    width: 44px;
    height: 44px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    background: #eef3f7;
    color: var(--accent);
    font-size: 13px;
    font-weight: 800;
}
.expositor-icon.sm {
    width: 38px;
    height: 38px;
    border-radius: 9px;
    font-size: 12px;
    flex-shrink: 0;
}
.status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .04em;
}
.status .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}
.status.ativo { color: var(--success); }
.status.desenvolvimento { color: var(--warning); }
.status.inativo { color: var(--muted); }
.expositor-card h3 {
    margin: 22px 0 20px;
    font-size: 18px;
}
.card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
}
.future-box {
    margin-top: 34px;
    padding: 22px;
    background: #fff;
    border: 1px dashed #ccd5dc;
    border-radius: 15px;
}
.future-box h2 { margin: 0 0 7px; font-size: 18px; }
.future-box p { margin: 0; color: var(--muted); line-height: 1.55; }
.empty-state {
    background: #fff;
    border: 1px dashed #ccd5dc;
    border-radius: 15px;
    padding: 36px 20px;
    text-align: center;
}
.empty-state p { color: var(--muted); margin: 0 0 16px; }

/* Manage */
.manage-layout {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 22px;
    align-items: start;
}
.manage-form-card,
.manage-list-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 15px;
    padding: 24px;
    box-shadow: 0 5px 18px rgba(23, 33, 43, .04);
}
.manage-form-card h2,
.manage-list-card h2 {
    margin: 0 0 8px;
    font-size: 18px;
}
.manage-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.manage-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}
.manage-item:last-child { border-bottom: 0; }
.manage-item-main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.manage-item-name {
    font-weight: 700;
    font-size: 15px;
}
.manage-item-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}
.slug-tag {
    font-size: 11px;
    color: var(--muted);
    background: #f0f3f6;
    padding: 2px 7px;
    border-radius: 6px;
}
.manage-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.manage-item-actions form { margin: 0; }
.muted { color: var(--muted); }

.footer {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 28px;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}

@media (max-width: 900px) {
    .manage-layout { grid-template-columns: 1fr; }
    .expositor-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
    .container { padding-top: 30px; }
}
@media (max-width: 520px) {
    .login-card { padding: 26px 21px; border-radius: 15px; }
    .topbar-inner { min-height: 64px; }
    .brand-name { font-size: 15px; }
    .welcome h1 { font-size: 24px; }
    .card-actions { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .manage-item {
        flex-direction: column;
        align-items: flex-start;
    }
    .manage-item-actions { width: 100%; }
}
