:root {
    --primary-yellow: #fbc02d;
    --active-yellow: #ffca28;
    --primary-red: #b71c1c;
    --danger-red: #e53935;
    --glass-bg: rgba(0, 0, 0, 0.55);
    --glass-strong: rgba(0, 0, 0, 0.72);
    --glass-light: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.12);
    --text-main: #ffffff;
    --text-muted: #b0bec5;
    --money-blue: #42a5f5;
    --growth-green: #4caf50;
    --radius-card: 12px;
}

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

html,
body {
    min-height: 100%;
}

body {
    font-family: "Segoe UI", Arial, sans-serif;
    color: var(--text-main);
    background:
        linear-gradient(rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.78)),
        url("../anhnen.jpg") center / cover fixed no-repeat;
    line-height: 1.4;
}

a {
    color: inherit;
}

button,
input,
select,
textarea {
    font: inherit;
}

.app-container {
    width: 100%;
    max-width: 480px;
    min-height: 100vh;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
    background:
        linear-gradient(rgba(0, 0, 0, 0.36), rgba(0, 0, 0, 0.72)),
        url("../anhnen.jpg") center / cover fixed no-repeat;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-bottom: 78px;
}

.yellow-header {
    height: 78px;
    background: var(--primary-yellow);
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    padding: 8px 14px;
    color: var(--primary-red);
    font-weight: 800;
    position: sticky;
    top: 0;
    z-index: 1001;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.22);
}

.logo-center {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

.header-logo {
    display: block;
    max-width: 150px;
    max-height: 62px;
    object-fit: contain;
}

.header-icon-btn {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 10px;
    background: rgba(183, 28, 28, 0.08);
    color: var(--primary-red);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    position: relative;
}

.header-icon-btn i {
    font-size: 20px;
}

.notification-icon {
    justify-self: end;
}

.badge-count {
    position: absolute;
    top: 3px;
    right: 3px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #d71920;
    color: #ffffff;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.side-menu-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 1200;
}

.side-menu-backdrop.open {
    opacity: 1;
    visibility: visible;
}

.side-menu {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 50%;
    width: min(82vw, 360px);
    transform: translateX(-240px) translateX(-105%);
    background: rgba(0, 0, 0, 0.78);
    border-right: 1px solid var(--glass-border);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 1201;
    padding: 18px 16px;
    color: #ffffff;
    transition: transform 0.22s ease;
    box-shadow: 14px 0 28px rgba(0, 0, 0, 0.36);
}

.side-menu.open {
    transform: translateX(-240px);
}

.side-menu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.side-menu-head img {
    max-width: 128px;
    max-height: 52px;
    object-fit: contain;
}

.side-menu-close {
    width: 36px;
    height: 36px;
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.side-menu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 0 12px;
    margin-bottom: 8px;
    border-radius: var(--radius-card);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    text-decoration: none;
    color: #ffffff;
    font-weight: 700;
}

.side-menu-link i {
    width: 20px;
    color: var(--active-yellow);
    text-align: center;
}

.glass-card,
.glass-list-item,
.form-card,
.auth-overlay-box {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-card);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: var(--text-main);
}

.glass-list-item {
    padding: 12px 14px;
}

.page-shell {
    padding: 16px;
}

.page-title {
    color: #ffffff;
    font-size: 20px;
    font-weight: 900;
    text-align: center;
    margin: 4px 0 16px;
    text-transform: uppercase;
}

.text-muted {
    color: var(--text-muted);
}

.text-highlight-blue,
.money-blue {
    color: var(--money-blue);
}

.growth-green {
    color: var(--growth-green);
}

.form-input,
.glass-input,
.form-card input,
.form-card select,
.form-card textarea,
.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    min-height: 48px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid #ffffff;
    border-radius: 8px;
    color: #ffffff;
    padding: 11px 12px;
    outline: none;
}

.form-input::placeholder,
.glass-input::placeholder,
.form-card input::placeholder,
.input-group input::placeholder,
.input-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.68);
}

.form-card select,
.input-group select {
    color-scheme: dark;
}

.primary-btn,
.btn-submit,
.btn-auth-submit {
    width: 100%;
    min-height: 50px;
    border: 0;
    border-radius: 8px;
    background: var(--danger-red);
    color: #ffffff;
    font-weight: 900;
    cursor: pointer;
}

.alert {
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 14px;
    font-size: 14px;
    text-align: center;
}

.alert-danger {
    background: rgba(229, 57, 53, 0.28);
    border: 1px solid rgba(255, 82, 82, 0.8);
    color: #ffcdd2;
}

.alert-success {
    background: rgba(76, 175, 80, 0.22);
    border: 1px solid rgba(76, 175, 80, 0.72);
    color: #c8e6c9;
}

.bottom-nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    position: fixed;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 -12px 28px rgba(0, 0, 0, 0.32);
}

.bottom-nav .nav-item {
    height: 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: rgba(255, 255, 255, 0.74);
    text-decoration: none;
    font-size: 12px;
    font-weight: 800;
    border-top: 3px solid transparent;
}

.bottom-nav .nav-item.active {
    color: var(--active-yellow);
    background: rgba(255, 202, 40, 0.12);
    border-top-color: var(--active-yellow);
}

.bottom-nav .nav-item i {
    font-size: 20px;
}

.bottom-nav .nav-item span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 480px) {
    .side-menu {
        left: 0;
        transform: translateX(-105%);
    }

    .side-menu.open {
        transform: translateX(0);
    }
}
