:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --bg-gradient-start: #0f172a;
    --bg-gradient-end: #1e293b;
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --success: #10b981;
    --error: #ef4444;
    --input-bg: rgba(0, 0, 0, 0.2);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
    color: var(--text-main);
    min-height: 100vh;
    padding: 16px;
    display: flex;
    justify-content: center;
    overscroll-behavior-y: none;
}

.container {
    width: 100%;
    max-width: 600px;
    padding-bottom: 40px;
}

.header {
    text-align: center;
    margin-bottom: 20px;
    margin-top: 10px;
}

h1 {
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(to right, #818cf8, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 4px;
}

/* Tabs */
.tabs {
    display: flex;
    background: var(--card-bg);
    padding: 4px;
    border-radius: 16px;
    margin-bottom: 20px;
    border: 1px solid var(--card-border);
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(12px);
}

.tab {
    flex: 1;
    padding: 14px;
    text-align: center;
    cursor: pointer;
    border-radius: 12px;
    color: var(--text-muted);
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.tab.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Card & Forms */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.3);
    display: none;
}

.card.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

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

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

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

input,
select,
textarea {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    background: var(--input-bg);
    border: 1px solid var(--card-border);
    color: var(--text-main);
    font-family: inherit;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s ease;
    appearance: none;
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    padding-right: 40px;
}

option {
    background-color: #1e293b;
    color: var(--text-main);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary-color);
}

button.btn-primary {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-top: 8px;
    min-height: 52px;
}

button.btn-primary:hover {
    background: var(--primary-hover);
}

button.btn-primary:active {
    transform: scale(0.98);
}

/* Summary Table */
.filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.table-container {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--card-border);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 500px;
}

th,
td {
    padding: 14px;
    text-align: left;
    border-bottom: 1px solid var(--card-border);
    font-size: 0.9rem;
}

th {
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    white-space: nowrap;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.status-msg {
    margin-top: 16px;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-size: 0.9rem;
    display: none;
}

.status-msg.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-msg.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Modal for Add Account */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 100;
    padding: 20px;
}

.modal {
    background: #1e293b;
    border: 1px solid var(--card-border);
    padding: 24px;
    border-radius: 20px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

.modal h3 {
    margin-bottom: 16px;
    color: var(--text-main);
    font-size: 1.25rem;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

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

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

    .filters>div:first-child {
        grid-column: span 1 !important;
    }

    h1 {
        font-size: 1.5rem;
    }

    .container {
        padding-bottom: 80px;
    }

    /* Space for bottom nav if we had one, or just general breathing room */
}