:root {
    /* Color Palette - Turing AI Smart Healthcare Theme */
    --bg-base: #0B0C10;
    --bg-surface: #151821;
    --bg-glass: rgba(102, 252, 241, 0.03);
    --bg-glass-hover: rgba(102, 252, 241, 0.08);
    --border-glass: #232936;
    
    --text-primary: #E0E2E8;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    
    /* Vibrant Accents */
    --accent-primary: #66FCF1;
    --accent-secondary: #45A29E;
    --accent-gradient: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    
    --semantic-success: #66FCF1;
    --semantic-danger: #FF2A54;
    --semantic-warning: #F3E16B;
    
    /* Typography */
    --font-sans: 'Chakra Petch', system-ui, -apple-system, sans-serif;
    --font-display: 'Chakra Petch', var(--font-sans);
    
    /* Spacing & Radii */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 24px;
    --radius-pill: 9999px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background Effects */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    animation: float 20s infinite ease-in-out alternate;
}

.orb-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--accent-primary) 0%, transparent 70%);
}

.orb-2 {
    bottom: -20%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--accent-secondary) 0%, transparent 70%);
    animation-delay: -10s;
}

/* Layout */
.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1rem 0 4rem;
}

/* Typography Utilities */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    line-height: 1.2;
    margin-bottom: 1rem;
    font-weight: 700;
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

.text-red { color: var(--semantic-danger); }
.text-green { color: var(--semantic-success); }
.mt-2 { margin-top: 2rem; }

/* Glassmorphism System */
.glass-panel {
    background: var(--bg-surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.glass-header {
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-glass);
    margin-bottom: 0rem;
}

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

/* Components */
.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-icon {
    font-size: 1.5rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 0.5rem;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-family: var(--font-sans);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #0B0C10;
    box-shadow: 0 4px 15px rgba(102, 252, 241, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 252, 241, 0.4);
}

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

.btn-secondary:hover {
    background: var(--bg-glass-hover);
    transform: translateY(-2px);
}

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

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

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-block {
    width: 100%;
}

/* Hero Section */
.hero-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    min-height: 70vh;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-pill);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-primary);
}

.hero-title {
    font-size: 4.5rem;
    line-height: 1.1;
    letter-spacing: -1px;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 90%;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    position: relative;
    z-index: 10;
}

/* Mockup Panel */
.mockup-panel {
    border-radius: var(--radius-lg);
    overflow: hidden;
    padding: 0;
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    box-shadow: -20px 20px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--border-glass);
    transition: var(--transition);
}

.mockup-panel:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.mockup-header {
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border-glass);
}

.mockup-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.mockup-dot.red { background-color: #ff5f56; }
.mockup-dot.yellow { background-color: #ffbd2e; }
.mockup-dot.green { background-color: #27c93f; }

.mockup-body {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: 300px;
}

.skeleton-row {
    height: 24px;
    background: var(--bg-glass);
    border-radius: var(--radius-sm);
    width: 100%;
}

.skeleton-row.half {
    width: 60%;
}

.skeleton-chart {
    flex: 1;
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}

.skeleton-chart .bar {
    flex: 1;
    background: var(--accent-gradient);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    opacity: 0.8;
}

/* Forms */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.auth-panel {
    width: 100%;
    max-width: 450px;
    padding: 3rem;
}

.auth-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.auth-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--text-secondary);
}

.form-group {
    margin-bottom: 1.5rem;
}

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

.input-wrapper {
    position: relative;
}

input[type="email"],
input[type="password"],
input[type="text"] {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    padding: 0.875rem 1rem;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: var(--font-sans);
    transition: var(--transition);
}

input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.2);
}

.form-actions {
    margin-top: 2rem;
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 2rem 0;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-glass);
}

.auth-divider span {
    padding: 0 1rem;
}

.social-btn {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
}

/* Dashboard */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    padding: 1.5rem;
}

