/* =====================================================================
   MonCorp — Design System Profissional
   ===================================================================== */

:root {
    /* Paleta de Cores */
    --bg-dark: #0a0e14;
    --bg-card: #131a24;
    --bg-elevated: #1a2332;
    --bg-input: #1a2332;
    --primary: #00d9c0;
    --primary-hover: #14e6cc;
    --primary-soft: rgba(0, 217, 192, 0.1);
    --accent: #3b82f6;
    --danger: #ef4444;
    --warning: #f59e0b;
    --success: #10b981;

    /* Texto */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    /* Bordas & Sombras */
    --border-soft: rgba(255, 255, 255, 0.06);
    --border-medium: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(0, 217, 192, 0.2);

    /* Raio de Borda */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    /* Transições */
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    background-image:
        radial-gradient(circle at 10% 0%, rgba(0, 217, 192, 0.08), transparent 40%),
        radial-gradient(circle at 90% 100%, rgba(59, 130, 246, 0.06), transparent 40%);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =====================================================================
   HEADER / NAVBAR SUPERIOR
   ===================================================================== */
.top-navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(10, 14, 20, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-soft);
    padding: 0 32px;
}

.navbar-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: 72px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
}

.brand-logo {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), #0a9486);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0a0e14;
    font-weight: 900;
    font-size: 18px;
    box-shadow: 0 4px 14px rgba(0, 217, 192, 0.35);
}

.brand-name {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.brand-name span {
    color: var(--primary);
}

/* Nav Links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    justify-content: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-links a.active {
    color: var(--primary);
    background: var(--primary-soft);
}

.nav-links a .nav-icon {
    font-size: 16px;
}

/* Ações à Direita */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.btn-login {
    padding: 10px 20px;
    border: 1px solid var(--border-medium);
    color: var(--text-primary);
    background: transparent;
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-login:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-signup {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary), #0a9486);
    color: #0a0e14;
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 700;
    transition: var(--transition);
    box-shadow: 0 4px 14px rgba(0, 217, 192, 0.3);
}

.btn-signup:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 217, 192, 0.45);
}

/* Profile Dropdown */
.profile-wrapper {
    position: relative;
}

.profile-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-soft);
    padding: 6px 14px 6px 6px;
    border-radius: 40px;
    cursor: pointer;
    transition: var(--transition);
}

.profile-trigger:hover {
    border-color: var(--primary);
    background: rgba(0, 217, 192, 0.05);
}

.profile-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #0a9486);
    color: #0a0e14;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 800;
}

.profile-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: 260px;
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 10px;
    z-index: 1100;
}

.profile-dropdown.active {
    display: block;
    animation: dropdownIn 0.2s ease-out;
}

@keyframes dropdownIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown-header {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-soft);
    margin-bottom: 8px;
}

.dropdown-header h4 {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 2px;
}

.dropdown-header small {
    color: var(--text-muted);
    font-size: 12px;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
}

.dropdown-item:hover {
    background: var(--primary-soft);
    color: var(--primary);
}

.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px;
    margin-top: 8px;
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-logout:hover {
    background: var(--danger);
    color: #fff;
}

.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--border-medium);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 18px;
    cursor: pointer;
}

/* =====================================================================
   MAIN CONTENT
   ===================================================================== */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 32px 80px;
    width: 100%;
    flex: 1;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.card:hover {
    border-color: var(--border-medium);
    box-shadow: var(--shadow-lg);
}

/* =====================================================================
   FORMULÁRIOS
   ===================================================================== */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group select {
    padding: 14px 16px;
    font-size: 15px;
    background: var(--bg-input);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    outline: none;
    transition: var(--transition);
    width: 100%;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary);
    background: rgba(0, 217, 192, 0.03);
    box-shadow: 0 0 0 3px rgba(0, 217, 192, 0.12);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.form-row > .form-group {
    flex: 1;
    min-width: 180px;
}

