/* =========================================================
   YasCash Theme Tokens
   Change the visual theme here; feature styles consume these variables.
   ========================================================= */

:root {
    color-scheme: light;

    /* Core palette - intentionally soft, not pure white */
    --theme-bg: #e9eef4;
    --theme-bg-deep: #e2e8ef;
    --theme-surface: #f7f9fb;
    --theme-surface-solid: #f9fafc;
    --theme-surface-soft: #eef2f6;
    --theme-surface-muted: #e6ecf2;
    --theme-text: #17243a;
    --theme-text-soft: #68778d;
    --theme-border: #d5dee8;
    --theme-navy: #0b1f3a;
    --theme-navy-2: #12345b;
    --theme-blue: #3f70df;
    --theme-blue-soft: #dfe9fb;
    --theme-green: #118f69;
    --theme-green-soft: #e0f2eb;
    --theme-red: #cf4d61;
    --theme-red-soft: #f8e7ea;
    --theme-orange: #bd780d;
    --theme-orange-soft: #f7ecd4;
    --theme-purple: #7458e5;
    --theme-purple-soft: #ebe6fb;
    --theme-cyan: #169f94;

    --theme-shadow-sm: 0 10px 30px rgba(30, 51, 79, .07);
    --theme-shadow-md: 0 18px 52px rgba(30, 51, 79, .11);

    /* Legacy/base aliases */
    --bg: var(--theme-bg);
    --surface: var(--theme-surface);
    --surface-soft: var(--theme-surface-soft);
    --surface-hover: var(--theme-surface-muted);
    --text: var(--theme-text);
    --text-soft: var(--theme-text-soft);
    --border: var(--theme-border);
    --navy: var(--theme-navy);
    --navy-2: var(--theme-navy-2);
    --blue: var(--theme-blue);
    --blue-soft: var(--theme-blue-soft);
    --success: var(--theme-green);
    --success-soft: var(--theme-green-soft);
    --danger: var(--theme-red);
    --danger-soft: var(--theme-red-soft);
    --shadow-sm: var(--theme-shadow-sm);
    --shadow-md: var(--theme-shadow-md);

    /* Customer app aliases */
    --yc-bg: var(--theme-bg);
    --yc-surface: var(--theme-surface);
    --yc-surface-2: var(--theme-surface-soft);
    --yc-surface-3: var(--theme-surface-muted);
    --yc-text: var(--theme-text);
    --yc-text-soft: var(--theme-text-soft);
    --yc-border: var(--theme-border);
    --yc-navy: var(--theme-navy);
    --yc-navy-2: var(--theme-navy-2);
    --yc-blue: var(--theme-blue);
    --yc-blue-soft: var(--theme-blue-soft);
    --yc-green: var(--theme-green);
    --yc-green-soft: var(--theme-green-soft);
    --yc-red: var(--theme-red);
    --yc-red-soft: var(--theme-red-soft);
    --yc-orange: var(--theme-orange);
    --yc-orange-soft: var(--theme-orange-soft);
    --yc-shadow: var(--theme-shadow-md);
    --yc-transfer: var(--theme-purple);
    --yc-transfer-soft: var(--theme-purple-soft);

    /* Customer sidebar */
    --yc-sidebar-bg: linear-gradient(180deg, #f1f5f9 0%, #e8eef5 100%);
    --yc-sidebar-text: #213650;
    --yc-sidebar-muted: #718198;
    --yc-sidebar-border: #d2dce7;
    --yc-sidebar-hover: rgba(63, 112, 223, .08);
    --yc-sidebar-active: linear-gradient(135deg, rgba(63, 112, 223, .14), rgba(247, 249, 251, .78));
    --yc-sidebar-shadow: -12px 0 36px rgba(30, 51, 79, .08);
    --yc-glow-color: rgba(63, 112, 223, .18);

    /* Public / registration atmosphere */
    --yc-public-bg: linear-gradient(155deg, #e7ecf2 0%, #edf1f5 52%, #e5eaf0 100%);
    --yc-public-aurora-blue: #4d78cf;
    --yc-public-aurora-purple: #7962d8;
    --yc-public-aurora-cyan: #2aa89e;
    --yc-public-beam: #628bdc;
    --yc-public-wordmark: linear-gradient(110deg, #26384f 5%, var(--yc-blue) 54%, #1d9180 100%);

    /* Dashboard atmosphere */
    --yc-ambient-blue: #4d7dde;
    --yc-ambient-purple: #7962dd;
    --yc-ambient-cyan: #2aa89e;
    --yc-ambient-beam: #608ce8;

    /* System admin aliases */
    --ya-bg: var(--theme-bg);
    --ya-bg-deep: var(--theme-bg-deep);
    --ya-surface: rgba(247, 249, 251, .90);
    --ya-surface-solid: var(--theme-surface-solid);
    --ya-surface-soft: var(--theme-surface-soft);
    --ya-text: var(--theme-text);
    --ya-muted: #6f7f95;
    --ya-border: var(--theme-border);
    --ya-accent: #536fdd;
    --ya-accent-2: var(--theme-purple);
    --ya-cyan: var(--theme-cyan);
    --ya-green: var(--theme-green);
    --ya-orange: var(--theme-orange);
    --ya-red: var(--theme-red);
    --ya-sidebar: rgba(240, 244, 248, .94);
    --ya-sidebar-solid: #f0f4f8;
    --ya-sidebar-text: #24364f;
    --ya-sidebar-muted: #728299;
    --ya-sidebar-border: #d2dce7;
    --ya-sidebar-hover: rgba(83, 111, 221, .08);
    --ya-sidebar-active: rgba(83, 111, 221, .13);
    --ya-shadow: 0 18px 52px rgba(36, 60, 98, .12);
    --ya-shadow-soft: 0 9px 26px rgba(36, 60, 98, .08);

    /* Login/public aliases */
    --login16-bg: var(--theme-bg);
    --login16-bg-2: var(--theme-bg-deep);
    --login16-card: rgba(247, 249, 251, .93);
    --login16-card-solid: var(--theme-surface-solid);
    --login16-card-soft: var(--theme-surface-soft);
    --login16-text: var(--theme-text);
    --login16-muted: var(--theme-text-soft);
    --login16-border: var(--theme-border);
    --login16-accent: var(--theme-blue);
    --login16-accent-2: var(--theme-purple);
    --login16-cyan: var(--theme-cyan);
    --login16-green: var(--theme-green);
    --login16-red: var(--theme-red);
    --login16-shadow: 0 28px 80px rgba(43, 68, 105, .15);
    --login16-shadow-soft: 0 12px 32px rgba(43, 68, 105, .09);
}

html[data-theme="dark"] {
    color-scheme: dark;

    --theme-bg: #07111f;
    --theme-bg-deep: #0a1524;
    --theme-surface: #0c192a;
    --theme-surface-solid: #0f1c30;
    --theme-surface-soft: #0f2034;
    --theme-surface-muted: #132942;
    --theme-text: #edf4ff;
    --theme-text-soft: #9db0c8;
    --theme-border: #1b314c;
    --theme-navy: #06111f;
    --theme-navy-2: #102742;
    --theme-blue: #6b9cff;
    --theme-blue-soft: #15294a;
    --theme-green: #45d4a6;
    --theme-green-soft: #0c2a23;
    --theme-red: #ff7186;
    --theme-red-soft: #35151e;
    --theme-orange: #f3b64b;
    --theme-orange-soft: #33270e;
    --theme-purple: #a996ff;
    --theme-purple-soft: #251f49;
    --theme-cyan: #43c7b8;

    --theme-shadow-sm: 0 12px 34px rgba(0, 0, 0, .18);
    --theme-shadow-md: 0 20px 58px rgba(0, 0, 0, .28);

    --yc-sidebar-bg: linear-gradient(180deg, #081729 0%, #0b2340 100%);
    --yc-sidebar-text: #eef5ff;
    --yc-sidebar-muted: #88a0bd;
    --yc-sidebar-border: #183354;
    --yc-sidebar-hover: rgba(120, 164, 245, .10);
    --yc-sidebar-active: linear-gradient(135deg, rgba(80, 137, 238, .22), rgba(255, 255, 255, .045));
    --yc-sidebar-shadow: -14px 0 40px rgba(0, 0, 0, .24);
    --yc-glow-color: rgba(112, 161, 255, .19);

    --yc-public-bg: linear-gradient(155deg, #06101d 0%, #0a1728 52%, #07121f 100%);
    --yc-public-aurora-blue: #4f8cff;
    --yc-public-aurora-purple: #9478ef;
    --yc-public-aurora-cyan: #44c8ba;
    --yc-public-beam: #72a1ff;
    --yc-public-wordmark: linear-gradient(110deg, #f0f5ff 5%, #72a1ff 55%, #53d5bd 100%);

    --yc-ambient-blue: #4f8cff;
    --yc-ambient-purple: #9478ef;
    --yc-ambient-cyan: #44c8ba;
    --yc-ambient-beam: #72a1ff;

    --ya-bg: #070d16;
    --ya-bg-deep: #0a1220;
    --ya-surface: rgba(13, 25, 42, .90);
    --ya-surface-solid: #0e1a2c;
    --ya-surface-soft: #12233a;
    --ya-text: #edf3ff;
    --ya-muted: #92a0b6;
    --ya-border: #21364e;
    --ya-accent: #7890ff;
    --ya-accent-2: #9a7df2;
    --ya-cyan: #43c7b8;
    --ya-green: #3bc395;
    --ya-orange: #f0a74b;
    --ya-red: #ef6d80;
    --ya-sidebar: rgba(6, 15, 27, .96);
    --ya-sidebar-solid: #081425;
    --ya-sidebar-text: #f1f5ff;
    --ya-sidebar-muted: #8292aa;
    --ya-sidebar-border: #1a3048;
    --ya-sidebar-hover: rgba(123, 148, 255, .08);
    --ya-sidebar-active: rgba(123, 148, 255, .14);
    --ya-shadow: 0 20px 60px rgba(0, 0, 0, .30);
    --ya-shadow-soft: 0 10px 30px rgba(0, 0, 0, .20);

    --login16-bg: #07101c;
    --login16-bg-2: #0a1524;
    --login16-card: rgba(12, 25, 43, .91);
    --login16-card-solid: #0f1c30;
    --login16-card-soft: #12243a;
    --login16-text: #edf4ff;
    --login16-muted: #91a1b7;
    --login16-border: #213850;
    --login16-accent: #6f8cff;
    --login16-accent-2: #9478ef;
    --login16-cyan: #44c8ba;
    --login16-green: #45c99a;
    --login16-red: #ef7182;
    --login16-shadow: 0 32px 90px rgba(0, 0, 0, .34);
    --login16-shadow-soft: 0 14px 36px rgba(0, 0, 0, .24);
}

html,
body {
    background: var(--theme-bg);
}

/* =========================================================
   Profile security / password change
   Shared by customer and system-admin profile pages.
   ========================================================= */

.yc-profile-security-card {
    position: relative;
    overflow: hidden;
    margin-top: 16px;
    padding: 20px;
    border: 1px solid color-mix(in srgb, var(--yc-blue) 22%, var(--yc-border));
    border-radius: 20px;
    background:
        radial-gradient(circle at 0 0, color-mix(in srgb, var(--yc-blue) 10%, transparent), transparent 32%),
        var(--yc-surface);
    box-shadow: var(--yc-shadow);
}

.yc-profile-security-card::after {
    content: "";
    position: absolute;
    width: 170px;
    height: 170px;
    inset-inline-end: -72px;
    bottom: -100px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--yc-transfer) 8%, transparent);
    pointer-events: none;
}

.yc-profile-security-head,
.yc-profile-password-form,
.yc-profile-security-message {
    position: relative;
    z-index: 1;
}

.yc-profile-security-head {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 18px;
}

.yc-profile-security-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    flex: 0 0 48px;
    border-radius: 15px;
    color: var(--yc-blue);
    border: 1px solid color-mix(in srgb, var(--yc-blue) 25%, var(--yc-border));
    background: color-mix(in srgb, var(--yc-blue) 12%, var(--yc-surface));
}

.yc-profile-security-icon svg {
    width: 23px;
    height: 23px;
}

.yc-profile-security-head span,
.yc-profile-security-head h2,
.yc-profile-security-head p {
    display: block;
    margin: 0;
}

.yc-profile-security-head > div > span {
    color: var(--yc-blue);
    font-size: .66rem;
    font-weight: 800;
}

.yc-profile-security-head h2 {
    margin-top: 2px;
    color: var(--yc-text);
    font-size: 1.02rem;
}

.yc-profile-security-head p {
    margin-top: 4px;
    color: var(--yc-text-soft);
    font-size: .7rem;
    line-height: 1.7;
}

.yc-profile-password-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 13px;
    align-items: end;
}

.yc-profile-password-hint {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--yc-text-soft);
    font-size: .68rem;
    line-height: 1.7;
}

.yc-profile-password-hint span {
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    flex: 0 0 20px;
    border-radius: 50%;
    color: var(--yc-green);
    background: color-mix(in srgb, var(--yc-green) 12%, var(--yc-surface));
}

.yc-profile-security-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-start;
    padding-top: 2px;
}

.yc-profile-security-message {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 14px;
    padding: 11px 13px;
    border-radius: 12px;
    font-size: .7rem;
    line-height: 1.7;
}

.yc-profile-security-message.success {
    color: var(--yc-green);
    border: 1px solid color-mix(in srgb, var(--yc-green) 28%, var(--yc-border));
    background: color-mix(in srgb, var(--yc-green) 9%, var(--yc-surface));
}

.yc-profile-security-message.warning {
    color: var(--yc-orange);
    border: 1px solid color-mix(in srgb, var(--yc-orange) 28%, var(--yc-border));
    background: color-mix(in srgb, var(--yc-orange) 9%, var(--yc-surface));
}

.yc-profile-security-message.danger {
    color: var(--yc-red);
    border: 1px solid color-mix(in srgb, var(--yc-red) 28%, var(--yc-border));
    background: color-mix(in srgb, var(--yc-red) 9%, var(--yc-surface));
}

@media (max-width: 820px) {
    .yc-profile-password-form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 540px) {
    .yc-profile-security-card {
        padding: 15px;
        border-radius: 17px;
    }

    .yc-profile-security-head {
        align-items: flex-start;
    }

    .yc-profile-security-actions .yc-primary-button {
        width: 100%;
    }
}
