/* ==========================================================================
   tappttoo - SYSTEM DESIGN (VANILLA CSS)
   Theme: Tinta · Papel · Gota de sangre
   Brand: blood-drop identity — ink near-black, paper text, blood red.
   ========================================================================== */

/* 1. VARIABLES & SYSTEM TOKENS */
:root {
    --bg-primary: #0e0c0b;   /* Ink */
    --bg-secondary: #181412; /* Ink 2 */
    --bg-tertiary: #231c19;  /* Ink 3 (cards/surfaces) */
    --bg-card: rgba(35, 28, 25, 0.85);
    --border-color: rgba(236, 226, 205, 0.08);
    --border-glow: rgba(163, 42, 42, 0.22);

    /* Craft Colors — matte, desaturated (see DESIGN.md). No neon. */
    --accent: #7a9d76;       /* Muted Sage (Income, Positive) */
    --accent-rgb: 122, 157, 118;
    --crimson: #a32a2a;         /* Muted Blood (Brand Identity) */
    --crimson-rgb: 163, 42, 42;
    --crimson-deep: #7a1f1f;    /* Deep blood (depth) */
    --violet: #7d6844;       /* Aged Brass (Secondary) */
    --info: #5b8aa6;         /* Dusty Blue (Bizum, Info) */
    --warning: #b8893f;      /* Muted Amber (Pending signals) */
    --danger: #bf6f5e;       /* Clay (Expenses, Errors) */
    --danger-rgb: 191, 111, 94;

    /* Typography & Text */
    --text-primary: #ece2cd;   /* Paper */
    --text-secondary: #a89a8b;
    --text-muted: #7c7064;

    /* UI Sizing & Transitions */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --glow-shadow: 0 0 20px rgba(0, 0, 0, 0.6);
}

/* 2. BASE RESET & SCROLLBAR */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Urbanist', sans-serif;
    overflow: hidden;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for mobile browsers */
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Urbanist', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Custom Scrollbar for premium feel */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--crimson);
}

/* 3. APPLICATION CONTAINER */
#app-container {
    width: 100%;
    height: 100%;
    max-width: 100%;
    background-color: var(--bg-primary);
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Responsive constraints to look like Instagram */
@media (min-width: 769px) {
    #app-container {
        max-width: 480px; /* Force mobile shell on desktop to mimic premium mobile app */
        height: 92vh;
        border-radius: var(--radius-lg);
        border: 1px solid var(--border-color);
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7),
                    0 0 30px rgba(163, 42, 42, 0.08);
        overflow: hidden;
    }
    body {
        background: radial-gradient(circle at 10% 20%, rgb(4, 4, 8) 0%, rgb(18, 18, 25) 90.1%);
    }
}

/* 4. HEADER (INSTAGRAM STYLE) */
.app-header {
    height: 64px;
    background: rgba(11, 11, 16, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 100;
    flex-shrink: 0;
}

.header-logo {
    font-family: 'Urbanist', sans-serif;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.05em;
    color: var(--text-primary);
}

.logo-accent {
    color: var(--crimson);
}

.header-actions {
    display: flex;
    gap: 16px;
}

.header-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.header-btn:hover {
    background: var(--bg-tertiary);
    color: var(--crimson);
}

.badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-secondary);
}

/* 5. VIEWPORT & SPA VIEWS */
.app-viewport {
    flex-grow: 1;
    overflow-y: auto;
    padding-bottom: 80px; /* Space for Navbar */
    position: relative;
}

.app-view {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    padding: 16px;
}

.app-view.active {
    display: block;
}

.section-header {
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 24px;
    color: var(--text-primary);
}

.section-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* 6. CARD COMPONENT */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    margin-bottom: 16px;
    transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.glass-card:hover {
    border-color: rgba(163, 42, 42, 0.2);
}

/* 7. VIEW 1: FEED & STORIES (Clean Instagram UX) */
/* Stories */
.stories-container {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 4px 2px 10px 2px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--border-color);
    scroll-snap-type: x mandatory;
    flex-shrink: 0;
}

.stories-container::-webkit-scrollbar {
    display: none; /* Hide scrollbar on mobile */
}

.story-bubble {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    min-width: 60px;
    scroll-snap-align: start;
}

.story-avatar-ring {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    padding: 2px;
    background: linear-gradient(45deg, #feda75, #fa7e1e, #d62976, #962fbf, #4f5bd5);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-fast);
}

.story-bubble:hover .story-avatar-ring {
    transform: scale(1.05);
}

.story-bubble.active .story-avatar-ring {
    background: var(--crimson);
}

.story-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: 2px solid var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    overflow: hidden;
}

.story-username {
    font-size: 10px;
    color: var(--text-secondary);
    max-width: 60px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

.add-story .story-avatar {
    border: 2px dashed var(--text-muted);
    color: var(--text-muted);
}

/* Feed Posts (Clean Stream Layout) */
.feed-post {
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 24px;
    padding-bottom: 14px;
    overflow: hidden;
}

.post-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 4px;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.author-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 11px;
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.post-tag {
    font-size: 10px;
    color: var(--crimson);
    font-weight: 600;
}

.post-media-container {
    width: 100%;
    aspect-ratio: 16 / 13; /* Clean wide aspect ratio instead of massive square block */
    background: linear-gradient(135deg, #0e0e13 0%, #050508 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.post-media-graphic {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 18px;
    text-align: center;
    position: relative;
}

.graphic-glow {
    position: absolute;
    width: 50%;
    height: 50%;
    border-radius: 50%;
    filter: blur(40px);
    z-index: 1;
    opacity: 0.15;
}

.post-product-icon {
    font-size: 48px;
    color: var(--text-primary);
    margin-bottom: 8px;
    z-index: 2;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.15));
}

.post-product-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
    z-index: 2;
}

.post-product-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
    z-index: 2;
}

.post-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 4px 6px 4px;
}

.social-actions {
    display: flex;
    gap: 14px;
    font-size: 16px;
}

.social-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.social-btn:hover {
    color: var(--crimson);
    transform: scale(1.08);
}

.social-btn.liked {
    color: var(--danger);
}

.post-btn-buy {
    background: var(--crimson);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-family: 'Urbanist', sans-serif;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(163, 42, 42,0.2);
    transition: var(--transition-fast);
}

.post-btn-buy:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(163, 42, 42,0.3);
}

