* {
    margin: 0;
    padding: 0;
}

button,
input {
    font: inherit;
}


.login-page {
    position: relative;
    min-height: 100vh;
    display: grid;
    place-items: center;
    overflow: hidden;
    isolation: isolate;
    padding: 32px 18px;
    background: radial-gradient(circle at 15% 15%, #c9a35d38, transparent 32%), radial-gradient(circle at 85% 85%, #0d453b33, transparent 35%), linear-gradient(135deg, #f5f7f3, #dfe8e2);
}


.background-logo {
    position: absolute;
    z-index: -2;
    inset: -12%;
    background-position: center;
    background-repeat: no-repeat;
    background-size: min(900px, 80vw);
    filter: blur(13px);
    opacity: 0.24;
    transform: scale(1.08);
}


.background-overlay {
    position: absolute;
    z-index: -1;
    inset: 0;
    background: #f4f7f361;
    backdrop-filter: blur(1px);
}


.glass-card {
    width: min(100%, 470px);
    padding: 34px 38px 28px;
    border: 1px solid #ffffff8c;
    border-radius: 28px;
    background: #ffffffa3;
    box-shadow: 0 30px 80px #07352e29, inset 0 1px 0 #ffffffbf;
    backdrop-filter: blur(22px) saturate(125%);
}


.card-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 8px;
}


.card-logo img {
    width: 180px;
    height: auto;
    display: block;
    mix-blend-mode: multiply;
}


.heading {
    text-align: center;
    margin: 10px 0 28px;
}


.eyebrow {
    display: inline-block;
    margin-bottom: 9px;
    color: #0d453b;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
}


h1 {
    margin: 0;
    color: #0d453b;
    font-size: clamp(28px, 5vw, 35px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}


.heading p {
    max-width: 360px;
    margin: 12px auto 0;
    color: #667773;
    font-size: 14px;
    line-height: 1.65;
}


.login-form {
    display: grid;
    gap: 9px;
}


.login-form label,
.password-row label {
    color: #07352e;
    font-size: 13px;
    font-weight: 600;
}


.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}


.input-icon {
    position: absolute;
    left: 16px;
    color: #c9a35d;
    font-size: 13px;
    pointer-events: none;
}


.input-wrap input,
.select {
    width: 100%;
    height: 54px;
    border: 1px solid #0d453b21;
    border-radius: 15px;
    outline: none;
    padding: 0 16px 0 43px;
    color: #07352e;
    background: #ffffffa8;
    transition: 0.2s ease;
}


.input-wrap input::placeholder {
    color: #9aa7a3;
}


.input-wrap input:focus {
    border-color: #c9a35dcc;
    background: #ffffffe6;
    box-shadow: 0 0 0 4px #c9a35d1f;
}


.password-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2px;
}


a {
    color: #0d453b;
    text-decoration: none;
    font-weight: 600;
}


a:hover {
    text-decoration: underline;
}


.password-row a {
    color: #c9a35d;
    font-size: 12px;
}


.toggle-password {
    position: absolute;
    right: 12px;
    border: 0;
    background: transparent;
    color: #0d453b;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.input-wrap .toggle-password {
    top: 50%;
    transform: translateY(-50%);
}

.input-wrap:has(.toggle-password) input {
    padding-right: 78px;
}


#password {
    padding-right: 65px;
}


.remember {
    display: flex !important;
    align-items: center;
    gap: 9px;
    margin: 2px 0 9px;
    color: #667773 !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    cursor: pointer;
}


.remember input {
    width: 16px;
    height: 16px;
    accent-color: #0d453b;
}

.register-card .remember {
    align-items: flex-start;
    line-height: 1.6;
}

.register-card .remember input {
    flex: 0 0 16px;
    margin-top: 2px;
}

.register-card .remember a {
    color: #0d453b;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.register-card .remember a:focus-visible {
    outline: 2px solid #9a6c22;
    outline-offset: 3px;
}


