@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800&display=swap');


/* =========================================
   پایه
========================================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


html {
    scroll-behavior: smooth;
}


body {

    direction: rtl;

    font-family: "Vazirmatn", sans-serif;

    min-height: 100vh;

    background:
        radial-gradient(
            circle at 15% 10%,
            rgba(255,255,255,.8),
            transparent 28%
        ),
        radial-gradient(
            circle at 90% 20%,
            rgba(147,197,253,.25),
            transparent 30%
        ),
        linear-gradient(
            145deg,
            #dff4ff,
            #eef8ff 45%,
            #f8fbff
        );

    color: #172033;

    overflow-x: hidden;

    -webkit-font-smoothing: antialiased;
}


button,
input,
select {
    font-family: inherit;
}


a {
    text-decoration: none;
    color: inherit;
}


/* =========================================
   برنامه
========================================= */

.app {

    width: 100%;

    max-width: 560px;

    min-height: 100vh;

    margin: 0 auto;

    padding:
        24px 16px
        calc(30px + env(safe-area-inset-bottom));
}


/* =========================================
   سربرگ
========================================= */

.app-header {

    position: relative;

    text-align: center;

    margin-bottom: 18px;

    padding:
        28px 20px
        26px;

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,.98),
            rgba(239,248,255,.94)
        );

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

    border-radius: 30px;

    box-shadow:
        0 18px 45px
        rgba(31,65,91,.12);

    overflow: hidden;
}


.app-header::before {

    content: "";

    position: absolute;

    width: 180px;
    height: 180px;

    top: -110px;
    left: -50px;

    background:
        radial-gradient(
            circle,
            rgba(96,165,250,.25),
            transparent 70%
        );

    border-radius: 50%;
}


.app-header::after {

    content: "";

    position: absolute;

    width: 150px;
    height: 150px;

    right: -55px;
    bottom: -100px;

    background:
        radial-gradient(
            circle,
            rgba(59,130,246,.18),
            transparent 70%
        );

    border-radius: 50%;
}


.small-title {

    position: relative;

    z-index: 1;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    padding:
        7px 15px;

    margin-bottom: 12px;

    font-size: 12px;

    font-weight: 700;

    color: #2563eb;

    background:
        linear-gradient(
            135deg,
            #eff6ff,
            #dbeafe
        );

    border:
        1px solid #dbeafe;

    border-radius: 999px;
}


.app-header h1 {

    position: relative;

    z-index: 1;

    font-size:
        clamp(
            28px,
            7vw,
            40px
        );

    line-height: 1.4;

    font-weight: 800;

    color: #102a43;
}


.app-header p {

    position: relative;

    z-index: 1;

    margin-top: 9px;

    font-size: 13px;

    line-height: 1.9;

    font-weight: 500;

    color: #64748b;
}


/* =========================================
   منو
========================================= */

.menu {

    display: grid;

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

    gap: 14px;
}


/* =========================================
   کارت منو
========================================= */

.menu-card {

    position: relative;

    display: flex;

    flex-direction: column;

    align-items: center;

    min-height: 205px;

    padding:
        22px 13px
        18px;

    text-align: center;

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

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

    border-radius: 24px;

    box-shadow:
        0 10px 30px
        rgba(31,65,91,.08);

    transition:
        transform .2s ease,
        box-shadow .2s ease;
}


.menu-card:hover {

    transform:
        translateY(-4px);

    box-shadow:
        0 16px 38px
        rgba(31,65,91,.14);
}


.menu-card:active {

    transform:
        scale(.97);
}


.menu-number {

    position: absolute;

    top: 11px;

    right: 13px;

    font-size: 11px;

    font-weight: 700;

    color: #94a3b8;
}


.menu-icon {

    width: 70px;

    height: 70px;

    display: flex;

    align-items: center;

    justify-content: center;

    margin:
        8px 0 15px;

    border-radius: 22px;

    font-size: 32px;
}


.icon-overtime {
    background: #fff3d6;
}


.icon-attendance {
    background: #dcfce7;
}


.icon-leave {
    background: #fce7f3;
}


.icon-today {
    background: #e0e7ff;
}


.icon-history {
    background: #e0f2fe;
}


.icon-register {
    background: #f3e8ff;
}


.menu-card h2 {

    font-size: 16px;

    line-height: 1.7;

    font-weight: 700;
}


.menu-card p {

    margin-top: 7px;

    font-size: 12px;

    line-height: 1.8;

    color: #64748b;
}


/* =========================================
   اطلاعیه
========================================= */

.notice {

    margin-top: 18px;

    padding:
        14px 15px;

    text-align: center;

    font-size: 12px;

    line-height: 1.9;

    color: #475569;

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

    border-radius: 18px;
}


/* =========================================
   کارت فرم
========================================= */

.login-card,
.page-card {

    width: 100%;

    padding:
        22px 18px;

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

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

    border-radius: 26px;

    box-shadow:
        0 14px 40px
        rgba(31,65,91,.09);
}


/* =========================================
   فرم
========================================= */

.form-group {

    margin-bottom: 17px;
}


