/**
 * Negocios de América - PWA Emprendimiento
 * CSS Principal - Mobile First
 */

/* ============================================================
   VARIABLES Y RESET
   ============================================================ */

:root {
    --primary: #1E3A5F;
    --primary-light: #2D5A8E;
    --primary-dark: #0F1F33;
    --accent: #3B82F6;
    --accent-light: #60A5FA;
    --accent-dark: #2563EB;
    --success: #10B981;
    --success-light: #D1FAE5;
    --warning: #F59E0B;
    --warning-light: #FEF3C7;
    --danger: #EF4444;
    --danger-light: #FEE2E2;
    --info: #06B6D4;

    --silver: #8B5CF6;
    --silver-light: #EDE9FE;
    --women: #EC4899;
    --women-light: #FCE7F3;

    --bg: #F8FAFC;
    --bg-white: #FFFFFF;
    --bg-card: #FFFFFF;
    --bg-sidebar: #0F172A;

    --text: #1E293B;
    --text-secondary: #64748B;
    --text-muted: #94A3B8;
    --text-white: #FFFFFF;
    --text-link: #3B82F6;

    --border: #E2E8F0;
    --border-light: #F1F5F9;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);

    --radius-sm: 6px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --transition: all 0.2s ease;
}

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    color: var(--text-link);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-dark);
}

img {
    max-width: 100%;
    height: auto;
}

input, button, textarea, select {
    font-family: var(--font);
    font-size: 1rem;
}

/* ============================================================
   LOADER
   ============================================================ */

.loader-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.4s ease;
}

.loader-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-content {
    text-align: center;
}

.loader-logo h1 {
    color: var(--text-white);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.loader-logo p {
    color: var(--accent-light);
    font-size: 0.9rem;
    font-weight: 300;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.2);
    border-top-color: var(--accent-light);
    border-radius: 50%;
    margin: 24px auto 0;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================================
   TIPOGRAFÍA
   ============================================================ */

h1 { font-size: 1.75rem; font-weight: 700; line-height: 1.2; color: var(--primary); }
h2 { font-size: 1.4rem; font-weight: 600; line-height: 1.3; color: var(--primary); }
h3 { font-size: 1.15rem; font-weight: 600; line-height: 1.4; }
h4 { font-size: 1rem; font-weight: 600; }

.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-muted { color: var(--text-secondary); }
.text-center { text-align: center; }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-silver { color: var(--silver); }
.text-women { color: var(--women); }
.font-bold { font-weight: 700; }
.font-medium { font-weight: 500; }

/* ============================================================
   LAYOUT
   ============================================================ */

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

/* Layout con sidebar para desktop */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.app-sidebar {
    width: 260px;
    background: var(--bg-sidebar);
    color: var(--text-white);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    transition: transform 0.3s ease;
}

.app-main {
    flex: 1;
    margin-left: 260px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-content {
    flex: 1;
    padding: 24px;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

/* Mobile: sidebar oculto */
@media (max-width: 768px) {
    .app-sidebar {
        transform: translateX(-100%);
    }

    .app-sidebar.open {
        transform: translateX(0);
    }

    .app-main {
        margin-left: 0;
    }

    .app-content {
        padding: 16px;
    }
}

/* ============================================================
   SIDEBAR
   ============================================================ */

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h2 {
    color: var(--text-white);
    font-size: 1.1rem;
    margin-bottom: 2px;
}

.sidebar-header p {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.sidebar-nav {
    padding: 12px 0;
}

.sidebar-item {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.sidebar-item:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-white);
}

.sidebar-item.active {
    background: rgba(59,130,246,0.15);
    color: var(--accent-light);
    border-right: 3px solid var(--accent);
}

.sidebar-item .icon {
    width: 20px;
    margin-right: 12px;
    text-align: center;
    font-size: 1.1rem;
}

.sidebar-item.locked {
    opacity: 0.4;
    cursor: not-allowed;
}

.sidebar-item.locked::after {
    content: '🔒';
    margin-left: auto;
    font-size: 0.7rem;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: auto;
    position: absolute;
    bottom: 0;
    width: 100%;
}

.sidebar-membership {
    font-size: 0.75rem;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    background: rgba(16,185,129,0.15);
    color: var(--success);
    text-align: center;
}

.sidebar-membership.expired {
    background: rgba(239,68,68,0.15);
    color: var(--danger);
}

/* ============================================================
   TOP BAR (Mobile)
   ============================================================ */

.top-bar {
    display: none;
    background: var(--primary);
    color: var(--text-white);
    padding: 12px 16px;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 90;
}

@media (max-width: 768px) {
    .top-bar {
        display: flex;
    }
}

.top-bar-title {
    font-size: 1rem;
    font-weight: 600;
}

.menu-toggle {
    background: none;
    border: none;
    color: var(--text-white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 99;
}

.sidebar-overlay.visible {
    display: block;
}

/* ============================================================
   BOTONES
   ============================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    gap: 8px;
    line-height: 1.4;
    text-align: center;
}

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

.btn-primary {
    background: var(--accent);
    color: var(--text-white);
}

.btn-primary:hover:not(:disabled) {
    background: var(--accent-dark);
}

.btn-secondary {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--border-light);
}

.btn-success {
    background: var(--success);
    color: var(--text-white);
}

.btn-danger {
    background: var(--danger);
    color: var(--text-white);
}

.btn-outline {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
}

.btn-outline:hover:not(:disabled) {
    background: var(--accent);
    color: var(--text-white);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: var(--border-light);
    color: var(--text);
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
}

.btn-google {
    background: var(--bg-white);
    color: var(--text);
    border: 1px solid var(--border);
    font-weight: 500;
}

.btn-google:hover {
    background: var(--border-light);
    box-shadow: var(--shadow-sm);
}

.btn-google img {
    width: 20px;
    height: 20px;
}

/* ============================================================
   FORMULARIOS
   ============================================================ */

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

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    color: var(--text);
    background: var(--bg-white);
    transition: var(--transition);
    outline: none;
}

.form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.form-input.error {
    border-color: var(--danger);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    color: var(--text);
    background: var(--bg-white);
    cursor: pointer;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2364748B' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

textarea.form-input {
    min-height: 100px;
    resize: vertical;
}

.form-error {
    font-size: 0.8rem;
    color: var(--danger);
    margin-top: 4px;
}

.form-help {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.form-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.form-divider::before,
.form-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.form-divider span {
    padding: 0 12px;
}

/* ============================================================
   CARDS
   ============================================================ */

.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.card-title {
    font-size: 1.05rem;
    font-weight: 600;
}

.card-body {
    color: var(--text);
}

.card-footer {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

/* ============================================================
   AUTH SCREENS
   ============================================================ */

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    padding: 16px;
}

.auth-card {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    padding: 36px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-lg);
}

.auth-logo {
    text-align: center;
    margin-bottom: 28px;
}

.auth-logo h1 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 4px;
}

.auth-logo p {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--accent);
    font-weight: 500;
}

/* ============================================================
   SCREENING
   ============================================================ */

.screening-container {
    max-width: 700px;
    margin: 0 auto;
}

.screening-progress {
    margin-bottom: 24px;
}

.progress-bar {
    height: 8px;
    background: var(--border-light);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--success));
    border-radius: var(--radius-full);
    transition: width 0.4s ease;
}

