/* ========== Theme Variables ========== */
:root {
    /* Dark (پیش‌فرض) */
    --bg: #101317;
    --text: #e8eaf6;
    --muted: #bfc5d1;
    --card: #212121;
    --border: #2a2f36;
    --primary: #079907;
    --primary-contrast: #fff;
    /* تأکید زرد/سبز برند و رنگ آیکون‌ها در دارک */
    --accent: #c3e91c; /* زرد-لیمویی خوانا روی تیره */
    --icon-color: rgba(255,255,255,.85);
    /* لایه‌های شفاف */
    --glass: rgba(20,24,28,.80);
    --glass-strong: rgba(14,18,22,.86);
    --shadow-lg: 0 8px 24px rgba(0,0,0,.35);
    --shadow-md: 2px 2px 10px rgba(0,0,0,.28);
    --input-inset: inset 2px 5px 10px rgba(0,0,0,.35);
    --link: #9bd3ff;
    --link-hover: #c6e7ff;
    /* پس‌زمینه (لود اولیه دارک) */
    --bg-image: url('../../newloginpage/newassets/newimages/bg1.jpg');
    /* زمینهٔ پنل مناسبت‌ها */
    --panel-bg: rgba(255,255,255,.045);
}

html[data-theme="light"] {
    /* Light با کنتراست کنترل‌شده برای زمینه‌های شفاف */
    --bg: #f6f8fb;
    --text: #0b0f14;
    --muted: #4e5968;
    /* ↓↓ تیره‌تر از قبل (کم‌سفیدتر) برای کارت اصلی */
    --card: #bfc9d6; /* پیش‌تر dfe5ee بود */
    /* لایه‌های شفاف: تیره‌تر تا متن روی bg2 ناخوانا نشود */
    --glass: rgba(170,182,198,.92);
    --glass-strong: rgba(160,172,190,.95);
    --shadow-lg: 0 8px 24px rgba(16,22,26,.16);
    --shadow-md: 0 2px 8px rgba(16,22,26,.12);
    --input-inset: inset 0 0 0 1px rgba(16,22,26,.12);
    --border: #c6d0de;
    --primary: #0d8b2d;
    --primary-contrast: #fff;
    /* آیکون‌ها و زرد برند در لایت: کهربایی/تیره و خوانا روی شفاف */
    --icon-color: #2b3a4b;
    --accent: #8a7a00; /* زردِ کهربایی-تیره، چشم‌نواز روی شیشه‌ای روشن */

    --link: #0b6bde;
    --link-hover: #084d9a;
    --bg-image: url('../../newloginpage/newassets/newimages/bg2.jpg');
    --panel-bg: rgba(10,14,18,.06);
}

/* ========== Reset & Base ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box
}

body {
    background-image: var(--bg-image);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    direction: rtl;
    color: var(--text);
}

/* ========== Header ========== */
.header {
    text-align: center;
    overflow: hidden;
    padding: 20px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative
}

.logo {
    max-width: 250px
}

.header-image {
    height: auto
}

.header-title {
    text-transform: uppercase;
    margin-bottom: 40px;
    color: var(--accent) !important; /* هماهنگ با تم */
    font-family: IranNastaliq !important;
    text-align: center;
    flex-grow: 1;
    font-size: 5vw;
    margin-right: 10px;
    right: 5%;
    top: 35%;
}

/* ========== Layout Shell ========== */
.Main {
    border: 2px solid var(--border);
    border-radius: 30px;
    padding: 50px;
    background: var(--card);
    box-shadow: 15px 15px 30px rgba(25,25,25,.9), -15px -15px 30px rgba(60,60,60,.35);
    width: 85%;
    height: auto;
    margin-bottom: 5%;
}

.container {
    align-items: center;
    top: 50%;
    left: 50%;
    max-width: 900px
}

/* ========== Fonts ========== */
@font-face {
    font-family: 'IranNastaliq';
    src: url('../newassets/newfonts/7.ttf') format('truetype')
}

#ebcaptchatext {
    color: #1b1818;
    font-size: 1.5rem
}

/* ========== Inputs ========== */
.input-group div {
    background-color: transparent;
    border: none
}

.input-group input {
    color: #fff;
    width: 100%;
    border: none;
    outline: none;
    border-radius: 100px;
    padding: 1em;
    background-color: transparent;
    box-shadow: var(--input-inset);
    transition: 300ms ease-in-out;
}