.form-group label {

    display: block;

    margin-bottom: 8px;

    font-size: 13px;

    font-weight: 700;

    color: #334155;
}


.form-group input {

    width: 100%;

    height: 52px;

    padding:
        0 15px;

    font-size: 14px;

    font-weight: 500;

    color: #172033;

    background: #f8fafc;

    border:
        1px solid #dbe3ec;

    border-radius: 15px;

    outline: none;
}


.form-group input:focus {

    border-color: #60a5fa;

    box-shadow:
        0 0 0 4px
        rgba(96,165,250,.13);
}


/* =========================================
   دکمه عمومی
========================================= */

.primary-button {

    width: 100%;

    min-height: 54px;

    margin-top: 6px;

    padding: 12px 16px;

    font-size: 15px;

    font-weight: 700;

    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            #2563eb,
            #3b82f6
        );

    border: none;

    border-radius: 16px;

    cursor: pointer;

    box-shadow:
        0 9px 22px
        rgba(37,99,235,.20);
}


.secondary-link,
.back-link {

    display: block;

    margin-top: 17px;

    text-align: center;

    font-size: 13px;

    font-weight: 600;

    color: #2563eb;
}


.back-link {
    color: #64748b;
}


/* =========================================
   صفحه ورود و خروج
========================================= */

.attendance-card {

    width: 100%;

    padding:
        22px 18px
        20px;

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

    border-radius: 28px;

    box-shadow:
        0 16px 45px
        rgba(31,65,91,.10);
}


.attendance-section-title {

    display: flex;

    align-items: center;

    gap: 13px;

    margin-bottom: 24px;

    padding-bottom: 18px;

    border-bottom:
        1px solid #edf2f7;
}


.section-icon {

    width: 54px;

    height: 54px;

    display: flex;

    align-items: center;

    justify-content: center;

    flex-shrink: 0;

    font-size: 25px;

    background:
        linear-gradient(
            145deg,
            #eff6ff,
            #dbeafe
        );

    border-radius: 17px;
}


.attendance-section-title h2 {

    font-size: 17px;

    font-weight: 800;
}


.attendance-section-title p {

    margin-top: 3px;

    font-size: 11px;

    color: #94a3b8;
}


.attendance-field {

    margin-bottom: 18px;
}


.attendance-field label {

    display: block;

    margin-bottom: 8px;

    font-size: 13px;

    font-weight: 700;

    color: #334155;
}


/* =========================================
   منوی تاریخ
========================================= */

.date-select-wrapper {

    position: relative;

    display: flex;

    align-items: center;

    height: 56px;

    background:
        linear-gradient(
            135deg,
            #f8fbff,
            #f1f7ff
        );

    border:
        1px solid #dbe7f3;

    border-radius: 17px;
}


.date-calendar-icon {

    position: absolute;

    right: 15px;

    z-index: 2;

    width: 31px;

    height: 31px;

    display: flex;

    align-items: center;

    justify-content: center;

    background: white;

    border-radius: 10px;

    pointer-events: none;
}


.attendance-date-select {

    appearance: none;

    -webkit-appearance: none;

    width: 100%;

    height: 100%;

    padding:
        0 58px 0 45px;

    font-size: 13px;

    font-weight: 700;

    color: #1e3a5f;

    background: transparent;

    border: 0;

    outline: 0;

    cursor: pointer;
}


.date-arrow {

    position: absolute;

    left: 16px;

    top: 50%;

    transform:
        translateY(-55%);

    font-size: 24px;

    color: #64748b;

    pointer-events: none;
}


/* =========================================
   ساعت و تاریخ نمایش داده شده
========================================= */

.time-display {

    display: flex;

    align-items: center;

    height: 56px;

    padding:
        0 14px;

    background: #f8fafc;

    border:
        1px solid #e2e8f0;

    border-radius: 17px;
}


.time-icon {

    width: 32px;

    height: 32px;

    display: flex;

    align-items: center;

    justify-content: center;

    margin-left: 10px;

    flex-shrink: 0;

    background: white;

    border-radius: 10px;
}


.time-display input {

    flex: 1;

    width: 100%;

    height: 100%;

    border: 0;

    outline: 0;

    background: transparent;

    font-size: 14px;

    font-weight: 700;

    color: #334155;
}


/* =========================================
   دکمه‌های ورود / خروج
========================================= */

.attendance-action {

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 10px;

    width: 100%;

    min-height: 58px;

    margin-top: 12px;

    font-size: 15px;

    font-weight: 800;

    border: none;

    border-radius: 18px;

    cursor: pointer;

    transition:
        transform .18s ease,
        box-shadow .18s ease;
}


.attendance-action:active {

    transform:
        scale(.98);
}


.exit-action {

    color: #991b1b;

    background:
        linear-gradient(
            135deg,
            #fee2e2,
            #fecaca
        );

    box-shadow:
        0 8px 22px
        rgba(153,27,27,.10);
}


.entry-action {

    color: #166534;

    background:
        linear-gradient(
            135deg,
            #dcfce7,
            #bbf7d0
        );

    box-shadow:
        0 8px 22px
        rgba(22,101,52,.12);
}


