/* ============================================================
   SILVERSUN ADMIN PANEL
   CLEAN PRODUCT-ENTRY UI
   Brand: #1F1A4E
   Gradient: #1F1A4E →
   ============================================================ */

@font-face {
    font-family: "SilverSun";
    src: url("fonts/Vazirmatn-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "SilverSun";
    src: url("fonts/Vazirmatn-Bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "SilverSun";
    src: url("fonts/Vazir-Bold.woff2") format("woff2");
    font-weight: 800 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "SilverNumeric";
    src: url("fonts/RobotoMono-SemiBold.ttf") format("truetype");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "SilverPrice";
    src: url("fonts/Vazirmatn-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "SilverPrice";
    src: url("fonts/Vazirmatn-Bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}


/* ============================================================
   TOKENS
   ============================================================ */
:root {
    color-scheme: dark;

    /* =========================
       CORE NAVY
       ========================= */

    --brand: #1F1A4E;
    --brand-2: #C7C4D9;
    --brand-dark: #151238;

    --brand-soft: rgba(255,255,255,.07);
    --brand-soft-2: rgba(255,255,255,.04);


    /* =========================
       SURFACES
       ========================= */

    --bg: #1F1A4E;
    --surface: #29245D;
    --surface-2: #332D70;
    --surface-3: #3D3779;


    /* =========================
       TEXT
       ========================= */

    --white: #FFFFFF;

    --text: #FFFFFF;
    --text-2: #E8E7EF;

    --muted: #AAA8BB;
    --muted-2: #878497;


    /* =========================
       BORDERS
       ========================= */

  --border: rgba(255,255,255,.11);
    --border-soft: rgba(255,255,255,.08);


    /* =========================
       PRICE
       ========================= */

    --sell: #FFFFFF;
    --sell-soft: rgba(255,255,255,.07);

    --buy: #D7D6DF;
    --buy-soft: rgba(215,214,223,.08);


    /* =========================
       STATUS
       ========================= */

    --success: #7ED957;
    --success-soft: rgba(126,217,87,.12);

    --warning: #D9A441;
    --warning-soft: rgba(217,164,65,.12);

    --danger: #E05252;
    --danger-soft: rgba(224,82,82,.12);


    /* =========================
       SHADOWS
       ========================= */

    --shadow-xs:
        0 2px 8px rgba(0,0,0,.12);

    --shadow-sm:
        0 8px 24px rgba(0,0,0,.18);

    --shadow-md:
        0 16px 38px rgba(0,0,0,.22);

    --shadow-brand:
        0 12px 28px rgba(0,0,0,.22);


    /* =========================
       RADIUS
       ========================= */

    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 22px;


    --ease: 170ms cubic-bezier(.2,.7,.2,1);
}
/* ============================================================
   RESET
   ============================================================ */

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

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;

    margin: 0;
    padding-bottom: 92px;

    direction: rtl;
    overflow-x: hidden;

    background:
        radial-gradient(
            circle at 100% 0%,
            rgba(255,255,255,.04),
            transparent 28%
        ),
        var(--bg);

    color: var(--text);

    font-family:
        "SilverSun",
        Tahoma,
        Arial,
        sans-serif;

    line-height: 1.5;
}

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

button {
    border: 0;
    cursor: pointer;
}

img {
    display: block;
    max-width: 100%;
}

::selection {
    background: #0096C7;
    color: #FFFFFF;
}

input::selection,
textarea::selection {
    background: #0096C7;
    color: #FFFFFF;
}
/* ============================================================
   LAYOUT
   ============================================================ */

.app-shell {
    min-height: 100vh;
}

.container {
    width: min(1060px, calc(100% - 28px));
    margin-inline: auto;
}

.main {
    padding: 18px 0 24px;
}

.section {
    margin-bottom: 15px;
}

.card {
    background: #29245D;

    border: 1px solid rgba(255,255,255,.08);

    border-radius: var(--radius-xl);

    box-shadow:
        0 8px 24px rgba(0,0,0,.18);

    overflow: hidden;
}

/* ============================================================
   TOPBAR — SILVERSUN / RESPONSIVE / STABLE
   ============================================================ */
.topbar {
    position: sticky;
    top: 0;
    z-index: 1000;

    background:
        linear-gradient(
            135deg,
            #1F1A4E 0%,
            #29245D 100%
        );

    border-bottom:
        1px solid rgba(255,255,255,.10);

    box-shadow:
        0 8px 28px rgba(0,0,0,.20);
}

.topbar-inner {
    width: 100%;
    min-width: 0;
    min-height: 70px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 12px;
}

.brand-box {
    min-width: 0;
    flex: 0 1 auto;

    display: flex;
    align-items: center;
    gap: 9px;
}

.brand-logo {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;

    object-fit: contain;
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

.brand-box > div {
    min-width: 0;
}

.brand-name {
    color: #FFFFFF;
    font-size: 17px;
    font-weight: 900;
    line-height: 1.1;
    white-space: nowrap;
}

.brand-subtitle {
    margin-top: 3px;
    color: rgba(255,255,255,.62);
    font-size: 8px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

.topbar-actions {
    width: min(680px, 100%);
    min-width: 0;
    flex: 1 1 680px;

    display: grid;
    align-items: center;

    grid-template-columns:
        minmax(0,1.20fr)
        1px
        minmax(0,.95fr)
        1px
        minmax(0,.82fr)
        1px
        minmax(0,1.05fr)
        1px
        58px;

    height: 54px;
    margin-right: auto;
    margin-left: 0;

    direction: rtl;
    overflow: hidden;

    background: rgba(255,255,255,.045);
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 16px;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.055),
        0 6px 20px rgba(0,0,0,.12);
}

.topbar-actions .header-item {
    width: 100%;
    min-width: 0;
    height: 100%;
    padding: 0 8px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;
    overflow: hidden;
    background: transparent;
    color: #FFFFFF;

    font-family:
        "SilverSun",
        Tahoma,
        Arial,
        sans-serif !important;
}

.topbar-actions .header-divider {
    width: 1px;
    height: 31px;
    justify-self: center;
    align-self: center;

    background:
        linear-gradient(
            to bottom,
            transparent,
            rgba(255,255,255,.20),
            transparent
        );
}

.topbar-actions .header-meta-label {
    margin: 0 0 4px;
    color: rgba(255,255,255,.48);
    font-size: 8px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.topbar-actions .market-header-status {
    flex-direction: row;
    gap: 7px;
    text-align: right;
}

.topbar-actions .market-header-status .status-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    margin: 0;
    border-radius: 50%;
}

.topbar-actions .market-header-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    overflow: hidden;
}

.topbar-actions .header-meta-title {
    max-width: 100%;
    color: #FFFFFF;
    font-size: 10px;
    font-weight: 900;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-actions .header-meta-subtitle {
    max-width: 100%;
    margin-top: 3px;
    color: rgba(255,255,255,.38);
    font-size: 7px;
    font-weight: 600;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-actions .pricing-base-header {
    position: relative;
    width: calc(100% - 8px);
    min-width: 0;
    height: 38px;
    margin: 0 4px;
    padding: 0 4px;

    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;

    border: 1px solid rgba(0,150,199,.34);
    border-radius: 10px;
    outline: none;

    background:
        linear-gradient(
            135deg,
            rgba(0,150,199,.30),
            rgba(8,124,162,.16)
        );

    color: #FFFFFF;
    cursor: pointer;
    overflow: hidden;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.08),
        0 3px 10px rgba(0,0,0,.10);

    transition:
        background .17s ease,
        border-color .17s ease,
        box-shadow .17s ease,
        transform .17s ease;

    container-type: inline-size;
}

.topbar-actions .pricing-base-header:hover {
    background:
        linear-gradient(
            135deg,
            rgba(0,150,199,.42),
            rgba(8,124,162,.25)
        );

    border-color: rgba(0,150,199,.65);

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.08),
        0 4px 13px rgba(0,150,199,.12);
}

.topbar-actions .pricing-base-header:active {
    transform: scale(.97);
}

.topbar-actions .pricing-base-header:focus-visible {
    box-shadow:
        0 0 0 3px rgba(0,150,199,.14),
        inset 0 1px 0 rgba(255,255,255,.08);
}

.topbar-actions .header-pricing-base-value {
    display: block;
    width: auto;
    max-width: 100%;
    min-width: 0;
    flex: 0 1 auto;

    margin: 0;
    padding: 0;

    color: #FFFFFF;
    font-family:
        "SilverSun",
        Tahoma,
        Arial,
        sans-serif !important;

    /* Shrinks from the actual button width, not the viewport. */
    font-size: clamp(3px, 8cqw, 10px) !important;
    font-weight: 900;
    line-height: 1;

    direction: rtl;
    text-align: center;

    white-space: nowrap;
    word-break: keep-all;
    overflow-wrap: normal;
    overflow: hidden;
    text-overflow: clip;
    letter-spacing: -0.2px;
}

.topbar-actions .ounce-header,
.topbar-actions .last-update {
    min-width: 0;
}

.topbar-actions .header-ounce-value,
.topbar-actions .header-meta-time {
    color: #FFFFFF;
    font-family:
        "SilverSun",
        Tahoma,
        Arial,
        sans-serif !important;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    direction: ltr;
    white-space: nowrap;
}

.topbar-actions .header-ounce-value {
    color: #F4F4F7;
}

.topbar-actions .header-meta-date {
    margin-top: 4px;
    color: rgba(255,255,255,.46);
    font-size: 7px;
    font-weight: 600;
    line-height: 1;
    direction: ltr;
    white-space: nowrap;
}

.topbar-actions .logout-button {
    width: 46px;
    min-width: 46px;
    height: 34px;
    margin: 0 auto;
    padding: 0;

    border: 1px solid rgba(255,255,255,.15);
    border-radius: 10px;
    background: rgba(255,255,255,.075);
    color: #FFFFFF;

    font-family:
        "SilverSun",
        Tahoma,
        Arial,
        sans-serif !important;

    font-size: 9px;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.05);

    transition:
        background .17s ease,
        border-color .17s ease,
        transform .17s ease;
}

.topbar-actions .logout-button:hover {
    background: rgba(255,255,255,.13);
    border-color: rgba(255,255,255,.24);
}

.topbar-actions .logout-button:active {
    transform: scale(.95);
}

@media (max-width: 1000px) {
    .topbar-inner { gap: 8px; }

    .brand-box { gap: 7px; }

    .brand-logo {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
    }

    .brand-name { font-size: 15px; }
    .brand-subtitle { font-size: 7px; }

    .topbar-actions {
        width: min(620px, 100%);
        grid-template-columns:
            minmax(0,1.15fr)
            1px
            minmax(0,.90fr)
            1px
            minmax(0,.78fr)
            1px
            minmax(0,.95fr)
            1px
            52px;
        height: 50px;
    }

    .topbar-actions .header-item { padding: 0 5px; }
    .topbar-actions .header-meta-label { font-size: 7px; }
    .topbar-actions .header-meta-title { font-size: 9px; }
    .topbar-actions .header-meta-subtitle { font-size: 6px; }

    .topbar-actions .header-ounce-value,
    .topbar-actions .header-meta-time {
        font-size: 13px;
    }

    .topbar-actions .header-meta-date { font-size: 6px; }
}

@media (max-width: 760px) {
    .topbar-inner {
        min-height: 58px;
        height: 58px;
        gap: 6px;
    }

    .brand-box { gap: 5px; }

    .brand-logo {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
    }

    .brand-name { font-size: 10px; }
    .brand-subtitle { font-size: 6px; }

    .topbar-actions {
        flex: 1 1 auto;
        width: auto;
        max-width: none;
        height: 46px;
        border-radius: 12px;
        grid-template-columns:
            minmax(0,1.15fr)
            1px
            minmax(0,.90fr)
            1px
            minmax(0,.72fr)
            1px
            minmax(0,.88fr)
            1px
            42px;
    }

    .topbar-actions .header-item { padding: 0 3px; }
    .topbar-actions .header-divider { height: 23px; }
    .topbar-actions .header-meta-label {
        margin-bottom: 2px;
        font-size: 5px;
    }
    .topbar-actions .header-meta-title { font-size: 7px; }
    .topbar-actions .header-meta-subtitle { display: none; }

    .topbar-actions .pricing-base-header {
        width: calc(100% - 2px);
        height: 34px;
        margin: 0 1px;
        padding: 0 2px;
        border-radius: 9px;
    }

    .topbar-actions .header-pricing-base-value {
        font-size: clamp(3px, 8cqw, 7px) !important;
    }

    .topbar-actions .header-ounce-value { font-size: 10px; }
    .topbar-actions .header-meta-time { font-size: 11px; }
    .topbar-actions .header-meta-date {
        margin-top: 2px;
        font-size: 5px;
    }

    .topbar-actions .logout-button {
        width: 36px;
        min-width: 36px;
        height: 28px;
        font-size: 7px;
    }
}

@media (max-width: 430px) {
    .topbar-inner {
        height: 52px;
        min-height: 52px;
        gap: 4px;
    }

    .brand-box {
        width: 32px;
        flex: 0 0 32px;
        justify-content: center;
    }

    .brand-box > div { display: none; }

    .brand-logo {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
    }

    .topbar-actions {
        height: 40px;
        border-radius: 10px;
        grid-template-columns:
            minmax(0,1.10fr)
            1px
            minmax(0,.82fr)
            1px
            minmax(0,.62fr)
            1px
            minmax(0,.82fr)
            1px
            36px;
    }

    .topbar-actions .header-item { padding: 0 2px; }
    .topbar-actions .header-divider { height: 19px; }
    .topbar-actions .header-meta-label {
        font-size: 4.5px;
        margin-bottom: 1px;
    }
    .topbar-actions .header-meta-title { font-size: 6px; }

    .topbar-actions .pricing-base-header {
        height: 30px;
        border-radius: 8px;
    }

    .topbar-actions .header-pricing-base-value {
        font-size: clamp(3px, 8cqw, 6px) !important;
        letter-spacing: -0.3px;
    }

    .topbar-actions .header-ounce-value { font-size: 9px; }
    .topbar-actions .header-meta-time { font-size: 10px; }
    .topbar-actions .header-meta-date { font-size: 4.5px; }

    .topbar-actions .logout-button {
        width: 31px;
        min-width: 31px;
        height: 25px;
        font-size: 6.5px;
    }
}

@media (max-width: 340px) {
    .topbar-inner { gap: 3px; }

    .topbar-actions {
        grid-template-columns:
            minmax(0,1.05fr)
            1px
            minmax(0,.78fr)
            1px
            minmax(0,.58fr)
            1px
            minmax(0,.78fr)
            1px
            32px;
    }

    .topbar-actions .header-meta-label { font-size: 4px; }
    .topbar-actions .header-meta-title { font-size: 5.5px; }

    .topbar-actions .header-pricing-base-value {
        font-size: clamp(2.5px, 8cqw, 5px) !important;
        letter-spacing: -0.35px;
    }

    .topbar-actions .header-ounce-value { font-size: 8px; }
    .topbar-actions .header-meta-time { font-size: 9px; }
    .topbar-actions .header-meta-date { font-size: 4px; }

    .topbar-actions .logout-button {
        width: 28px;
        min-width: 28px;
        height: 23px;
        font-size: 6px;
    }
}

/* Legacy helper retained for compatibility. */
.server-clock-time {
    color: #FFFFFF;
    font-family:
        "SilverSun",
        Tahoma,
        Arial,
        sans-serif !important;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.1;
}

.server-clock-date {
    margin-top: 3px;
    color: rgba(255,255,255,.70);
    font-family:
        "SilverSun",
        Tahoma,
        Arial,
        sans-serif !important;
    font-size: 7px;
}
/* ============================================================
   TITLES
   ============================================================ */

.section-title {
    margin: 0;
    color: var(--text);
    font-size: 15px;
    font-weight: 900;
}

.section-title.small-title {
    font-size: 12px;
}

.section-caption {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 8px;
    line-height: 1.7;
}

.block-title {
    margin-bottom: 10px;

    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
}

.block-title h3 {
    margin: 0;
    color: var(--text);
    font-size: 14px;
    font-weight: 900;
}

.block-title span {
    color: var(--muted);
    font-size: 8px;
    font-weight: 600;
}


/* ============================================================
   MARKET + OUNCE
   ============================================================ */

.market-status-banner {
    min-height: 62px;
    padding: 12px 15px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 12px;

    border:
        1px solid rgba(255,255,255,.08);

    border-right:
        4px solid var(--warning);

    border-radius: 14px;

    background:
        linear-gradient(
            135deg,
            rgba(217,164,65,.12),
            rgba(255,255,255,.035)
        );

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.03);
}
.market-status-banner.market-active {
    background:
        linear-gradient(
            135deg,
            rgba(126,217,87,.12),
            rgba(255,255,255,.03)
        );

    border-right-color: var(--success);
}
.market-status-banner.waiting-rate {
    background:
        linear-gradient(
            135deg,
            rgba(217,164,65,.14),
            rgba(255,255,255,.03)
        );

    border-right-color: var(--warning);
}
.market-status-banner.market-closed {
    background:
        linear-gradient(
            135deg,
            rgba(224,82,82,.14),
            rgba(255,255,255,.03)
        );

    border-right-color: var(--danger);
}
.market-status-main {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.status-dot {
    width: 9px;
    height: 9px;
    flex: 0 0 auto;

    border-radius: 50%;
    background: var(--warning);

    box-shadow:
        0 0 0 5px rgba(214,129,19,.09);
}

.market-active .status-dot {
    background: var(--success);
    box-shadow: 0 0 0 5px rgba(21,148,71,.09);
}

.market-closed .status-dot {
    background: var(--danger);
    box-shadow: 0 0 0 5px rgba(217,58,58,.09);
}

.market-title {
    color: var(--text);
    font-size: 11px;
    font-weight: 900;
}

.market-message {
    margin-top: 2px;
    color: var(--muted);
    font-size: 8px;
}

.market-hours {
    color: var(--muted);
    font-size: 7px;
    font-weight: 800;
    white-space: nowrap;
}

.ounce-strip {
    min-height: 56px;

    display: grid;
    grid-template-columns: 1fr auto;

    align-items: center;

    gap: 12px;

    padding: 9px 15px;

    border-top:
        1px solid rgba(255,255,255,.08);

    background: #29245D;
}
.ounce-value {
    direction: ltr;
    unicode-bidi: isolate;

    color: #F4F4F7;

    font-family:
        "SilverNumeric",
        Tahoma,
        sans-serif;

    font-size: 20px;
    font-weight: 600;

    white-space: nowrap;
}
/* ============================================================
   EDITOR
   ============================================================ */

.editor-card {
    padding: 16px;
}

.editor-block + .editor-block {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--border-soft);
}

.section-note {
    margin: -1px 0 10px;

    padding: 8px 10px;

    background: rgba(255,255,255,.045);

    border:
        1px solid rgba(255,255,255,.07);

    border-radius: 10px;

    color: var(--muted);

    font-size: 8px;
    line-height: 1.8;
}
/* ============================================================
   PRODUCT CARDS
   ============================================================ */

.product-grid {
    width: 100%;
    min-width: 0;

    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 12px;
}
.product-card {
    width: 100%;
    min-width: 0;

    padding: 14px;

    background: #29245D;

    border:
        1px solid rgba(255,255,255,.07);

    border-radius: var(--radius-lg);

    box-shadow:
        0 6px 18px rgba(0,0,0,.14);

    overflow: hidden;
}
.product-card:nth-child(odd) {
    background: #302A68;
}
.product-card:hover {
    border-color:
        rgba(255,255,255,.16);

    box-shadow:
        0 10px 24px rgba(0,0,0,.18);

    transform: translateY(-1px);
}
.product-card-head {
    min-height: 40px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;

    margin-bottom: 11px;
}

.product-title {
    color: var(--text);
    font-size: 13px;
    font-weight: 900;
}

.product-subtitle {
    margin-top: 2px;
    color: var(--muted);
    font-size: 7px;
}
.purity-badge {
    min-width: 43px;
    padding: 5px 8px;

    text-align: center;

    background:
        rgba(255,255,255,.08);

    color: #E8E7EF;

    border:
        1px solid rgba(255,255,255,.10);

    border-radius: 999px;

    font-family:
        "SilverNumeric",
        Tahoma,
        sans-serif;

    font-size: 9px;
    font-weight: 600;
}
.field {
    min-width: 0;
}

.field-grid-2 {
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(0,1fr);
    gap: 9px;
}

.field-label {
    display: block;
    margin-bottom: 5px;

    color: var(--muted);
    font-size: 8px;
    font-weight: 900;
}

.field-label.sell-label {
    color: var(--sell);
}

.field-label.buy-label {
    color: var(--buy);
}
.input {
    width: 100%;
    min-width: 0;
    height: 54px;

    padding: 0 10px;

    background: #4A457A;
    color: #FFFFFF;

    border:
        1px solid rgba(255,255,255,.14);

    border-radius: 11px;

    outline: none;

    text-align: center;

    font-size: 12px;
    font-weight: 800;

    transition:
        background var(--ease),
        border-color var(--ease),
        box-shadow var(--ease);
}
.input::placeholder {
    color: #C7C4D9;
    opacity: 1;
    font-weight: 600;
}

.input:hover::placeholder {
    color: #E0DEE8;
}
.input:hover {
    border-color: rgba(255,255,255,.16);
}

.input:focus {
    background: #514C82;

    border-color: #0096C7;

    box-shadow:
        0 0 0 3px rgba(0,150,199,.24);
}
.percent-input-wrap {
    position: relative;
}

.percent-input {
    padding-left: 26px;
}

.percent-suffix {
    position: absolute;

    left: 9px;
    top: 50%;

    transform: translateY(-50%);

    color: var(--muted);

    font-size: 8px;
    pointer-events: none;
}
/* ============================================================
   BAR DESKTOP — LABEL INSIDE INPUT BOX
   فقط دسکتاپ
   ============================================================ */
/* ============================================================
   BAR MOBILE — LABEL INSIDE INPUT BOX
   ============================================================ */

@media (max-width: 760px) {

    .bar-card .bar-input-grid .field {
        position: relative;
        min-width: 0;
    }

    /* عنوان داخل خود باکس */
    .bar-card .bar-input-grid .field-label {
        position: absolute;

        top: 7px;
        right: 10px;

        z-index: 5;

        margin: 0;

        font-size: 8px;
        font-weight: 800;
        line-height: 1;

        text-align: right;

        pointer-events: none;
    }

    .bar-card .bar-input-grid .field-label.sell-label {
        color: var(--sell);
    }

    .bar-card .bar-input-grid .field-label.buy-label {
        color: var(--buy);
    }

    /* فضای کافی برای عنوان داخل باکس */
    .bar-card .bar-input-grid .percent-input {
        padding-top: 10px;
    }
}
@media (min-width: 761px) {

    .bar-card .bar-input-grid .field {
        position: relative;
        min-width: 0;
    }

    /* عنوان درصد داخل خود باکس */
    .bar-card .bar-input-grid .field-label {
        position: absolute;

        top: 7px;
        right: 11px;

        z-index: 5;

        margin: 0;

        font-size: 8px;
        font-weight: 800;
        line-height: 1;

        text-align: right;

        pointer-events: none;
    }

    /* رنگ عنوان فروش */
    .bar-card .bar-input-grid .field-label.sell-label {
        color: var(--sell);
    }

    /* رنگ عنوان خرید */
    .bar-card .bar-input-grid .field-label.buy-label {
        color: var(--buy);
    }

    /* کمی فضای بالایی برای عنوان داخل باکس */
    .bar-card .bar-input-grid .percent-input {
        padding-top: 10px;
    }
}

/* ============================================================
   PRICE RESULT BOXES
   This is the key UI for the new index.php.
   ============================================================ */

.price-result-box {
    margin-top: 11px;

    min-height: 63px;
    padding: 8px;

    display: grid;

    grid-template-columns:
        1fr auto 1fr;

    align-items: stretch;

    gap: 6px;

    background:
        linear-gradient(
            145deg,
            #332D70,
            #29245D
        );

    border:
        1px solid rgba(255,255,255,.08);

    border-radius: 13px;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.03);
}
.result-item {
    min-width: 0;
    padding: 7px 8px;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2px;

    border-radius: 9px;
}

.result-label {
    color: var(--muted);
    font-size: 7px;
    font-weight: 800;
}

.result-value {
    direction: ltr;
    unicode-bidi: isolate;

    font-family:
        "SilverPrice",
        "SilverSun",
        Tahoma,
        sans-serif;

    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0;

    white-space: nowrap;
}

.result-sell .result-label {
    color: var(--sell);
}

.result-sell .result-value {
        color: #FFFFFF;
}

.result-buy .result-label {
    color: var(--buy);
}

.result-buy .result-value {
    color: #D7D6DF;
}

.result-divider {
    width: 1px;
    margin: 5px 0;

    background: var(--border);
}


/* ============================================================
   BARS
   ============================================================ */

.bar-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.bar-card {
    display: grid;

    grid-template-columns:
        minmax(150px, 1.25fr)
        minmax(150px, .95fr)
        minmax(95px, .7fr)
        minmax(250px, 1.35fr);

    align-items: center;

    gap: 10px;

    padding: 12px;

    background: #29245D;

    border:
        1px solid rgba(255,255,255,.07);

    border-radius: 15px;

    box-shadow:
        0 6px 18px rgba(0,0,0,.14);

    transition:
        border-color var(--ease),
        box-shadow var(--ease);
}

.bar-card:nth-child(odd) {
    background: #302A68;
}


.bar-card:hover {
    border-color: rgba(255,255,255,.14);
    box-shadow: var(--shadow-sm);
}
/* ============================================================
   BAR MAIN
   ============================================================ */

.bar-main {
    min-width: 0;
}

.bar-title {
    color: var(--text);
    font-size: 12px;
    font-weight: 900;
}

.bar-subtitle {
    margin-top: 2px;
    color: var(--muted-2);
    font-size: 7px;
    font-weight: 600;
}


/* ============================================================
   EXISTING READONLY PRICE
   ============================================================ */

.readonly-price {
    min-height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 5px;
    padding: 0 9px;

    background: #332D70;

    border:
        1px solid rgba(255,255,255,.08);

    border-radius: 11px;

    white-space: nowrap;
}
.readonly-price-value {
    direction: ltr;
    unicode-bidi: isolate;

      color: #FFFFFF;

    font-family:
        "SilverPrice",
        "SilverSun",
        Tahoma,
        sans-serif;

    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0;
}

.rial-mark {
    color: var(--muted-2);
    font-size: 7px;
    font-weight: 700;
}


/* ============================================================
   FINAL PRICE RESULT
   ============================================================ */

.bar-result-box {
    min-height: 56px;
    padding: 7px;

    display: grid;

    grid-template-columns:
        1fr auto 1fr;

    align-items: stretch;

    gap: 6px;

    background:
        linear-gradient(
            145deg,
            #332D70,
            #29245D
        );

    border:
        1px solid rgba(255,255,255,.08);

    border-radius: 12px;
}
.bar-result-item {
    min-width: 0;
    padding: 2px 6px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
}

/* عنوان راست‌چین */
.bar-result-item > span {
    width: 100%;

    color: var(--muted);

    font-size: 7.5px;
    font-weight: 800;

    text-align: right;
}
.bar-result-item > span,
.bar-result-sell,
.bar-result-buy {
    transform: translateY(-6px);
}
.bar-result-item:last-child > span {
    transform: translate(-1.5px, -6px);
}

/* قیمت وسط‌چین */
.bar-result-sell,
.bar-result-buy {
    width: 100%;
    text-align: center;
}
.bar-result-separator {
    width: 1px;

    margin: 4px 0;

    background: var(--border);
    color: transparent;
}

.bar-result-sell,
.bar-result-buy {
    direction: ltr;
    unicode-bidi: isolate;

    font-family:
        "SilverPrice",
        "SilverSun",
        Tahoma,
        sans-serif;

    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0;

    white-space: nowrap;
}

.bar-result-sell {
    color: #FFFFFF;
}

.bar-result-buy {
         color: #D7D6DF;

}

/* ============================================================
   SETTINGS
   ============================================================ */
.advanced-card {
    padding: 12px;

    background: #29245D;

    border:
        1px solid rgba(255,255,255,.08);

    border-radius: var(--radius-md);

    box-shadow:
        0 6px 18px rgba(0,0,0,.12);
}
.advanced-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 9px;
}

