* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Prevent pinch-to-zoom on iOS */
html {
    touch-action: manipulation;
}

body {
    touch-action: manipulation;
}

:root {
    --bg: #0f1117;
    --surface: #1a1d27;
    --surface2: #242836;
    --border: #2e3345;
    --text: #e4e6f0;
    --text-dim: #8b8fa3;
    --accent: #6c5ce7;
    --accent-hover: #7f71ed;
    --green: #00b894;
    --orange: #fdcb6e;
    --red: #e17055;
    --blue: #74b9ff;
    --radius: 12px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

.app {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 24px;
    position: relative;
}

/* Header */
.app-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 24px;
    margin: -32px -24px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-bar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

h1 {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent), var(--blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.base-currency-picker {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-dim);
}

.base-currency-picker select {
    background: var(--surface2);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 14px;
    cursor: pointer;
}

.btn-secondary {
    background: var(--surface);
    color: var(--text-dim);
    border: 1px solid var(--border);
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--text);
}

.btn-add {
    background: var(--accent);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-add:hover {
    background: var(--accent-hover);
}

/* Dashboard */
.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-label {
    font-size: 13px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
}

.upcoming-card .stat-value {
    font-size: 16px;
}

/* Top Controls */
.top-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

/* Filters */
.filters {
    display: flex;
    gap: 8px;
}

.view-switcher {
    display: flex;
    gap: 4px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 4px;
}

.view-btn {
    background: none;
    border: none;
    color: var(--text-dim);
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.view-btn:hover {
    color: var(--text);
}

.view-btn.active {
    background: var(--accent);
    color: white;
}

.filter-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-dim);
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    border-color: var(--accent);
    color: var(--text);
}

.filter-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

/* Reminders */
.reminders-section {
    background: linear-gradient(135deg, rgba(253, 203, 110, 0.1), rgba(225, 112, 85, 0.1));
    border: 1px solid rgba(253, 203, 110, 0.3);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 24px;
}

.reminders-section h3 {
    font-size: 14px;
    color: var(--orange);
    margin-bottom: 12px;
}

.reminder-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 14px;
    border-bottom: 1px solid rgba(253, 203, 110, 0.15);
}

.reminder-item:last-child {
    border-bottom: none;
}

.reminder-days {
    color: var(--orange);
    font-weight: 600;
    font-size: 13px;
}

/* Category Breakdown */
.category-breakdown {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 28px;
}

.breakdown-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

.breakdown-panel h3 {
    font-size: 14px;
    color: var(--text-dim);
    margin-bottom: 16px;
}

.bar-item {
    margin-bottom: 12px;
}

.bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 6px;
}

.bar-name {
}

.bar-track {
    height: 8px;
    background: var(--surface2);
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s ease;
}

/* Search & Sort Controls */
.list-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.search-input {
    flex: 1;
    padding: 10px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 14px;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent);
}

.search-input::placeholder {
    color: var(--text-dim);
}

.sort-select {
    padding: 10px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 13px;
    cursor: pointer;
    min-width: 180px;
}

.sort-select:focus {
    outline: none;
    border-color: var(--accent);
}

/* Annual Projection */
.annual-projection {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 24px;
}

.annual-projection h3 {
    font-size: 14px;
    color: var(--text-dim);
    margin-bottom: 16px;
}

.projection-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.projection-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
}

.projection-item:last-child {
    border-bottom: none;
}

.projection-total {
    display: flex;
    justify-content: space-between;
    font-size: 16px;
    font-weight: 700;
    padding-top: 12px;
    border-top: 2px solid var(--border);
}

/* Most Expensive Highlight */
.sub-card.most-expensive {
    border-left: 3px solid var(--orange);
}

.most-expensive-badge {
    font-size: 11px;
    color: var(--text-dim);
    font-weight: 400;
    font-style: italic;
}

/* Subscriptions List */
.subscriptions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sub-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: border-color 0.2s;
}

.sub-card:hover {
    border-color: var(--accent);
}

.sub-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
}

.sub-info {
    flex: 1;
    min-width: 0;
}

.sub-name {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 4px;
}

.sub-meta {
    font-size: 12px;
    color: var(--text-dim);
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.sub-tag {
    background: var(--surface2);
    padding: 2px 8px;
    border-radius: 6px;
}

.sub-cost {
    text-align: right;
    flex-shrink: 0;
}

.sub-cost-value {
    font-size: 18px;
    font-weight: 700;
}

.sub-cost-cycle {
    font-size: 12px;
    color: var(--text-dim);
}

.sub-cost-converted {
    font-size: 11px;
    color: var(--text-dim);
}

.sub-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.2s;
}

.sub-card:hover .sub-actions {
    opacity: 1;
}

.sub-actions button {
    background: var(--surface2);
    border: 1px solid var(--border);
    color: var(--text-dim);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.sub-actions button:hover {
    color: var(--text);
    border-color: var(--text-dim);
}

.sub-actions button.delete:hover {
    color: var(--red);
    border-color: var(--red);
}

.sub-renewal-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 600;
}

.renewal-soon {
    background: rgba(253, 203, 110, 0.15);
    color: var(--orange);
}