/* =========================================
   آخرین ثبت
========================================= */

.last-record-box {

    display: flex;

    align-items: center;

    gap: 12px;

    margin-top: 21px;

    padding: 14px;

    background:
        #f8fafc;

    border:
        1px solid #e2e8f0;

    border-radius: 17px;
}


.last-record-icon {

    width: 40px;

    height: 40px;

    display: flex;

    align-items: center;

    justify-content: center;

    flex-shrink: 0;

    background: white;

    border-radius: 12px;
}


.last-record-content {

    min-width: 0;

    display: flex;

    flex-direction: column;

    gap: 3px;
}


.last-record-title {

    font-size: 11px;

    font-weight: 700;

    color: #94a3b8;
}


.last-record-value {

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;

    font-size: 12px;

    font-weight: 600;

    color: #475569;
}


/* =========================================
   دکمه بازگشت
========================================= */

.attendance-back-button {

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 9px;

    width: 100%;

    min-height: 52px;

    margin-top: 18px;

    padding:
        11px 16px;

    font-size: 13px;

    font-weight: 700;

    color: #1d4ed8;

    background:
        linear-gradient(
            135deg,
            #eff6ff,
            #dbeafe
        );

    border:
        1px solid #bfdbfe;

    border-radius: 16px;

    box-shadow:
        0 7px 18px
        rgba(37,99,235,.08);
}


.back-icon {

    width: 29px;

    height: 29px;

    display: flex;

    align-items: center;

    justify-content: center;

    background: white;

    border-radius: 9px;

    font-size: 19px;
}


/* =========================================
   صفحات داخلی
========================================= */

.page-title-row {

    display: flex;

    align-items: center;

    gap: 12px;

    margin-bottom: 20px;
}


.page-title-icon {

    width: 50px;

    height: 50px;

    display: flex;

    align-items: center;

    justify-content: center;

    flex-shrink: 0;

    background: #eff6ff;

    border-radius: 16px;

    font-size: 23px;
}


.page-title-row h2 {

    font-size: 18px;

    font-weight: 800;
}


.page-title-row p {

    margin-top: 3px;

    font-size: 11px;

    color: #94a3b8;
}


.info-box {

    margin-top: 15px;

    padding: 14px;

    background: #f8fafc;

    border:
        1px solid #e2e8f0;

    border-radius: 15px;

    font-size: 12px;

    line-height: 1.9;

    color: #475569;
}


.list {

    display: flex;

    flex-direction: column;

    gap: 10px;

    margin-top: 16px;
}


.list-item {

    padding: 14px;

    background: #f8fafc;

    border:
        1px solid #e2e8f0;

    border-radius: 15px;
}


.list-item strong {

    display: block;

    font-size: 13px;
}


.list-item span {

    display: block;

    margin-top: 5px;

    font-size: 11px;

    color: #64748b;
}


.empty {

    padding: 25px 10px;

    text-align: center;

    font-size: 12px;

    color: #94a3b8;
}


/* =========================================
   آمار
========================================= */

.stat-grid {

    display: grid;

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

    gap: 10px;

    margin-bottom: 16px;
}


.stat {

    padding: 15px;

    text-align: center;

    background: #f8fafc;

    border:
        1px solid #e2e8f0;

    border-radius: 15px;
}


.stat b {

    display: block;

    font-size: 22px;

    color: #2563eb;
}


.stat span {

    font-size: 11px;

    color: #64748b;
}


/* =========================================
   جدول
========================================= */

.table-wrap {

    overflow-x: auto;

    border:
        1px solid #e2e8f0;

    border-radius: 15px;
}


table {

    width: 100%;

    min-width: 480px;

    border-collapse: collapse;

    font-size: 11px;
}


th,
td {

    padding: 11px;

    text-align: right;

    border-bottom:
        1px solid #edf2f7;
}


th {

    background: #f8fafc;

    color: #475569;
}


td {

    color: #64748b;
}


/* =========================================
   پایین صفحه
========================================= */

.app-footer {

    padding-top: 24px;

    text-align: center;

    font-size: 11px;

    color: #94a3b8;
}


/* =========================================
   موبایل خیلی کوچک
========================================= */

@media (max-width:360px) {

    .app {

        padding-left: 12px;

        padding-right: 12px;
    }


    .menu {

        gap: 10px;
    }


    .menu-card {

        min-height: 190px;

        padding-left: 9px;

        padding-right: 9px;
    }


    .menu-icon {

        width: 62px;

        height: 62px;

        font-size: 28px;
    }


    .menu-card h2 {

        font-size: 14px;
    }


    .menu-card p {

        font-size: 11px;
    }


    .attendance-date-select {

        font-size: 12px;

        padding-right: 53px;
    }

}


/* =========================================
   دسکتاپ
========================================= */

@media (min-width:700px) {

    .app {

        max-width: 820px;

        padding-top: 45px;
    }


    .menu {

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


    .login-card,
    .page-card,
    .attendance-card {

        max-width: 600px;

        margin-left: auto;

        margin-right: auto;
    }

   }ث