.progress-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 6px;
    text-align: right;
}

.screening-question {
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease;
}

.question-text {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 12px;
    color: var(--text);
}

.question-help {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    padding: 8px 12px;
    background: var(--border-light);
    border-radius: var(--radius-sm);
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.option-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.option-item:hover {
    border-color: var(--accent);
    background: rgba(59,130,246,0.03);
}

.option-item.selected {
    border-color: var(--accent);
    background: rgba(59,130,246,0.08);
    color: var(--accent-dark);
    font-weight: 500;
}

.option-item input[type="radio"],
.option-item input[type="checkbox"] {
    margin-right: 12px;
    accent-color: var(--accent);
}

.screening-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

/* ============================================================
   DASHBOARD
   ============================================================ */

.dashboard-header {
    margin-bottom: 24px;
}

.dashboard-header h1 {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.dashboard-header .subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 14px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.stat-icon.blue { background: rgba(59,130,246,0.1); }
.stat-icon.green { background: rgba(16,185,129,0.1); }
.stat-icon.purple { background: rgba(139,92,246,0.1); }
.stat-icon.orange { background: rgba(245,158,11,0.1); }

.stat-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ============================================================
   PROGRESS RING
   ============================================================ */

.progress-ring {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 16px;
}

.progress-ring svg {
    transform: rotate(-90deg);
}

.progress-ring-bg {
    fill: none;
    stroke: var(--border-light);
    stroke-width: 8;
}

.progress-ring-fill {
    fill: none;
    stroke: var(--accent);
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.6s ease;
}

.progress-ring-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
}

/* ============================================================
   TASKS
   ============================================================ */

.task-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.task-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
    cursor: pointer;
}

.task-item:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-sm);
}

.task-item.completed {
    background: var(--success-light);
    border-color: var(--success);
}

.task-checkbox {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
    transition: var(--transition);
}

.task-item.completed .task-checkbox {
    background: var(--success);
    border-color: var(--success);
    color: var(--text-white);
}

.task-title {
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.task-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.task-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-weight: 500;
    margin-top: 4px;
    display: inline-block;
}

.task-badge.reflexion { background: rgba(59,130,246,0.1); color: var(--accent); }
.task-badge.investigacion { background: rgba(139,92,246,0.1); color: var(--silver); }
.task-badge.accion { background: rgba(245,158,11,0.1); color: var(--warning); }
.task-badge.entregable { background: rgba(16,185,129,0.1); color: var(--success); }
.task-badge.validacion { background: rgba(236,72,153,0.1); color: var(--women); }

/* ============================================================
   CHAT IA
   ============================================================ */

.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 120px);
    max-height: 700px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-bubble {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    font-size: 0.9rem;
    line-height: 1.5;
    animation: fadeIn 0.3s ease;
}

