/* ── Variables ────────────────────────────────────────────────────── */
:root {
    --bg: #faf7f2;
    --bg-card: #ffffff;
    --bg-surface: #f3ede4;
    --green: #2D4A3E;
    --green-mid: #3d6b59;
    --green-light: rgba(255, 152, 0, 0.25);
    --mint: #7DDFAA;
    --mint-light: #d4f0e4;
    --text-dark: #000;
    --text-mid: #4a3f30;
    --text-muted: #9a8e7e;
    --border: #e5ddd0;
    --shadow: 0 2px 16px rgba(45,74,62,.08);
    --radius: 14px;
    --font: 'Tajawal', sans-serif;
}

/* ── Reset ────────────────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}



body {
    font-family: var(--font);
    background: #ffffff;
    color: var(--text-dark);
    direction: rtl;
    padding-top: 155px;
}



a {
    text-decoration: none;
    color: inherit;
}

/* ── Layout ───────────────────────────────────────────────────────── */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}


/*تسجيل الدخول____________________________________*/

.auth-title {
    font-size: 28px;
    font-weight: 800;
    color: #0f1f3d;
    margin-bottom: 8px;
}

.auth-subtitle {
    color: #9b9ba8;
    font-size: 15px;
    margin-bottom: 25px;
}

.auth-input,
.phone-input {
    width: 100%;
    height: 58px;
    border: 1px solid #eceaf3;
    border-radius: 18px;
    padding: 0 18px;
    font-size: 16px;
    outline: none;
}

.auth-input {
    margin-bottom: 14px;
}

.phone-box {
    border: 1px solid #eceaf3;
    border-radius: 18px;
    overflow: hidden;
    margin-bottom: 14px;
}

.country-row {
    height: 58px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 18px;
    border-bottom: 1px solid #eceaf3;
    font-size: 17px;
}

.flag {
    font-size: 24px;
}

.arrow {
    margin-right: auto;
    font-size: 22px;
}

.phone-input {
    border: none;
    border-radius: 0;
    direction: ltr;
}

.auth-main-btn {
    width: 100%;
    height: 58px;
    border: none;
    border-radius: 30px;
    background: #e91e73;
    color: white;
    font-size: 18px;
    font-weight: bold;
    margin-top: 18px;
}

.auth-switch {
    display: block;
    margin-top: 25px;
    color: #777;
    font-size: 15px;
}

    .auth-switch span {
        color: #e91e73;
        font-weight: bold;
    }

/*___________________________________________________*/
/* ── Navbar ───────────────────────────────────────────────────────── */


/* حاوية اللوقو */
/*.navbar > div:first-child {
    position: absolute;
    right: 30px;
}
*/
/* اللوقو */
.main-logo {
    width: 180px;
    height: auto;
    margin-bottom: 10px;
}

.new-user-btn {
    color: rgba(255, 152, 0);
    display: block;
    text-align: right;
}

.logout-btn {
    color: #c0392b !important;
    position: absolute;
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
}

.navbar {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 20px;
    z-index: 1000;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 10px rgba(0,0,0,0.02); /* ظل خفيف للجمالية */
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: .55rem;
}

.brand-dot {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    background: var(--green);
    position: relative;
}

    .brand-dot::after {
        content: '';
        position: absolute;
        inset: 7px;
        border: 2px solid var(--mint);
        border-radius: 3px;
    }

.brand-name {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--green);
    letter-spacing: -.3px;
}
.navbar-top {
    padding: 5px 5px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-links {
    display: flex; /*بدل none */
    justify-content: center;
    gap: 20px;
    /*مسافة بسيطة عشان ما يلزقوا باللي فوقهم */
    z-index: 100000;
    margin-top: 5px;
}

.nav-link {
    /* السطر المفقود الذي سيجعل الـ gap يعمل */
    display: inline-flex;
    align-items: center; /* لضمان توسط الأيقونة والنص عمودياً */

    gap: 10px; /* 20px قد تكون كبيرة جداً، 10px غالباً أجمل */
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-muted);
    padding: .25rem 0;
    border-bottom: 2px solid transparent;
    transition: all .2s;
}

    .nav-link i {
        font-size: 1.5rem; /* حجم الأيقونة */
        color: inherit; /* تأخذ نفس لون النص (زيتي أو رمادي) */
    }

    .nav-link:hover, .nav-link.active {
        color: var(--green);
        border-bottom-color: var(--mint);
    }

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--mint-light);
    border: 2px solid var(--mint);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    font-weight: 700;
    color: var(--green);
}