.post-caption {
    padding: 2px 4px;
    font-size: 12.5px;
    line-height: 1.4;
}

.caption-username {
    font-weight: 700;
    margin-right: 4px;
}

.caption-text {
    color: var(--text-secondary);
}

.caption-tags {
    color: var(--crimson);
    margin-top: 2px;
    font-size: 11px;
}

/* 8. BUTTONS & UI GENERAL ELEMENTS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Urbanist', sans-serif;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-primary {
    background: var(--crimson);
    color: white;
    box-shadow: 0 4px 14px rgba(163, 42, 42,0.3);
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(163, 42, 42,0.45);
}

.btn-accent {
    background: var(--crimson);
    color: white;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(163, 42, 42, 0.3);
}

.btn-accent:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(163, 42, 42, 0.45);
    opacity: 0.9;
}

.btn-success {
    background: #25d366; /* WhatsApp Green */
    color: white;
}

.btn-success:hover {
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.4);
}

.btn-outline-danger {
    background: none;
    border: 1px solid rgba(191, 111, 94,0.4);
    color: var(--danger);
}

.btn-outline-danger:hover {
    background: rgba(191, 111, 94,0.1);
    border-color: var(--danger);
}

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

.btn-outline-accent:hover {
    background: rgba(163, 42, 42,0.1);
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
}

.badge-accent {
    background: rgba(163, 42, 42,0.15);
    color: var(--crimson);
    border: 1px solid rgba(163, 42, 42,0.3);
}

/* 9. FORM CONTROL */
.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-size: 12.5px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-weight: 600;
}

.form-group input, 
.form-group select, 
.form-group textarea {
    width: 100%;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 13.5px;
    outline: none;
    transition: var(--transition-fast);
}

.form-group input:focus-visible,
.form-group select:focus-visible,
.form-group input:focus,
.form-group select:focus {
    border-color: var(--crimson);
    box-shadow: 0 0 0 2px rgba(163, 42, 42,0.35);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.radio-toggle-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.radio-label {
    position: relative;
    cursor: pointer;
}

.radio-label input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.radio-label input:checked + .radio-btn.bg-success-active {
    background: rgba(122, 157, 118,0.15);
    border-color: var(--accent);
    color: var(--accent);
}

.radio-label input:checked + .radio-btn.bg-danger-active {
    background: rgba(191, 111, 94,0.15);
    border-color: var(--danger);
    color: var(--danger);
}

/* 10. VIEW 2: CALENDAR & CONVENTIONS */
.calendar-widget {
    background: var(--bg-card);
}

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

.calendar-header h3 {
    font-size: 16px;
}

.calendar-header button {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
}

.calendar-header button:hover {
    background: var(--bg-tertiary);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 8px;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    gap: 4px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--text-primary);
    cursor: pointer;
    border-radius: 50%;
    position: relative;
    transition: var(--transition-fast);
}

.calendar-day:hover {
    background: var(--bg-tertiary);
}

.calendar-day.empty {
    cursor: default;
    background: none !important;
}

.calendar-day.active {
    background: var(--bg-tertiary);
}

.calendar-day .day-event-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    position: absolute;
    bottom: 3px;
}

.dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 4px;
}