html[data-theme="light"] .input-group input {
    color: #0b0f14
}

.input-group input:focus {
    background-color: transparent;
    transform: scale(1.05);
    box-shadow: 2px 2px 5px rgba(150,150,150,.8);
}

/* آیکون‌های داخل ادآن‌ها با تم هماهنگ شوند */
.input-group-addon span,
.input-group-addon i {
    color: var(--icon-color) !important
}

/* ========== Text accents ========== */
/* همان رفتار قبلی: spanها تأکید زرد دارند، ولی در بخش‌هایی که نباید زرد شوند override می‌کنیم */
span {
    color: var(--accent)
}

.app-meta span,
.app-meta .sep,
.calendar-panel__header span,
.calendar-panel__date,
.app-meta__brand span,
.app-meta__rights span,
.app-meta__contact span {
    color: var(--text) !important
}

/* ========== Icons (global) ========== */
i, .fa, .fas, .far, .glyphicon {
    color: var(--icon-color)
}

.carousel-control .glyphicon {
    color: var(--icon-color)
}

/* ========== Primary Button (.Btn) ========== */
.Btn {
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 50% !important;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition-duration: .3s;
    box-shadow: var(--shadow-md);
    background-color: var(--primary);
}

.sign {
    width: 100%;
    transition-duration: .3s;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative
}

    .sign svg {
        width: 17px
    }

        .sign svg path {
            fill: #fff
        }

.text {
    position: absolute;
    right: 0;
    width: 0;
    opacity: 0;
    color: #fff;
    font-size: 1.2em;
    font-weight: 600;
    transition-duration: .3s
}

/* Hover (enabled only) */
.Btn:not([disabled]):hover {
    width: 125px;
    border-radius: 40px !important;
    transition-duration: .3s;
    padding-inline-start: 10px
}

.Btn:not([disabled]):hover {
    padding-left: 10px
}
/* fallback */
html[lang="fa"] .Btn:not([disabled]):hover {
    padding-left: 0;
    padding-right: 10px
}

.Btn:not([disabled]):hover .sign {
    width: 30%;
    transition-duration: .3s;
    padding-left: 0;
    padding-right: 12px
}

.Btn:not([disabled]):hover .text {
    opacity: 1;
    width: 100%;
    transition-duration: .3s;
    padding-right: 10px
}

.Btn:active {
    transform: translate(2px,2px)
}

/* ========== Secondary Button (Reset Password) ========== */
.restorPass {
    width: 9em;
    height: 3em;
    border-radius: 30em;
    font-size: 15px;
    font-family: inherit;
    border: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: 1px 1px 6px #c5c5c5,0 0 6px #fff;
    background-color: transparent;
}

    .restorPass::before {
        content: '';
        width: 0;
        height: 3em;
        border-radius: 30em;
        position: absolute;
        top: 0;
        left: 0;
        background-image: linear-gradient(to right,#14a53f 0%,#c4c42a 100%);
        transition: .5s ease;
        display: block;
        z-index: -1;
    }

    .restorPass:hover::before {
        width: 9em
    }

/* ========== Responsive typography/media ========== */
.header-title {
    font-size: 5vw
}

picture {
    width: 50%
}

@media(max-width:480px) {
    .header-title {
        font-size: 7vw
    }

    picture {
        width: 85%
    }
}

@media(min-width:481px) and (max-width:767px) {
    .header-title {
        font-size: 8vw
    }

    picture {
        width: 90%
    }
}

@media(min-width:768px) and (max-width:1024px) {
    .header-title {
        font-size: 6vw
    }

    picture {
        width: 70%
    }
}

@media(min-width:1025px) {
    .header-title {
        font-size: 5vw
    }

    picture {
        width: 50%
    }
}

/* ========== Responsive spacing (page) ========== */
.Main .card {
    margin-bottom: 24px
}

@media(max-width:991px) {
    .Main {
        padding: 24px;
        width: 94%;
        margin: 12px auto
    }

        .Main .col-md-7, .Main .col-md-5 {
            margin-bottom: 16px
        }
}

@media(max-width:767px) {
    .header {
        padding: 12px 8px
    }

    .container.Main {
        padding: 16px
    }

    .carousel {
        margin-bottom: 12px
    }
}

.card-body .form-group {
    margin-bottom: 16px
}

/* ========== Footer (Version Badge) ========== */
.app-meta {
    position: fixed;
    bottom: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 16px;
    background: var(--glass);
    color: var(--text);
    backdrop-filter: blur(6px);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    z-index: 1040;
}

    .app-meta a {
        color: var(--link);
        text-decoration: none
    }

        .app-meta a:hover {
            color: var(--link-hover);
            text-decoration: underline
        }

.app-meta__brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600
}

