:root {
    --bg: #f5f7fb;
    --surface: #ffffff;
    --border: #e5e7eb;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --text: #111827;
    --text-muted: #6b7280;
    --sidebar-bg: #0b1727;
    --danger: #ef4444;
}

/* RESET BÁSICO */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ===================================================================
   LOGIN PAGE
   =================================================================== */

.login-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, #2563eb33, transparent 55%),
        radial-gradient(circle at bottom right, #22c55e33, transparent 50%),
        #020617;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-wrapper {
    width: 100%;
    max-width: 1040px;
    padding: 16px;
}

.login-card {
    background: rgba(15, 23, 42, 0.96);
    border-radius: 24px;
    padding: 22px 24px;
    color: #e5e7eb;
    box-shadow:
        0 40px 80px rgba(15, 23, 42, 0.85),
        0 0 0 1px rgba(15, 23, 42, 0.8);
    display: grid;
    grid-template-columns: 1.1fr 1.7fr;
    gap: 22px;
}

/* Lado esquerdo: logo + frase */

.login-hero {
    padding-right: 20px;
    border-right: 1px solid rgba(148, 163, 184, 0.4);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
}

.login-logo-only {
    width: 130px;
    height: 130px;
    border-radius: 28px;
    background: radial-gradient(circle at top, #1f2937, #020617);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.8);
}

.login-logo-only img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.login-subtitle-only {
    margin: 0;
    font-size: 0.98rem;
    color: #9ca3af;
    max-width: 280px;
    line-height: 1.5;
}

/* Lado direito: formulários */

.login-forms {
    display: grid;
    grid-template-columns: 1fr 12px 1fr;
    gap: 14px;
}

.login-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.login-column-title {
    margin: 0 0 4px;
    font-size: 1.05rem;
    font-weight: 500;
    color: #f9fafb;
}

.login-divider {
    width: 1px;
    background: linear-gradient(to bottom, transparent, rgba(148, 163, 184, 0.8), transparent);
    height: 100%;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.login-label {
    font-size: 0.78rem;
    color: #9ca3af;
}

.login-input {
    border-radius: 999px;
    border: 1px solid #374151;
    padding: 9px 12px;
    font-size: 0.9rem;
    background: rgba(15, 23, 42, 0.9);
    color: #e5e7eb;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.login-input::placeholder {
    color: #6b7280;
}

.login-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.5);
    background: rgba(15, 23, 42, 0.98);
}

.login-btn {
    margin-top: 8px;
    width: 100%;
}

/* Botões (modo escuro login) */

.btn {
    border-radius: 999px;
    border: none;
    padding: 8px 14px;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
}

.btn-primary {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 16px 30px rgba(37, 99, 235, 0.5);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    color: #e5e7eb;
    border: 1px solid #4b5563;
}

.btn-secondary:hover {
    background: rgba(31, 41, 55, 0.85);
}

/* Alertas login */

.login-alert {
    border-radius: 10px;
    padding: 6px 8px;
    font-size: 0.8rem;
}

.login-alert-error {
    background: rgba(239, 68, 68, 0.12);
    color: #fecaca;
    border: 1px solid rgba(248, 113, 113, 0.5);
}

.login-alert-success {
    background: rgba(34, 197, 94, 0.12);
    color: #bbf7d0;
    border: 1px solid rgba(74, 222, 128, 0.5);
}

/* Responsivo login */

@media (max-width: 900px) {
    .login-card {
        grid-template-columns: 1fr;
        padding: 20px 18px;
    }

    .login-hero {
        border-right: none;
        border-bottom: 1px solid rgba(148, 163, 184, 0.35);
        padding-right: 0;
        padding-bottom: 14px;
        margin-bottom: 10px;
        align-items: center;
        text-align: center;
    }

    .login-subtitle-only {
        max-width: none;
    }

    .login-forms {
        grid-template-columns: 1fr;
    }

    .login-divider {
        display: none;
    }
}

@media (max-width: 480px) {
    .login-wrapper {
        padding: 10px;
    }

    .login-card {
        padding: 16px 14px;
        border-radius: 18px;
    }

    .login-logo-only {
        width: 96px;
        height: 96px;
    }
}

/* ===================================================================
   APP LAYOUT (após login)
   =================================================================== */

.app-shell {
    display: flex;
    min-height: 100vh;
    background: var(--bg);
}

.sidebar {
    width: 220px;
    background: var(--sidebar-bg);
    color: #e5e7eb;
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
}

.main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Topbar */