.bg-accent { background-color: var(--accent); }
.bg-warning { background-color: var(--warning); }
.bg-success { background-color: #25d366; }
.bg-crimson { background-color: var(--crimson); }

/* Text color utilities */
.text-accent   { color: var(--accent); }
.text-success  { color: var(--accent); }
.text-danger   { color: var(--danger); }
.text-warning  { color: var(--warning); }
.text-info     { color: var(--info); }
.text-crimson  { color: var(--crimson); }
.text-muted    { color: var(--text-muted); }

.bg-success-glow {
    background: rgba(122, 157, 118, 0.1);
    box-shadow: 0 0 15px rgba(122, 157, 118, 0.15);
}

.bg-danger-glow {
    background: rgba(191, 111, 94, 0.1);
    box-shadow: 0 0 15px rgba(191, 111, 94, 0.15);
}

.bg-accent-glow {
    background: rgba(122, 157, 118, 0.1);
    box-shadow: 0 0 15px rgba(122, 157, 118, 0.15);
}

.calendar-legend {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 16px;
    font-size: 11px;
    color: var(--text-secondary);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.legend-icon {
    font-size: 10px;
    opacity: 0.7;
}

/* Convention list items */
.subsection-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.convention-card {
    display: flex;
    flex-direction: column;
    background: rgba(22, 18, 15, 0.8);
    border: 1px solid rgba(163, 42, 42, 0.18);
    border-radius: var(--radius-sm);
    padding: 14px;
    margin-bottom: 10px;
}

.convention-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.convention-title {
    font-size: 14px;
    font-weight: 700;
}

.convention-date {
    font-size: 11px;
    color: var(--crimson);
    font-weight: 600;
    margin-top: 2px;
}

.convention-meta {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 6px;
    display: flex;
    gap: 10px;
}

.convention-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed var(--border-color);
}

.convention-price {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
}

/* 11. VIEW 3: VIRTUAL CART & OPTIMIZER */
.optimizer-alert {
    display: flex;
    gap: 14px;
    align-items: center;
    background: linear-gradient(135deg, rgba(125, 104, 68,0.12) 0%, rgba(163, 42, 42,0.08) 100%);
    border: 1px solid rgba(163, 42, 42,0.3);
    box-shadow: 0 0 15px rgba(163, 42, 42,0.1);
}

.optimizer-icon {
    font-size: 26px;
    color: var(--crimson);
}

.optimizer-text h4 {
    font-size: 14px;
    color: var(--text-primary);
}

.optimizer-text p {
    font-size: 11.5px;
    color: var(--text-secondary);
    margin-top: 2px;
    line-height: 1.4;
}

.cart-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.cart-supplier-group {
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.supplier-group-header {
    background: var(--bg-tertiary);
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
    color: var(--crimson);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.supplier-shipping-tip {
    font-size: 10px;
    font-weight: 500;
    color: var(--accent);
}

.supplier-shipping-tip.alert {
    color: var(--warning);
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
    font-size: 12.5px;
}

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

.cart-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cart-item-name {
    font-weight: 600;
    color: var(--text-primary);
}

.cart-item-meta {
    font-size: 10px;
    color: var(--text-secondary);
}

.cart-item-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-item-qty {
    background: var(--bg-tertiary);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 11px;
}

.cart-item-price {
    font-weight: 700;
    color: var(--accent);
    min-width: 50px;
    text-align: right;
}

.cart-item-delete {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-fast);
}

.cart-item-delete:hover {
    color: var(--danger);
}

.cart-total-box {
    margin-top: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    padding: 14px;
    border: 1px solid var(--border-color);
}

.total-row {
    display: flex;
    justify-content: space-between;
    font-size: 12.5px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.total-row:last-child {
    margin-bottom: 0;
}

.total-row.grand-total {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-primary);
    border-top: 1px solid var(--border-color);
    padding-top: 8px;
    margin-top: 4px;
}

/* 12. VIEW 4: FINANCE & TRANSACTIONS */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
    margin-bottom: 16px;
}

.metric-card {
    padding: 14px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 6px;
}

.metric-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.metric-info {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.metric-label {
    font-size: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.metric-value {
    font-size: 20px;
    font-weight: 800;
    margin-top: 2px;
    line-height: 1.1;
}

.chart-card {
    min-height: 250px;
}

.chart-container {
    position: relative;
    width: 100%;
    max-width: 180px;
    margin: 0 auto;
    aspect-ratio: 1;
}

.payment-methods-breakdown h4 {
    font-size: 12.5px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.progress-bar-container {
    margin-bottom: 8px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    margin-bottom: 3px;
}

.progress-bg {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 10px;
}

/* Tax assistant styling */
.tax-description {
    font-size: 11.5px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 14px;
}

.tax-results-box {
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    padding: 14px;
    border: 1px solid var(--border-color);
    margin-bottom: 16px;
}

.tax-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.tax-row strong {
    color: var(--text-primary);
}

.tax-row.highlight {
    font-weight: 700;
    color: var(--crimson);
    border-top: 1px solid var(--border-color);
    padding-top: 8px;
}

.tax-row.highlight strong {
    color: var(--crimson);
}

.tax-row.highlight-accent {
    font-size: 13.5px;
    font-weight: 800;
    color: var(--accent);
    background: rgba(122, 157, 118,0.05);
    padding: 6px 8px;
    border-radius: 4px;
    border: 1px solid rgba(122, 157, 118,0.15);
    margin-top: 8px;
    margin-bottom: 0;
}

.tax-row.highlight-accent strong {
    color: var(--accent);
}

.tax-separator {
    border: 0;
    border-top: 1px dashed var(--border-color);
    margin: 8px 0;
}

/* Ledger table */
.ledger-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.ledger-table, .bookings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    text-align: left;
}

.ledger-table th, .bookings-table th {
    padding: 10px 12px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-weight: 700;
    border-bottom: 2px solid var(--border-color);
}

.ledger-table td, .bookings-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.ledger-table tr:hover, .bookings-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.tx-type-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}

.badge-income {
    background: rgba(122, 157, 118,0.15);
    color: var(--accent);
}

.badge-expense {
    background: rgba(191, 111, 94,0.15);
    color: var(--danger);
}

/* 13. VIEW 5: BOOKINGS & DEPOSITS */
.bookings-summary-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.booking-sum-card {
    text-align: center;
    padding: 12px 6px;
}

.sum-label {
    font-size: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.sum-value {
    font-size: 14px;
    font-weight: 800;
    margin-top: 4px;
}

.bookings-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.signal-status-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}

.badge-paid {
    background: rgba(122, 157, 118,0.15);
    color: var(--accent);
}

.badge-pending {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.badge-cancelled {
    background: rgba(191, 111, 94,0.15);
    color: var(--danger);
}

.action-icon-btn {
    background: none;
    border: none;
    color: var(--crimson);
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
    border-radius: 4px;
    transition: var(--transition-fast);
}

.action-icon-btn:hover {
    background: var(--bg-tertiary);
    transform: scale(1.1);
}

/* 14. VIEW 6: CHAT B2B (DMs with Brands) */
.chat-layout {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 170px);
}

.chat-sidebar {
    height: 160px;
    overflow-y: auto;
    flex-shrink: 0;
    padding: 12px;
}

.chat-sidebar-header {
    margin-bottom: 10px;
}

.chat-meta {
    font-size: 10px;
    color: var(--crimson);
    font-weight: 700;
    text-transform: uppercase;
}

.chat-list {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.chat-list::-webkit-scrollbar {
    display: none;
}

.chat-thread-bubble {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    min-width: 64px;
    position: relative;
}

.chat-thread-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    border: 1px solid var(--border-color);
}

.chat-thread-bubble.active .chat-thread-avatar {
    border: 2px solid var(--crimson);
    box-shadow: 0 0 10px rgba(163, 42, 42,0.3);
}

.chat-thread-name {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-secondary);
    max-width: 60px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-thread-badge {
    position: absolute;
    top: 0;
    right: 6px;
    background: var(--danger);
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.chat-box {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 250px;
    margin-top: 10px;
    padding: 0 !important; /* Reset padding for layout */
}

.chat-box-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(18, 18, 23, 0.4);
}

.chat-active-user-placeholder {
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    width: 100%;
}

.chat-active-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-active-name {
    font-size: 14px;
    font-weight: 700;
}

.chat-active-status {
    font-size: 10px;
    color: var(--accent);
}

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

.chat-welcome-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    height: 100%;
}

.chat-large-icon {
    font-size: 40px;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.chat-welcome-placeholder h3 {
    font-size: 15px;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.chat-welcome-placeholder p {
    font-size: 11.5px;
    line-height: 1.4;
}

.message-bubble {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 12.5px;
    line-height: 1.4;
}

.message-bubble.incoming {
    align-self: flex-start;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
    border: 1px solid var(--border-color);
}

.message-bubble.outgoing {
    align-self: flex-end;
    background: var(--crimson);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-input-area {
    display: flex;
    padding: 12px;
    border-top: 1px solid var(--border-color);
    background: rgba(18, 18, 23, 0.4);
    gap: 8px;
    align-items: center;
}

.chat-input-area input {
    flex-grow: 1;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    padding: 8px 14px;
    border-radius: 20px;
    color: white;
    font-family: inherit;
    font-size: 13px;
    outline: none;
}

.chat-send-btn {
    background: none;
    border: none;
    color: var(--crimson);
    font-size: 16px;
    cursor: pointer;
    padding: 4px 8px;
    transition: var(--transition-fast);
}

.chat-send-btn:hover {
    transform: scale(1.1);
}

/* 15. PERSISTENT NAVBAR (Instagram Style) */
.app-navbar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 64px;
    height: calc(64px + env(safe-area-inset-bottom));
    padding-bottom: calc(6px + env(safe-area-inset-bottom)); /* Add extra clearance for Android virtual navigation keys */
    background: rgba(11, 11, 16, 0.9);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 100;
}

.nav-item {
    background: none;
    border: none;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    font-family: inherit;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    width: 54px;
    position: relative;
    transition: var(--transition-fast);
}

.nav-item i {
    font-size: 18px;
}

.nav-item:hover, .nav-item.active {
    color: var(--crimson);
}

.nav-badge {
    position: absolute;
    top: -5px;
    right: 10px;
    background: var(--crimson);
    color: white;
    font-size: 10px;
    font-weight: 700;
    min-width: 14px;
    height: 14px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    border: 1px solid var(--bg-secondary);
}

/* 16. MODALS OVERLAYS */
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 8, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    opacity: 1;
    transition: opacity 0.25s ease;
}

.modal-overlay.hidden {
    display: none;
    opacity: 0;
}

.modal-content {
    width: 90%;
    max-width: 380px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    position: relative;
    transform: scale(1);
    transition: transform 0.25s ease;
}

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

.modal-header h3 {
    font-size: 18px;
}

.close-modal {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

/* Receipt Modal Unique Styling */
.receipt-modal-content {
    padding: 16px !important;
}

.receipt-visual-card {
    background: linear-gradient(135deg, #161622 0%, #0d0d12 100%);
    border: 1.5px solid rgba(163, 42, 42,0.4);
    border-radius: var(--radius-md);
    padding: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.receipt-card-glow {
    position: absolute;
    top: -50px;
    right: -50px;
    width: 120px;
    height: 120px;
    background: var(--crimson);
    filter: blur(50px);
    opacity: 0.15;
    pointer-events: none;
}

.receipt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 14px;
    margin-bottom: 16px;
}

.receipt-logo {
    font-family: 'Urbanist', sans-serif;
    font-weight: 800;
    font-size: 18px;
}

.receipt-status-tag {
    background: rgba(122, 157, 118,0.15);
    color: var(--accent);
    border: 1px solid var(--accent);
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 10px;
    letter-spacing: 0.05em;
}

.receipt-title {
    font-size: 14px;
    text-align: center;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.receipt-amount-section {
    text-align: center;
    margin-bottom: 20px;
}

.receipt-amount-label {
    font-size: 11px;
    color: var(--text-secondary);
}

.receipt-amount-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--accent);
    margin: 4px 0;
}

.receipt-total-due {
    font-size: 11px;
    color: var(--text-muted);
}

.receipt-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    padding: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 16px;
}

.receipt-detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 11.5px;
    color: var(--text-secondary);
}

.receipt-detail-row strong {
    color: var(--text-primary);
}

.receipt-footer {
    text-align: center;
    border-top: 1.5px dashed var(--border-color);
    padding-top: 14px;
}

.receipt-footer p {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary);
}