.stat-card h3 {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-value {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-sub {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.dashboard-main {
    min-height: 400px;
}

.dashboard-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: flex-start;
}
.dashboard-layout > * {
    min-width: 0;
}

.panel-header {
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    text-align: center;
    color: var(--text-secondary);
}

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

/* Animations */
@keyframes float {
    0% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(2%, 2%) rotate(2deg); }
    100% { transform: translate(-2%, 1%) rotate(-1deg); }
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

.fade-in {
    animation: fadeIn 1s ease forwards;
    opacity: 0;
}

/* Responsive */
@media (max-width: 1024px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .app-container {
        padding: 0 0.5rem;
    }
    
    .glass-panel {
        padding: 1rem;
        border-radius: var(--radius-md);
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }

    .hero-section {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .hero-content {
        align-items: center;
    }

    .hero-subtitle {
        max-width: 100%;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }
    
    .hero-actions .btn {
        width: 100%;
    }

    .hero-title {
        font-size: 3.5rem;
    }
    
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .auth-panel {
        padding: 1.5rem;
    }
    
    .tables-wrapper {
        flex-direction: column;
        width: 100%;
        overflow: hidden;
    }
    
    .table-container {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        min-width: 0;
    }
    
    .tabs-header {
        flex-direction: column;
        align-items: stretch !important;
        gap: 1rem;
    }
    
    .tabs-header-right {
        margin-left: 0;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }
    
    .paycheck-container {
        width: 100%;
        justify-content: space-between;
    }
    
    .tabs-header > div {
        flex-direction: column;
        align-items: stretch !important;
        gap: 0.5rem;
        margin-left: 0 !important;
        width: 100%;
    }
    
    .sleek-table, .sleek-table thead, .sleek-table tbody, .sleek-table tr, .sleek-table td, .sleek-table th {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }
    
    .sleek-table thead {
        display: none;
    }
    
    .sleek-table tr {
        background: rgba(0, 0, 0, 0.2);
        border: 1px solid var(--border-glass);
        border-radius: var(--radius-md);
        margin-bottom: 1rem;
        padding: 0.5rem;
    }
    
    .sleek-table td {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        padding: 0.5rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.03);
        position: relative;
        white-space: normal;
    }
    
    .sleek-table td:last-child {
        border-bottom: none;
    }
    
    .sleek-table td::before {
        position: absolute;
        left: 0.5rem;
        font-weight: 600;
        font-size: 0.75rem;
        text-transform: uppercase;
        color: var(--text-secondary);
    }
    
    .sleek-table td:nth-child(1)::before { content: "Category"; }
    .sleek-table td:nth-child(2)::before { content: "Name"; }
    .sleek-table td:nth-child(3)::before { content: "Amount"; }
    .sleek-table td:nth-child(4)::before { content: "Left"; }
    
    .editable-cell {
        width: 60%;
        text-align: right;
        min-width: 0;
        background: rgba(255, 255, 255, 0.03);
    }
}

/* Data Tables */
.data-tables {
    display: flex;
    flex-direction: column;
}

.tables-wrapper {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    align-items: flex-start;
}

.table-container {
    flex: 1;
    min-width: 300px;
    overflow-x: auto;
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
}

.sleek-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.sleek-table th {
    text-align: left;
    padding: 1.25rem 1rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-glass);
    font-weight: 600;
    background: rgba(0, 0, 0, 0.2);
}

.sleek-table td {
    padding: 0.25rem 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.sleek-table td:nth-child(1) { width: 25%; }
.sleek-table td:nth-child(2) { width: 35%; }
.sleek-table td:nth-child(3) { width: 15%; }
.sleek-table td:nth-child(4) { width: 15%; }
.sleek-table td:nth-child(5) { width: 10%; text-align: right; }

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

.editable-cell {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    width: 100%;
    box-sizing: border-box;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.editable-cell:hover {
    background: var(--bg-glass-hover);
    cursor: text;
}

.editable-cell:focus {
    outline: none;
    background: rgba(0, 0, 0, 0.3);
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(102, 252, 241, 0.2);
}

.tabs-header-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.paycheck-container {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 0.25rem 0.75rem;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.paycheck-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    margin-right: 0.5rem;
}

.paycheck-currency {
    color: var(--accent-primary);
    font-weight: bold;
    margin-right: 0.2rem;
}

.paycheck-input {
    background: transparent;
    color: var(--text-primary);
    border: none;
    outline: none;
    font-size: 1rem;
    font-weight: 600;
    width: 80px;
    padding: 0;
}

/* Tabs */
.tabs-container {
    margin-bottom: 1.5rem;
}
.tabs-header {
    display: flex;
    gap: 1rem;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 0.5rem;
}
.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 2px solid transparent;
}
.tab-btn:hover {
    color: var(--text-primary);
}
.tab-btn.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}
.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
}

/* Month Selector */
.month-selector {
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    outline: none;
    margin-left: auto;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}
.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}
.modal-content {
    background: var(--bg-base);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    transform: translateY(20px);
    transition: var(--transition);
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
.modal-overlay.active .modal-content {
    transform: translateY(0);
}
.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

/* Snackbar */
.snackbar {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-surface);
    backdrop-filter: blur(8px);
    border: 1px solid var(--accent-primary);
    color: var(--text-primary);
    padding: 1rem 2rem;
    border-radius: var(--radius-pill);
    box-shadow: 0 4px 15px rgba(102, 252, 241, 0.3);
    font-weight: 500;
    z-index: 2000;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.snackbar.show {
    transform: translateX(-50%) translateY(0);
}