.app-meta__version b {
    font-family: monospace;
    letter-spacing: .5px
}

@media(max-width:480px) {
    .app-meta {
        font-size: 12px;
        padding: 6px 10px
    }

    .app-meta__version {
        white-space: nowrap
    }
}

/* ========== Loader (button) ========== */
.loader {
    display: none;
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255,255,255,.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: btnspin .8s linear infinite
}

@keyframes btnspin {
    to {
        transform: rotate(360deg)
    }
}

/* Loading state */
.Btn.is-loading {
    width: 125px;
    border-radius: 40px !important;
    justify-content: center
}

    .Btn.is-loading .sign, .Btn.is-loading .text {
        display: none
    }

    .Btn.is-loading .loader {
        display: block
    }

/* Fine hover spacing */
.Btn:not([disabled]):hover .sign {
    margin-inline-end: 8px
}

.Btn:not([disabled]):hover .sign {
    margin-right: 8px
}
/* fallback */
.Btn:not([disabled]):hover .text {
    padding-right: 14px
}

/* ========== Disabled UX (no internal change on hover) ========== */
.Btn[disabled] {
    opacity: .60;
    cursor: not-allowed;
    position: relative;
    width: 45px;
    height: 45px;
    border-radius: 50% !important;
}

    .Btn[disabled] .text {
        display: none !important
    }

    .Btn[disabled]:hover {
        width: 45px;
        border-radius: 50% !important;
        padding: 0
    }

    .Btn[disabled]::after {
        content: 'غیرفعال — ابتدا کپچا';
        position: absolute;
        bottom: -34px;
        right: 50%;
        transform: translateX(50%);
        background: var(--glass-strong);
        color: #fff;
        font-size: 12px;
        line-height: 1;
        padding: 6px 8px;
        border-radius: 6px;
        white-space: nowrap;
        box-shadow: var(--shadow-lg);
        opacity: 0;
        transition: opacity .2s ease;
        pointer-events: none;
        z-index: 5;
    }

    .Btn[disabled]:hover::after, .Btn[disabled]:active::after {
        opacity: 1
    }

/* ========== Theme Toggle Button ========== */
.theme-toggle {
    position: fixed;
    top: 12px;
    left: 12px;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 999px;
    background: var(--glass-strong);
    color: var(--text);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1060;
    transition: transform .15s ease, background .2s ease, color .2s ease;
    border: 1px solid var(--border);
}

    .theme-toggle:hover {
        transform: translateY(-1px)
    }

.theme-toggle__icon {
    position: absolute;
    font-size: 18px;
    transition: opacity .2s ease, transform .25s ease
}

.theme-toggle__icon--sun {
    opacity: 0;
    transform: scale(.6) rotate(-30deg)
}

html[data-theme="light"] .theme-toggle__icon--sun {
    opacity: 1;
    transform: scale(1) rotate(0)
}

html[data-theme="light"] .theme-toggle__icon--moon {
    opacity: 0;
    transform: scale(.6) rotate(30deg)
}

/* ========== Occasions (Full Row inside Main) ========== */
.calendar-panel {
    background: var(--panel-bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 12px 14px;
    box-shadow: var(--shadow-md);
}

.calendar-panel--fullrow {
    width: 100%;
    margin-top: 8px
}

.calendar-panel__header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    margin-bottom: 6px
}

    .calendar-panel__header i {
        color: var(--icon-color)
    }
/* آیکون عنوان با تم */
.calendar-panel__list {
    margin: 0;
    padding-inline-start: 22px;
    padding-right: 22px
}

    .calendar-panel__list li {
        margin: 2px 0;
        font-size: 14px
    }

.calendar-panel__date {
    margin-top: 6px;
    font-size: 12px;
    color: var(--muted)
}

/* موبایل */
@media(max-width:480px) {
    .calendar-panel {
        font-size: 13px;
        padding: 10px 12px
    }

    .calendar-panel__list {
        padding-inline-start: 18px;
        padding-right: 18px
    }
}