/* ── Hero ─────────────────────────────────────────────────────────── */
.hero {
    background: var(--green-light);
    padding: 4rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    max-width: 100%;
    overflow: hidden;
    position: relative;
}

    .hero::before {
        content: '';
        position: absolute;
        top: -60px;
        left: -60px;
        width: 300px;
        height: 300px;
        border-radius: 50%;
        background: rgba(125,223,170,.08);
    }

.hero-content {
    max-width: 300px;
}

.hero-badge {
    display: inline-block;
    background: rgba(125,223,170,.2);
    color: var(--mint);
    font-size: .8rem;
    font-weight: 700;
    padding: .35rem 1rem;
    border-radius: 20px;
    margin-bottom: 1rem;
    letter-spacing: .3px;
}

.hero-title {
    font-size: 2.4rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    margin-bottom: .75rem;
}

    .hero-title em {
        color: var(--mint);
        font-style: normal;
    }

.hero-sub {
    font-size: 1rem;
    color: rgba(255,255,255,.65);
    margin-bottom: 1.75rem;
}

.hero-cta {
    display: inline-block;
    background: var(--mint);
    color: var(--green);
    font-size: .95rem;
    font-weight: 700;
    padding: .75rem 2rem;
    border-radius: 30px;
    transition: transform .15s, box-shadow .15s;
}

    .hero-cta:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(125,223,170,.4);
    }

.hero-card {
    background: rgba(255,255,255,.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,.2);
    border-radius: var(--radius);
    padding: 1.5rem;
    min-width: 260px;
    flex-shrink: 0;
}

.hero-deal-icon {
    font-size: 2.5rem;
    margin-bottom: .75rem;
    display: block;
}

.hero-deal-tag {
    display: inline-block;
    background: rgba(125,223,170,.25);
    color: var(--mint);
    font-size: .75rem;
    font-weight: 700;
    padding: .25rem .75rem;
    border-radius: 12px;
    margin-bottom: .5rem;
}

.hero-deal-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: .25rem;
}

.hero-deal-rest {
    font-size: .85rem;
    color: rgba(255,255,255,.6);
    margin-bottom: .85rem;
}

.hero-deal-prices {
    display: flex;
    align-items: center;
    gap: .6rem;
    flex-wrap: wrap;
}

.price-new {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--mint);
}

.price-old {
    font-size: .85rem;
    color: rgba(255,255,255,.4);
    text-decoration: line-through;
}

.price-badge {
    background: var(--mint);
    color: var(--green);
    font-size: .75rem;
    font-weight: 800;
    padding: .2rem .7rem;
    border-radius: 12px;
}

/* ── Filter ───────────────────────────────────────────────────────── */
.filter-section {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 135px; /* تم تعديله ليتناسب مع الطول الفعلي للنافبار الجديد */
    z-index: 999;
}

.filter-row {
    /* display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;*/
    display: flex;
    position: absolute;
    left: 5px;
    top: 5px;
}

.filter-cats {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    flex: 1;
}

.cat-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border: 1px solid #eef0f2; /* إطار خفيف جداً */
    border-radius: 50px; /* شكل كبسولة Pill shape */
    background-color: #fff;
    color: #555; /* لون نص هادئ */
    text-decoration: none; /* إزالة الخط تحت اللينك */
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

    .cat-btn:hover {
        border-color: var(--green);
        color: var(--green);
    }

    .cat-btn.active {
        background-color: #1b3a34; /* اللون الزيتي المعتمد في هويتك */
        color: #fff;
        border-color: #1b3a34;
        box-shadow: 0 4px 12px rgba(27, 58, 52, 0.15); /* ظل ناعم */
    }



    .search-input:focus {
        outline: none;
        border-color: var(--green);
    }

/* ── Deals ────────────────────────────────────────────────────────── */
.deals-section {
    padding: 2.1rem 0 4rem;
}

.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1rem;
   
    color: var(--text-dark);
}

.deals-count {
    padding-top:5px;
    font-size: .9rem;
    color: var(--text-muted);
}


.deals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
}

.deal-card {
    background: #fff;
    border-radius: 16px; /* حواف دائرية واضحة */
    padding: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05); /* ظل ناعم جداً */
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 250px;
    transition: transform 0.3s ease;
}


    .deal-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow);
    }

.deal-img-wrap {
    position: relative;
    overflow: hidden; /* مهم جداً */
    border-radius: 16px; /* لو بدك ستايل احترافي */
    aspect-ratio: 4 / 3; /* كل الصور نفس النسبة */
}