.renewal-today {
    background: rgba(225, 112, 85, 0.15);
    color: var(--red);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-dim);
}

.empty-state p {
    margin-bottom: 8px;
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 100;
    align-items: center;
    justify-content: center;
}

.modal-overlay.open {
    display: flex;
}

.modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    width: 90%;
    max-width: 520px;
    padding: 28px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-header h2 {
    font-size: 20px;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 24px;
    cursor: pointer;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 6px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
}

.cost-input {
    display: flex;
    gap: 8px;
}

.cost-input input {
    flex: 1;
}

.cost-input select {
    width: 80px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 8px;
}

.btn-cancel {
    background: var(--surface2);
    border: 1px solid var(--border);
    color: var(--text-dim);
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
}

.btn-save {
    background: var(--accent);
    border: none;
    color: white;
    padding: 10px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.btn-save:hover {
    background: var(--accent-hover);
}

/* History View */
.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.history-header h2 {
    font-size: 22px;
    font-weight: 700;
}

.month-nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.month-arrow {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.month-arrow:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.month-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.month-label {
    font-size: 16px;
    font-weight: 600;
    min-width: 160px;
    text-align: center;
}

.history-summary {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 24px;
    font-size: 22px;
    font-weight: 700;
    text-align: center;
}

.history-charts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.chart-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

.chart-panel h3 {
    font-size: 14px;
    color: var(--text-dim);
    margin-bottom: 16px;
    text-align: center;
}

.pie-container {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    margin: 0 auto 16px;
    position: relative;
}

.pie-center {
    position: absolute;
    inset: 30px;
    background: var(--surface);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
}

.pie-legend {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
}

.legend-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    flex-shrink: 0;
}

.legend-value {
    color: var(--text-dim);
    font-variant-numeric: tabular-nums;
}

/* History Table */
.history-table-wrap {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.history-table th {
    text-align: left;
    padding: 14px 20px;
    font-size: 12px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}

.history-table th.right,
.history-table td.right {
    text-align: right;
}

.history-table td {
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
}

.history-table tbody tr:last-child td {
    border-bottom: none;
}

.history-table tfoot td {
    padding: 14px 20px;
    font-weight: 700;
    border-top: 2px solid var(--border);
}

/* Month-over-month comparison */
.mom-diff {
    font-size: 14px;
    font-weight: 600;
    margin-top: 4px;
}

.mom-diff.up {
    color: var(--red);
}

.mom-diff.down {
    color: var(--green);
}

.mom-diff.neutral {
    color: var(--text-dim);
}

/* Spending Trend */
.trend-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 24px;
}

.trend-section h3 {
    font-size: 14px;
    color: var(--text-dim);
    margin-bottom: 16px;
}

.trend-chart {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 160px;
    padding-top: 8px;
}

.trend-bar-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
    gap: 6px;
}

.trend-bar {
    width: 100%;
    max-width: 60px;
    border-radius: 6px 6px 0 0;
    transition: height 0.4s ease;
    min-height: 4px;
    cursor: default;
    position: relative;
}

.trend-bar:hover {
    opacity: 0.8;
}

.trend-bar.active {
    outline: 2px solid var(--text);
    outline-offset: 1px;
}

.trend-bar-value {
    font-size: 11px;
    color: var(--text-dim);
    font-weight: 600;
    white-space: nowrap;
}

.trend-bar-label {
    font-size: 11px;
    color: var(--text-dim);
    white-space: nowrap;
}

/* History delete button */
.hist-delete-btn {
    background: none;
    border: 1px solid transparent;
    color: var(--text-dim);
    font-size: 16px;
    cursor: pointer;
    border-radius: 6px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.hist-delete-btn:hover {
    color: var(--red);
    border-color: var(--red);
}

/* Cancelled View */
.cancelled-header {
    margin-bottom: 24px;
}

.cancelled-header h2 {
    font-size: 22px;
    font-weight: 700;
}

.cancelled-savings {
    background: linear-gradient(135deg, rgba(0, 184, 148, 0.1), rgba(85, 239, 196, 0.1));
    border: 1px solid rgba(0, 184, 148, 0.3);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 24px;
    text-align: center;
}

.cancelled-savings .savings-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--green);
}

.cancelled-savings .savings-label {
    font-size: 13px;
    color: var(--text-dim);
    margin-top: 4px;
}

.cancelled-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cancelled-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    opacity: 0.75;
}

.cancelled-card .sub-icon {
    opacity: 0.5;
}