/* =====================================================================
   BOTÕES
   ===================================================================== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--primary), #0a9486);
    color: #0a0e14;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 14px rgba(0, 217, 192, 0.3);
    text-decoration: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0, 217, 192, 0.45);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-secondary:hover {
    background: var(--primary-soft);
}

.btn-help {
    background: transparent;
    border: 1px dashed var(--border-medium);
    color: var(--text-secondary);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 12px;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-help:hover {
    background: var(--primary-soft);
    color: var(--primary);
    border-color: var(--primary);
}

/* =====================================================================
   HERO / BANNER
   ===================================================================== */
.hero {
    background: linear-gradient(135deg, rgba(0, 217, 192, 0.12), rgba(59, 130, 246, 0.06));
    border: 1px solid rgba(0, 217, 192, 0.25);
    border-radius: var(--radius-xl);
    padding: 36px 40px;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(0, 217, 192, 0.15), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero h1 {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
    position: relative;
}

.hero p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 700px;
    position: relative;
}

/* =====================================================================
   RESULTADO IMC & GORDURA (DUAS COLUNAS LADO A LADO)
   ===================================================================== */
.results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 24px;
}

.result-card {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-xl);
    padding: 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.4s ease-out;
}

.result-card::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(0, 217, 192, 0.08), transparent 70%);
    pointer-events: none;
}

.result-card.gordura::before {
    background: radial-gradient(circle, rgba(59, 130, 246, 0.08), transparent 70%);
}

.result-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.result-value {
    font-size: 64px;
    font-weight: 900;
    background: linear-gradient(135deg, #fff 20%, var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -2px;
    line-height: 1;
    margin-bottom: 16px;
    position: relative;
}

.result-card.gordura .result-value {
    background: linear-gradient(135deg, #fff 20%, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.result-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 14px;
    color: #fff;
    box-shadow: var(--shadow-md);
    position: relative;
}

.result-tip {
    background: var(--primary-soft);
    border-left: 3px solid var(--primary);
    padding: 14px 18px;
    margin-top: 20px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-secondary);
    text-align: left;
    line-height: 1.5;
    position: relative;
}

/* =====================================================================
   GRID DASHBOARD (STATS)
   ===================================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.stat-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary), #0a9486);
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 217, 192, 0.3);
    box-shadow: var(--shadow-glow);
}

.stat-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.stat-value.positive { color: var(--success); }
.stat-value.negative { color: var(--danger); }
.stat-value.muted { color: var(--text-muted); }

/* =====================================================================
   TABELAS
   ===================================================================== */
.table-container {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-top: 24px;
}

.table-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.table-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
}

.badge-count {
    background: var(--primary-soft);
    color: var(--primary);
    border: 1px solid rgba(0, 217, 192, 0.3);
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.data-table th {
    padding: 14px 20px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-soft);
}

.data-table td {
    padding: 16px 20px;
    font-size: 14px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-soft);
}

.data-table tbody tr {
    transition: var(--transition);
}

.data-table tbody tr:hover {
    background: rgba(0, 217, 192, 0.04);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table td strong {
    color: var(--text-primary);
    font-weight: 700;
}

/* =====================================================================
   MODAIS (GERAL / AJUDA DE MEDIDAS)
   ===================================================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-xl);
    padding: 30px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 500px;
    animation: modalIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.modal-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 20px;
    transition: 0.2s;
}

.modal-close:hover {
    color: var(--danger);
    transform: scale(1.1);
}

.help-content {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.help-content ul {
    margin-left: 20px;
    margin-top: 10px;
    margin-bottom: 20px;
}

.help-content li {
    margin-bottom: 8px;
}

.help-content strong {
    color: var(--text-primary);
}

/* =====================================================================
   ALERTAS E ESTADOS VAZIOS
   ===================================================================== */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--success);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 56px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 15px;
    margin-bottom: 20px;
}

.blocked-state {
    text-align: center;
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-xl);
    padding: 60px 40px;
    margin-top: 40px;
    box-shadow: var(--shadow-lg);
}

