:root {
    --background: #101010;
    --surface: #181818;
    --surface-hover: #202020;
    --border: #292929;

    --text: #f5f5f5;
    --muted: #929292;

    --accent: #a8d500;
    --accent-hover: #b9e600;

    --radius: 18px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;

    background: var(--background);
    color: var(--text);

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

button {
    font: inherit;
}

.app {
    width: min(100% - 32px, 720px);
    margin: 0 auto;
    padding: 32px 0 48px;
}


/* Header */

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 28px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;

    font-size: 21px;
    font-weight: 700;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 38px;
    height: 38px;

    border-radius: 12px;

    background: var(--accent);
    font-size: 20px;
}

.account {
    display: flex;
    align-items: center;
    gap: 10px;

    color: var(--muted);
    font-size: 14px;
}

.account a {
    color: var(--muted);
    text-decoration: none;
}

.avatar {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 34px;
    height: 34px;

    border-radius: 50%;

    background: #303030;
    color: white;

    font-weight: 600;
}


/* Balance */

.balance-card {
    padding: 30px;

    border: 1px solid var(--border);
    border-radius: var(--radius);

    background: var(--surface);
}

.balance-label {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 8px;
}

.balance {
    font-size: 46px;
    font-weight: 700;
    letter-spacing: -2px;
}

.balance-actions {
    display: flex;
    gap: 10px;

    margin-top: 24px;
}

.primary-button,
.secondary-button {
    border: 0;
    border-radius: 12px;

    padding: 11px 22px;

    font-weight: 600;
    cursor: pointer;

    transition: 0.15s ease;
}

.primary-button {
    background: var(--accent);
    color: #111;
}

.primary-button:hover {
    background: var(--accent-hover);
}

.secondary-button {
    background: #292929;
    color: var(--text);
}

.secondary-button:hover {
    background: #333;
}


/* Sections */

.section {
    margin-top: 32px;
}

.section h2 {
    margin: 0 0 14px;

    font-size: 16px;
    font-weight: 600;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-header a {
    color: var(--accent);
    text-decoration: none;
    font-size: 14px;
}


/* Quick Actions */

.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;

    padding: 18px 10px;

    border: 1px solid var(--border);
    border-radius: 15px;

    background: var(--surface);
    color: var(--text);

    cursor: pointer;

    transition: 0.15s ease;
}

.action-card:hover {
    background: var(--surface-hover);
    transform: translateY(-1px);
}

.action-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;

    border-radius: 50%;

    background: #292929;

    color: var(--accent);
    font-size: 20px;
}


/* Transactions */

.transactions {
    overflow: hidden;

    border: 1px solid var(--border);
    border-radius: var(--radius);

    background: var(--surface);
}

.transaction {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 18px 20px;

    border-bottom: 1px solid var(--border);
}

.transaction:last-child {
    border-bottom: 0;
}

.transaction-info {
    display: flex;
    align-items: center;
    gap: 13px;
}

.transaction-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;

    border-radius: 50%;

    background: #292929;
}

.transaction-name {
    font-weight: 600;
}

.transaction-date {
    margin-top: 3px;

    color: var(--muted);
    font-size: 13px;
}

.transaction-amount {
    font-weight: 600;
}

.transaction-amount.positive {
    color: var(--accent);
}

.transaction-amount.negative {
    color: var(--text);
}


/* Empty state */

.empty-state {
    padding: 48px 20px;

    text-align: center;
}

.empty-icon {
    margin-bottom: 12px;

    font-size: 30px;
}

.empty-state p {
    margin: 0 0 5px;

    font-weight: 600;
}

.empty-state span {
    color: var(--muted);
    font-size: 14px;
}


/* Footer */

footer {
    display: flex;
    justify-content: center;
    gap: 8px;

    margin-top: 40px;

    color: #666;
    font-size: 12px;
}


/* Mobile */

@media (max-width: 500px) {

    .app {
        width: min(100% - 20px, 720px);
        padding-top: 20px;
    }

    .balance-card {
        padding: 24px;
    }

    .balance {
        font-size: 38px;
    }

    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }

}

/* Authentication */

.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 100vh;
    padding: 24px;
}

.auth-container {
    width: 100%;
    max-width: 420px;

    text-align: center;
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 58px;
    height: 58px;

    margin: 0 auto 24px;

    border-radius: 18px;

    background: var(--accent);

    font-size: 30px;
}

.auth-header {
    margin-bottom: 24px;
}

.auth-header h1 {
    margin: 0 0 8px;

    font-size: 28px;
    letter-spacing: -0.5px;
}

.auth-header p {
    margin: 0;

    color: var(--muted);
    font-size: 15px;
}

.auth-card {
    padding: 26px;

    border: 1px solid var(--border);
    border-radius: var(--radius);

    background: var(--surface);

    text-align: left;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;

    margin-bottom: 8px;

    color: #d8d8d8;
    font-size: 14px;
    font-weight: 600;
}

.password-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.password-label label {
    margin-bottom: 8px;
}

.password-label a {
    color: var(--accent);
    font-size: 13px;
    text-decoration: none;
}

.form-group input {
    width: 100%;

    padding: 13px 14px;

    border: 1px solid var(--border);
    border-radius: 12px;

    outline: none;

    background: #111;
    color: var(--text);

    font: inherit;
    font-size: 15px;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.form-group input::placeholder {
    color: #606060;
}

.form-group input:focus {
    border-color: var(--accent);

    box-shadow: 0 0 0 3px rgba(168, 213, 0, 0.1);
}

.login-button {
    width: 100%;

    margin-top: 4px;
    padding: 13px;

    border: 0;
    border-radius: 12px;

    background: var(--accent);
    color: #111;

    font: inherit;
    font-weight: 700;

    cursor: pointer;

    transition: background 0.15s ease;
}

.login-button:hover {
    background: var(--accent-hover);
}

.login-button:active {
    transform: translateY(1px);
}

#login-error {
    margin: -4px 0 16px;

    color: #ff7070;
    font-size: 13px;
}

.auth-footer {
    display: flex;
    justify-content: center;
    gap: 5px;

    margin-top: 20px;
    margin-bottom: 500px;

    color: var(--muted);
    font-size: 14px;
}

.auth-footer a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.back-to-home {
    display: flex;
    justify-content: right;

    margin-bottom: 75px;
}

.back-to-home a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}