.receipt-footer small {
    display: block;
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 4px;
}

.receipt-share-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

/* Brand Story Popup */
.story-modal-content {
    width: 100%;
    height: 100%;
    max-width: 480px;
    background: #000;
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 16px;
    justify-content: space-between;
}

.story-progress-bar {
    width: 100%;
    height: 2.5px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    margin-bottom: 12px;
    overflow: hidden;
}

.story-progress-fill {
    height: 100%;
    width: 0%;
    background: var(--crimson);
    transition: width linear;
}

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

.story-modal-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.story-modal-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.story-modal-username {
    font-size: 13.5px;
    font-weight: 700;
}

.story-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 26px;
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.story-modal-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 24px;
}

.story-promo-img {
    font-size: 72px;
    color: var(--crimson);
    margin-bottom: 20px;
}

.story-promo-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 10px;
}

.story-promo-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.story-modal-footer {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    padding-bottom: 24px;
}

/* Notification Popdown Panel */
.notification-panel {
    position: absolute;
    top: 64px;
    right: 20px;
    width: calc(100% - 40px);
    max-width: 320px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 150;
    padding: 14px;
    transition: var(--transition-fast);
}

.notification-panel.hidden {
    display: none;
}

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

.panel-header h3 {
    font-size: 14px;
}

.close-panel-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notif-item {
    display: flex;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    font-size: 11.5px;
    align-items: flex-start;
}

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

.notif-icon {
    font-size: 14px;
    margin-top: 2px;
}

.notif-text {
    color: var(--text-secondary);
}

.notif-text strong {
    color: var(--text-primary);
}

.notif-time {
    display: block;
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* HELPER STYLES */
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
.pulse {
    animation: pulse-animation 2s infinite;
}

@keyframes pulse-animation {
    0% { transform: scale(1); }
    50% { transform: scale(1.08); filter: drop-shadow(0 0 8px rgba(163, 42, 42,0.5)); }
    100% { transform: scale(1); }
}

/* 17. RESPONSIFY desktop layouts */
.grid-two-cols {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.grid-cart {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* When displayed on wider viewports inside container, or if we want wider displays */
@media (min-width: 992px) {
    /* If the app-container was allowed to grow, we'd style a dashboard here, but we are keeping it as a mobile SPA emulator for extremely hyper-focused premium styling. */
}

/* ==========================================================================
   18. PREMIUM PRO FEATURES - GUEST SPOT DESIGN SYSTEM
   ========================================================================== */

:root {
    --gold: #e5c158;
    --gold-glow: rgba(229, 193, 88, 0.15);
}

.text-gold {
    color: var(--gold) !important;
}

.pro-header h2 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pro-text {
    color: var(--gold);
    font-weight: 800;
}

.pro-card {
    border-color: rgba(229, 193, 88, 0.2) !important;
}

.pro-card:hover {
    border-color: rgba(229, 193, 88, 0.45) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4), 0 0 15px rgba(229, 193, 88, 0.05);
}

.pro-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.badge-gold {
    background: rgba(229, 193, 88, 0.15);
    color: var(--gold);
    border: 1px solid rgba(229, 193, 88, 0.3);
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold) 0%, #b45309 100%) !important;
    color: #000 !important;
    font-weight: 800 !important;
    box-shadow: 0 4px 14px rgba(229, 193, 88, 0.3) !important;
}

.btn-gold:hover {
    box-shadow: 0 6px 20px rgba(229, 193, 88, 0.5) !important;
}

/* Nav Bar PRO Button */
.nav-item.pro-item {
    color: var(--text-muted);
    position: relative;
}

.nav-item.pro-item.active, .nav-item.pro-item:hover {
    color: var(--gold) !important;
}

.nav-item.pro-item i {
    font-size: 18px;
}

.pro-badge {
    position: absolute;
    top: -5px;
    right: 2px;
    background: var(--gold);
    color: black;
    font-size: 7px;
    font-weight: 800;
    padding: 0px 3px;
    border-radius: 4px;
    border: 1px solid var(--bg-primary);
}

/* Calculadora Rentabilidad */
.trip-results-box {
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    padding: 16px;
    border: 1px solid var(--border-color);
}

.trip-results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.trip-res-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8px 4px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}