.deal-emoji {
    width: 100%;
    height: 100%;
    object-fit: cover; /* يخلي الصورة تملى الكارد بدون ما تتشوه */
}

.deal-discount-badge {
    position: absolute;
    top: 10px; /* المسافة من الأعلى */
    right: -35px; /* سحبه لليمين ليظهر مائلاً على الزاوية */
    background-color: #e74c3c; /* اللون الأحمر المشرق */
    color: white;
    padding: 5px 40px;
    transform: rotate(45deg); /* السر هنا: تدوير العنصر 45 درجة */
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 10;
}

.deal-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 1rem 1.1rem;
}

.deal-restaurant {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 3px;
}

.deal-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: .35rem;
}

.deal-desc {
    font-size: .82rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: .75rem;
}

.deal-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .5rem;
}

.deal-prices {
    display: flex;
    align-items: baseline;
    gap: .5rem;
}

.dp-new {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--green);
}

.dp-old {
    font-size: .8rem;
    color: #c0b5a5;
    text-decoration: line-through;
}

.deal-actions {
    position: absolute;
    top: 10px;
    left: 10px; /* هون نخليه يسار */
    z-index: 10;
}

.btn-fav, .btn-qr {
    display: block; /* عشان نقدر نتحكم بالهوامش */
    width: fit-content; /* يخلي العرض على قد الكلمة */
    min-width: 120px; /* أقل عرض عشان ما يكون صغير زيادة */
    margin: 15px auto; /* السحر هنا: auto من اليمين واليسار بتخليه بالنص */
    padding: 10px 20px; /* مساحة داخلية للزر */
    background-color: #fff;
    color: #000;
    text-decoration: none;
    border-radius: 20px; /* حواف دائرية ناعمة */
    border: 1px solid #ff9f43; /* برتقالي */
    text-align: center;
    font-weight: bold;
    font-size: 14px;
    transition: background 0.3s ease;
}

    .btn-fav:hover {
        border-color: lawngreen;
        color: #c0392b;
    }

    .btn-qr:hover {
        background: #ff9f43;
        color: #fff;
    }

.deal-expiry {
    font-size: .75rem;
    color: var(--text-muted);
}


/* ── No results ───────────────────────────────────────────────────── */
.no-results {
    display: block;
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* ── QR Page ──────────────────────────────────────────────────────── */
.qr-page {
    padding: 2.5rem 0 4rem;
}

.page-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: .4rem;
}

.page-sub {
    font-size: .95rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.qr-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 750px) {
    .qr-layout {
        grid-template-columns: 1fr;
    }
}

/* Form */
.qr-form-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: .85rem;
    font-weight: 700;
    color: var(--text-mid);
    margin-bottom: .45rem;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.optional {
    font-weight: 400;
    color: var(--text-muted);
    text-transform: none;
}

.form-select, .form-input {
    width: 100%;
    padding: .7rem 1rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    color: var(--text-dark);
    font-family: var(--font);
    font-size: .95rem;
    transition: border-color .15s;
}

    .form-select:focus, .form-input:focus {
        outline: none;
        border-color: var(--green);
    }

textarea.form-input {
    resize: vertical;
}

.btn-generate {
    width: 100%;
    padding: .85rem;
    background: var(--green);
    color: var(--mint-light);
    border: none;
    border-radius: 12px;
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s;
    margin-top: .5rem;
}

    .btn-generate:hover {
        background: var(--green-mid);
    }

.validation-msg {
    margin-top: .75rem;
    padding: .7rem 1rem;
    background: #fff0f0;
    border: 1px solid #f0c0c0;
    border-radius: 8px;
    color: #c0392b;
    font-size: .9rem;
}