.blocked-state .lock-icon {
    font-size: 56px;
    margin-bottom: 20px;
}

.blocked-state h2 {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.blocked-state p {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    line-height: 1.6;
}

.blocked-state .btn-primary {
    margin-top: 24px;
}

.blocked-state a.link-inline {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.blocked-state a.link-inline:hover {
    text-decoration: underline;
}

/* =====================================================================
   TABS (TREINOS)
   ===================================================================== */
.tabs-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 28px;
    overflow-x: auto;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border-soft);
}

.tabs-bar::-webkit-scrollbar {
    height: 4px;
}

.tabs-bar::-webkit-scrollbar-thumb {
    background: var(--border-medium);
    border-radius: 10px;
}

.tab-button {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    transition: var(--transition);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.tab-button:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
}

.tab-button.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: var(--primary-soft);
}

.tab-panel {
    display: none;
    animation: fadeInUp 0.3s ease-out;
}

.tab-panel.active {
    display: block;
}

/* Grid de Treinos */
.workout-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 24px;
}

.workout-card {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.workout-card:hover {
    border-color: rgba(0, 217, 192, 0.3);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.workout-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.workout-card .workout-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 18px;
    font-weight: 500;
}

.exercise-list {
    list-style: none;
    flex-grow: 1;
    margin-bottom: 18px;
}

.exercise-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-soft);
    font-size: 14px;
    color: var(--text-secondary);
    gap: 12px;
}

.exercise-item:last-child {
    border-bottom: none;
}

.exercise-item span {
    flex: 1;
}

.btn-timer {
    background: var(--primary-soft);
    color: var(--primary);
    border: 1px solid rgba(0, 217, 192, 0.3);
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-timer:hover {
    background: var(--primary);
    color: #0a0e14;
}

.btn-start-workout {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--primary), #0a9486);
    color: #0a0e14;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-start-workout:hover {
    box-shadow: 0 6px 20px rgba(0, 217, 192, 0.4);
}

/* =====================================================================
   MODAL CRONÔMETRO
   ===================================================================== */
.modal-title.timer-title {
    font-size: 18px;
    justify-content: center;
}

.timer-display {
    font-size: 72px;
    font-weight: 800;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
    letter-spacing: 2px;
    margin-bottom: 28px;
    text-align: center;
}

.timer-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.timer-btn {
    padding: 12px 22px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    min-width: 110px;
}

.timer-btn-play {
    background: var(--primary);
    color: #0a0e14;
}

.timer-btn-play:hover {
    background: var(--primary-hover);
}

.timer-btn-reset {
    background: var(--warning);
    color: #0a0e14;
}

.timer-btn-close {
    background: var(--danger);
    color: #fff;
}

/* =====================================================================
   NUTRIÇÃO
   ===================================================================== */
.macro-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.macro-card {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.macro-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.macro-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

.macro-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.macro-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
}

.macro-value.accent {
    color: var(--primary);
}

.macro-value.water {
    color: #3b82f6;
}

.ai-content-box {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 32px;
    line-height: 1.7;
    color: var(--text-secondary);
    position: relative;
    overflow: hidden;
}

.ai-content-box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.ai-content-box h1,
.ai-content-box h2,
.ai-content-box h3,
.ai-content-box h4 {
    color: var(--text-primary);
    margin-top: 24px;
    margin-bottom: 12px;
    font-weight: 700;
}

.ai-content-box h2 {
    font-size: 20px;
    color: var(--primary);
}

.ai-content-box h3 {
    font-size: 17px;
    color: var(--primary);
}

.ai-content-box p {
    margin-bottom: 14px;
}

.ai-content-box table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14px;
}

.ai-content-box th,
.ai-content-box td {
    padding: 12px 14px;
    border: 1px solid var(--border-soft);
    text-align: left;
}

.ai-content-box th {
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 700;
}

.ai-content-box ul,
.ai-content-box ol {
    margin-left: 20px;
    margin-bottom: 16px;
}