.advanced-grid.two-options {
    grid-template-columns: repeat(2, minmax(0,1fr));
}

.toggle-card {
    min-height: 56px;
    padding: 10px 12px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 10px;

    background: #332D70;

    border:
        1px solid rgba(255,255,255,.08);

    border-radius: 11px;
}

.toggle-text {
    min-width: 0;
}

.toggle-text strong {
    display: block;
    color: var(--text);
    font-size: 9px;
    font-weight: 900;
}

.toggle-text span {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 7px;
}

.switch {
    position: relative;
    width: 44px;
    height: 25px;
    flex: 0 0 auto;
}

.switch input {
    width: 0;
    height: 0;
    opacity: 0;
}

.slider {
    position: absolute;
    inset: 0;

    cursor: pointer;

    background: #5B5870;

    border-radius: 999px;

    transition:
        background var(--ease);
}
.slider::before {
    content: "";

    position: absolute;

    width: 19px;
    height: 19px;

    top: 3px;
    right: 3px;

    border-radius: 50%;

    background: #FFFFFF;

    box-shadow:
        0 1px 5px rgba(0,0,0,.15);

    transition:
        transform var(--ease);
}

.switch input:checked + .slider {
    background: #0096c7;
}
.switch input:checked + .slider::before {
    transform: translateX(-19px);
}