/* Preview */
.qr-preview-panel {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.preview-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-empty {
    text-align: center;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.qr-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.qr-result-header {
    text-align: center;
}

.qr-restaurant-name {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
}

.qr-deal-name {
    display: block;
    font-size: .85rem;
    color: var(--text-muted);
    margin-top: .2rem;
}

.qr-code-box {
    padding: 1rem;
    background: var(--bg);
    border-radius: 12px;
    border: 1px solid var(--border);
}

    .qr-code-box img {
        display: block;
    }

.qr-meta {
    text-align: center;
}

.qr-code-text {
    display: block;
    font-size: .85rem;
    font-weight: 700;
    color: var(--green);
    letter-spacing: .5px;
}

.qr-expiry {
    display: block;
    font-size: .8rem;
    color: var(--text-muted);
    margin-top: .25rem;
}

.qr-actions {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-download, .btn-share, .btn-print {
    padding: .55rem 1.1rem;
    border-radius: 10px;
    font-family: var(--font);
    font-size: .85rem;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid var(--border);
    background: var(--bg-surface);
    color: var(--green);
    transition: all .15s;
}

.btn-download {
    background: var(--green);
    color: var(--mint-light);
    border-color: var(--green);
}

    .btn-download:hover {
        background: var(--green-mid);
    }

.btn-share:hover, .btn-print:hover {
    background: var(--mint-light);
    border-color: var(--mint);
}

/* History */
.qr-history {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
}

.history-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.history-item {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .75rem 0;
    border-bottom: 1px solid var(--border);
}

    .history-item:last-child {
        border-bottom: none;
    }

.history-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: var(--mint-light);
    border: 1px solid var(--mint);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .7rem;
    font-weight: 800;
    color: var(--green);
    flex-shrink: 0;
}

.history-info {
    flex: 1;
}

.history-name {
    font-size: .9rem;
    font-weight: 600;
    color: var(--text-dark);
}

.history-date {
    font-size: .78rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.history-reuse {
    font-size: .8rem;
    font-weight: 700;
    color: var(--green);
    background: transparent;
    border: 1px solid var(--green);
    padding: .3rem .7rem;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font);
    transition: all .15s;
}

    .history-reuse:hover {
        background: var(--mint-light);
    }
/* ===== Search ===== */

.search-wrap {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 30px auto;
}

.search-input {
    width: 100%;
    height: 42px;
    padding-right: 20px;
    padding-left: 62px;
    border-radius: 50px;
    border: 1px solid #e5ddd0;
    background: #faf7f2;
    font-family: var(--font);
    font-size: 15px;
    color: var(--text-dark);
    text-align: right;
    outline: none;
}

    .search-input:focus {
        border-color: var(--green);
    }

.search-btn-inside {
    position: absolute;
    left: 5px; /* تثبيته بأقصى اليسار داخل الحقل */
    top: 50%;
    transform: translateY(-50%);
    background: #2d5a47; /* نفس اللون الأخضر المعتمد في اللوجو */
    color: white !important;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

/* ── Footer ───────────────────────────────────────────────────────── */
.footer {
    background: #F6E4C7;
    padding: 5px 5px;
    text-align: center;
    border-radius: 30px 30px 0 0;
}



.footer-tagline {
    font-size: 28px;
    color: #222;
    margin-top: 5px;
    margin-bottom: 10px;
    font-weight: 500;
}
.footer-sub {
    font-size: 11px;
    color: #8c7d67;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
}

.footer-phone {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    font-size: 26px;
    color: #333;
    margin-bottom: 5px;
}

    .footer-phone i {
        width: 55px;
        height: 55px;
        background: rgba(255,255,255,.4);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

.footer-divider {
    width: 90%;
    height: 1px;
    background: #d8c09d;
    margin: 0 auto 5px;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 5px;
}

    .footer-social a {
        font-size: 36px;
        color: #1f5b46;
        transition: .3s;
    }

        .footer-social a:hover {
            transform: translateY(-3px);
        }

.footer-copy {
    color: #555;
    font-size: 20px;
}
/*_____________________________________________*/
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px 0; /* مسافة فوق وتحت الأرقام */
    padding-bottom: 20px;
}

.pagination {
    display: flex;
    gap: 8px;
    align-items: center;
}

.page-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-main);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

    .page-link:hover {
        background: var(--green);
        color: white;
        border-color: var(--green);
    }

    .page-link.active {
        background: var(--green);
        color: white;
        border-color: var(--green);
        box-shadow: 0 4px 10px rgba(22, 163, 74, 0.2);
    }

.page-dots {
    color: var(--text-muted);
    padding: 0 5px;
}

/* لتعديل اتجاه الأسهم في العربي */
.pagination i {
    font-size: 0.8rem;
}

.logout-mobile {
    display: none;
    background: #fff4f1;
    color: #d35400;
    border: 1px solid #ffd7c2;
}

/*___________________________________________________________________*/
/* التنسيق الضروري لظهور النافذة في المنتصف فوق كل شيء */
/* الخلفية المعتمة مع تأثير الضباب */
.modal-overlay {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px); /* تأثير ضبابي خلف النافذة */
    display: flex !important;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

/* صندوق تسجيل الدخول */
.login-modal {
    background: #ffffff;
    width: 90%;
    max-width: 420px;
    padding: 40px;
    border-radius: 24px; /* زوايا دائرية ناعمة */
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    text-align: center;
    animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

    .login-modal h3 {
        font-family: 'Cairo', sans-serif;
        font-weight: 700;
        color: #2d3436;
        margin-bottom: 10px;
        font-size: 1.5rem;
    }

    .login-modal p {
        color: #636e72;
        font-size: 0.95rem;
        margin-bottom: 30px;
    }

/* تحسين خانات الإدخال */
.login-inputs .input-field {
    width: 100%;
    padding: 14px 20px;
    margin-bottom: 15px;
    border: 2px solid #f1f2f6;
    border-radius: 12px;
    background: #f8f9fa;
    font-family: 'Tajawal', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
    outline: none;
}

    .login-inputs .input-field:focus {
        border-color: rgba(255, 152, 0, 0.25);
        background: #fff;
        box-shadow: rgba(255, 152, 0, 0.25);
    }

/* زر الدخول المطور */
.btn-login-submit {
    width: 100%;
    padding: 14px;
    background: rgba(255, 152, 0, 0.25); /* تدرج لوني */
    color: black;
    border: none;
    border-radius: 12px;
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: rgba(255, 152, 0, 0.25);
}

    .btn-login-submit:hover {
        transform: translateY(-2px);
        box-shadow: rgba(255, 152, 0, 0.25);
    }

    .btn-login-submit:active {
        transform: translateY(0);
    }

/* زر الإغلاق */
.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 28px;
    color: #b2bec3;
    text-decoration: none;
    line-height: 1;
    transition: color 0.2s;
}

    .close-btn:hover {
        color: #d63031;
    }

/* حركات الأنميشن */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Print ────────────────────────────────────────────────────────── */
@media print {
    .navbar, .qr-form-panel, .qr-history, .qr-actions {
        display: none !important;
    }

    .preview-card {
        border: none;
        box-shadow: none;
    }
}

.filter-toggle {
    display: none;
}


/* ── Responsive (الحفاظ على الترتيب العمودي ومنع التداخل) ───────────────────────────────────────────────────── */
@media (max-width: 768px) {

    body {
        /* زيادة المسافة العلوية لأن النافبار العمودي يأخذ مساحة طولية أكبر، لمنع اختفاء المحتوى تحته */
        padding-top: 155px !important;
    }
 /*   ______________________________________________*/
    /* 1. إجبار المتصفح على حجز كامل ارتفاع الشاشة */
    html, body {
        height: 100%;
        margin: 0;
        padding: 0;
    }

    /* 2. تحويل الفورم الرئيسي لحاوية مرنة عمودية */
    #form1 {
        display: flex;
        flex-direction: column;
        min-height: 100%; /* تضمن امتداده بكامل الارتفاع المتاح */
    }

    /* 3. سحب الفوتر ليكون ملاصقاً للقاع دائماً */
    .footer {
        margin-top: auto; /* هذا السطر يدفع الفوتر للأسفل مباشرة عند نقص المحتوى */
    }
/*    ________________________________________________*/
    .logout-btn {
        display: none !important;
    }

    .logout-mobile {
        display: flex !important;
    }

    /* ===== Navbar Mobile ===== */
    .navbar {
        display: flex !important;
        flex-direction: column !important; /* يضمن بقاء اللوجو فوق واللينكات تحته */
        align-items: center !important;
        justify-content: center !important;
        padding: 5px 15px !important;
        height: auto !important; /* نتركه مرن ليحتوي العناصر عمودياً دون خنق */
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
    }

    /* اللوجو يظل فوق وفي المنتصف */
    .main-logo {
        width: 100px !important; /* حجم مناسب ومريح للموبايل */
        height: auto !important;
        margin-bottom: 8px !important; /* مسافة بسيطة تفصله عن اللينكات التي تحته */
    }

    /* حاوية الروابط (الأيقونات) تحت اللوجو مباشرة */
    .nav-links {
        display: flex !important;
        flex-direction: row !important; /* الأيقونات بجانب بعضها */
        align-items: center !important;
        justify-content: center !important;
        gap: 20px !important; /* مسافة مريحة تمنع خنق الأيقونات */
        margin: 5px 0 0 0 !important;
        width: 100% !important;
    }

    /* إخفاء النصوص والاعتماد على الأيقونات فقط */
    .nav-link span {
        display: none !important;
    }

    .nav-link {
        font-size: 1.1rem !important;
        padding: 6px !important;
        gap: 0 !important;
        border-bottom: 2px solid transparent !important; /* الحفاظ على ستايل الخط السفلي الخفيف عند التفاعل */
    }

        .nav-link i {
            font-size: 1.5rem !important;
        }
        .nav-link:hover,
        .nav-link.active {
            color: var(--green) !important;
            border-bottom: 3px solid var(--green) !important; /* هذا السطر السحري اللي رجّع الخط */
        }
       

    /* ===== Filter Section (بار البحث والفلاتر) ===== */
    .filter-section {
        position: fixed !important;
        top: 110px !important; /* يبدأ مباشرة بعد النافبار العمودي لحمايته من الاختفاء */
        left: 0 !important;
        right: 0 !important;
        background: var(--bg-card) !important;
        z-index: 5000 !important;
        padding: 8px 12px !important;
        border-bottom: 1px solid var(--border) !important;
    }

    /* القائمة المنسدلة للتصنيفات */
    .filter-cats {
        display: none;
        position: fixed !important;
        top: 65px !important; /* تنزل أسفل بار البحث تماماً */
        left: 12px !important;
        right: 12px !important;
        background: #fff !important;
        padding: 14px !important;
        border-radius: 18px !important;
        box-shadow: 0 12px 35px rgba(0,0,0,.18) !important;
        z-index: 99999 !important;
        flex-direction: column !important;
        gap: 10px !important;
    }

        .filter-cats.show {
            display: flex !important;
        }

    .cat-btn {
        width: 100% !important;
        justify-content: center !important;
        padding: 11px 15px !important;
        font-size: 14px !important;
    }

    /* زر الفلاتر الجانبي (التوجل) */
    .filter-row-mobile {
        display: block !important;
    }

    .filter-toggle {
        display: block !important;
        padding: 8px 14px !important;
        border: none !important;
        border-radius: 10px !important;
        background: #fff3e0 !important;
        color: #f57c00 !important;
        font-size: 16px !important;
        font-weight: 700 !important;
    }

    /* ===== Search ===== */
    .search-wrap {
        max-width: 100% !important;
        margin: 4px 0 !important;
    }

    .search-input {
        height: 38px !important;
        font-size: 16px !important;
        padding-right: 18px !important;
        padding-left: 56px !important;
    }

    .search-btn-inside {
        width: 38px !important;
        height: 38px !important;
        left: 1px !important;
    }

    /* ===== Deals Grid (العروض) ===== */
    .container {
        padding: 0 .5rem !important;
    }

    .deals-section {
        padding: 1rem .4rem !important;
    }
   


    .section-title {
        font-size: 1rem !important;
        padding-top:10px;
    }
    .deals-count {
        padding-top: 7px;
        font-size: .9rem;
        color: var(--text-muted);
    }


    .deals-grid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }

    .deal-card {
        width: 100% !important;
        padding: 8px !important;
        border-radius: 14px !important;
        gap: 8px !important;
    }

    .deal-img-wrap {
        height: 115px !important;
        border-radius: 12px !important;
    }

    .deal-discount-badge {
        top: 8px !important;
        right: -32px !important;
        font-size: 11px !important;
        padding: 4px 35px !important;
    }

    .deal-body {
        padding: 4px !important;
    }

    .deal-restaurant {
        font-size: 14px !important;
        font-weight:600;
    }

    .deal-name {
        font-size: 13px !important;
        line-height: 1.3 !important;
    }

    .deal-desc {
        font-size: 11px !important;
        line-height: 1.3 !important;
    }

    .dp-new {
        font-size: 13px !important;
    }

    .dp-old {
        font-size: 10px !important;
    }

    .btn-qr {
        min-width: 90px !important;
        font-size: 12px !important;
        padding: 8px 10px !important;
        margin: 8px auto !important;
    }

    /* ===== Hero & Footer ===== */
    .hero {
        flex-direction: column !important;
        padding: 2rem 1rem !important;
    }

    .hero-title {
        font-size: 1.6rem !important;
    }

    .footer {
        padding: 12px 10px;
    }

    .footer-logo img {
        width: 140px;
    }

    .footer-tagline {
        font-size: 15px;
    }

    .footer-phone {
        font-size: 18px;
    }

        .footer-phone i {
            width: 40px;
            height: 40px;
        }

    .footer-social a {
        font-size: 20px;
    }

    .footer-copy {
        font-size: 16px;
    }
}