.cancelled-meta {
    font-size: 12px;
    color: var(--text-dim);
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.cancelled-saving {
    color: var(--green);
    font-weight: 600;
    font-size: 13px;
}

.cancelled-actions button {
    background: var(--surface2);
    border: 1px solid var(--border);
    color: var(--text-dim);
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.cancelled-actions button:hover {
    color: var(--text);
    border-color: var(--text-dim);
}

/* Auth Screen */
.auth-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
}

.auth-screen.hidden {
    display: none;
}

.auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.auth-title {
    font-size: 32px;
    margin-bottom: 8px;
}

.auth-subtitle {
    color: var(--text-dim);
    font-size: 14px;
    margin-bottom: 28px;
}

.auth-card .form-group {
    text-align: left;
}

.auth-btn {
    margin-top: 4px;
}

.auth-hint {
    font-size: 13px;
    color: var(--text-dim);
    margin-top: 12px;
    min-height: 20px;
}

.auth-hint.error {
    color: var(--red);
}

.auth-hint.success {
    color: var(--green);
}

/* Sync status */
.sync-status {
    font-size: 12px;
    color: var(--text-dim);
}
.sync-status.sync-error {
    color: #e17055;
}

.signout-link {
    font-size: 12px;
    color: var(--text-dim);
    cursor: pointer;
    text-decoration: none;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 5px 14px;
}

.signout-link:hover {
    color: var(--text);
}

/* Responsive */
@media (max-width: 700px) {
    .app {
        padding: 16px 12px;
    }

    .app-bar {
        padding: 12px 12px;
        margin: -16px -12px 12px;
    }

    header {
        margin-bottom: 14px;
    }

    h1 {
        font-size: 20px;
    }

    .header-right {
        flex-wrap: wrap;
        gap: 8px;
    }

    .header-right .btn-add {
        padding: 8px 14px;
        font-size: 12px;
    }

    .header-right .btn-secondary {
        padding: 8px 12px;
        font-size: 11px;
    }

    .top-controls {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }

    .top-controls > * {
        width: 100%;
    }

    .filters {
        flex-shrink: 0;
        display: flex;
    }

    .filter-btn {
        padding: 9px 0;
        font-size: 13px;
        flex: 1;
        text-align: center;
    }

    .view-switcher {
        flex: 1;
        padding: 3px;
    }

    .view-btn {
        flex: 1;
        padding: 9px 6px;
        font-size: 13px;
        text-align: center;
    }

    .dashboard {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .stat-card {
        padding: 12px;
    }

    .stat-label {
        font-size: 10px;
    }

    .stat-value {
        font-size: 18px;
    }

    .upcoming-card .stat-value {
        font-size: 12px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .category-breakdown,
    .history-charts {
        grid-template-columns: 1fr;
    }

    .sub-card {
        padding: 14px;
        gap: 10px;
        flex-wrap: wrap;
        position: relative;
    }

    .sub-icon {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .sub-info {
        flex: 1;
        min-width: 0;
        padding-right: 60px; /* space for actions */
    }

    .sub-cost {
        width: 100%;
        text-align: left;
        display: flex;
        align-items: baseline;
        gap: 4px;
        padding-left: 46px; /* align with text after icon */
    }

    .sub-cost-value {
        font-size: 16px;
    }

    .sub-cost-converted {
        margin-left: 4px;
    }

    .sub-actions {
        opacity: 1;
        position: absolute;
        top: 14px;
        right: 14px;
    }

    .sub-actions button {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .sub-name {
        font-size: 14px;
    }

    .sub-meta {
        font-size: 11px;
        gap: 6px;
    }

    /* Search & sort stack vertically */
    .list-controls {
        flex-direction: column;
        gap: 8px;
    }

    .sort-select {
        min-width: 0;
        width: 100%;
    }

    /* Annual projection */
    .annual-projection {
        padding: 14px;
    }

    .projection-item {
        font-size: 12px;
    }

    .projection-total {
        font-size: 14px;
    }

    /* History view */
    .history-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .month-nav {
        justify-content: center;
    }

    .history-summary {
        font-size: 18px;
        padding: 16px;
    }

    .pie-container {
        width: 140px;
        height: 140px;
    }

    .pie-center {
        inset: 24px;
        font-size: 13px;
    }

    .legend-item {
        font-size: 12px;
    }

    /* Trend chart */
    .trend-chart {
        height: 120px;
        gap: 4px;
        overflow-x: auto;
    }

    .trend-bar-wrap {
        min-width: 44px;
    }

    .trend-bar-value,
    .trend-bar-label {
        font-size: 9px;
    }

    /* History table */
    .history-table th,
    .history-table td {
        padding: 10px 10px;
        font-size: 12px;
    }

    .history-table th:nth-child(2),
    .history-table td:nth-child(2) {
        display: none;
    }

    /* Cancelled view */
    .cancelled-card {
        flex-wrap: wrap;
        padding: 14px;
        gap: 10px;
    }

    .cancelled-saving {
        font-size: 12px;
    }

    .cancelled-actions {
        width: 100%;
        display: flex;
        gap: 8px;
    }

    .cancelled-actions button {
        flex: 1;
        text-align: center;
    }

    /* Modal */
    .modal {
        padding: 20px;
        width: 95%;
    }

    .modal-header h2 {
        font-size: 18px;
    }

    /* Auth */
    .auth-card {
        padding: 28px 20px;
    }

    .auth-title {
        font-size: 26px;
    }
}

/* Extra small screens */
@media (max-width: 400px) {
    .dashboard {
        grid-template-columns: 1fr;
    }

    .stat-value {
        font-size: 18px;
    }

    .filter-btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .sub-actions button {
        width: 26px;
        height: 26px;
        font-size: 11px;
    }
}
