﻿:root {
    --bg-app: #000000;
    --bg-card: rgba(10, 10, 10, 0.8);
    --bg-glass: rgba(15, 15, 15, 0.5);

    --text-primary: #f8fafc;
    --text-muted: #a1a1aa;

    --accent-blue: #8b5cf6;
    /* Main Violet */
    --accent-indigo: #6d28d9;
    /* Deep Violet */
    --accent-cyan: #c4b5fd;
    /* Light Violet */

    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;

    --border-light: rgba(255, 255, 255, 0.05);
    /* Made more subtle */
    --border-focus: rgba(139, 92, 246, 0.4);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;

    --shadow-glow: 0 0 15px rgba(139, 92, 246, 0.15);

    --bg-input: rgba(0, 0, 0, 0.3);
    --bg-surface: rgba(255, 255, 255, 0.03);
}

[data-theme="light"] {
    --bg-app: #1e293b;
    --bg-card: rgba(30, 41, 59, 0.9);
    --bg-glass: rgba(30, 41, 59, 0.7);

    --text-primary: #f8fafc;
    --text-muted: #cbd5e1;

    --accent-blue: #8b5cf6;
    --accent-indigo: #6d28d9;
    --accent-cyan: #c4b5fd;

    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;

    --border-light: rgba(255, 255, 255, 0.1);
}

html {
    font-size: clamp(10px, 1vw + 2px, 16px);
    /* Fluid unit scaling! */
}

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

/* Hide arrow spinners from number inputs */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
    /* Firefox */
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-app);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
}

/* Background Glow Effects */
.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.15;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--accent-indigo), var(--accent-blue));
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--accent-cyan), var(--success));
}

.app-wrapper {
    width: 100%;
    max-width: 100%;
    display: grid;
    grid-template-columns: minmax(260px, 22vw) 1fr;
    gap: 2rem;
    padding: 2rem 3vw;
    align-items: start;
    margin: 0 auto;
}