.ai-content-box li {
    margin-bottom: 6px;
}

.ai-content-box strong {
    color: var(--text-primary);
}

.loading-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--primary);
    text-align: center;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(0, 217, 192, 0.15);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* =====================================================================
   AUTH (LOGIN / CADASTRO)
   ===================================================================== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--bg-dark);
    background-image:
        radial-gradient(circle at 20% 10%, rgba(0, 217, 192, 0.1), transparent 40%),
        radial-gradient(circle at 80% 90%, rgba(59, 130, 246, 0.08), transparent 40%);
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-xl);
    padding: 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.auth-card.wide {
    max-width: 650px;
}

.auth-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), #3b82f6);
}

.auth-brand {
    text-align: center;
    margin-bottom: 32px;
}

.auth-brand-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), #0a9486);
    color: #0a0e14;
    font-weight: 900;
    font-size: 24px;
    margin-bottom: 16px;
    box-shadow: 0 8px 22px rgba(0, 217, 192, 0.35);
}

.auth-brand h1 {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}

.auth-brand p {
    font-size: 14px;
    color: var(--text-secondary);
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.auth-footer a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* =====================================================================
   RESPONSIVO
   ===================================================================== */
@media (max-width: 1024px) {
    .nav-links {
        display: none;
    }
    .nav-links.mobile-open {
        display: flex;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--bg-card);
        border-bottom: 1px solid var(--border-soft);
        flex-direction: column;
        padding: 16px;
        gap: 4px;
        box-shadow: var(--shadow-lg);
        z-index: 999;
    }
    .nav-links.mobile-open a {
        width: 100%;
        justify-content: flex-start;
    }
    .mobile-menu-toggle {
        display: block;
    }
}

@media (max-width: 768px) {
    .top-navbar {
        padding: 0 16px;
    }
    .navbar-inner {
        height: 64px;
        gap: 12px;
    }
    .brand-name {
        font-size: 17px;
    }
    .brand-logo {
        width: 34px;
        height: 34px;
        font-size: 16px;
    }
    .main-container {
        padding: 24px 16px 60px;
    }
    .hero {
        padding: 24px;
    }
    .hero h1 {
        font-size: 22px;
    }
    .results-grid {
        grid-template-columns: 1fr;
    }
    .result-value {
        font-size: 48px;
    }
    .result-card {
        padding: 24px 20px;
    }
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    .stat-card {
        padding: 18px;
    }
    .stat-value {
        font-size: 22px;
    }
    .card,
    .table-container {
        padding: 20px;
    }
    .data-table th,
    .data-table td {
        padding: 12px 14px;
        font-size: 13px;
    }
    .workout-grid {
        grid-template-columns: 1fr;
    }
    .auth-card {
        padding: 28px 22px;
    }
    .auth-card.wide {
        padding: 28px 22px;
    }
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    .form-row > .form-group {
        min-width: 100%;
    }
    .modal-box {
        padding: 28px 20px;
        width: 100%;
    }
    .timer-display {
        font-size: 54px;
    }
    .profile-name {
        display: none;
    }
    .btn-login,
    .btn-signup {
        padding: 8px 14px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .nav-actions {
        gap: 6px;
    }
    .btn-login {
        display: none;
    }
    .result-value {
        font-size: 42px;
    }
    .timer-display {
        font-size: 44px;
    }
    .timer-controls {
        flex-direction: column;
    }
    .timer-btn {
        width: 100%;
    }
}

/* =====================================================================
   CENTRALIZAÇÃO DA CALCULADORA (INDEX)
   ===================================================================== */
.hero-center-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 160px);
    text-align: center;
}

.hero-center-layout .hero {
    width: 100%;
    max-width: 800px;
    margin-bottom: 24px;
    padding: 30px;
}

.hero-center-layout .hero h1 {
    font-size: 26px;
}

.hero-center-layout .hero p {
    margin: 0 auto;
}

.hero-center-layout .card {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.hero-center-layout .results-grid {
    width: 100%;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}