.topbar {
    height: 56px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.topbar-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.menu-toggle {
    display: none;
    margin-right: 8px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    padding: 4px 8px;
    cursor: pointer;
}

.content {
    padding: 16px;
}

.footer {
    margin-top: auto;
    padding: 10px 16px;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    background: var(--surface);
}

/* Sidebar brand + user */

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.brand-logo {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.sidebar-avatar {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
}

.sidebar-user-name {
    font-size: 0.9rem;
}

.sidebar-user-meta {
    font-size: 0.75rem;
    color: #9ca3af;
}

/* Sidebar nav */

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 8px;
}

.nav-link {
    padding: 6px 10px;
    border-radius: 999px;
    color: #e5e7eb;
    text-decoration: none;
    font-size: 0.9rem;
}

.nav-link-active,
.nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-logout {
    margin-top: auto;
}

.sidebar-logout button {
    width: 100%;
    margin-top: 16px;
    padding: 6px 10px;
    border-radius: 999px;
    border: none;
    background: rgba(239, 68, 68, 0.15);
    color: #fecaca;
    cursor: pointer;
}

/* Sections / cards */

.section {
    margin-bottom: 16px;
}

.section-title {
    margin: 0 0 8px;
    font-size: 1.05rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.card {
    background: var(--surface);
    border-radius: 12px;
    padding: 12px 14px;
    border: 1px solid var(--border);
}

.card-plan {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

/* Texto */

.plan-name {
    font-weight: 600;
}

.plan-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.list-simple {
    list-style: none;
    margin: 0;
    padding-left: 0;
    font-size: 0.9rem;
}

/* Alert genérico */

.alert {
    margin-bottom: 8px;
    background: #e0f2fe;
    color: #1d4ed8;
    padding: 6px 8px;
    border-radius: 8px;
    font-size: 0.85rem;
}

/* Inputs / botões no app */

.input {
    border-radius: 8px;
    border: 1px solid var(--border);
    padding: 6px 8px;
    font-size: 0.9rem;
    width: 100%;
    font-family: inherit;
}

.label {
    font-size: 0.86rem;
    color: var(--text-muted);
    margin-top: 8px;
    display: block;
}

.label-small {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.inline-form {
    display: flex;
    gap: 6px;
    align-items: center;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 0.8rem;
}

.btn-big {
    padding: 8px 16px;
}

.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }

/* Editor de exercícios */

.ex-list {
    margin-top: 4px;
}

.ex-row {
    display: flex;
    gap: 4px;
    align-items: center;
    margin-bottom: 6px;
}

.ex-handle {
    cursor: grab;
    font-size: 1rem;
}

.ex-input {
    flex: 2;
}

.ex-select {
    flex: 1;
}

.ex-small {
    width: 60px;
}

/* Sequência semanal */

.sequence-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.sequence-day {
    width: 80px;
    font-size: 0.9rem;
}

.sequence-select {
    max-width: 240px;
}

/* Execução do treino */

.run-row {
    border-top: 1px solid var(--border);
    padding-top: 8px;
    margin-top: 8px;
}

.run-header {
    display: flex;
    align-items: center;
    gap: 6px;
}

.run-name {
    font-weight: 500;
}

.run-tag {
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--text-muted);
}

.run-last {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 4px 0;
}

.run-inputs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* Histórico */

.hist-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

.hist-date {
    color: var(--text-muted);
}

.hist-note {
    font-size: 0.86rem;
    margin-top: 4px;
}

/* Responsivo app */

@media (max-width: 768px) {
    .app-shell {
        flex-direction: column;
    }

    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        transform: translateX(-100%);
        transition: transform 0.2s ease;
        z-index: 10;
    }
    .sidebar.sidebar-open {
        transform: translateX(0);
    }
    .menu-toggle {
        display: inline-flex;
    }
}
/* ===================================================================
   DASHBOARD MODERNO
   =================================================================== */

.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Header do dashboard */

.dash-header {
    margin-bottom: 20px;
}

.dash-title {
    margin: 0 0 4px;
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--text);
}

.dash-subtitle {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* Cards de estatísticas */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--surface);
    border-radius: 16px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
}

.stat-card-blue {
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
    border-color: #bfdbfe;
}

.stat-card-green {
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
    border-color: #bbf7d0;
}

.stat-card-purple {
    background: linear-gradient(135deg, #faf5ff 0%, #ffffff 100%);
    border-color: #e9d5ff;
}

.stat-icon {
    font-size: 2rem;
    line-height: 1;
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text);
}

