:root {
    --bg: #f0f2f5;
    --surface: #ffffff;
    --border: #e2e8f0;
    --text: #1e293b;
    --text-muted: #64748b;
    --accent: #0d9488;
    --accent-hover: #0f766e;
    --accent-light: #ccfbf1;
    --user-bubble: #0d9488;
    --zoe-bubble: #ffffff;
    --shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(15, 23, 42, 0.04);
    --radius: 12px;
    --header-height: 72px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.5;
}

.app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Cabecera ── */

.app-header {
    height: var(--header-height);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-shrink: 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), #14b8a6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    box-shadow: 0 2px 8px rgba(13, 148, 136, 0.3);
}

.brand-text h1 {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.brand-text p {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 1px;
}

.header-status {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    margin-right: 16px;
}

.nav-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
}

.nav-link:hover {
    background: #f1f5f9;
    color: var(--text);
}

.nav-link.active {
    background: var(--accent-light);
    color: var(--accent);
}

.status-badge {
    font-size: 13px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 20px;
    background: #ecfdf5;
    color: #047857;
}

.datetime {
    font-size: 14px;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    min-width: 180px;
    text-align: right;
}

/* ── Layout principal ── */

.app-main {
    flex: 1;
    display: grid;
    grid-template-columns: 260px 1fr 260px;
    gap: 20px;
    padding: 20px;
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
    min-height: calc(100vh - var(--header-height));
}

.panel {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.panel-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    padding: 16px 18px 12px;
}

/* ── Panel estado ── */

.sidebar-panels {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: calc(var(--header-height) + 20px);
    align-self: start;
}

.panel-status,
.panel-mail-status {
    display: flex;
    flex-direction: column;
    height: fit-content;
}

.panel-status {
    position: static;
}

.status-list {
    padding: 0 18px 18px;
}

.status-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.status-item:last-child {
    border-bottom: none;
}

.status-item dt {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.status-item dd {
    font-size: 14px;
    font-weight: 500;
}

.status-value-text {
    font-weight: 400;
    font-size: 13px;
    line-height: 1.4;
    word-break: break-word;
}

.status-ok {
    color: #047857;
}

.muted {
    color: var(--text-muted);
    font-style: italic;
}

.role-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 6px;
    vertical-align: middle;
}

.role-tag.user {
    background: var(--accent-light);
    color: var(--accent);
}

.role-tag.zoe {
    background: #f1f5f9;
    color: #475569;
}

/* ── Chat central ── */

.panel-chat {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - var(--header-height) - 40px);
}

.chat-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(to bottom, #fafbfc, var(--surface));
}

.chat-header h2 {
    font-size: 16px;
    font-weight: 600;
}

.chat-subtitle {
    font-size: 13px;
    color: var(--text-muted);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8fafc;
    background-image: radial-gradient(circle at 1px 1px, #e2e8f0 1px, transparent 0);
    background-size: 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 400px;
}

.message {
    display: flex;
}

.message.user {
    justify-content: flex-end;
}

.message.zoe {
    justify-content: flex-start;
}

.bubble {
    max-width: 70%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.45;
    word-wrap: break-word;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.message.user .bubble {
    background: var(--user-bubble);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.message.zoe .bubble {
    background: var(--zoe-bubble);
    color: var(--text);
    border: 1px solid var(--border);
    border-bottom-left-radius: 4px;
}

.chat-input {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-top: 1px solid var(--border);
    background: var(--surface);
}

.chat-input input {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 12px 18px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.chat-input input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.chat-input input::placeholder {
    color: #94a3b8;
}

.chat-input button {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, transform 0.1s;
    flex-shrink: 0;
}

.chat-input button:hover {
    background: var(--accent-hover);
}

.chat-input button:active {
    transform: scale(0.96);
}

.chat-input button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ── Panel próximamente ── */

.panel-upcoming {
    height: fit-content;
    position: sticky;
    top: calc(var(--header-height) + 20px);
}

.upcoming-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 0 14px 16px;
}

.upcoming-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 10px;
    border-radius: 10px;
    border: 1px dashed var(--border);
    background: #fafbfc;
    opacity: 0.75;
    cursor: default;
    transition: opacity 0.15s;
}

.upcoming-card:hover {
    opacity: 1;
    background: #f1f5f9;
}

.upcoming-icon {
    font-size: 24px;
    line-height: 1;
}

.upcoming-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    text-align: center;
}

/* ── Responsive ── */

@media (max-width: 1100px) {
    .app-main {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr auto;
    }

    .panel-status,
    .panel-mail-status,
    .panel-upcoming,
    .sidebar-panels {
        position: static;
    }

    .panel-chat {
        min-height: 500px;
        order: -1;
    }

    .status-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0 20px;
    }

    .upcoming-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 640px) {
    .app-header {
        padding: 0 16px;
        flex-wrap: wrap;
        height: auto;
        min-height: var(--header-height);
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .header-nav {
        order: 3;
        width: 100%;
        margin: 8px 0 0;
        justify-content: center;
    }

    .header-status {
        width: 100%;
        justify-content: space-between;
    }

    .datetime {
        min-width: auto;
        font-size: 13px;
    }

    .app-main {
        padding: 12px;
        gap: 12px;
    }

    .status-list {
        grid-template-columns: 1fr;
    }

    .upcoming-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .bubble {
        max-width: 85%;
    }
}

/* ── Conocimiento ── */

.app-main-knowledge {
    grid-template-columns: 240px 1fr 320px;
}

.panel-knowledge {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - var(--header-height) - 40px);
}