.trip-res-card span {
    font-size: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.trip-res-card strong {
    font-size: 12px;
    margin-top: 4px;
}

.bg-gold-fill {
    background: linear-gradient(90deg, var(--gold) 0%, #f59e0b 100%);
    box-shadow: 0 0 8px rgba(229, 193, 88, 0.5);
}

.trip-advice {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.4;
    text-align: center;
    border-top: 1px dashed var(--border-color);
    padding-top: 8px;
}

/* Skyscanner / Booking Mockup Results */
.tag-cheapest {
    font-size: 10px;
    background: rgba(37, 211, 102, 0.12);
    color: var(--accent);
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 700;
    border: 1px solid rgba(122, 157, 118,0.2);
}

.logistics-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform var(--transition-fast);
}

.logistics-card:hover {
    transform: translateX(3px);
    border-color: rgba(255, 255, 255, 0.15);
}

.logistics-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logistics-logo-box {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
}

.bg-airline { background: linear-gradient(135deg, var(--info), var(--info)); }
.bg-hotel { background: var(--warning); }

.logistics-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
}

.logistics-text h5 {
    font-size: 13px;
    color: var(--text-primary);
}

.logistics-text p {
    font-size: 11px;
    color: var(--text-secondary);
}

.logistics-price-box {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-end;
}

.logistics-price {
    font-size: 15px;
    font-weight: 800;
    color: var(--accent);
}

.btn-select-deal {
    background: none;
    border: 1px solid var(--gold);
    color: var(--gold);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-select-deal:hover {
    background: var(--gold);
    color: black;
}

/* Local Regulations */
.regulation-info-box {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 14px;
    font-size: 12px;
    line-height: 1.5;
    text-align: left;
}

.regulation-alert-card {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    color: var(--text-secondary);
}

.regulation-alert-card i {
    font-size: 16px;
    color: var(--gold);
    margin-top: 2px;
}

.regulation-alert-card strong {
    color: var(--text-primary);
}

/* Live conversions preview */
.currency-conversion-helper {
    background: rgba(229, 193, 88, 0.05);
    border: 1px solid rgba(229, 193, 88, 0.15);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    font-size: 11.5px;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 12px;
}

.currency-conversion-helper strong {
    color: var(--gold);
}

/* ==========================================================================
   19. FORM AUTOCOMPLETE & SHORTCUTS HELPERS
   ========================================================================== */

.input-shortcuts-row {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    margin-top: 5px;
    padding: 2px 0;
}

.input-shortcuts-row::-webkit-scrollbar {
    display: none; /* Hide horizontal scroll on mobile */
}

.btn-shortcut {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition-fast);
}

.btn-shortcut:hover {
    background: rgba(163, 42, 42,0.15);
    border-color: var(--crimson);
    color: white;
}

/* Specific golden shortcut style inside Pro cards */
.pro-card .btn-shortcut:hover,
#guest-booking-modal .btn-shortcut:hover {
    background: rgba(229, 193, 88, 0.15);
    border-color: var(--gold);
    color: var(--gold);
}

/* ==========================================================================
   20. tappttoo AI COPILOT PREMIUM CHAT STYLING
   ========================================================================== */

/* AI Thread Bubble in Sidebar */
.chat-thread-bubble.ai-thread {
    border: 1px solid rgba(125, 104, 68,0.3);
    background: linear-gradient(135deg, rgba(125, 104, 68,0.05) 0%, rgba(163, 42, 42,0.05) 100%);
    position: relative;
    overflow: hidden;
}

.chat-thread-bubble.ai-thread::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(125, 104, 68, 0.12) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

@keyframes rotate-bg {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.chat-thread-bubble.ai-thread.active {
    border-color: var(--crimson);
    box-shadow: 0 0 15px rgba(163, 42, 42,0.25);
}

.chat-thread-bubble.ai-thread .chat-thread-avatar {
    background: var(--crimson);
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    z-index: 1;
}

.chat-thread-bubble.ai-thread .chat-thread-name {
    z-index: 1;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 0 8px rgba(255,255,255,0.1);
}

/* AI Helper Area above input */
.ai-helper-area {
    background: rgba(11, 11, 16, 0.9);
    border-top: 1px solid var(--border-color);
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 5;
    backdrop-filter: blur(10px);
}

.ai-quick-actions {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.ai-quick-actions::-webkit-scrollbar {
    display: none;
}

.btn-ai-pill {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition-fast);
}

.btn-ai-pill:hover {
    background: rgba(125, 104, 68,0.15);
    border-color: var(--violet);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(125, 104, 68,0.15);
}

/* AI Typing Indicator */
.ai-typing-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 4px 2px;
    color: var(--text-secondary);
    font-size: 11px;
}

.ai-typing-indicator i {
    font-size: 14px;
    color: var(--crimson);
    text-shadow: 0 0 8px rgba(163, 42, 42,0.4);
}

.ai-typing-indicator span {
    font-weight: 500;
    letter-spacing: 0.01em;
    animation: text-pulse 2s infinite ease-in-out;
}

@keyframes text-pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* AI Model Selector in Header */
.ai-model-container {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 10.5px;
    color: var(--text-secondary);
    margin-left: auto; /* Push to the right in flex header */
}

.ai-model-container i {
    color: var(--violet);
}

.ai-model-container select {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    outline: none;
    padding-right: 4px;
}

.ai-model-container select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* Copy button inside chat balloons */
.message-bubble {
    position: relative;
    padding-bottom: 22px !important; /* Make room for the footer copy icon */
}