/* Glassmorphism Classes */
.glass-panel {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* Sidebar Elements */
.sidebar {
    position: sticky;
    top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.logo {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
    /* Blue to Cyan */
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 8px 16px rgba(6, 182, 212, 0.2);
}

.logo-x-left {
    position: absolute;
    width: 6px;
    height: 30px;
    background: #ffffff;
    transform: rotate(-45deg);
    border-radius: 2px;
    z-index: 2;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.logo-x-right {
    position: absolute;
    width: 6px;
    height: 30px;
    background: linear-gradient(to top, #00f2fe 0%, #4facfe 100%);
    transform: rotate(45deg);
    border-radius: 2px;
    z-index: 1;
}

.brand h1 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.1;
    color: #ffffff;
}

.brand h1 span {
    color: #06b6d4;
    /* SafeX cyan */
}

.brand p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
    line-height: 1.3;
}

.theme-toggle {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    color: var(--text-muted);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: auto;
}

.theme-toggle:hover {
    color: var(--accent-cyan);
    border-color: var(--accent-cyan);
    transform: rotate(15deg);
}

.settings-card h2 {
    font-size: 1.1rem;
    color: var(--accent-blue);
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.2rem;
}

.staked-group {
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon i {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.input-with-icon input {
    width: 100%;
    min-width: 0;
    background: var(--bg-app);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    padding: 0.8rem 1rem 0.8rem 2.5rem;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.input-with-icon input:focus {
    outline: none;
    border-color: var(--accent-indigo);
    box-shadow: var(--shadow-glow);
}

/* Cool Toggle Switch */
.toggle-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.08);
    transition: .3s cubic-bezier(0.4, 0.0, 0.2, 1);
    border: 1px solid rgba(255,255,255,0.05);
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    transition: .3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

input:checked+.slider {
    background-color: #8b5cf6;
    border-color: #8b5cf6;
}

input:checked+.slider:before {
    transform: translateX(20px);
    background-color: white;
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.toggle-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Summary Dashboard Elements */
.summary-dash {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.dash-item {
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s;
}

.dash-item:hover {
    transform: translateX(5px);
    border-color: var(--border-focus);
}

.dash-title {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
}

.dash-title small {
    font-size: 0.7rem;
    opacity: 0.7;
}

.dash-value {
    font-weight: 700;
    font-size: 1.1rem;
}

.dash-value.big {
    font-size: 1.5rem;
}

.dash-value.neutral {
    color: var(--text-primary);
}

.dash-value.success {
    color: var(--success);
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.dash-value.danger {
    color: var(--danger);
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

.roi-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.highlight-panel {
    background: linear-gradient(145deg, rgba(99, 102, 241, 0.1), rgba(6, 182, 212, 0.05));
    border-color: rgba(99, 102, 241, 0.3);
}

.sidebar-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Main Content Area */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    /* Reduced gap to accommodate tabs */
}

/* Tabs Navigation */
.tabs-nav {
    display: flex;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.tabs-nav::-webkit-scrollbar {
    height: 4px;
}

.tabs-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.tab-btn {
    background: transparent;
    color: var(--text-muted);
    border-bottom: 2px solid transparent !important;
    border-radius: 0 !important;
    padding: 0.8rem 1.5rem;
    white-space: nowrap;
}

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

.tab-btn.active {
    color: var(--accent-cyan);
    border-bottom-color: var(--accent-cyan) !important;
    opacity: 1 !important;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-pane.active {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.readonly-highlight {
    background: rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.readonly-highlight input {
    background: transparent !important;
}

.lay-highlight i {
    color: var(--accent-cyan);
}

.liab-highlight i {
    color: var(--danger);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-header {
    margin-bottom: 1.5rem;
}

.section-header h2 {
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--text-primary);
}

.section-header p.subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

/* Bets List - Card Style */
.bets-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.bet-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1.2rem;
    display: grid;
    grid-template-columns: 2fr 1.2fr 1fr 1.5fr auto;
    gap: 1.2rem;
    align-items: start;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.bet-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--accent-blue);
    opacity: 0.5;
    transition: opacity 0.3s;
}

.bet-card:focus-within {
    border-color: var(--accent-indigo);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.bet-card:focus-within::before {
    opacity: 1;
    background: var(--accent-cyan);
}

/* Specialized lay styling */
.bet-card.is-lay::before {
    background: var(--danger);
}

.stake-wrapper-col,
.odds-wrapper-col {
    display: flex;
    flex-direction: column;
}

.bet-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.liability-group,
.comm-group {
    display: none;
    margin-top: 0.5rem;
}

.bet-card.is-lay .liability-group,
.bet-card.is-lay .comm-group {
    display: flex;
    flex-direction: column;
}

.bet-group label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.bet-group input,
.bet-group select {
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    padding: 0 0.8rem;
    border-radius: var(--radius-sm);
    min-width: 0;
    width: 100%;
    height: 42px;
    line-height: 40px;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

.bet-group input:focus,
.bet-group select:focus {
    border-color: var(--accent-cyan);
}

.bet-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    background-size: 1em;
    padding-right: 2rem;
}

.bet-group select option {
    background: var(--bg-card);
    color: var(--text-primary);
}

/* Type Select specific styling */
select.type-back {
    color: var(--success);
    font-weight: 600;
}

select.type-boost {
    color: var(--warning);
    /* Yellow/Orange for Boost */
    font-weight: 600;
}

select.type-freebet {
    color: #e879f9;
    /* Vibrant Pink/Magenta for Freebet */
    font-weight: 600;
}

select.type-cashback {
    color: #a855f7;
    /* Purple for Cashback */
    font-weight: 600;
}

select.type-lay {
    color: var(--danger);
    font-weight: 600;
}

.val-display {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--bg-surface);
    padding-left: 0.8rem;
    padding-right: 0.4rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    height: 42px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.val-display:focus-within {
    border-color: var(--accent-cyan);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.1);
}

.val-display span {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
}

.bet-group .val-display input {
    background: transparent !important;
    border: none !important;
    padding: 0.6rem 0 !important;
    flex: 1;
    color: var(--text-primary);
    font-weight: 600;
    box-shadow: none !important;
}

.bet-group .val-display input:focus {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

.btn-delete-row {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: none;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 2px;
}

.btn-delete-row:hover {
    background: var(--danger);
    color: white;
    transform: scale(1.05);
}

.btn-add-bet {
    width: 100%;
    padding: 1.2rem;
    background: transparent;
    border: 2px dashed var(--border-light);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    transition: all 0.3s;
    margin-top: 1rem;
}

.btn-add-bet:hover {
    border-color: var(--accent-indigo);
    color: var(--accent-indigo);
    background: rgba(99, 102, 241, 0.05);
}

/* Results Section Board */
.results-board {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.result-row {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.result-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

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

.res-name {
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.res-type-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.badge-back {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.badge-boost {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.badge-freebet {
    background: rgba(232, 121, 249, 0.2);
    color: #e879f9;
}

.badge-cashback {
    background: rgba(168, 85, 247, 0.2);
    color: #a855f7;
}

.badge-lay {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.res-retorno {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.res-profit {
    font-weight: 700;
    font-size: 1.2rem;
}

.res-profit.success {
    color: var(--success);
}

.res-profit.danger {
    color: var(--danger);
}

/* Progress Bar Visuals */
.progress-track {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

.progress-fill.success {
    background: linear-gradient(90deg, var(--accent-cyan), var(--success));
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.progress-fill.danger {
    background: linear-gradient(90deg, #991b1b, var(--danger));
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
    opacity: 0.7;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Buttons */
.btn {
    padding: 0.8rem 1.2rem;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn:active {
    transform: scale(0.95);
}

.btn-glass {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-indigo);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.btn-glass:hover {
    background: rgba(99, 102, 241, 0.25);
    color: white;
    border-color: var(--accent-indigo);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
}

.btn-outline-danger {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-light);
}

.btn-outline-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.3);
}

.btn-lock,
.btn-copy {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-light);
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.btn-lock:hover,
.btn-copy:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    transform: scale(1.05);
}

.btn-lock.is-locked {
    background: rgba(16, 185, 129, 0.2);
    border-color: var(--success);
    color: var(--success);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.btn-copy.is-copied {
    background: var(--success) !important;
    border-color: var(--success) !important;
    color: #ffffff !important;
}

.btn-copy.is-copied i {
    color: #ffffff !important;
}

/* History Log */
.history-section {
    margin-top: 2rem;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.history-card {
    padding: 1rem 1.2rem;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-glow);
}

.hist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.8rem;
}

.hist-filters {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-filter {
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-muted);
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.btn-filter.active {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--accent-indigo);
    color: var(--accent-indigo);
    font-weight: 600;
}

.btn-clear-hist {
    margin-left: 0.5rem;
    background: transparent;
    border-color: transparent;
    color: var(--danger);
    opacity: 0.7;
}

.btn-clear-hist:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    opacity: 1;
}

.hist-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 130px;
}

.hist-note {
    flex: 1;
    margin: 0 1.5rem;
    background: transparent;
    border: 1px solid transparent;
    border-bottom: 1px dashed var(--border-light);
    color: var(--text-primary);
    font-size: 0.85rem;
    padding: 0.2rem 0.5rem;
    text-align: center;
    transition: all 0.2s;
    font-family: inherit;
    border-radius: 4px 4px 0 0;
}

.hist-note:focus {
    outline: none;
    border-bottom: 1px solid var(--accent);
    background: rgba(255, 255, 255, 0.02);
}

.hist-note::placeholder {
    color: var(--text-muted);
    opacity: 0.5;
}

.btn-delete-hist {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.3rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.btn-delete-hist:hover {
    color: var(--danger);
}

.btn-share-hist {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.3rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.btn-share-hist:hover {
    color: var(--accent-blue);
    transform: scale(1.1);
}

.hist-body {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 0.8rem;
}

.hist-bets {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    padding-right: 1.5rem;
}

.hist-bet-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.hist-name-group {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.hist-name {
    font-weight: 500;
    color: var(--text-primary);
}

.hist-val-group {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.hist-odd {
    font-family: inherit;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.85rem;
    min-width: 50px;
    text-align: right;
}

.hist-stake {
    font-weight: 700;
    color: var(--text-primary);
    min-width: 80px;
    text-align: right;
}

.hist-summary {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.4rem;
    text-align: right;
    min-width: 140px;
    padding-left: 1.5rem;
    border-left: 1px dashed var(--border-light);
}

.hist-invest,
.hist-roi {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.hist-profit {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin: 0.2rem 0;
}

.hist-profit .success {
    color: var(--success);
}

.hist-profit .danger {
    color: var(--danger);
}

/* Toast Container */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    z-index: 9999;
}

.toast {
    background: rgba(24, 24, 27, 0.9);
    backdrop-filter: blur(10px);
    border-left: 4px solid var(--success);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    animation: slideIn 0.3s ease forwards;
    transform: translateX(120%);
}

.toast i {
    font-size: 1.2rem;
    color: var(--success);
}

@keyframes slideIn {
    to {
        transform: translateX(0);
    }
}

@keyframes slideOut {
    to {
        transform: translateX(120%);
        opacity: 0;
    }
}

/* Custom Confirm Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}




.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-container {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    width: 90%;
    max-width: 400px;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
}

.modal-overlay.active .modal-container {
    transform: scale(1) translateY(0);
}

.modal-header {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--warning);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-close-modal {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s;
}

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

.modal-body {
    padding: 1.5rem;
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.5;
}

.modal-footer {
    padding: 1.2rem 1.5rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

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

.btn-outline:hover {
    background: var(--bg-surface);
}

.btn-danger {
    background: var(--danger);
    color: white;
    border: none;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: #b91c1c;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(239, 68, 68, 0.4);
}

.btn-success {
    background: var(--success);
    color: white;
    border: none;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(16, 185, 129, 0.4);
}

@media (max-width: 1440px) {
    .app-wrapper {
    padding-left: 1.5rem;
    border-left: 1px dashed var(--border-light);
}

.hist-invest,
.hist-roi {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.hist-profit {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin: 0.2rem 0;
}

.hist-profit .success {
    color: var(--success);
}

.hist-profit .danger {
    color: var(--danger);
}

/* Toast Container */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    z-index: 9999;
}

.toast {
    background: rgba(24, 24, 27, 0.9);
    backdrop-filter: blur(10px);
    border-left: 4px solid var(--success);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    animation: slideIn 0.3s ease forwards;
    transform: translateX(120%);
}

.toast i {
    font-size: 1.2rem;
    color: var(--success);
}

@keyframes slideIn {
    to {
        transform: translateX(0);
    }
}

@keyframes slideOut {
    to {
        transform: translateX(120%);
        opacity: 0;
    }
}

/* Custom Confirm Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}




.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-container {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    width: 90%;
    max-width: 400px;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
}

.modal-overlay.active .modal-container {
    transform: scale(1) translateY(0);
}

.modal-header {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--warning);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-close-modal {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s;
}

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

.modal-body {
    padding: 1.5rem;
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.5;
}

.modal-footer {
    padding: 1.2rem 1.5rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

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

.btn-outline:hover {
    background: var(--bg-surface);
}

.btn-danger {
    background: var(--danger);
    color: white;
    border: none;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: #b91c1c;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(239, 68, 68, 0.4);
}

.btn-success {
    background: var(--success);
    color: white;
    border: none;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(16, 185, 129, 0.4);
}

@media (max-width: 1440px) {
    .app-wrapper {
        grid-template-columns: minmax(240px, 25vw) 1fr;
        gap: 1.5rem;
        padding: 1.5rem;
    }

    .card {
        padding: 1.25rem;
    }

    .bet-card {
        gap: 0.8rem;
        grid-template-columns: 1fr 1fr 0.8fr 1fr auto;
    }

    .input-with-icon input,
    select.res-type {
        font-size: 0.85rem;
        padding: 0 0.6rem 0 2rem;
    }

    .brand h1 {
        font-size: 1.6rem;
    }
}

@media (max-width: 850px) {
    .app-wrapper {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: relative;
        top: 0;
    }
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .bet-card {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .bet-group:nth-child(1) {
        grid-column: span 2;
    }

    .btn-delete-row {
        grid-column: span 2;
        width: 100%;
        margin-top: 0.5rem;
    }
}

@media (max-width: 500px) {
    .bet-card {
        grid-template-columns: 1fr;
    }

    .bet-group:nth-child(1),
    .btn-delete-row {
        grid-column: span 1;
    }
    
    .history-card .hist-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .history-card .hist-body {
        flex-direction: column;
    }
    
    .hist-summary {
        border-left: none !important;
        padding-left: 0 !important;
        border-top: 1px dashed var(--border-light);
        padding-top: 1rem !important;
        margin-top: 1rem;
    }
}

/* =========================================
   PROTE��O 2UP - ISOLATED STYLES
   ========================================= */

.twoup-sport-btn {
    transition: all 0.2s;
}
.twoup-sport-btn.active {
    background: rgba(59, 130, 246, 0.15) !important;
    border-color: rgba(59, 130, 246, 0.4) !important;
    color: var(--text-primary) !important;
}

.twoup-cov-btn {
    transition: all 0.2s;
    cursor: pointer;
}
.twoup-cov-btn:hover {
    background: rgba(255,255,255,0.05) !important;
}
.twoup-cov-btn.active {
    background: rgba(52, 211, 153, 0.15) !important;
    border-color: rgba(52, 211, 153, 0.4) !important;
    color: #34d399 !important;
    box-shadow: 0 0 10px rgba(52, 211, 153, 0.2);
}

.twoup-action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(16, 185, 129, 0.2) !important;
    transition: all 0.3s;
}

.twoup-result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.2) !important;
    transition: all 0.3s;
}

.twoup-compare-card, .twoup-outcome-card {
    transition: all 0.3s;
}
.twoup-compare-card:hover, .twoup-outcome-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255,255,255,0.2) !important;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

/* =========================================
   PROFIT DIARY (AGENDA DE LUCROS) STYLES
   ========================================= */

.diary-drawer {
    position: fixed;
    top: 0;
    right: -450px;
    width: 400px;
    height: 100vh;
    background: var(--bg-surface);
    border-left: 1px solid var(--border-light);
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    z-index: 2000;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.diary-drawer.open {
    right: 0;
}

@media (max-width: 450px) {
    .diary-drawer {
        width: 100vw;
        right: -100vw;
    }
}

.history-card {
    padding: 0.8rem 1rem;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-glow);
}

.hist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.8rem;
}

.hist-filters {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-filter {
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-muted);
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.btn-filter.active {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--accent-indigo);
    color: var(--accent-indigo);
    font-weight: 600;
}

.btn-clear-hist {
    margin-left: 0.5rem;
    background: transparent;
    border-color: transparent;
    color: var(--danger);
    opacity: 0.7;
}

.btn-clear-hist:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    opacity: 1;
}

.hist-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 130px;
}

.hist-note {
    flex: 1;
    margin: 0 1.5rem;
    background: transparent;
    border: 1px solid transparent;
    border-bottom: 1px dashed var(--border-light);
    color: var(--text-primary);
    font-size: 0.85rem;
    padding: 0.2rem 0.5rem;
    text-align: center;
    transition: all 0.2s;
    font-family: inherit;
    border-radius: 4px 4px 0 0;
}

.hist-note:focus {
    outline: none;
    border-bottom: 1px solid var(--accent);
    background: rgba(255, 255, 255, 0.02);
}

.hist-note::placeholder {
    color: var(--text-muted);
    opacity: 0.5;
}

.btn-delete-hist {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.3rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.btn-delete-hist:hover {
    color: var(--danger);
}

.btn-share-hist,
.btn-restore-hist {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.3rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.btn-share-hist:hover {
    color: var(--accent-blue);
    transform: scale(1.1);
}

.btn-restore-hist:hover {
    color: var(--accent-purple);
    transform: scale(1.1);
}

.hist-body {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    border-top: 1px solid var(--border-light);
    padding-top: 0.8rem;
}

.hist-bets {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    padding-right: 1.5rem;
}

.hist-bet-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.hist-name-group {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.hist-name {
    font-weight: 500;
    color: var(--text-primary);
}

.hist-val-group {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.hist-odd {
    font-family: inherit;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.85rem;
    min-width: 50px;
    text-align: right;
}

.hist-stake {
    font-weight: 700;
    color: var(--text-primary);
    min-width: 80px;
    text-align: right;
}

.hist-summary {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.4rem;
    text-align: right;
    min-width: 130px;
    padding-left: 1rem;
    border-left: 1px dashed var(--border-light);
}

.hist-invest,
.hist-roi {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.hist-profit {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin: 0.2rem 0;
}

.hist-profit .success {
    color: var(--success);
}

.hist-profit .danger {
    color: var(--danger);
}

.diary-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-light);
    background: rgba(0,0,0,0.2);
}

.diary-drawer-content {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.diary-drawer-content::-webkit-scrollbar {
    width: 6px;
}
.diary-drawer-content::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
}

/* Calendar Grid */
.diary-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.cal-day-header {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    padding-bottom: 0.5rem;
}

.cal-day-cell {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 6px;
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.cal-day-cell:hover:not(.empty) {
    background: rgba(255,255,255,0.08);
    transform: scale(1.05);
    border-color: rgba(255,255,255,0.1);
}

.cal-day-cell.empty {
    background: transparent;
    border: none;
    cursor: default;
}

.cal-day-cell.has-profit {
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.05);
}

.cal-day-cell.has-loss {
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.05);
}

.cal-day-number {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.cal-day-amount {
    font-size: 0.65rem;
    font-weight: 700;
    margin-top: 0.2rem;
}

.cal-day-amount.profit { color: var(--success); }
.cal-day-amount.loss { color: var(--danger); }

/* Entries List Items */
.diary-entry-item {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.diary-entry-item.profit { border-left: 3px solid var(--success); }
.diary-entry-item.loss { border-left: 3px solid var(--danger); }

.diary-entry-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

#sidebar-bankrolls-list::-webkit-scrollbar { width: 4px; }
#sidebar-bankrolls-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

/* Centered Mode */
.app-wrapper.sidebar-collapsed {
    display: block;
    position: relative;
}
.app-wrapper.sidebar-collapsed .sidebar {
    position: absolute;
    top: 2rem;
    left: 3vw;
    width: max-content;
}
.app-wrapper.sidebar-collapsed .main-content {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}


.bankroll-select option { background: var(--bg-app); color: var(--text-primary); }
select option { background: var(--bg-app); color: var(--text-primary); }

/ *   E s c o n d e r   o   o l h o   n a t i v o   d o   E d g e   p a r a   i n p u t s   d e   s e n h a   * /  
 i n p u t [ t y p e = " p a s s w o r d " ] : : - m s - r e v e a l ,  
 i n p u t [ t y p e = " p a s s w o r d " ] : : - m s - c l e a r   {  
         d i s p l a y :   n o n e ;  
 }  
 