.stat-value-small {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

/* Seção "Hoje" (Hero) */

.today-section {
    margin-bottom: 20px;
}

.section-card {
    background: var(--surface);
    border-radius: 16px;
    padding: 18px 20px;
    border: 1px solid var(--border);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.section-card-hero {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    border: none;
    box-shadow: 0 20px 45px rgba(37, 99, 235, 0.4);
    position: relative;
    overflow: hidden;
}

.section-card-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15), transparent 70%);
    border-radius: 50%;
}

.hero-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.25);
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.hero-badge-gray {
    background: rgba(255, 255, 255, 0.15);
}

.hero-title {
    margin: 0 0 6px;
    font-size: 1.5rem;
    font-weight: 600;
}

.hero-subtitle {
    margin: 0 0 14px;
    font-size: 0.95rem;
    opacity: 0.9;
}

.hero-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-hero {
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-hero-primary {
    background: rgba(255, 255, 255, 0.95);
    color: #1d4ed8;
    box-shadow: 0 12px 25px rgba(15, 23, 42, 0.3);
}

.btn-hero-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.4);
}

.btn-hero-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Grid de conteúdo */

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.card-header-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.card-title-modern {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.card-link {
    font-size: 0.85rem;
    color: var(--primary);
    text-decoration: none;
}

.card-link:hover {
    text-decoration: underline;
}

/* Semana visual */

.week-visual {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.week-day-item {
    text-align: center;
    padding: 8px 4px;
    border-radius: 10px;
    background: #f9fafb;
    border: 1px solid var(--border);
    position: relative;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.week-day-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
}

.week-day-done {
    background: linear-gradient(135deg, #d1fae5 0%, #ffffff 100%);
    border-color: #6ee7b7;
}

.week-day-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.week-day-plan {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.week-day-rest {
    font-size: 0.7rem;
    color: #9ca3af;
    font-style: italic;
}

.week-day-check {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #10b981;
    color: #ffffff;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Histórico */

.history-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    background: #f9fafb;
    border: 1px solid var(--border);
    transition: background 0.15s ease;
}

.history-item:hover {
    background: #f3f4f6;
}

.history-date {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    min-width: 32px;
}

.history-info {
    flex: 1;
}

.history-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
}

.history-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.history-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #d1fae5;
    color: #10b981;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

/* Empty state */

.empty-state {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
}

.empty-state-hint {
    font-size: 0.85rem;
    margin-top: 4px;
}

/* Responsivo dashboard */

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .content-grid {
        grid-template-columns: 1fr;
    }

    .week-visual {
        grid-template-columns: repeat(4, 1fr);
    }

    .dash-title {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .week-visual {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===================================================================
   PÁGINAS MODERNAS (Treinos, Sequência, Histórico)
   =================================================================== */

.page-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Header das páginas */

.page-header {
    margin-bottom: 24px;
}

.page-title {
    margin: 0 0 4px;
    font-size: 1.7rem;
    font-weight: 600;
    color: var(--text);
}

.page-subtitle {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* Card de criar treino */

.create-section {
    margin-bottom: 24px;
}

.create-card {
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
    border: 1px solid #bfdbfe;
    border-radius: 16px;
    padding: 18px 20px;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.08);
}

.create-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.create-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.create-title {
    margin: 0 0 2px;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
}

.create-hint {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.create-form {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Inputs modernos */

.input-modern {
    border-radius: 999px;
    border: 1px solid var(--border);
    padding: 9px 14px;
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input-modern:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.input-modern-large {
    flex: 1;
    min-width: 280px;
}

/* Botões modernos */

.btn-modern {
    border-radius: 999px;
    border: none;
    padding: 9px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    text-decoration: none;
}

.btn-modern-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    box-shadow: 0 12px 25px rgba(37, 99, 235, 0.35);
}

.btn-modern-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 35px rgba(37, 99, 235, 0.45);
}

.btn-modern-secondary {
    background: #f3f4f6;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-modern-secondary:hover {
    background: #e5e7eb;
}

.btn-modern-large {
    padding: 11px 20px;
    font-size: 1rem;
}

/* Alertas modernos */

.alert-modern {
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.alert-modern-success {
    background: linear-gradient(135deg, #d1fae5, #ffffff);
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.alert-modern-error {
    background: linear-gradient(135deg, #fee2e2, #ffffff);
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Grid de treinos */

.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.plan-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px 18px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.plan-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
}

.plan-card-header {
    margin-bottom: 10px;
}

.plan-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: #f0fdf4;
    color: #15803d;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid #86efac;
}

.plan-card-name {
    margin: 0 0 6px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
}

.plan-card-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.plan-card-actions {
    display: flex;
    gap: 6px;
}

.btn-card {
    flex: 1;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 0.85rem;
    text-align: center;
    text-decoration: none;
    font-weight: 500;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-card-primary {
    background: var(--primary);
    color: #ffffff;
}

.btn-card-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.3);
}

.btn-card-secondary {
    background: #f3f4f6;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-card-secondary:hover {
    background: #e5e7eb;
}

/* Empty state grande */

.empty-state-large {
    text-align: center;
    padding: 60px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 12px;
}

.empty-title {
    margin: 0 0 6px;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text);
}

.empty-text {
    margin: 0 0 16px;
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* ===== SEQUÊNCIA ===== */

.sequence-form {
    margin-bottom: 24px;
}

.sequence-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.sequence-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.sequence-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.1);
}

.sequence-day-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.sequence-day-icon {
    font-size: 1.5rem;
}

.sequence-day-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
}

.sequence-day-short {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.select-modern {
    width: 100%;
    border-radius: 999px;
    border: 1px solid var(--border);
    padding: 8px 12px;
    font-size: 0.9rem;
    font-family: inherit;
    background: #f9fafb;
    cursor: pointer;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.select-modern:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: #ffffff;
}

.sequence-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
}

/* ===== HISTÓRICO ===== */

.history-stats {
    margin-bottom: 24px;
}

.history-stat-card {
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
    border: 1px solid #86efac;
    border-radius: 16px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 320px;
    box-shadow: 0 8px 20px rgba(34, 197, 94, 0.12);
}

.history-stat-icon {
    font-size: 2.2rem;
}

.history-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
}

.history-stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Timeline */

.timeline {
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 28px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--border), transparent);
}

.timeline-month {
    margin-bottom: 16px;
    padding-left: 70px;
}

.timeline-month-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
}

.timeline-item {
    position: relative;
    margin-bottom: 16px;
    padding-left: 70px;
}

.timeline-dot {
    position: absolute;
    left: 22px;
    top: 12px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid var(--bg);
    box-shadow: 0 0 0 2px var(--primary);
}

.timeline-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 16px;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.timeline-card:hover {
    transform: translateX(4px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
}

.timeline-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.timeline-date {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border: 1px solid #93c5fd;
    border-radius: 12px;
    padding: 8px 10px;
    text-align: center;
    min-width: 50px;
}

.timeline-day {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.timeline-month-short {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.timeline-info {
    flex: 1;
}

.timeline-name {
    margin: 0 0 2px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.timeline-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.timeline-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #d1fae5;
    color: #10b981;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
}

.timeline-note {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 8px;
}

.timeline-note-icon {
    font-size: 1rem;
}

.timeline-note-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Responsivo páginas */

@media (max-width: 768px) {
    .plans-grid {
        grid-template-columns: 1fr;
    }

    .sequence-grid {
        grid-template-columns: 1fr;
    }

    .create-form {
        flex-direction: column;
    }

    .input-modern-large {
        width: 100%;
        min-width: 0;
    }

    .timeline::before {
        left: 14px;
    }

    .timeline-item {
        padding-left: 40px;
    }

    .timeline-dot {
        left: 8px;
    }

    .timeline-month {
        padding-left: 40px;
    }
}
/* ===================================================================
   TOPBAR MODERNO
   =================================================================== */

.topbar-glass {
    position: sticky;
    top: 0;
    z-index: 5;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar-title-wrap {
    display: flex;
    flex-direction: column;
}

.topbar-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
}

.topbar-tagline {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Lado direito: pill + usuário */

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
}

.topbar-pill-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.3);
}

.topbar-pill-text {
    font-size: 0.75rem;
    color: #166534;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 6px;
    border-radius: 999px;
    background: #f9fafb;
    border: 1px solid var(--border);
}

.topbar-user-info {
    display: flex;
    flex-direction: column;
}

.topbar-user-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
}

.topbar-user-role {
    font-size: 0.74rem;
    color: var(--text-muted);
}

.topbar-avatar {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Responsivo topbar */

@media (max-width: 768px) {
    .topbar-right {
        gap: 8px;
    }
    .topbar-tagline {
        display: none;
    }
    .topbar-pill-text {
        display: none;
    }
    .topbar-pill {
        padding: 4px;
    }
}