/* ============================================================
   PRICING BASE — SETTINGS / RESPONSIVE
   ============================================================ */
.pricing-base-card {
    width: 100%;
    min-width: 0;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;

    overflow: hidden;
}

.pricing-base-card .toggle-text {
    min-width: 0;
    flex: 0 1 auto;
}

.pricing-base-card .toggle-text strong {
    display: block;
    white-space: nowrap;
}

.pricing-base-options {
    width: min(155px, 100%);
    max-width: 100%;
    min-width: 0;
    flex: 1 1 155px;

    display: flex;
    align-items: stretch;
    gap: 4px;

    padding: 3px;
    box-sizing: border-box;
    overflow: hidden;

    border-radius: 10px;
    background: rgba(31,26,78,.045);
}

.pricing-base-option {
    position: relative;
    width: 0;
    min-width: 0;
    flex: 1 1 0;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 7px 6px;
    box-sizing: border-box;
    overflow: hidden;

    border-radius: 8px;
    color: var(--text);
    font-size: 10px;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
}

.pricing-base-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pricing-base-label {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;

    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    text-align: center;
}

.pricing-base-option:has(input:checked) {
    background: #0096C7;
    color: #FFFFFF;
    box-shadow: 0 3px 10px rgba(0,150,199,.22);
}