.btn-copy-msg {
    position: absolute;
    right: 8px;
    bottom: 6px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.25);
    cursor: pointer;
    font-size: 10px;
    transition: var(--transition-fast);
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-copy-msg:hover {
    color: var(--accent);
    background: rgba(255, 255, 255, 0.05);
}

.btn-copy-msg.copied {
    color: var(--accent) !important;
}

/* Special styling for AI balloon response */
.message-bubble.incoming.ai-bubble {
    background: linear-gradient(135deg, rgba(125, 104, 68,0.15) 0%, rgba(163, 42, 42,0.08) 100%);
    border: 1px solid rgba(125, 104, 68,0.2);
    border-top-left-radius: 4px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.message-bubble.incoming.ai-bubble::after {
    border-bottom-color: rgba(125, 104, 68,0.15) !important;
}

/* ==========================================================================
   22. SEGMENTED TABS FOR UNIFIED AGENDA & BOOKINGS VIEW
   ========================================================================== */

.segmented-control {
    display: flex;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    padding: 4px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    width: 100%;
    z-index: 10;
}

.segment-btn {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 10px 14px;
    border-radius: calc(var(--radius-sm) - 2px);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition-fast);
}

.segment-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.02);
}

.segment-btn.active {
    background: linear-gradient(135deg, rgba(163, 42, 42,0.15) 0%, rgba(125, 104, 68,0.15) 100%);
    border: 1px solid rgba(163, 42, 42,0.3);
    color: white;
    box-shadow: 0 4px 15px rgba(163, 42, 42,0.1);
}

/* Tab display togglers */
.sub-agenda-view {
    display: block;
    animation: fade-in-tab 0.25s ease-out forwards;
}

.sub-agenda-view.hidden-tab {
    display: none;
}

@keyframes fade-in-tab {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 24. INVENTORY & STOCK MODULE STYLES (ERP TATUADOR) */
.sub-materials-view {
    display: block;
    animation: fade-in-tab 0.25s ease-out forwards;
}

.sub-materials-view.hidden-tab {
    display: none;
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.stock-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.stock-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
}

.stock-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.stock-card-icon {
    font-size: 20px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
}

.stock-card.critical .stock-card-icon {
    background: rgba(191, 111, 94, 0.15);
    color: var(--danger);
    box-shadow: 0 0 10px rgba(191, 111, 94, 0.2);
}

.stock-card.ok .stock-card-icon {
    background: rgba(122, 157, 118, 0.15);
    color: var(--success);
}

.stock-badge {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
}

.stock-badge.critical {
    background: rgba(191, 111, 94, 0.2);
    border: 1px solid rgba(191, 111, 94, 0.4);
    color: #fca5a5;
}

.stock-badge.ok {
    background: rgba(122, 157, 118, 0.2);
    border: 1px solid rgba(122, 157, 118, 0.4);
    color: #86efac;
}

.stock-card-body {
    margin-bottom: 12px;
}

.stock-card-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stock-card-supplier {
    font-size: 10px;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 10px;
}

.stock-level-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}

.stock-level-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s ease;
}

.stock-card.critical .stock-level-fill {
    background: var(--danger);
}

.stock-card.ok .stock-level-fill {
    background: var(--accent);
}

.stock-numbers {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-secondary);
}

.stock-numbers strong {
    color: var(--text-primary);
}

.stock-numbers .text-danger {
    color: var(--danger) !important;
}

.stock-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 10px;
    margin-top: 4px;
}

.stock-card-cost {
    font-size: 10px;
    color: var(--text-muted);
}

.stock-card-cost strong {
    font-size: 11px;
    color: var(--text-primary);
}

.btn-reponer {
    padding: 4px 10px;
    font-size: 10px;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--crimson);
    border: none;
    color: white;
    box-shadow: 0 0 10px rgba(191, 111, 94, 0.3);
}

.btn-reponer:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(191, 111, 94, 0.5);
}

.pulse-critical {
    animation: critical-pulse 2s infinite alternate;
}

@keyframes critical-pulse {
    0% {
        box-shadow: 0 0 4px rgba(191, 111, 94, 0.1), inset 0 0 0px rgba(191, 111, 94, 0.0);
        border-color: var(--border-color);
    }
    100% {
        box-shadow: 0 0 12px rgba(191, 111, 94, 0.3), inset 0 0 4px rgba(191, 111, 94, 0.1);
        border-color: rgba(191, 111, 94, 0.4);
    }
}

.bg-crimson-glow {
    background: rgba(163, 42, 42, 0.1);
    box-shadow: 0 0 15px rgba(163, 42, 42, 0.15);
}

/* ACCESSIBILITY: global focus-visible ring for keyboard navigation */
:focus-visible {
    outline: 2px solid var(--crimson);
    outline-offset: 2px;
}

/* Suppress focus ring for mouse/touch users (only show for keyboard) */
:focus:not(:focus-visible) {
    outline: none;
}

/* ACCESSIBILITY: respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* ==========================================================================
   25. TOAST NOTIFICATION SYSTEM
   ========================================================================== */

.toast-container {
    position: absolute;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 500;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
    width: calc(100% - 32px);
    max-width: 380px;
}

.toast {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-size: 13px;
    color: var(--text-primary);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    animation: toast-slide-in 0.25s cubic-bezier(0, 0, 0.2, 1);
    pointer-events: all;
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.4;
}

.toast.toast-success { border-color: rgba(122, 157, 118, 0.35); }
.toast.toast-success i { color: var(--accent); }
.toast.toast-warning { border-color: rgba(217, 119, 6, 0.35); }
.toast.toast-warning i { color: var(--warning); }
.toast.toast-info { border-color: rgba(163, 42, 42, 0.3); }
.toast.toast-info i { color: var(--crimson); }

@keyframes toast-slide-in {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes toast-fade-out {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-6px); }
}

/* ==========================================================================
   26. CONFIRM DIALOG STYLES
   ========================================================================== */

.confirm-content {
    text-align: center;
    padding: 28px 24px !important;
    max-width: 320px;
}

.confirm-content h3 {
    font-size: 17px;
    margin-bottom: 10px;
}

.confirm-message {
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 22px;
}

