@font-face {
    font-family: VazirLocal;
    src: url("./Vazir.woff2") format("woff2");
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
}
:root {
    color-scheme: light;
    --page: #f2f6fc;
    --surface: #fff;
    --soft: #f7faff;
    --text: #172b4d;
    --muted: #687b96;
    --border: #dce6f3;
    --blue: #2563eb;
    --blue-soft: #eaf2ff;
    --green: #07864b;
    --green-bg: #eafaf1;
    --green-border: #8ce3b4;
    --orange: #c76a08;
    --orange-bg: #fff4e5;
    --orange-border: #ffd09a;
    --red: #c62828;
    --red-bg: #fff0f0;
    --red-border: #ffc0c0;
    --shadow: 0 16px 42px rgba(33, 66, 120, 0.09);
}
@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
        --page: #081321;
        --surface: #101e30;
        --soft: #14243a;
        --text: #edf4ff;
        --muted: #a2b4ce;
        --border: #2b405b;
        --blue: #75a9ff;
        --blue-soft: #172e4d;
        --green: #39dfa0;
        --green-bg: #0b352c;
        --green-border: #087b57;
        --orange: #ffbd70;
        --orange-bg: #392b1d;
        --orange-border: #78512b;
        --red: #ff8585;
        --red-bg: #3a2029;
        --red-border: #88414b;
        --shadow: 0 18px 48px rgba(0, 0, 0, 0.25);
    }
}
* {
    box-sizing: border-box;
}
body {
    margin: 0;
    min-height: 100vh;
    padding: 28px 16px;
    background: radial-gradient(ellipse at 10% 0%, rgba(59, 130, 246, 0.1), transparent 40%), var(--page);
    color: var(--text);
    font-family: VazirLocal, Vazir, Tahoma, Arial, sans-serif;
    line-height: 1.8;
}
.container {
    width: min(100%, 1100px);
    margin: auto;
}
output{
    font-variant-numeric:unset !important;
}
.app {
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow);
}
.header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 25px 28px 22px;
    border-bottom: 1px solid var(--border);
}
.clear{clear: both;}
.logo {
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    border-radius: 17px;
    background: var(--blue-soft);
    color: var(--blue);
    font-size: 29px;
    font-weight: 800;
}
h1 {
    margin: 0;
    font-size: clamp(19px, 3vw, 25px);
    line-height: 1.55;
}
.subtitle {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
}
.content {
    padding: 25px 28px 24px;
}
.inputs {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 190px;
    gap: 17px;
    align-items: start;
}
.field label {
    display: block;
    margin-bottom: 7px;
    font-size: 14px;
    font-weight: 700;
}
input {
    width: 100%;
    min-height: 55px;
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: 13px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 18px;
    font-variant-numeric: tabular-nums;
    outline: none;
}
input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 15%, transparent);
}
.rate-wrap {
    position: relative;
}
.rate-wrap input {
    padding-left: 40px;
}
.rate-wrap span {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    pointer-events: none;
}
.rate-note {
    margin-top: 5px;
    min-height: 25px;
    font-size: 13px;
    font-weight: 800;
    /*color: var(--green);*/
}
.is-dirty .rate-note{
    color: var(--orange);
}
.is-official .rate-note{
    color: var(--green);
}
.rate-field.is-dirty .rate-note {
    color: var(--orange);
}
#rateField.is-dirty input {
    border-color: var(--orange);
}
#rateField.is-official input {
    border-color: var(--green);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 12%, transparent);
}
.result-section {
    margin-top: 20px;
    padding: 15px 19px 14px;
    border: 1px solid var(--border);
    border-radius: 17px;
    background: var(--soft);
    transition:
        opacity 0.2s,
        filter 0.2s,
        border-color 0.2s;
        width:50%;
        float:right;
}
.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 9px;
    border-bottom: 1px solid var(--border);
}
.section-heading h2 {
    margin: 0;
    font-size: 17px;
}
.section-tag {
    color: var(--muted);
    font-size: 12px;
}
.result-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 10px 0;
    font-size: 14px;
}
.result-row + .result-row {
    border-top: 1px solid color-mix(in srgb, var(--border) 65%, transparent);
}
.result-row > span {
    color: var(--muted);
}
output {
    text-align: left;
    direction: ltr;
    overflow-wrap: anywhere;
    font-size: 18px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}
.base-row output {
    color: var(--blue);
}
.section-status {
    margin-top: 8px;
    padding: 8px 11px;
    border-radius: 10px;
    background: var(--green-bg);
    color: var(--green);
    font-size: 12px;
    font-weight: 800;
}
.official.is-invalid {
    border-color: var(--red-border);
}
.official.is-invalid .section-status {
    background: var(--red-bg);
    color: var(--red);
}
.current.is-valid {
    border-color: var(--green-border);
}
.current.is-valid .section-status {
    background: var(--green-bg);
    color: var(--green);
}
.current.is-invalid .section-status {
    background: var(--orange-bg);
    color: var(--orange);
}
.current.is-disabled {
    opacity: 0.38;
    filter: blur(1.2px);
    pointer-events: none;
    user-select: none;
}
.footer {
    margin: 22px 0 0;
    text-align: center;
    color: var(--muted);
    font-size: 11px;
}
#officialSection{
    border-radius: 0 17px 17px 0;
}
#currentSection{
    border-radius: 17px 0 0 17px ;
}
@media (max-width: 560px) {
    body {
        padding: 13px 9px;
    }
    .app {
        border-radius: 18px;
    }
    .header {
        padding: 19px 16px;
        gap: 12px;
    }
    .logo {
        width: 46px;
        height: 46px;
        flex-basis: 46px;
        border-radius: 14px;
    }
    .content {
        padding: 19px 15px 21px;
    }
    .inputs {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .result-section {
        padding: 13px 13px 12px;
        width: 100%;
    }
    .result-row {
        gap: 8px;
        font-size: 12px;
    }
    output {
        font-size: 16px;
        font-weight:500;
    }
    #officialSection{
    border-radius: 17px ;
    }
    #currentSection{
        border-radius: 17px ;
    }
}