.pricing-base-option:hover {
    background: rgba(31,26,78,.08);
}

.pricing-base-option:has(input:checked):hover {
    background: #0096C7;
}

.pricing-base-status {
    margin-top: 4px;
    color: var(--muted);
    font-size: 7px;
    line-height: 1.4;
}

@media (max-width: 760px) {
    .advanced-grid {
        width: 100%;
        grid-template-columns:
            minmax(0,1fr)
            minmax(0,1fr);
        gap: 8px;
    }

    .advanced-grid .pricing-base-card {
        grid-column: 1 / -1;
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .pricing-base-option {
        padding: 7px 5px;
        font-size: 9px;
    }
}

@media (max-width: 430px) {
    .advanced-grid {
        grid-template-columns: 1fr;
        gap: 7px;
    }

    .advanced-grid .pricing-base-card {
        grid-column: 1 / -1;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 6px;
        padding: 9px 10px;
    }

    .advanced-grid .pricing-base-card .toggle-text {
        width: 100%;
        text-align: right;
    }

    .advanced-grid .pricing-base-options {
        width: 100%;
        max-width: 100%;
        margin-top: 0;
        flex: none;
        gap: 3px;
        padding: 3px;
    }

    .advanced-grid .pricing-base-option {
        width: 0;
        min-width: 0;
        flex: 1 1 0;
        padding: 7px 3px;
    }

    .advanced-grid .pricing-base-label {
        font-size: clamp(7px, 2.35vw, 9px);
    }
}

@media (max-width: 340px) {
    .advanced-grid .pricing-base-card {
        padding: 8px;
    }

    .advanced-grid .pricing-base-options {
        gap: 2px;
        padding: 2px;
    }

    .advanced-grid .pricing-base-option {
        padding: 6px 2px;
    }

    .advanced-grid .pricing-base-label {
        font-size: 7px;
    }
}

/* ============================================================
   PUBLISH BAR
   ============================================================ */

.publish-bar {
    position: fixed;

    left: 0;
    right: 0;
    bottom: 0;

    z-index: 2000;

    padding: 7px 0;

    background:
        rgba(31,26,78,.94);

    border-top:
        1px solid rgba(255,255,255,.10);

    box-shadow:
        0 -10px 32px rgba(0,0,0,.22);

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}
.publish-inner {
    min-height: 54px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 12px;
}

.publish-info {
    min-width: 0;
    flex: 1;
}

.publish-status {
    color: var(--muted);
    font-size: 8px;
    font-weight: 700;
}

.publish-button {
    min-width: 225px;
    min-height: 45px;
    padding: 0 18px;

background:
    linear-gradient(
        -135deg,
        #1F1A4E 0%,
        #0096c7 100%
    );

    color: #FFFFFF;

    border:
        1px solid rgba(255,255,255,.14);

    border-radius: 11px;

    font-size: 10px;
    font-weight: 900;

    box-shadow:
        0 8px 22px rgba(0,0,0,.22);

    transition:
        transform var(--ease),
        box-shadow var(--ease),
        filter var(--ease),
        opacity var(--ease);
}
.publish-button:hover:not(:disabled) {
    filter: brightness(1.08);

    transform: translateY(-1px);

    box-shadow:
        0 12px 28px rgba(0,0,0,.26);
}
.publish-button:active:not(:disabled) {
    transform: scale(.99);
}

.publish-button:disabled {
    opacity: .48;
    cursor: not-allowed;
    box-shadow: none;
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 760px) {

    body {
        padding-bottom: 92px;
    }

    .container {
        width: calc(100% - 16px);
    }

    .main {
        padding: 10px 0 18px;
    }

    .topbar-inner {
        min-height: 62px;
    }

    .brand-logo {
        width: 37px;
        height: 37px;
    }

    .brand-name {
        font-size: 15px;
    }

    .brand-subtitle {
        font-size: 7px;
    }

    .server-clock {
        display: none;
    }

    .logout-button {
        min-height: 34px;
        padding: 0 10px;
        font-size: 8px;
    }

    .market-status-banner {
        min-height: 70px;

        flex-direction: column;
        align-items: flex-start;

        gap: 7px;
        padding: 12px;
    }

    .market-hours {
        padding-right: 19px;
    }

    .ounce-strip {
        min-height: 54px;
        padding: 9px 12px;
    }

    .ounce-value {
        font-size: 18px;
    }

    .editor-card {
        padding: 11px;
    }

    .product-grid,
    .shots-grid {
        grid-template-columns: 1fr;
    }

    .product-card {
        padding: 12px;
    }

    .product-title {
        font-size: 12px;
    }

    .field-grid-2 {
        grid-template-columns: minmax(0,1fr) minmax(0,1fr);
    }

    .price-result-box {
        min-height: 60px;
    }

    .result-value {
        font-size: 13px;
        font-weight: 700;
    }

    .bar-list {
        gap: 12px;
    }

    .bar-card {
        display: grid;

        grid-template-columns:
            minmax(0,1fr)
            minmax(92px,.7fr);

        gap: 9px;

        padding: 10px;
    }

.bar-main {
    grid-column: 1 / -1;
}

/* درصد فروش */
.bar-card > .field:nth-child(2) {
    grid-column: 1 / 2;
}

/* درصد خرید */
.bar-card > .field:nth-child(3) {
    grid-column: 2 / 3;
}

/* نتیجه نهایی */
.bar-result-box {
    grid-column: 1 / -1;
}
    .readonly-price-value {
        font-size: 12px;
        font-weight: 700;
    }

    .bar-result-sell,
    .bar-result-buy {
        font-size: 12px;
        font-weight: 700;
    }

    .advanced-grid.two-options {
        grid-template-columns: 1fr;
    }

    .publish-info {
        display: none;
    }

    .publish-button {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 430px) {

    .field-grid-2 {
        grid-template-columns: 1fr;
    }

    .product-card {
        padding: 11px;
    }

    .price-result-box {
        grid-template-columns: 1fr auto 1fr;
    }

    .result-value {
        font-size: 12px;
        font-weight: 700;
    }


    /* ==========================================
       BAR MOBILE ALIGNMENT
       ========================================== */

.bar-card {
    display: grid;

    /* دقیقاً مثل ساچمه‌ها */
    grid-template-columns:
        minmax(0,1fr)
        minmax(0,1fr);

    gap: 9px;

    padding: 12px;
}


.bar-main {
    grid-column: 1 / -1;

    width: 100%;
}


.bar-card > .field:nth-child(2),
.bar-card > .field:nth-child(3) {
    grid-column: auto;

    width: 100%;
    min-width: 0;
}


.bar-card > .field:nth-child(2) .percent-input-wrap,
.bar-card > .field:nth-child(3) .percent-input-wrap {
    width: 100%;
}


.bar-card > .field:nth-child(2) .input,
.bar-card > .field:nth-child(3) .input {
    width: 100%;
}


.bar-result-box {
    grid-column: 1 / -1;

    width: 100%;
}


/* ============================================================
   END MOBILE 430px
   ============================================================ */

}


/* ============================================================
   ACCESSIBILITY
   ============================================================ */
button:focus-visible,
input:focus-visible {
    outline:
        2px solid
        rgba(0,150,199,.24);

    outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}



	/* ============================================================
   PRICE HISTORY
============================================================ */

.silver-archive-card {

    padding:
        15px;

    background:
        rgba(255,255,255,.035);

    border:
        1px solid
        rgba(255,255,255,.08);

    border-radius:
        15px;
}
/* ============================================================
   ARCHIVE DATE + BUTTON — SAME ROW
   ============================================================ */

.silver-archive-row {

    width: 100%;

    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        125px;

    align-items: end;

    gap: 10px;
}


.silver-archive-row .silver-archive-field {
    min-width: 0;
}


/* دکمه نمایش آرشیو */

.silver-archive-row .silver-archive-button {

    width: 125px;

    min-width: 125px;

    height: 44px;

    align-self: end;
}

.silver-archive-form {

    display:
        grid;

    grid-template-columns:
        minmax(0, 1fr)
        auto;

    align-items:
        end;

    gap:
        10px;
}


.silver-archive-field {

    min-width:
        0;
}


.silver-archive-field label {

    display:
        block;

    margin-bottom:
        6px;

    color:
        var(--muted);

    font-size:
        9px;

    font-weight:
        800;
}


.silver-archive-field input {

    width:
        100%;

    height:
        42px;

    padding:
        0 11px;

    border:
        1px solid
        rgba(255,255,255,.10);

    border-radius:
        10px;

    background:
        #3D3779;

    color:
        #FFFFFF;

    outline:
        none;

    font-size:
        12px;

    font-weight:
        700;

    text-align:
        center;

    direction:
        ltr;
}


.silver-archive-field input:focus {

    border-color:
        #0096C7;

    box-shadow:
        0 0 0 3px
        rgba(0,150,199,.18);
}


.silver-archive-button {

    min-width:
        125px;

    height:
        42px;

    padding:
        0 14px;

    border:
        0;

    border-radius:
        10px;

    background:
        linear-gradient(
            135deg,
            #0096C7,
            #087CA2
        );

    color:
        #FFFFFF;

    font-size:
        10px;

    font-weight:
        900;

    cursor:
        pointer;

    transition:
        transform .15s ease,
        opacity .15s ease;
}


.silver-archive-button:hover {

    transform:
        translateY(-1px);
}


.silver-archive-button:disabled {

    opacity:
        .55;

    cursor:
        default;

    transform:
        none;
}


.silver-archive-status {

    min-height:
        18px;

    margin-top:
        8px;

    text-align:
        right;

    color:
        var(--muted);

    font-size:
        8px;
}


.silver-archive-status.success {

    color:
        var(--success);
}


.silver-archive-status.error {

    color:
        var(--danger);
}


.silver-archive-status.loading {

    color:
        var(--warning);
}


@media (
    max-width: 760px
) {

    .silver-archive-form {

        grid-template-columns:
            1fr;

    }


    .silver-archive-button {

        width:
            100%;

    }

}
/* ============================================================
   SILVERSUN ARCHIVE DATE PICKER
   PREMIUM DARK MODAL
   ============================================================ */

.silver-archive-field {
    position: relative;
    width: 100%;
    min-width: 0;
}


/* ============================================================
   LABEL
   ============================================================ */

.silver-archive-field > label {
    display: block;

    margin-bottom: 7px;

    color: var(--muted);

    font-size: 9px;
    font-weight: 800;

    line-height: 1.3;
}


/* ============================================================
   DATE BUTTON
   ============================================================ */

.archive-date-picker-btn {
    width: 100%;
    min-height: 44px;

    padding: 0 12px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    background:
        linear-gradient(
            145deg,
            #3D3779,
            #332D70
        );

    border:
        1px solid
        rgba(255,255,255,.09);

    border-radius: 11px;

    color: var(--text);

    font-family:
        "SilverSun",
        Tahoma,
        Arial,
        sans-serif;

    font-size: 10px;
    font-weight: 800;

    cursor: pointer;
    outline: none;

    box-shadow:
        inset 0 1px 0
        rgba(255,255,255,.035);

    transition:
        background var(--ease),
        border-color var(--ease),
        box-shadow var(--ease),
        transform var(--ease);
}

.archive-date-picker-btn:hover {
    background:
        linear-gradient(
            145deg,
            #464080,
            #393375
        );

    border-color:
        rgba(0,150,199,.38);
}

.archive-date-picker-btn:active {
    transform: scale(.995);
}

.archive-date-picker-btn[aria-expanded="true"] {
    border-color:
        #0096C7;

    box-shadow:
        0 0 0 3px
        rgba(0,150,199,.12);
}


/* ============================================================
   DATE BUTTON CONTENT
   ============================================================ */

.archive-date-picker-left {
    min-width: 0;

    display: flex;
    align-items: center;

    gap: 9px;
}

.archive-date-icon {
    width: 30px;
    height: 30px;

    flex: 0 0 30px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 9px;

    background:
        rgba(0,150,199,.12);

    color:
        #0096C7;
}

.archive-date-icon svg {
    width: 16px;
    height: 16px;
}

.archive-date-display {
    min-width: 0;

    color:
        rgba(255,255,255,.52);

    font-size: 10px;
    font-weight: 700;

    white-space: nowrap;
}

.archive-date-display.has-value {
    color: #FFFFFF;
}

.archive-date-chevron {
    color:
        rgba(255,255,255,.45);

    font-size: 14px;

    line-height: 1;

    transition:
        transform var(--ease),
        color var(--ease);
}

.archive-date-picker-btn[aria-expanded="true"]
.archive-date-chevron {
    color: #0096C7;
    transform: rotate(180deg);
}


/* ============================================================
   MODAL BACKDROP
   ============================================================ */

.archive-calendar {
    position: fixed;

    inset: 0;

    z-index: 5000;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 0;

    padding: 16px;

    background:
        rgba(8,6,28,.68);

    backdrop-filter:
        blur(7px);

    -webkit-backdrop-filter:
        blur(7px);

    animation:
        archiveCalendarFadeIn
        .18s ease-out;
}

.archive-calendar.hidden {
    display: none;
}


/* ============================================================
   CALENDAR HEADER
   ============================================================ */

.archive-calendar-header,
.archive-calendar-weekdays,
.archive-calendar-days,
.archive-calendar-footer {

    width: 360px;
    max-width: 100%;
}


/* HEADER */

.archive-calendar-header {

    padding:
        13px 14px;

    display: grid;

    grid-template-columns:
        36px 1fr 36px;

    align-items: center;

    gap: 8px;

    background:
        linear-gradient(
            145deg,
            #332D70,
            #29245D
        );

    border:
        1px solid
        rgba(255,255,255,.09);

    border-bottom:
        0;

    border-radius:
        17px 17px 0 0;

    box-shadow:
        inset 0 1px 0
        rgba(255,255,255,.035);
}


/* ============================================================
   NAV BUTTON
   ============================================================ */

.archive-calendar-nav {

    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border:
        1px solid
        rgba(255,255,255,.07);

    border-radius: 9px;

    background:
        rgba(255,255,255,.045);

    color: #FFFFFF;

    font-family:
        "SilverSun",
        Tahoma,
        sans-serif;

    font-size: 19px;
    font-weight: 700;

    line-height: 1;

    cursor: pointer;

    transition:
        background var(--ease),
        border-color var(--ease),
        color var(--ease),
        transform var(--ease);
}

.archive-calendar-nav:hover {
    background:
        rgba(0,150,199,.13);

    border-color:
        rgba(0,150,199,.32);

    color:
        #0096C7;
}

.archive-calendar-nav:active {
    transform: scale(.94);
}


/* ============================================================
   MONTH TITLE
   ============================================================ */

.archive-calendar-title {

    text-align: center;

    color: #FFFFFF;

    font-size: 13px;
    font-weight: 900;

    line-height: 1.3;

    white-space: nowrap;
}


/* ============================================================
   WEEKDAYS
   ============================================================ */

.archive-calendar-weekdays {

    padding:
        6px 13px 2px;

    display: grid;

    grid-template-columns:
        repeat(7, minmax(0, 1fr));

    background:
        #29245D;

    border-left:
        1px solid
        rgba(255,255,255,.09);

    border-right:
        1px solid
        rgba(255,255,255,.09);
}

.archive-calendar-weekdays span {

    height: 28px;

    display: flex;
    align-items: center;
    justify-content: center;

    color:
        var(--muted-2);

    font-size: 8px;
    font-weight: 800;
}


/* ============================================================
   DAYS
   ============================================================ */

.archive-calendar-days {

    padding:
        3px 13px 12px;

    display: grid;

    grid-template-columns:
        repeat(7, minmax(0, 1fr));

    gap:
        4px;

    background:
        #29245D;

    border-left:
        1px solid
        rgba(255,255,255,.09);

    border-right:
        1px solid
        rgba(255,255,255,.09);
}


/* DAY */

.archive-calendar-day {

    width: 100%;

    aspect-ratio: 1 / 1;

    min-width: 0;

    padding: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border:
        1px solid
        transparent;

    border-radius: 9px;

    background:
        transparent;

    color:
        #E8E7EF;

    font-family:
        "SilverSun",
        Tahoma,
        Arial,
        sans-serif;

    font-size: 10px;
    font-weight: 700;

    line-height: 1;

    cursor: pointer;

    transition:
        background var(--ease),
        border-color var(--ease),
        color var(--ease),
        transform var(--ease);
}


/* HOVER */

.archive-calendar-day:hover {

    background:
        rgba(255,255,255,.06);

    border-color:
        rgba(255,255,255,.07);

    color:
        #FFFFFF;
}


/* CLICK */

.archive-calendar-day:active {
    transform:
        scale(.94);
}


/* TODAY */

.archive-calendar-day.is-today {

    border-color:
        rgba(0,150,199,.48);

    background:
        rgba(0,150,199,.04);

    color:
        #0096C7;
}


/* SELECTED */

.archive-calendar-day.is-selected {

    background:
        #0096C7;

    border-color:
        #0096C7;

    color:
        #FFFFFF;

    font-weight:
        900;

    box-shadow:
        0 4px 12px
        rgba(0,150,199,.20);
}


/* SELECTED + TODAY */

.archive-calendar-day.is-selected.is-today {

    background:
        #0096C7;

    border-color:
        #0096C7;

    color:
        #FFFFFF;
}


/* EMPTY */

.archive-calendar-day.is-empty {

    pointer-events:
        none;

    background:
        transparent;
}


/* ============================================================
   FOOTER
   ============================================================ */

.archive-calendar-footer {

    min-height:
        54px;

    padding:
        9px 13px 11px;

    display: flex;
    align-items: center;
    justify-content: flex-start;

    background:
        #29245D;

    border:
        1px solid
        rgba(255,255,255,.09);

    border-top:
        1px solid
        rgba(255,255,255,.055);

    border-radius:
        0 0 17px 17px;
}


/* TODAY */

.archive-today-btn {

    min-height:
        33px;

    padding:
        0 13px;

    border:
        1px solid
        rgba(0,150,199,.18);

    border-radius:
        9px;

    background:
        rgba(0,150,199,.08);

    color:
        #0096C7;

    font-family:
        "SilverSun",
        Tahoma,
        Arial,
        sans-serif;

    font-size:
        9px;

    font-weight:
        800;

    cursor:
        pointer;

    transition:
        background var(--ease),
        border-color var(--ease),
        transform var(--ease);
}

.archive-today-btn:hover {

    background:
        rgba(0,150,199,.14);

    border-color:
        rgba(0,150,199,.35);
}

.archive-today-btn:active {
    transform:
        scale(.97);
}


/* ============================================================
   OPEN ARCHIVE BUTTON
   ============================================================ */

.silver-archive-button {

    min-width:
        125px;

    height:
        42px;

    padding:
        0 14px;

    border:
        0;

    border-radius:
        10px;

    background:
        linear-gradient(
            135deg,
            #0096C7,
            #087CA2
        );

    color:
        #FFFFFF;

    font-family:
        "SilverSun",
        Tahoma,
        Arial,
        sans-serif;

    font-size:
        10px;

    font-weight:
        900;

    cursor:
        pointer;

    box-shadow:
        0 7px 18px
        rgba(0,0,0,.18);

    transition:
        transform var(--ease),
        filter var(--ease),
        opacity var(--ease);
}

.silver-archive-button:hover {

    filter:
        brightness(1.07);

    transform:
        translateY(-1px);
}

.silver-archive-button:disabled {

    opacity:
        .55;

    cursor:
        not-allowed;

    transform:
        none;
}


/* ============================================================
   STATUS
   ============================================================ */

.silver-archive-status {

    min-height:
        18px;

    margin-top:
        8px;

    color:
        var(--muted);

    font-size:
        8px;

    font-weight:
        700;

    text-align:
        right;
}

.silver-archive-status.success {
    color:
        var(--success);
}

.silver-archive-status.error {
    color:
        var(--danger);
}

.silver-archive-status.loading {
    color:
        var(--warning);
}


/* ============================================================
   ANIMATION
   ============================================================ */

@keyframes archiveCalendarFadeIn {

    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 430px) {

    .archive-calendar {
        padding:
            12px;
    }

    .archive-calendar-header,
    .archive-calendar-weekdays,
    .archive-calendar-days,
    .archive-calendar-footer {

        width:
            min(360px, calc(100vw - 24px));

    }

    .archive-calendar-header {
        padding:
            11px 12px;
    }

    .archive-calendar-days {
        padding:
            3px 10px 11px;

        gap:
            3px;
    }

    .archive-calendar-weekdays {
        padding:
            5px 10px 2px;
    }

    .archive-calendar-day {
        font-size:
            10px;
    }

}


/* ============================================================
   VERY SMALL PHONES
   ============================================================ */

@media (max-width: 340px) {

    .archive-calendar-header,
    .archive-calendar-weekdays,
    .archive-calendar-days,
    .archive-calendar-footer {

        width:
            calc(100vw - 20px);

    }

    .archive-calendar-days {
        gap:
            2px;
    }

    .archive-calendar-day {
        font-size:
            9px;
    }

}