.confirm-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.btn-ghost {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-family: 'Urbanist', sans-serif;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-ghost:hover {
    color: var(--text-primary);
    border-color: rgba(255, 235, 205, 0.15);
}

.btn-danger-fill {
    background: var(--danger);
    color: white;
    box-shadow: 0 4px 14px rgba(191, 111, 94, 0.3);
    font-family: 'Urbanist', sans-serif;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-danger-fill:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* ==========================================================================
   27. HOY OPERATIONAL DASHBOARD
   ========================================================================== */

.hoy-greeting {
    display: flex;
    flex-direction: column;
    margin-bottom: 18px;
    padding: 2px 0;
}

.hoy-title {
    font-size: 22px;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    font-weight: 700;
}

.hoy-date {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.hoy-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}

.hoy-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px 8px;
    text-align: center;
}

.hoy-stat-value {
    font-size: 19px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 5px;
    font-family: 'Urbanist', sans-serif;
}

.hoy-stat-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.hoy-quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.hoy-next-cita {
    margin-bottom: 14px;
}

.hoy-section-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}


/* ─── AUTH SCREEN ─────────────────────────────────────────────────────────── */
.auth-screen {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 24px;
}
/* Brand panel: desktop only */
.auth-brand { display: none; }
.auth-card {
    width: 100%;
    max-width: 380px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px 28px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.brand-drop {
    display: block;
    width: 48px;
    height: auto;
    margin: 0 auto 2px;
    filter: drop-shadow(0 6px 14px rgba(var(--crimson-rgb), 0.28));
}
.auth-logo {
    font-family: 'Urbanist', sans-serif;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.03em;
    text-align: center;
    color: var(--text-primary);
}

/* Segmented login / signup */
.auth-seg {
    display: flex;
    gap: 4px;
    background: var(--bg-tertiary);
    border-radius: 11px;
    padding: 4px;
}
.auth-seg-btn {
    flex: 1;
    padding: 9px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-muted);
    font-family: 'Urbanist', sans-serif;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: background .2s, color .2s;
}
.auth-seg-btn.active { background: var(--crimson); color: #fff; }

.auth-error {
    background: rgba(var(--crimson-rgb), 0.12);
    border: 1px solid rgba(var(--crimson-rgb), 0.3);
    color: var(--crimson);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    line-height: 1.4;
}
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.auth-field input {
    width: 100%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 14px;
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s;
}
.auth-field input:focus { outline: none; border-color: var(--crimson); }

/* Password input + show/hide eye */
.auth-input-wrap { position: relative; }
.auth-input-wrap input { padding-right: 44px; }
.auth-eye {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    width: 34px; height: 34px; border: none; background: none;
    color: var(--text-muted); cursor: pointer; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
}
.auth-eye:hover { color: var(--text-primary); }

/* Caps lock warning */
.auth-caps { font-size: 12px; color: var(--warning); display: flex; align-items: center; gap: 6px; }
.auth-caps[hidden] { display: none; }

/* Password strength (signup) */
.auth-strength { display: flex; flex-direction: column; gap: 6px; margin-top: 2px; }
.auth-strength[hidden] { display: none; }
.auth-strength-bars { display: flex; gap: 4px; }
.auth-strength-bars span { height: 4px; flex: 1; border-radius: 2px; background: var(--bg-tertiary); transition: background .2s; }
.auth-strength.lvl-1 .auth-strength-bars span:nth-child(-n+1) { background: var(--danger); }
.auth-strength.lvl-2 .auth-strength-bars span:nth-child(-n+2) { background: var(--warning); }
.auth-strength.lvl-3 .auth-strength-bars span:nth-child(-n+3) { background: var(--accent); }
.auth-strength.lvl-4 .auth-strength-bars span:nth-child(-n+4) { background: var(--accent); }
.auth-strength-label { font-size: 12px; color: var(--text-muted); }

.auth-btn {
    width: 100%;
    padding: 13px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    background: var(--crimson);
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity 0.2s, transform 0.12s;
}
.auth-btn:not(:disabled):active { transform: scale(0.985); }
.auth-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.auth-link {
    background: none;
    border: none;
    color: var(--crimson);
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    font-weight: 600;
    padding: 0;
}
.auth-forgot { align-self: center; margin-top: 2px; }

/* Desktop: split screen (brand panel + form) */
@media (min-width: 1024px) {
    .auth-screen { display: grid; grid-template-columns: 1.05fr 0.95fr; grid-template-rows: 1fr; align-items: stretch; padding: 0; }
    .auth-brand {
        display: flex; flex-direction: column; justify-content: center; gap: 18px;
        padding: 64px; background: var(--bg-secondary);
        border-right: 1px solid var(--border-color);
        position: relative; overflow: hidden;
    }
    .auth-brand::before {
        content: ""; position: absolute; width: 520px; height: 520px; top: -140px; left: -140px;
        background: radial-gradient(circle, rgba(var(--crimson-rgb), 0.16), transparent 70%);
        pointer-events: none;
    }
    .auth-brand > * { position: relative; }
    .auth-brand-drop { width: 72px; height: auto; filter: drop-shadow(0 10px 26px rgba(var(--crimson-rgb), 0.35)); }
    .auth-brand-word { font-family: 'Urbanist', sans-serif; font-weight: 800; font-size: 34px; letter-spacing: -0.03em; color: var(--text-primary); }
    .auth-brand-line { font-size: 18px; color: var(--text-secondary); max-width: 22ch; line-height: 1.4; }
    .auth-brand-pillars { list-style: none; padding: 0; margin-top: 6px; display: flex; flex-direction: column; gap: 10px; }
    .auth-brand-pillars li { font-family: 'Space Mono', monospace; font-size: 13px; color: var(--text-muted); display: flex; align-items: center; gap: 10px; }
    .auth-brand-pillars li::before { content: "—"; color: var(--crimson); }
    .auth-card { max-width: 400px; border: none; background: transparent; padding: 0 24px; align-self: center; margin: 0 auto; }
    .auth-card .brand-drop, .auth-card .auth-logo { display: none; } /* brand lives in the left panel */
}

/* ─── ONBOARDING MODAL ────────────────────────────────────────────────────── */
.onboarding-overlay {
    position: fixed;
    inset: 0;
    background: rgba(7,7,10,0.85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 24px;
}
.onboarding-overlay.hidden { display: none; }
.onboarding-card {
    width: 100%;
    max-width: 380px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.onboarding-title {
    font-family: 'Urbanist', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin: 0;
}
.onboarding-sub {
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    margin: -8px 0 4px;
}
.onboarding-choice-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 8px 0 0;
}
.onboarding-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.onboarding-btn-ghost {
    width: 100%;
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: border-color 0.2s, color 0.2s;
}
.onboarding-btn-ghost:hover {
    border-color: var(--text-muted);
    color: var(--text-primary);
}

/* ─── AJUSTES / SETTINGS MODAL ─────────────────────────────────────────────── */
.settings-section-title {
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 22px 0 10px;
}
.settings-section-title.danger { color: var(--crimson); }
.settings-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin: -4px 0 12px;
}
#settings-modal textarea {
    width: 100%;
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border, rgba(236,226,205,.10));
    border-radius: 10px;
    padding: 10px 12px;
    font-family: 'Urbanist', sans-serif;
    font-size: 14px;
    resize: vertical;
    line-height: 1.4;
}
#settings-modal textarea:focus { outline: none; border-color: var(--crimson); }
.btn-settings-logout {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--text-muted);
}
.btn-settings-danger {
    background: rgba(191, 111, 94, .12);
    color: var(--danger);
}

