﻿<style >
/* ====================== */
/* 🎨 پالت رنگ‌ها */
/* ====================== */
:root {
    --frame-width: 1780px;
    --frame-height: 800px;
    --primary: #0d6efd; /* آبی */
    --secondary: #6c757d; /* خاکستری */
    --accent: #20c997; /* سبز ملایم */
    --danger: #dc3545; /* قرمز */
    --warning: #ffc107; /* طلایی/زرد */
    --success: #28a745; /* سبز تیره */
    --light: #f8f9fa;
    --dark: #212529;
}

/* ====================== */
/* 🔘 دکمه‌های مدرن بیضی */
/* ====================== */
.btn-custom-rounded {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    transition: all 0.25s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
    text-decoration: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    color: #fff;
    background-origin: border-box;
    background-clip: padding-box;
}

    .btn-custom-rounded:hover {
        transform: translateY(-2px) scale(1.03);
        box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
    }

    .btn-custom-rounded:active {
        transform: translateY(1px) scale(0.98);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    }

    .btn-custom-rounded:focus {
        outline: none;
        box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.3);
    }

    /* ✨ Ripple Effect */
    .btn-custom-rounded::after {
        content: "";
        position: absolute;
        border-radius: 50%;
        width: 0;
        height: 0;
        background: rgba(255, 255, 255, 0.5);
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        transition: width 0.5s ease, height 0.5s ease, opacity 0.5s ease;
        opacity: 0;
        pointer-events: none;
    }

    .btn-custom-rounded:active::after {
        width: 200%;
        height: 200%;
        opacity: 0;
        transition: 0s;
    }

/* ====================== */
/* 🌈 رنگ‌های دکمه‌ها — نسخه غنی و مدرن */
/* ====================== */

.btn-custom {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 120px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    outline: none;
}

    .btn-custom:active {
        transform: translateY(1px);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }

    .btn-custom::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 50%;
        transform: translate(-50%, -50%);
        transition: width 0.6s, height 0.6s;
    }

    .btn-custom:active::after {
        width: 300px;
        height: 300px;
    }