.login-button {
    height: 55px;
    border: 0;
    border-radius: 15px;
    background: linear-gradient(135deg, #0d453b, #176154);
    color: #ffffff;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: 0 12px 25px #0d453b38;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}


.login-button:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
    box-shadow: 0 15px 30px #0d453b45;
}


.login-button:active {
    transform: translateY(0);
}

.auth-button-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-decoration: none;
}

.auth-button-link:hover {
    color: #fff;
    text-decoration: none;
}

.auth-status-icon {
    display: grid;
    width: 58px;
    height: 58px;
    margin: 8px auto 0;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(135deg, #0d453b, #176154);
    box-shadow: 0 12px 24px #0d453b2e;
    font-size: 23px;
    place-items: center;
}

.auth-status-icon-error {
    background: linear-gradient(135deg, #8b3c35, #b6574d);
    box-shadow: 0 12px 24px #8b3c352e;
}

.form-errors,
.form-errors .errorlist {
    margin: -4px 0 8px;
    padding: 0;
    color: #9a3d34;
    font-size: 12px;
    line-height: 1.5;
    list-style: none;
}


.form-message {
    min-height: 18px;
    margin: 1px 0 0;
    text-align: center;
    font-size: 12px;
    color: #0d453b;
}


.divider {
    display: flex;
    align-items: center;
    gap: 13px;
    margin: 20px 0 16px;
    color: #87938f;
    font-size: 11px;
}


.divider::before,
.divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: #0d453b1f;
}


.signup {
    margin: 0;
    text-align: center;
    color: #667773;
    font-size: 13px;
    line-height: 1.6;
}


.signup a {
    color: #c9a35d;
}


.footer-note {
    margin: 20px 0 0;
    text-align: center;
    color: #0d453b7a;
    font-size: 10px;
    letter-spacing: 0.06em;
}

/* =========================================
   PROFILE DASHBOARD
========================================= */

.profile-page {
    min-height: calc(100vh - 55px);
    padding: 42px 20px 70px;
    color: #143d36;
    background:
        radial-gradient(circle at 0 0, rgba(201, 163, 93, 0.12), transparent 28%),
        linear-gradient(180deg, #f7f9f7 0%, #eef3ef 100%);
}

.profile-container {
    width: min(100%, 1400px);
    margin: 0 auto;
}

.email-quota-warning {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    margin-bottom: 24px;
    padding: 16px 19px;
    border: 1px solid #e8c77e;
    border-left: 5px solid #c58a24;
    border-radius: 14px;
    color: #674611;
    background: #fff8e8;
}

.email-quota-warning > i { margin-top: 4px; font-size: 18px; }
.email-quota-warning strong { display: block; font-size: 14px; }
.email-quota-warning p { margin: 3px 0 0; font-size: 13px; line-height: 1.5; }
.email-quota-exhausted { border-color: #e9b8b5; border-left-color: #bb4b44; color: #762b2b; background: #fff1ef; }

.email-quota-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px 28px;
    margin-bottom: 32px;
    padding: 23px 26px;
    border: 1px solid #d9e8dd;
    border-radius: 20px;
    background: linear-gradient(135deg, #fff 45%, #f0f7f1 100%);
    box-shadow: 0 12px 28px rgba(13, 69, 59, 0.07);
}

.email-quota-heading { display: flex; align-items: center; gap: 15px; min-width: 0; }
.email-quota-icon { display: grid; place-items: center; flex: 0 0 48px; width: 48px; height: 48px; border-radius: 14px; color: #0d453b; background: #e2f0e6; font-size: 21px; }
.email-quota-heading .section-kicker { margin-bottom: 2px; }
.email-quota-heading h2 { margin: 0; color: #0d453b; font-size: 19px; font-weight: 750; }
.email-quota-heading p { margin: 3px 0 0; color: #60776c; font-size: 12px; }
.email-quota-total { color: #0d453b; white-space: nowrap; font-variant-numeric: tabular-nums; }
.email-quota-total strong { font-size: clamp(26px, 3vw, 36px); letter-spacing: -.04em; }
.email-quota-total span { color: #687e72; font-size: 17px; font-weight: 650; }
.email-quota-track { grid-column: 1 / -1; height: 11px; overflow: hidden; border-radius: 99px; background: #e5ede7; }
.email-quota-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #0d453b, #57a979); transition: width .3s ease; }
.email-quota-card-warning .email-quota-track span { background: linear-gradient(90deg, #bc882c, #e5b95d); }
.email-quota-remaining { grid-column: 1 / -1; margin: -10px 0 0; color: #60776c; font-size: 12px; }

.profile-heading,
.section-title-row,
.dashboard-card-heading,
.statistic-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.profile-heading {
    gap: 20px;
    margin-bottom: 38px;
}

.profile-eyebrow,
.section-kicker {
    display: block;
    margin-bottom: 5px;
    color: #b38b42;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.profile-heading h1 {
    color: #0d453b;
    font-size: clamp(28px, 4vw, 40px);
    letter-spacing: -0.04em;
}

.profile-heading p {
    margin: 9px 0 0;
    color: #71817d;
    font-size: 14px;
}

.profile-period {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 11px 15px;
    border: 1px solid rgba(13, 69, 59, 0.10);
    border-radius: 12px;
    color: #526762;
    background: rgba(255, 255, 255, 0.75);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.profile-period i {
    color: #c9a35d;
}

.profile-heading-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.profile-scan-link { display: inline-flex; align-items: center; gap: 12px; min-height: 60px; padding: 9px 13px 9px 10px; border: 1px solid #0d453b; border-radius: 14px; color: #fff; background: #0d453b; box-shadow: 0 8px 20px #0d453b1f; text-decoration: none; white-space: nowrap; transition: background .15s ease, transform .15s ease, box-shadow .15s ease; }
.profile-scan-link:hover { color: #fff; background: #176154; transform: translateY(-2px); box-shadow: 0 11px 24px #0d453b2b; text-decoration: none; }
.profile-scan-link:focus-visible { outline: 3px solid #c9a35d; outline-offset: 3px; }
.profile-scan-icon { display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; border-radius: 10px; color: #0d453b; background: #fff; font-size: 19px; }
.profile-scan-text { display: grid; gap: 1px; line-height: 1.2; }
.profile-scan-text strong { font-size: 13px; font-weight: 750; }
.profile-scan-text small { color: #d8e9e1; font-size: 11px; font-weight: 500; }
.profile-scan-arrow { margin-left: 5px; font-size: 12px; opacity: .8; }

.section-title-row {
    margin-bottom: 14px;
}

.section-title-row h2,
.dashboard-card-heading h2,
.statistic-title h2 {
    margin: 0;
    color: #143d36;
    font-size: 17px;
    font-weight: 750;
    letter-spacing: -0.02em;
}

.day-cards {
    display: grid;
    grid-template-columns: repeat(10, minmax(120px, 1fr));
    gap: 10px;
    padding-bottom: 7px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-inline: contain;
    touch-action: pan-x pan-y;
    scrollbar-color: rgba(13, 69, 59, 0.18) transparent;
    border-radius: 10px;
}

.day-card {
    display: block;
    min-width: 120px;
    overflow: hidden;
    border: 1px solid rgba(13, 69, 59, 0.09);
    border-radius: 16px;
    color: inherit;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 8px 24px rgba(7, 53, 46, 0.05);
    text-decoration: none;
    user-select: none;
    -webkit-user-drag: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.day-card:hover {
    color: inherit;
    border-color: rgba(13, 69, 59, 0.24);
    box-shadow: 0 11px 28px rgba(7, 53, 46, 0.10);
    text-decoration: none;
}

.day-card:focus-visible {
    outline: 3px solid #9a6c22;
    outline-offset: 3px;
}

.day-card-date {
    padding: 13px 8px 11px;
    text-align: center;
    background: rgba(13, 69, 59, 0.045);
}

.day-card-date span,
.day-card-date small {
    display: block;
    color: #75847f;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.day-card-date strong {
    display: block;
    margin: 3px 0 1px;
    color: #0d453b;
    font-size: 25px;
    line-height: 1;
}

.day-card-data {
    padding: 12px 10px;
}

.day-card-data p {
    display: grid;
    grid-template-columns: 19px auto;
    align-items: center;
    gap: 0 7px;
    margin: 0;
}

.day-card-data p + p {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(13, 69, 59, 0.07);
}

.day-card-data i {
    grid-row: 1 / 3;
    color: #c9a35d;
    font-size: 15px;
}

.day-card-data strong {
    color: #143d36;
    font-size: 17px;
    line-height: 1;
}

.day-card-data span {
    margin-top: 3px;
    color: #8a9692;
    font-size: 10px;
}

.day-card-today {
    border-color: rgba(13, 69, 59, 0.28);
    box-shadow: 0 12px 28px rgba(7, 53, 46, 0.12);
}

.day-card-today .day-card-date {
    background: #0d453b;
}

.day-card-today .day-card-date span,
.day-card-today .day-card-date small {
    color: rgba(255, 255, 255, 0.65);
}

.day-card-today .day-card-date strong {
    color: #ffffff;
}

.chart-grid {
    display: flex;
    gap: 18px;
    margin-top: 30px;
}

.dashboard-card {
    border: 1px solid rgba(13, 69, 59, 0.09);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.90);
    box-shadow: 0 10px 32px rgba(7, 53, 46, 0.055);
}

.chart-card {
    flex: 1 1 0;
    min-width: 0;
    padding: 23px;
}

.dashboard-card-heading {
    gap: 14px;
    margin-bottom: 24px;
}

.line-chart {
    height: 248px;
    display: flex;
    gap: 10px;
}

.line-chart-content {
    min-width: 0;
    flex: 1;
}

.line-chart svg {
    width: 100%;
    height: 215px;
    overflow: visible;
}

.chart-grid-line {
    stroke: rgba(13, 69, 59, 0.08);
    stroke-width: 1;
    stroke-dasharray: 4 5;
}

.chart-area {
    fill: url(#bookingArea);
}

.chart-line {
    fill: none;
    stroke: #c9a35d;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.chart-x-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    color: #8a9692;
    font-size: 9px;
}

.chart-x-labels span {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.chart-x-labels strong,
.candle small strong {
    color: #143d36;
    font-size: 10px;
}

.candle-chart {
    position: relative;
    height: 248px;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    padding: 10px 8px 27px;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0,
        transparent 59px,
        rgba(13, 69, 59, 0.07) 60px
    );
}

.candle {
    position: relative;
    width: 34px;
    height: 205px;
}

.candle-line,
.candle-body {
    position: absolute;
    left: 50%;
    display: block;
    transform: translateX(-50%);
}

.candle-line {
    bottom: 0;
    width: 2px;
    height: var(--height);
    border-radius: 3px;
    background: #176154;
}

.candle-body {
    bottom: 0;
    width: 16px;
    height: var(--height);
    border-radius: 4px;
    background: #176154;
    box-shadow: 0 5px 12px rgba(13, 69, 59, 0.14);
    transform: translateX(-50%) scaleY(0.55);
    transform-origin: bottom;
}

.candle small {
    position: absolute;
    bottom: -24px;
    left: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: #8a9692;
    font-size: 9px;
    transform: translateX(-50%);
}

.statistics-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 18px;
}

.statistic-card {
    min-width: 270px;
    flex: 1 1 calc(50% - 9px);
    padding: 21px;
}

.statistic-title {
    justify-content: flex-start;
    gap: 12px;
}

.statistic-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 11px;
    color: #c9a35d;
    background: rgba(201, 163, 93, 0.12);
    font-size: 14px;
}

.statistic-title h2 {
    font-size: 14px;
}

.statistic-title p {
    margin: 3px 0 0;
    color: #8a9692;
    font-size: 10px;
}

.percentage-bar {
    height: 12px;
    display: flex;
    gap: 2px;
    overflow: hidden;
    margin-top: 22px;
    border-radius: 20px;
    background: #e6ece8;
}

.segment {
    display: block;
    height: 100%;
}

.segment.green { background: #176154; }
.segment.gold { background: #c9a35d; }
.segment.soft { background: #9db2ac; }
.segment.red { background: #a96e67; }

.percentage-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-top: 14px;
}

.percentage-legend span {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #7b8985;
    font-size: 9px;
}

.percentage-legend strong {
    margin-left: 2px;
    color: #143d36;
    font-size: 10px;
}

.percentage-legend i {
    width: 6px;
    height: 6px;
    display: block;
    border-radius: 50%;
}

.green-dot { background: #176154; }
.gold-dot { background: #c9a35d; }
.soft-dot { background: #9db2ac; }
.red-dot { background: #a96e67; }

/* =========================================
   NAVBAR
========================================= */

.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    background: rgba(255, 255, 255, 0.78);
    border-bottom: 1px solid rgba(13, 69, 59, 0.10);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 30px rgba(7, 53, 46, 0.06);
}

.navbar-container {
    width: min(100% - 40px, 1400px);
    min-height: 55px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}


/* =========================================
   LOGO
========================================= */

.navbar-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
}

.navbar-logo img {
    width: 170px;
    height: auto;
    display: block;
}

.navbar-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-left: auto;
}

.nav-link {
    position: relative;
    padding: 10px 14px;
    color: #526762;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 10px;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover {
    color: #0d453b;
    background: rgba(13, 69, 59, 0.06);
    text-decoration: none;
}

.nav-link.active {
    color: #0d453b;
}

.nav-link.active::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 3px;
    height: 2px;
    border-radius: 20px;
    background: #c9a35d;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.language-dropdown,
.user-dropdown {
    position: relative;
}

.language-button {
    height: 42px;
    padding: 0 11px;
    display: flex;
    align-items: center;
    gap: 7px;
    border: 1px solid rgba(13, 69, 59, 0.10);
    border-radius: 11px;
    color: #0d453b;
    background: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.language-button:hover {
    background: white;
    border-color: rgba(13, 69, 59, 0.18);
}

.language-button span {
    font-size: 11px;
    font-weight: 700;
}

.language-button i:first-child {
    color: #c9a35d;
    font-size: 14px;
}

.language-button i:last-child {
    font-size: 9px;
    color: #7c8b87;
}

.language-menu {
    position: absolute;
    top: calc(100% + 9px);
    right: 0;
    width: 145px;
    padding: 7px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(13, 69, 59, 0.10);
    border-radius: 13px;
    box-shadow: 0 18px 45px rgba(7, 53, 46, 0.13);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.98);
    transform-origin: top right;
    transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s ease;
}

.language-dropdown.open .language-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.language-menu form {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.language-menu button {
    width: 100%;
    padding: 9px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #526762;
    text-align: left;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.language-menu button:hover {
    background: rgba(13, 69, 59, 0.06);
    color: #0d453b;
}

.user-button {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 170px;
    padding: 5px 10px 5px 5px;
    border: 1px solid rgba(13, 69, 59, 0.10);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    text-align: left;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.user-button:hover {
    background: white;
    border-color: rgba(13, 69, 59, 0.18);
}

.user-avatar {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 10px;
    color: white;
    background: linear-gradient(135deg, #0d453b, #176154);
    font-size: 12px;
}

.user-info {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-info strong {
    overflow: hidden;
    color: #143d36;
    font-size: 11px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-info small {
    color: #8a9692;
    font-size: 9px;
}

.user-button > i {
    color: #8a9692;
    font-size: 9px;
}

.user-menu {
    position: absolute;
    top: calc(100% + 9px);
    right: 0;
    width: 205px;
    padding: 7px;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(13, 69, 59, 0.10);
    border-radius: 14px;
    box-shadow: 0 18px 45px rgba(7, 53, 46, 0.14);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.98);
    transform-origin: top right;
    transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s ease;
}

.user-dropdown.open .user-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.user-menu a,
.user-menu form button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 9px;
    color: #526762;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.user-menu form button{
    width: 100%;
    border: none;
    background: none;
}

.user-menu a:hover,
.user-menu form button:hover {
    color: #0d453b;
    background: rgba(13, 69, 59, 0.06);
    text-decoration: none;
}

.user-menu a i,
.user-menu form button i{
    width: 16px;
    color: #c9a35d;
    text-align: center;
}

.user-menu-divider {
    height: 1px;
    margin: 5px 4px;
    background: rgba(13, 69, 59, 0.08);
}

.user-menu .logout-link {
    color: #9b5f58;
}

.user-menu .logout-link i {
    color: #9b5f58;
}

.mobile-menu-button {
    width: 44px;
    height: 44px;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 1px solid rgba(13, 69, 59, 0.10);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.55);
    cursor: pointer;
}

.mobile-menu-button span {
    width: 18px;
    height: 2px;
    border-radius: 10px;
    background: #0d453b;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
}

.mobile-menu-button.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-button.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-button.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu {
    width: min(100% - 24px, 600px);
    margin: 0 auto;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px);
    visibility: hidden;
    transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, visibility 0.4s ease;
}

.mobile-menu.open {
    max-height: 600px;
    padding: 10px 0 18px;
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.mobile-menu-links,
.mobile-menu-footer {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mobile-menu-links a,
.mobile-menu-footer a {
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 46px;
    padding: 0 14px;
    border-radius: 11px;
    color: #526762;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.25s ease, transform 0.35s ease, background 0.2s ease, color 0.2s ease;
}

.mobile-menu.open .mobile-menu-links a,
.mobile-menu.open .mobile-menu-footer a {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu.open .mobile-menu-links a:nth-child(1) {
    transition-delay: 0.05s;
}

.mobile-menu.open .mobile-menu-links a:nth-child(2) {
    transition-delay: 0.09s;
}

.mobile-menu.open .mobile-menu-links a:nth-child(3) {
    transition-delay: 0.13s;
}

.mobile-menu.open .mobile-menu-links a:nth-child(4) {
    transition-delay: 0.17s;
}

.mobile-menu.open .mobile-menu-links a:nth-child(5) {
    transition-delay: 0.21s;
}

.mobile-menu.open .mobile-menu-footer a {
    transition-delay: 0.25s;
}

.mobile-menu-links a:hover,
.mobile-menu-footer a:hover {
    color: #0d453b;
    background: rgba(13, 69, 59, 0.06);
    text-decoration: none;
}

.mobile-menu-links a i,
.mobile-menu-footer a i {
    width: 20px;
    color: #c9a35d;
    text-align: center;
}

.mobile-menu-footer {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(13, 69, 59, 0.09);
}

.mobile-menu .logout-link {
    color: #9b5f58;
}

.mobile-menu .logout-link i {
    color: #9b5f58;
}

.django-messages {
    position: fixed;
    top: 90px;
    left: 50%;
    z-index: 1000;
    width: min(90%, 560px);
    transform: translateX(-50%);
}

.django-message {
    margin-bottom: 12px;
    padding: 14px 18px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: #fff;
    font-size: 0.95rem;
    line-height: 1.5;
    box-shadow: 0 12px 30px rgb(0 0 0 / 20%);
    backdrop-filter: blur(12px);
}

.django-message {
    position: relative;
    overflow: hidden;
    transition:
        opacity 0.3s ease,
        transform 0.3s ease;
}

.django-message.is-hiding {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
}

.message-progress {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 3px;
    background-color: rgb(255 255 255 / 70%);
    animation: message-countdown 4s linear forwards;
}

@keyframes message-countdown {
    from {
        width: 100%;
    }

    to {
        width: 0;
    }
}

.django-message.success {
    border-color: rgb(34 197 94 / 45%);
    background: rgb(22 101 52 / 90%);
}

.django-message.error {
    border-color: rgb(239 68 68 / 45%);
    background: rgb(153 27 27 / 90%);
}

.django-message.warning {
    border-color: rgb(245 158 11 / 45%);
    background: rgb(146 64 14 / 90%);
}

.django-message.info {
    border-color: rgb(59 130 246 / 45%);
    background: rgb(30 64 175 / 90%);
}


@media (max-width: 1050px) {

    .profile-page {
        padding-top: 34px;
    }

    .chart-grid {
        flex-direction: column;
    }

    .chart-card {
        flex-basis: auto;
    }

    .navbar-container {
        width: min(100% - 30px, 1400px);
        gap: 15px;
    }

    .navbar-menu {
        gap: 0;
    }

    .nav-link {
        padding: 9px 10px;
        font-size: 12px;
    }

    .user-button {
        min-width: 145px;
    }

}

@media (max-width: 900px) {

    .profile-heading {
        align-items: flex-start;
        flex-direction: column;
        margin-bottom: 30px;
    }

    .statistic-card {
        flex-basis: 100%;
    }

    .navbar-container {
        min-height: 68px;
    }

    .navbar-logo img {
        width: 125px;
    }

    .navbar-menu {
        display: none;
    }

    .language-dropdown {
        display: none;
    }

    .user-dropdown {
        display: none;
    }

    .mobile-menu-button {
        display: flex;
    }

}

@media (max-width: 520px) {

    .profile-page {
        padding: 27px 12px 50px;
    }

    .email-quota-card { grid-template-columns: minmax(0, 1fr); gap: 13px; padding: 19px; }
    .email-quota-total { margin-left: 63px; }
    .email-quota-remaining { margin-top: -5px; }

    .profile-heading h1 {
        font-size: 30px;
    }

    .profile-period {
        width: 100%;
        justify-content: center;
    }

    .profile-heading-actions,
    .profile-scan-link { width: 100%; }

    .profile-scan-link { justify-content: center; }

    .section-title-row {
        align-items: flex-end;
    }

    .section-title-row h2 {
        font-size: 16px;
    }

    .chart-card,
    .statistic-card {
        padding: 18px;
        border-radius: 15px;
    }

    .line-chart,
    .candle-chart {
        height: 220px;
    }

    .line-chart svg {
        height: 188px;
    }

    .candle-chart {
        padding-bottom: 27px;
    }

    .candle {
        width: 24px;
        height: 185px;
    }

    .candle-body {
        width: 12px;
    }

    .percentage-legend {
        column-gap: 12px;
    }

    .login-page {
        padding: 18px 12px;
    }


    .glass-card {
        padding: 28px 22px 23px;
        border-radius: 23px;
    }


    .background-logo {
        background-size: 125vw;
        opacity: 0.18;
    }


    .card-logo img {
        width: 155px;
    }
}

@media (max-width: 420px) {

    .navbar-container {
        width: calc(100% - 20px);
        min-height: 62px;
    }

    .navbar-logo img {
        width: 112px;
    }

    .mobile-menu-button {
        width: 44px;
        height: 44px;
    }

    .mobile-menu {
        width: calc(100% - 20px);
    }

}

@media (prefers-reduced-motion: reduce) {

    .navbar *,
    .navbar *::before,
    .navbar *::after {
        transition: none !important;
        animation: none !important;
    }

}