.chat-bubble.user {
    background: var(--accent);
    color: var(--text-white);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-bubble.assistant {
    background: var(--border-light);
    color: var(--text);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.chat-input-area {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    background: var(--bg-white);
}

.chat-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    outline: none;
}

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

.chat-send {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--text-white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: var(--transition);
}

.chat-send:hover {
    background: var(--accent-dark);
}

.chat-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chat-quick-actions {
    display: flex;
    gap: 8px;
    padding: 8px 16px;
    overflow-x: auto;
    border-top: 1px solid var(--border-light);
}

.quick-action-btn {
    white-space: nowrap;
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    background: var(--bg-white);
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
}

.quick-action-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.chat-typing {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    align-self: flex-start;
}

.chat-typing span {
    width: 8px;
    height: 8px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
    30% { opacity: 1; transform: translateY(-4px); }
}

/* ============================================================
   MEMBERSHIP / PAYMENT
   ============================================================ */

.plan-card {
    border: 2px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 28px;
    text-align: center;
    transition: var(--transition);
    max-width: 400px;
    margin: 0 auto;
}

.plan-card.featured {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}

.plan-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.plan-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 4px;
}

.plan-price span {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-secondary);
}

.plan-period {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.plan-features {
    text-align: left;
    margin-bottom: 24px;
}

.plan-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 0.9rem;
    color: var(--text);
}

.plan-feature::before {
    content: '✓';
    color: var(--success);
    font-weight: 700;
}

#paypal-button-container {
    margin-top: 16px;
}

/* ============================================================
   TAGS
   ============================================================ */

.tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
    gap: 4px;
}

.tag-general { background: rgba(59,130,246,0.1); color: var(--accent); }
.tag-mujer { background: var(--women-light); color: var(--women); }
.tag-silver { background: var(--silver-light); color: var(--silver); }

/* ============================================================
   ALERTS / TOASTS
   ============================================================ */

.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.alert-success { background: var(--success-light); color: #065F46; border: 1px solid #A7F3D0; }
.alert-danger { background: var(--danger-light); color: #991B1B; border: 1px solid #FECACA; }
.alert-warning { background: var(--warning-light); color: #92400E; border: 1px solid #FDE68A; }
.alert-info { background: #E0F2FE; color: #075985; border: 1px solid #BAE6FD; }

.toast-container {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 12px 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    font-size: 0.9rem;
    animation: slideIn 0.3s ease;
    max-width: 380px;
}

.toast.success { background: var(--success); color: var(--text-white); }
.toast.error { background: var(--danger); color: var(--text-white); }
.toast.warning { background: var(--warning); color: var(--text-white); }
.toast.info { background: var(--accent); color: var(--text-white); }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   TIMELINE / PHASES
   ============================================================ */

.phase-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    padding-left: 28px;
}

.phase-item {
    position: relative;
    padding: 16px 0 16px 20px;
    border-left: 2px solid var(--border);
}

.phase-item:last-child {
    border-left-color: transparent;
}

.phase-item.active {
    border-left-color: var(--accent);
}

.phase-item.completed {
    border-left-color: var(--success);
}

.phase-dot {
    position: absolute;
    left: -9px;
    top: 18px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--border);
    border: 2px solid var(--bg-white);
}

.phase-item.active .phase-dot {
    background: var(--accent);
    box-shadow: 0 0 0 4px rgba(59,130,246,0.2);
}

.phase-item.completed .phase-dot {
    background: var(--success);
}

.phase-name {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.phase-weeks {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.phase-progress-mini {
    margin-top: 6px;
    height: 4px;
    background: var(--border-light);
    border-radius: var(--radius-full);
    overflow: hidden;
    max-width: 200px;
}

.phase-progress-mini .fill {
    height: 100%;
    background: var(--accent);
    border-radius: var(--radius-full);
    transition: width 0.4s ease;
}

/* ============================================================
   MODAL
   ============================================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
    animation: fadeIn 0.2s ease;
}

.modal {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    padding: 28px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
}

.modal-close:hover {
    color: var(--text);
}

/* ============================================================
   EMPTY STATES
   ============================================================ */

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.empty-state .icon {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.5;
}

.empty-state h3 {
    color: var(--text);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 0.9rem;
    max-width: 400px;
    margin: 0 auto 16px;
}

/* ============================================================
   UTILITIES
   ============================================================ */

.hidden { display: none !important; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.p-16 { padding: 16px; }
.p-24 { padding: 24px; }
.w-full { width: 100%; }

/* Scrollbar personalizado */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ============================================================
   RESPONSIVE FINAL
   ============================================================ */

@media (max-width: 480px) {
    .auth-card {
        padding: 24px 20px;
    }

    h1 { font-size: 1.4rem; }
    h2 { font-size: 1.2rem; }

    .plan-price {
        font-size: 2rem;
    }

    .chat-bubble {
        max-width: 90%;
    }

    .dashboard-grid {
        gap: 12px;
    }
}