/* 🟡 دکمه طلایی */
.btn-gold {
    background: linear-gradient(135deg, #ffc107 0%, #ffd54f 30%, #ffe082 60%, #e0a800 100%);
    color: #000;
}

    .btn-gold:hover {
        background: linear-gradient(135deg, #ffcd39 0%, #ffd966 30%, #ffe599 60%, #d39e00 100%);
        box-shadow: 0 6px 16px rgba(224, 168, 0, 0.3);
    }

/* 🟢 دکمه سبز */
.btn-green {
    background: linear-gradient(135deg, #28a745 0%, #3cb043 30%, #4cce5a 60%, #218838 100%);
    color: #fff;
}

    .btn-green:hover {
        background: linear-gradient(135deg, #3cb043 0%, #4cce5a 30%, #5ed967 60%, #2c9f42 100%);
        box-shadow: 0 6px 16px rgba(33, 136, 56, 0.3);
    }

/* 🔵 دکمه آبی */
.btn-blue {
    background: linear-gradient(135deg, #0d6efd 0%, #2a8cff 30%, #4ba5ff 60%, #0b5ed7 100%);
    color: #fff;
}

    .btn-blue:hover {
        background: linear-gradient(135deg, #2a8cff 0%, #4ba5ff 30%, #6bb7ff 60%, #1c7aff 100%);
        box-shadow: 0 6px 16px rgba(11, 94, 215, 0.3);
    }

/* 🔴 دکمه قرمز */
.btn-red {
    background: linear-gradient(135deg, #dc3545 0%, #e6495c 30%, #f16b7a 60%, #c82333 100%);
    color: #fff;
}

    .btn-red:hover {
        background: linear-gradient(135deg, #e6495c 0%, #f16b7a 30%, #fa8594 60%, #d32f3f 100%);
        box-shadow: 0 6px 16px rgba(200, 35, 51, 0.3);
    }

/* ⚪ دکمه خاکستری */
.btn-gray {
    background: linear-gradient(135deg, #6c757d 0%, #868e96 30%, #adb5bd 60%, #5a6268 100%);
    color: #fff;
}

    .btn-gray:hover {
        background: linear-gradient(135deg, #868e96 0%, #adb5bd 30%, #ced4da 60%, #495057 100%);
        box-shadow: 0 6px 16px rgba(90, 98, 104, 0.3);
    }

/* 🟣 دکمه بنفش */
.btn-purple {
    background: linear-gradient(135deg, #6f42c1 0%, #8a5ac2 30%, #a575d3 60%, #5e3a9e 100%);
    color: #fff;
}

    .btn-purple:hover {
        background: linear-gradient(135deg, #8a5ac2 0%, #a575d3 30%, #bf90e4 60%, #734db0 100%);
        box-shadow: 0 6px 16px rgba(94, 58, 158, 0.3);
    }

/* 🟠 دکمه نارنجی */
.btn-orange {
    background: linear-gradient(135deg, #fd7e14 0%, #ff9a3d 30%, #ffb366 60%, #e6700a 100%);
    color: #fff;
}

    .btn-orange:hover {
        background: linear-gradient(135deg, #ff9a3d 0%, #ffb366 30%, #ffcc99 60%, #d9660a 100%);
        box-shadow: 0 6px 16px rgba(230, 102, 10, 0.3);
    }

/* 🌸 دکمه صورتی */
.btn-pink {
    background: linear-gradient(135deg, #d63384 0%, #e1559f 30%, #ec77ba 60%, #c2185b 100%);
    color: #fff;
}

    .btn-pink:hover {
        background: linear-gradient(135deg, #e1559f 0%, #ec77ba 30%, #f799d5 60%, #d81b60 100%);
        box-shadow: 0 6px 16px rgba(194, 24, 91, 0.3);
    }

/* 🟦 دکمه فیروزه‌ای */
.btn-cyan {
    background: linear-gradient(135deg, #17a2b8 0%, #2bb8ca 30%, #4ed0dc 60%, #138496 100%);
    color: #fff;
}

    .btn-cyan:hover {
        background: linear-gradient(135deg, #2bb8ca 0%, #4ed0dc 30%, #71e2f0 60%, #1a9ca0 100%);
        box-shadow: 0 6px 16px rgba(19, 132, 150, 0.3);
    }

/* ⚫ دکمه مشکی */
.btn-black {
    background: linear-gradient(135deg, #212529 0%, #343a40 30%, #495057 60%, #1a1d20 100%);
    color: #fff;
}

    .btn-black:hover {
        background: linear-gradient(135deg, #343a40 0%, #495057 30%, #60686f 60%, #2a2d31 100%);
        box-shadow: 0 6px 16px rgba(26, 29, 32, 0.3);
    }

/* دکمه دانلود */
.btn-download {
    background: #ff6b6b;
    color: white;
    font-weight: bold;
    padding: 12px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

    .btn-download:hover {
        background: #ff5252;
        transform: translateY(-3px);
        box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
        color: white;
    }

    .btn-download:active {
        transform: translateY(0);
    }

/* ورودی نمره */
.score-input {
    font-size: 1rem;
    padding: 6px 12px;
    text-align: center;
    transition: background-color 0.3s ease, color 0.3s ease;
    box-sizing: border-box;
    width: 100%;
}

    .score-input.red {
        background-color: #ffe6e6 !important;
        color: #b30000 !important;
    }

    .score-input.yellow {
        background-color: #fff8dc !important;
        color: #996600 !important;
    }

    .score-input.green {
        background-color: #e6ffe6 !important;
        color: #006600 !important;
    }

.score-cell {
    width: 150px;
    padding: 2px;
}

/* عناصر فرم بزرگ */
.label-xl {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.form-select-xl {
    padding: 0.5rem 1rem;
    font-size: 1.25rem;
    height: auto;
}

.input-lg {
    transform: scale(2);
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

.label-lg {
    font-size: 1.5rem;
    padding-right: 10px;
    user-select: none;
}

.switch-lg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ====================== */
/* 📐 Frame & Layout */
/* ====================== */
.frame {
    width: var(--frame-width);
    height: var(--frame-height);
    display: block;
    margin: 0 auto;
    overflow: hidden;
}

.responsive-frame {
    width: 100%;
    max-width: 1780px;
    aspect-ratio: 1780 / 800;
    margin: 0 auto;
    overflow: hidden;
    background-color: #f5f5f5;
}

/* ====================== */
/* 📏 تایپوگرافی */
/* ====================== */
html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    margin-bottom: 60px;
    font-family: 'Vazirmatn', Tahoma,'B Titr', Arial, sans-serif !important;
    color: var(--dark);
    background-color: #fdfdfd;
    line-height: 1.6;
    direction: rtl;
    text-align: right;
    font-variant-numeric: persian-numeric;
    font-feature-settings: "pnum";
    -webkit-font-feature-settings: "pnum";
    -moz-font-feature-settings: "pnum";
}

/* اعمال فونت به همه عناصر */
body, input, textarea, select, button {
    font-family: 'Vazirmatn','B Titr', Tahoma, Arial, sans-serif !important;
}

* {
    font-variant-numeric: persian-numeric;
    -webkit-font-feature-settings: "pnum";
    font-feature-settings: "pnum";
}

/* ====================== */
/* 🪟 Glassmorphism Cards */
/* ====================== */
.card {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(14px) saturate(180%);
    -webkit-backdrop-filter: blur(14px) saturate(180%);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 1.2rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    color: #111;
}

    .card:hover {
        transform: translateY(-5px) scale(1.03);
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
    }

/* ====================== */
/* 📊 جدول */
/* ====================== */
.table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px) saturate(170%);
    -webkit-backdrop-filter: blur(12px) saturate(170%);
    border-radius: 0.8rem;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border: 2px solid rgba(0, 0, 0, 0.25);
    color: #111;
}

    .table th,
    .table td {
        padding: 0.75rem 1rem;
        text-align: center;
        border: 2px solid rgba(0, 0, 0, 0.25);
        font-weight: 500;
    }

    .table thead {
        background: rgba(255, 255, 255, 0.25);
        font-weight: 700;
        color: #111;
    }

    .table tbody tr:hover {
        background: rgba(255, 255, 255, 0.35);
        transition: background 0.3s ease;
    }

/* ====================== */
/* 📱 ریسپانسیو */
/* ====================== */
@media (max-width: 768px) {
    .table {
        font-size: 0.85rem;
    }

        .table th,
        .table td {
            padding: 0.5rem;
            font-size: 0.8rem;
        }

    .btn-custom-rounded {
        padding: 0.4rem 1rem;
        font-size: 0.8rem;
        gap: 0.3rem;
    }

    .frame,
    .responsive-frame {
        width: 100%;
        height: auto;
    }

    .card {
        padding: 1rem;
        border-radius: 0.8rem;
    }
}

/* ====================== */
/* ⚙️ دکمه‌های غیرفعال */
/* ====================== */
.btn-custom-rounded:disabled,
.btn-custom-rounded[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    transform: none !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

    .btn-custom-rounded:disabled::after,
    .btn-custom-rounded[disabled]::after {
        display: none;
    }

/* ====================== */
/* 🎨 Scrollbar مدرن */
/* ====================== */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(6px);
}

::-webkit-scrollbar-thumb {
    background: rgba(100, 100, 100, 0.5);
    border-radius: 10px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: rgba(100, 100, 100, 0.7);
    }

/* ====================== */
/* 📝 فونت واضح */
/* ====================== */
body, table, th, td, .card {
    font-family: 'Rubik', 'Segoe UI', 'Montserrat', sans-serif;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ====================== */
/* ✅ دکمه‌های آیکونی */
/* ====================== */
.btn-icon-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    min-width: auto;
    border-radius: 40px;
}

    .btn-icon-sm i {
        font-size: 0.9rem;
    }

.btn-round {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

    .btn-round i {
        font-size: 1rem;
    }

/* تاریخ فارسی */
.text-persian-date {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    color: #17a2b8;
    background-color: #e6f7ff;
    padding: 6px 12px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #bae7ff;
    transition: all 0.2s ease;
}

    .text-persian-date:hover {
        background-color: #bae7ff;
        transform: translateY(-1px);
        box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    }

.mobile-user-nav {
    background: #fff;
    padding: 10px;
    border-bottom: 1px solid #ddd;
    position: relative;
    z-index: 1001;
}

/* منوی کاربری */
@media (max-width: 991px) {
    .account-box {
        margin-top: 0 !important;
        position: relative !important;
        transform: none !important;
        top: auto !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .header-account,
    .header-left {
        position: static !important;
    }
}

.user-menu-container {
    position: relative;
    display: inline-block;
}

.user-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background 0.2s;
}

    .user-trigger:hover {
        background-color: #f5f5f5;
    }

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #eee;
}

.user-name {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.arrow {
    font-size: 10px;
    color: #777;
    transition: transform 0.2s;
}

.user-dropdown.open .arrow {
    transform: rotate(180deg);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    width: 280px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

    .user-dropdown.open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

.user-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.user-avatar-large {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.user-fullname {
    font-weight: 600;
    color: #222;
    font-size: 15px;
}

.user-roles {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

.user-menu-list {
    list-style: none;
    padding: 8px 0;
    margin: 0;
}

    .user-menu-list li {
        padding: 0 12px;
        margin: 4px 0;
    }

    .user-menu-list a,
    .user-menu-list button {
        display: block;
        width: 100%;
        padding: 8px 12px;
        text-decoration: none;
        color: #333;
        border-radius: 6px;
        font-size: 14px;
        transition: background 0.2s;
        text-align: right;
    }

        .user-menu-list a:hover,
        .user-menu-list button:hover {
            background-color: #f8f9fa;
        }

    .user-menu-list button {
        background: none;
        border: none;
        cursor: pointer;
        font-family: inherit;
    }

.logout-link {
    color: #d32f2f !important;
}

    .logout-link:hover {
        background-color: #ffebee !important;
    }

.seed-form {
    margin-top: 6px;
}

    .seed-form button {
        background-color: #f5f5f5;
        color: #c62828;
        border: 1px solid #ffcdd2;
    }

        .seed-form button:hover {
            background-color: #ffebee;
        }

@media (max-width: 768px) {
    .user-dropdown {
        width: calc(100vw - 32px);
        right: 16px;
        left: auto;
    }

    .account-box {
        padding: 0 16px;
    }
}

.guest-menu {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background-color: #0d6efd;
    color: white;
}

    .btn-primary:hover {
        background-color: #0b5ed7;
    }

.btn-outline {
    border: 1px solid #0d6efd;
    color: #0d6efd;
}

    .btn-outline:hover {
        background-color: #eaf4ff;
    }

/* =============== فوتر =============== */
.footer-main-site {
    background: linear-gradient(135deg, #1e88e5, #43a047);
    color: #fff;
    font-family: 'IRANSans', Tahoma, sans-serif;
    padding-top: 30px;
}

.footer-shopping-features .item {
    flex: 1 1 180px;
    margin: 10px;
    padding: 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    transition: 0.3s;
}

    .footer-shopping-features .item:hover {
        background: rgba(255,255,255,0.25);
        transform: translateY(-5px);
    }

.footer-shopping-features .icon-shopping {
    font-size: 32px;
    margin-bottom: 10px;
    display: block;
}

.footer-shopping-features .title-shopping {
    font-weight: bold;
    font-size: 18px;
}

.footer-shopping-features .desc-shopping {
    font-size: 14px;
    opacity: 0.9;
}

.footer-links-col {
    margin-bottom: 20px;
}

    .footer-links-col .headline-links a {
        color: #fff;
        font-weight: bold;
        font-size: 16px;
        border-bottom: 2px solid #fff;
        padding-bottom: 5px;
    }

.footer-menu-ul li a {
    color: #e0f2f1;
    font-size: 14px;
    transition: color 0.3s;
}

    .footer-menu-ul li a:hover {
        color: #fff176;
    }

.form-newsletter-title {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    color: #fff;
}

.input-group-newsletter {
    display: flex;
    gap: 5px;
}

    .input-group-newsletter input {
        flex: 1;
        border-radius: 6px;
        border: none;
        padding: 8px;
    }

    .input-group-newsletter button {
        border-radius: 6px;
        padding: 8px 15px;
        background: #fff176;
        color: #333;
        font-weight: bold;
        border: none;
    }

.footer-content .title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 8px;
}

.footer-content .desc {
    font-size: 14px;
    line-height: 1.7;
    color: #e0f2f1;
}

.footer-copyright {
    text-align: center;
    margin-top: 20px;
}

.footer-copyright-text {
    font-size: 13px;
    opacity: 0.9;
}

/* فونت واژیر */
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* دکمه روزانه */
.btn-daily {
    background-color: #28a745;
    color: white;
    border: none;
}

    .btn-daily:hover {
        background-color: #218838;
        color: white;
    }

    .btn-daily:focus,
    .btn-daily:active {
        box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
    }

    .btn-daily.disabled,
    .btn-daily:disabled {
        background-color: #c3e6cb;
        color: #495057;
        opacity: 1;
    }

/* ✅ تعیین B Titr به عنوان فونت اصلی — برای تمام عناصر UI */
body, table, th, td, input, button, select, textarea, .card, .form-control, .page-account-box, h1, h2, h3, h4, h5, h6, p, a, label, .btn {
    font-family: "B Titr", "B Koodak", "Vazir", Tahoma, Arial, sans-serif !important;
    direction: rtl;
    text-align: right;
    font-size: 15px; /* خوانایی بهتر برای B Titr و B Koodak */
}

/* جدول‌ها */
.table, .table th, .table td {
    font-family: "B Titr", "B Koodak", "Vazir", Tahoma, Arial, sans-serif !important;
    font-size: 15px !important;
    text-align: right !important;
}
</style >



if ('serviceWorker' in navigator) {
    window .addEventListener('load', () => {
    navigator.serviceWorker.register('/service-worker.js')
      .then(registration => {
        console.log('Service Worker registered:', registration);
      })
      .catch(error => {
        console.log('Service Worker registration failed:', error);
      });
  });
}