/* ═══════════════════════════════════════════════════════════════════════════
   DESKTOP / WEB LAYOUT  (>=1024px)
   Additive only — mobile (<1024px) is untouched. Turns the phone shell into a
   proper web product: fixed sidebar nav + topbar + wide centered content.
   ═══════════════════════════════════════════════════════════════════════════ */
@media (min-width: 1024px) {
  body { background: var(--bg-primary); }

  /* Kill the phone frame; become an app grid */
  #app-container {
    max-width: none;
    width: 100%;
    height: 100vh;
    border: none;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    display: grid;
    grid-template-columns: 248px 1fr;
    grid-template-rows: 64px 1fr;
    grid-template-areas:
      "header header"
      "sidebar main";
  }

  /* Topbar spans full width; brand stays top-left */
  .app-header {
    grid-area: header;
    padding: 0 28px;
    background: var(--bg-primary);
    backdrop-filter: none;
  }
  .header-logo { font-size: 22px; }

  /* Bottom nav -> left sidebar */
  .app-navbar {
    grid-area: sidebar;
    position: static;
    width: auto;
    height: auto;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 2px;
    padding: 16px 12px;
    background: var(--bg-secondary);
    border-top: none;
    border-right: 1px solid var(--border-color);
    backdrop-filter: none;
    overflow-y: auto;
  }
  .app-navbar .nav-item {
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 13px;
    width: 100%;
    max-width: none;
    flex: 0 0 auto;
    height: 46px;
    padding: 0 14px;
    border-radius: 10px;
    color: var(--text-secondary);
    transition: background var(--transition-fast), color var(--transition-fast);
  }
  .app-navbar .nav-item i { font-size: 18px; width: 22px; text-align: center; }
  .app-navbar .nav-item span { font-size: 14px; font-weight: 600; }
  .app-navbar .nav-item:hover { background: var(--bg-tertiary); color: var(--text-primary); }
  .app-navbar .nav-item.active {
    background: rgba(var(--crimson-rgb), 0.12);
    color: var(--crimson);
  }
  /* PRO badge reads inline next to the label, not stacked */
  .app-navbar .nav-item.pro-item .pro-badge {
    margin-left: auto;
    font-size: 9px;
  }

  /* Content column */
  .app-viewport {
    grid-area: main;
    padding-bottom: 0;
  }
  .app-view {
    max-width: 1120px;
    margin: 0 auto;
    padding: 32px 40px 64px;
  }

  /* Dashboard / finance breathe into columns on wide screens */
  .app-view .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
  .app-view .dash-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: start; }
  .app-view .hoy-col-main, .app-view .hoy-col-side { min-width: 0; }
  .app-view .fin-chart-split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
  .app-view .fin-chart-split .payment-methods-breakdown { margin-top: 0; }

  /* Notification panel anchors under the topbar bell, not full-bleed */
  .notification-panel { right: 28px; top: 70px; }

  /* Retire the Instagram rainbow story ring on web */
  .story-avatar-ring { background: var(--bg-tertiary); padding: 2px; }
  .story-bubble.active .story-avatar-ring { background: var(--crimson); }
}

/* Wider desktop: cap content for readable line length, let it sit left-biased */
@media (min-width: 1440px) {
  .app-view { max-width: 1200px; }
}

/* ─── DESKTOP: Agenda density (>=1024px) ──────────────────────────────────── */
@media (min-width: 1024px) {
  /* Calendar + conventions side by side instead of stacked */
  #sub-view-calendar-grid .grid-two-cols {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 22px;
    align-items: start;
  }
  /* Compact day cells: no ballooning square circles at wide widths */
  #sub-view-calendar-grid .calendar-day {
    aspect-ratio: auto;
    height: 48px;
    border-radius: 10px;
  }
}


/* ==========================================================================
   PAYWALL SCREEN
   ========================================================================== */
.paywall-screen {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px 32px;
    z-index: 9000;
    text-align: center;
    overflow-y: auto;
}

.paywall-drop {
    opacity: 0.6;
    margin-bottom: 14px;
}

.paywall-logo {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.3px;
    color: var(--text-primary);
    margin-bottom: 28px;
}

.paywall-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px;
    letter-spacing: -0.3px;
}

.paywall-message {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0 0 28px;
}

.paywall-features {
    list-style: none;
    padding: 0;
    margin: 0 0 28px;
    text-align: left;
    width: 100%;
    max-width: 300px;
}

.paywall-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.paywall-features li .fa-check {
    color: var(--accent);
    font-size: 11px;
    flex-shrink: 0;
}

.paywall-price {
    font-size: 52px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 4px;
    letter-spacing: -1px;
}

.paywall-price span {
    font-size: 20px;
    font-weight: 400;
    color: var(--text-muted);
    letter-spacing: 0;
}

.paywall-price-note {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0 0 28px;
}

.paywall-btn {
    width: 100%;
    max-width: 300px;
    margin-bottom: 10px;
}

.paywall-btn-secondary {
    width: 100%;
    max-width: 300px;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 8px;
}

.paywall-btn-logout {
    width: 100%;
    max-width: 300px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 12px;
    text-decoration: underline;
    cursor: pointer;
    padding: 8px;
}

.btn-settings-billing {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 8px;
}