.knowledge-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(to bottom, #fafbfc, var(--surface));
}

.knowledge-header h2 {
    font-size: 16px;
    font-weight: 600;
}

.knowledge-upload {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.knowledge-upload form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.knowledge-upload select,
.knowledge-filter select,
.query-filter select {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    background: var(--surface);
}

.knowledge-upload input[type="file"] {
    font-size: 13px;
    flex: 1;
    min-width: 160px;
}

.knowledge-upload button,
.btn-action {
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}

.knowledge-upload button {
    background: var(--accent);
    color: #fff;
}

.knowledge-upload button:hover:not(:disabled) {
    background: var(--accent-hover);
}

.knowledge-upload button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.upload-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
}

.knowledge-filter,
.query-filter {
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.knowledge-table-wrap {
    flex: 1;
    overflow: auto;
    padding: 0;
}

.knowledge-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.knowledge-table th {
    text-align: left;
    padding: 10px 14px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    background: #fafbfc;
    position: sticky;
    top: 0;
}

.knowledge-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.knowledge-table tr:hover td {
    background: #f8fafc;
}

.table-empty {
    text-align: center;
    padding: 24px !important;
}

.doc-name {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.doc-date {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
}

.doc-actions {
    white-space: nowrap;
}

.btn-action {
    background: #f1f5f9;
    color: var(--text);
    margin-right: 4px;
}

.btn-action:hover {
    background: #e2e8f0;
}

.btn-delete {
    color: #b91c1c;
}

.btn-delete:hover {
    background: #fef2f2;
}

.doc-status {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 12px;
}

.doc-status-indexed {
    background: #ecfdf5;
    color: #047857;
}

.doc-status-pending {
    background: #fef3c7;
    color: #b45309;
}

.doc-status-error {
    background: #fef2f2;
    color: #b91c1c;
}

.panel-query {
    min-height: calc(100vh - var(--header-height) - 40px);
}

.panel-query .chat-messages {
    min-height: 300px;
}

.query-sources {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    font-size: 12px;
}

.query-sources ul {
    margin: 6px 0 0 16px;
    padding: 0;
}

.query-debug {
    margin-top: 8px;
    font-size: 11px;
}

@media (max-width: 1100px) {
    .app-main-knowledge {
        grid-template-columns: 1fr;
    }

    .panel-query {
        min-height: 400px;
    }
}

/* ── Correo Inteligente ── */

.mail-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 auto;
    max-width: 1440px;
    width: calc(100% - 40px);
    margin-top: 16px;
    padding: 14px 18px;
    background: linear-gradient(135deg, #ecfdf5, #f0fdfa);
    border: 1px solid #99f6e4;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.mail-banner-content {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 14px;
}

.mail-banner-greeting {
    font-weight: 600;
}

.mail-banner-item {
    background: #fff;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 13px;
    border: 1px solid var(--border);
}

.mail-banner-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.mail-banner-link {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
    font-size: 14px;
}

.mail-banner-dismiss {
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 16px;
    padding: 4px 8px;
}

.upcoming-card-active {
    opacity: 1;
    border-style: solid;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.app-main-mail {
    grid-template-columns: 260px 1fr 340px;
}

.panel-mail-summary,
.panel-mail-detail {
    display: flex;
    flex-direction: column;
    height: fit-content;
    max-height: calc(100vh - var(--header-height) - 40px);
    position: sticky;
    top: calc(var(--header-height) + 20px);
}

.mail-summary-content {
    padding: 0 18px 12px;
}

.mail-greeting {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
}

.mail-summary-message {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 16px;
}

.mail-summary-message strong {
    font-weight: 600;
}

.mail-summary-sync {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.5;
}

.mail-summary-sync-label {
    display: block;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 2px;
}

.mail-summary-accounts-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.mail-accounts-ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mail-accounts-ul a {
    font-size: 13px;
    color: var(--accent);
    text-decoration: none;
}

.mail-accounts-ul a:hover {
    text-decoration: underline;
}

.panel-mail-summary {
    padding-bottom: 18px;
}

.panel-mail-summary .panel-title {
    display: none;
}

.mail-summary-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.mail-summary-lines {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.summary-line {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
}

.summary-line:hover {
    background: #f1f5f9;
}

.summary-line.highlight {
    background: #fef9c3;
    border: 1px solid #fde047;
    font-weight: 600;
}

.summary-emoji {
    font-size: 16px;
}

.summary-text {
    font-size: 13px;
}

.mail-sync-info {
    border-top: 1px solid var(--border);
    margin-top: 8px;
}

.panel-mail-list {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - var(--header-height) - 40px);
}

.mail-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(to bottom, #fafbfc, var(--surface));
}

.mail-list-header h2 {
    font-size: 16px;
    font-weight: 600;
}

.btn-sync {
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-sync:hover:not(:disabled) {
    background: #f1f5f9;
}

.btn-sync:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.mail-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
    align-items: center;
}

.mail-filters select {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    background: var(--surface);
}

.filter-check {
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mail-list-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.mail-list-empty {
    padding: 24px;
    text-align: center;
}

.mail-group {
    margin-bottom: 16px;
}

.mail-group-commercial {
    background: #fefce8;
    border: 1px solid #fde047;
    border-radius: 10px;
    padding: 8px;
}

.mail-group-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    padding: 8px 10px 6px;
}

.mail-row {
    display: flex;
    gap: 10px;
    width: 100%;
    text-align: left;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    transition: background 0.15s;
    font-family: inherit;
    color: inherit;
}

.mail-row:hover {
    background: #f8fafc;
}

.mail-row.selected {
    background: var(--accent-light);
}

.mail-row-priority {
    font-size: 18px;
    flex-shrink: 0;
    line-height: 1.2;
}

.mail-row-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mail-row-top {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.mail-row-from {
    font-size: 14px;
}

.mail-row-date {
    margin-left: auto;
    font-size: 12px;
    color: var(--text-muted);
}

.mail-row-account {
    font-size: 11px;
    color: var(--accent);
    font-weight: 500;
}

.mail-row-subject {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mail-row-snippet {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mail-row-waiting {
    font-size: 12px;
    color: var(--accent);
    font-weight: 500;
    margin-top: 2px;
}

.mail-detail-simple dt {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-top: 12px;
}

.mail-detail-simple dt:first-child {
    margin-top: 0;
}

.mail-detail-waiting {
    color: var(--accent);
    font-weight: 500;
}

.mail-badge-new {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    background: #dbeafe;
    color: #1d4ed8;
    padding: 2px 6px;
    border-radius: 4px;
}

.mail-badge-category {
    font-size: 10px;
    font-weight: 600;
    background: #fef9c3;
    color: #a16207;
    padding: 2px 6px;
    border-radius: 4px;
}

.mail-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-muted);
}

.mail-pagination-btns button {
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 6px;
    padding: 4px 10px;
    cursor: pointer;
    margin-left: 4px;
}

.mail-pagination-btns button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.mail-detail-body {
    padding: 16px 18px;
    overflow-y: auto;
    flex: 1;
}

.mail-detail-header {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.mail-detail-priority,
.mail-detail-category,
.mail-detail-subcategory {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    background: #f1f5f9;
}

.mail-detail-category {
    background: #fef9c3;
    color: #a16207;
}

.mail-detail-meta {
    font-size: 13px;
    margin-bottom: 16px;
}

.mail-detail-meta dt {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 10px;
}

.mail-detail-meta dd {
    margin-top: 2px;
    word-break: break-word;
}

.mail-detail-body-text {
    white-space: pre-wrap;
    font-size: 14px;
    line-height: 1.55;
    background: #f8fafc;
    padding: 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.mail-truncated-note {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 10px;
    font-style: italic;
}

.mail-detail-attachments {
    margin-top: 16px;
    font-size: 13px;
}

.mail-detail-attachments ul {
    margin: 6px 0 0 16px;
}

.mail-detail-reason {
    margin-top: 12px;
    font-size: 11px;
}

@media (max-width: 1100px) {
    .app-main-mail {
        grid-template-columns: 1fr;
    }

    .panel-mail-summary,
    .panel-mail-detail {
        position: static;
        max-height: none;
    }
}

/* ── Login ── */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--bg);
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 32px 28px;
}

.login-brand {
    text-align: center;
    margin-bottom: 28px;
}

.login-brand .brand-avatar {
    margin: 0 auto 14px;
}

.login-brand h1 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 4px;
}

.login-brand p {
    font-size: 14px;
    color: var(--text-muted);
}

.login-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    margin-bottom: 16px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.login-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    margin-top: 8px;
}

.login-label:first-child {
    margin-top: 0;
}

.login-input {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.15s;
}

.login-input:focus {
    border-color: var(--accent);
}

.login-submit {
    margin-top: 16px;
    padding: 12px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.login-submit:hover {
    background: var(--accent-hover);
}

/* ── Logout ── */

.logout-form {
    margin: 0;
}

.btn-logout {
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.btn-logout:hover {
    background: #f1f5f9;
    color: var(--text);
}
