@import url('https://fonts.googleapis.com/css2?family=Almarai:wght@400;700;800&family=IBM+Plex+Sans+Arabic:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #f57f17;
    --primary-dark: #c85f00;
    --primary-light: #fff2e5;
    --primary-soft: #fff8f1;

    --ink: #242424;
    --muted: #767676;
    --line: #ece7e2;
    --bg: #f7f6f4;
    --white: #ffffff;

    --shadow: 0 18px 50px rgba(81, 48, 20, .09);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    direction: rtl;

    font-family: 'IBM Plex Sans Arabic', Tahoma, Arial, sans-serif;

    color: var(--ink);

    background:
        radial-gradient(circle at 10% 5%, rgba(245, 127, 23, .08), transparent 25%),
        linear-gradient(180deg, #fbfaf9 0%, var(--bg) 100%);
}

a {
    color: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6,
.brand strong,
.card-head h2,
.login-panel h1 {
    font-family: 'Almarai', Tahoma, Arial, sans-serif;
    font-weight: 800;
}

.eyebrow,
.card-kicker,
.field label,
.toolbar select,
.filter-btn,
.reset-btn,
.logout-link,
.back-link,
.summary-card span {
    font-family: 'Almarai', Tahoma, Arial, sans-serif;
    font-weight: 400;
}

.app-shell {
    min-height: 100vh;
}

/* =========================================================
   Top Bar
   ========================================================= */

.topbar {
    min-height: 82px;

    padding: 16px max(24px, calc((100vw - 1240px) / 2));

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

    border-bottom: 1px solid rgba(245, 127, 23, .10);

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    position: sticky;
    top: 0;
    z-index: 20;

    backdrop-filter: blur(12px);
}

.brand,
.user-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand strong,
.brand span {
    display: block;
}

.brand-logo-wrap {
    width: 92px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    overflow: visible;
    flex: 0 0 auto;
}

.brand-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 0;
}

.brand strong {
    font-size: 17px;
    color: #2c2c2c;
}

.brand span {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
}

.brand-mark {
    width: 72px;
    height: 72px;

    border-radius: 23px;

    display: grid;
    place-items: center;

    background:
        linear-gradient(145deg, #ff9a3d, var(--primary));

    color: #ffffff;

    font-family: 'Almarai', sans-serif;
    font-size: 32px;
    font-weight: 800;

    box-shadow:
        0 17px 38px rgba(245, 127, 23, .25);
}

.brand-mark-small {
    width: 46px;
    height: 46px;

    border-radius: 15px;

    font-size: 21px;

    box-shadow:
        0 8px 22px rgba(245, 127, 23, .20);
}

.user-name {
    font-size: 14px;
    color: var(--muted);
}



.login-home-link {
    align-self: flex-start;
    min-height: 40px;
    padding: 7px 12px;
    margin-bottom: 24px;
    border-radius: 12px;
    border: 1px solid #f3d1b4;
    background: #ffffff;
    color: var(--primary-dark);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    font-family: 'Almarai', Tahoma, Arial, sans-serif;
    font-size: 12px;
    transition: .2s ease;
}

.login-home-link:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

.site-home-link {
    min-height: 40px;
    padding: 7px 12px;
    border-radius: 12px;
    border: 1px solid #f3d1b4;
    background: #ffffff;
    color: var(--primary-dark);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    font-family: 'Almarai', Tahoma, Arial, sans-serif;
    font-size: 12px;
    transition: .2s ease;
}

.site-home-link:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

.site-home-icon {
    font-family: Arial, sans-serif;
    font-size: 20px;
    line-height: 1;
    transform: translateY(-1px);
}

.site-home-text {
    white-space: nowrap;
}

.logout-form {
    margin: 0;
    padding: 0;
}

.logout-link {
    text-decoration: none;
    background: #ffffff;
    font-family: 'Almarai', Tahoma, Arial, sans-serif;
    cursor: pointer;

    color: var(--primary-dark);

    border: 1px solid #f3d1b4;

    padding: 9px 14px;

    border-radius: 12px;

    font-size: 12px;

    transition: .2s ease;
}

.logout-link:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

/* =========================================================
   Main Content
   ========================================================= */

.content {
    width: min(1240px, calc(100% - 36px));

    margin: 0 auto;

    padding: 48px 0 70px;
}

/* =========================================================
   Hero
   ========================================================= */

.hero {
    position: relative;

    overflow: hidden;

    color: #ffffff;

    background:
        radial-gradient(circle at 18% 20%, rgba(255, 255, 255, .18), transparent 25%),
        linear-gradient(120deg, #e56e07 0%, var(--primary) 55%, #ff9a3d 100%);

    border-radius: 30px;

    padding: 42px;

    box-shadow:
        0 23px 55px rgba(245, 127, 23, .19);
}

.hero:before {
    content: "";

    position: absolute;

    width: 370px;
    height: 370px;

    border-radius: 50%;

    left: -130px;
    top: -190px;

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

    box-shadow:
        0 0 0 40px rgba(255, 255, 255, .045),
        0 0 0 80px rgba(255, 255, 255, .025);
}

.hero h1 {
    position: relative;

    margin: 0;

    font-size: clamp(29px, 4vw, 48px);

    line-height: 1.35;
}

.hero p {
    position: relative;

    max-width: 760px;

    margin: 14px 0 0;

    color: rgba(255, 255, 255, .86);

    line-height: 2;

    font-size: 15px;
}

.eyebrow {
    position: relative;

    margin-bottom: 10px;

    color: #fff4e7;

    font-size: 13px;
}

.back-link {
    position: relative;

    display: inline-block;

    margin-bottom: 19px;

    text-decoration: none;

    color: #ffffff;

    font-size: 13px;
}

/* =========================================================
   Search / Filter Toolbar
   ========================================================= */

.toolbar {
    margin: 22px 0 18px;

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

    border: 1px solid rgba(245, 127, 23, .11);

    border-radius: 22px;

    padding: 14px;

    box-shadow:
        0 12px 32px rgba(75, 44, 17, .055);
}

.toolbar-form {
    display: grid;

    grid-template-columns:
        minmax(280px, 1fr)
        minmax(220px, .55fr)
        auto
        auto;

    align-items: center;

    gap: 10px;
}

.search-box {
    position: relative;
}

.search-box input,
.sort-box select {
    width: 100%;
    height: 50px;

    border: 1px solid #e8ded5;

    border-radius: 14px;

    background: #fbfaf9;

    color: #353535;

    outline: 0;

    transition: .2s ease;
}

.search-box input {
    padding: 0 45px 0 14px;

    font-family: 'IBM Plex Sans Arabic', sans-serif;
    font-size: 14px;
}

.search-icon {
    position: absolute;

    right: 15px;
    top: 50%;

    transform: translateY(-50%);

    color: var(--primary);

    font-size: 23px;

    pointer-events: none;
}

.sort-box select {
    padding: 0 14px;

    font-size: 12px;

    cursor: pointer;
}

.search-box input:focus,
.sort-box select:focus {
    background: #ffffff;

    border-color: var(--primary);

    box-shadow:
        0 0 0 4px rgba(245, 127, 23, .10);
}

.filter-btn,
.reset-btn {
    min-height: 50px;

    border-radius: 14px;

    padding: 0 19px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    text-decoration: none;

    font-size: 12px;

    cursor: pointer;

    transition: .2s ease;
}

.filter-btn {
    border: 0;

    background:
        linear-gradient(135deg, var(--primary), #ff9837);

    color: #ffffff;

    box-shadow:
        0 10px 22px rgba(245, 127, 23, .18);
}

.filter-btn:hover {
    transform: translateY(-2px);

    box-shadow:
        0 14px 28px rgba(245, 127, 23, .24);
}

.reset-btn {
    border: 1px solid #eadfd6;

    background: #ffffff;

    color: #757575;
}

.reset-btn:hover {
    color: var(--primary-dark);
    border-color: #f1c398;
}

/* =========================================================
   Summary
   ========================================================= */

.summary-grid {
    display: grid;

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

    gap: 15px;

    margin: 0 0 31px;
}

.summary-card {
    position: relative;

    overflow: hidden;

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

    border: 1px solid rgba(245, 127, 23, .09);

    border-radius: 21px;

    padding: 21px 22px;

    box-shadow:
        0 11px 31px rgba(75, 44, 17, .055);
}

.summary-card:after {
    content: "";

    position: absolute;

    width: 58px;
    height: 58px;

    border-radius: 50%;

    left: -20px;
    top: -20px;

    background: var(--primary-light);
}

.summary-card span {
    display: block;

    color: var(--muted);

    font-size: 12px;

    margin-bottom: 9px;
}

.summary-card strong {
    color: var(--primary);

    font-family: 'IBM Plex Sans Arabic', sans-serif;

    font-size: clamp(25px, 3vw, 35px);

    font-weight: 700;

    letter-spacing: -.02em;
}

/* =========================================================
   Cards
   ========================================================= */

.cards-grid {
    display: grid;

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

    gap: 19px;
}

.place-card {
    position: relative;

    overflow: hidden;

    display: block;

    text-decoration: none;

    background: var(--white);

    border: 1px solid rgba(245, 127, 23, .09);

    border-radius: 25px;

    padding: 23px;

    box-shadow:
        0 13px 36px rgba(75, 44, 17, .065);

    transition:
        transform .25s ease,
        box-shadow .25s ease,
        border-color .25s ease;
}

.place-card:before {
    content: "";

    position: absolute;

    right: 0;
    top: 0;

    width: 100%;
    height: 4px;

    background:
        linear-gradient(
            90deg,
            transparent 0%,
            #ffb061 30%,
            var(--primary) 50%,
            #ffb061 70%,
            transparent 100%
        );
}

.place-card:not(.place-card-static):hover {
    transform: translateY(-6px);

    border-color: rgba(245, 127, 23, .35);

    box-shadow:
        0 22px 52px rgba(98, 53, 14, .12);
}

.card-head {
    display: grid;

    grid-template-columns: 54px 1fr auto;

    gap: 14px;

    align-items: center;

    margin-bottom: 21px;
}

.place-icon {
    width: 54px;
    height: 54px;

    border-radius: 17px;

    display: grid;
    place-items: center;

    background:
        linear-gradient(145deg, #fff7ee, #ffead5);

    color: var(--primary);

    font-family: 'Almarai', sans-serif;

    font-size: 20px;
    font-weight: 800;
}

.card-kicker {
    display: block;

    color: var(--primary);

    font-size: 11px;

    margin-bottom: 6px;
}

.card-head h2 {
    margin: 0;

    color: #303030;

    font-size: 19px;
}

.arrow {
    color: #c8bcb2;

    font-size: 22px;

    transition: .2s ease;
}

.place-card:hover .arrow {
    transform: translateX(-4px);

    color: var(--primary);
}

.stats-list {
    border-top: 1px solid var(--line);
}

.stat-row {
    min-height: 54px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 18px;

    border-bottom: 1px solid var(--line);
}

.stat-row:last-child {
    border-bottom: 0;
}

.stat-row span {
    color: var(--muted);

    font-family: 'IBM Plex Sans Arabic', sans-serif;

    font-size: 13px;
}

.stat-row strong {
    color: #353535;

    font-family: 'IBM Plex Sans Arabic', sans-serif;

    font-size: 18px;
    font-weight: 700;
}

/* =========================================================
   Empty
   ========================================================= */

.empty-state {
    text-align: center;

    background: #ffffff;

    border: 1px dashed #e8d8c9;

    border-radius: 27px;

    padding: 58px 20px;
}

.empty-icon {
    width: 62px;
    height: 62px;

    border-radius: 19px;

    background: var(--primary-light);

    color: var(--primary);

    display: grid;
    place-items: center;

    margin: 0 auto 16px;

    font-size: 27px;
}

.empty-state h2 {
    margin: 0 0 8px;

    color: #353535;
}

.empty-state p {
    margin: 0;

    color: var(--muted);
}

/* =========================================================
   Footer
   ========================================================= */

.footer {
    width: min(1240px, calc(100% - 36px));

    margin: 0 auto;

    padding: 20px 0 34px;

    border-top: 1px solid rgba(245, 127, 23, .10);

    display: flex;
    justify-content: space-between;

    color: #9a9189;

    font-size: 12px;
}

/* =========================================================
   Login — Orange theme
   ========================================================= */

.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;

    background:
        radial-gradient(circle at 15% 20%, rgba(255,255,255,.18), transparent 24%),
        radial-gradient(circle at 82% 75%, rgba(255,193,124,.24), transparent 28%),
        linear-gradient(135deg, #b95000 0%, #e86d05 36%, #f57f17 70%, #ff9b3e 100%);
}

.login-shell {
    width: min(1080px, 100%);
    min-height: 640px;
    background: #ffffff;
    border-radius: 32px;
    overflow: hidden;
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    box-shadow: 0 34px 90px rgba(104, 45, 0, .34);
}

.login-panel {
    padding: 60px 54px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #ffffff;
}

.login-panel .brand-mark {
    background: linear-gradient(145deg, #ff9b3d, #f57f17);
    color: #ffffff;
    box-shadow: 0 18px 42px rgba(245,127,23,.28);
}

.login-panel h1 {
    margin: 0 0 32px;
    color: #252525;
    font-family: 'Almarai', sans-serif;
    font-weight: 800;
    font-size: 38px;
}

.login-intro {
    color: #777;
    line-height: 1.9;
    margin: 12px 0 28px;
    font-family: 'IBM Plex Sans Arabic', sans-serif;
}

.field {
    margin-bottom: 17px;
}

.field label {
    display: block;
    margin-bottom: 8px;
    color: #333333;
    font-family: 'Almarai', sans-serif;
    font-size: 12px;
}

.field input {
    width: 100%;
    height: 52px;
    border-radius: 14px;
    border: 1px solid #eadfd5;
    background: #fcfaf8;
    padding: 0 15px;
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    font-size: 15px;
    outline: 0;
    transition: .2s ease;
}

.field input:focus {
    border-color: #f57f17;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(245,127,23,.11);
}


.captcha-row {
    display: grid;
    grid-template-columns: 145px 1fr;
    gap: 10px;
    align-items: center;
}

.captcha-question {
    height: 52px;
    border-radius: 14px;
    background: #fff2e5;
    border: 1px solid #f4c79f;
    color: #c85f00;
    display: flex;
    align-items: center;
    justify-content: center;
    direction: ltr;
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: .03em;
    user-select: none;
}

.captcha-row input {
    text-align: center;
    direction: ltr;
}

.primary-btn {
    width: 100%;
    height: 54px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, #e76d07, #f57f17 60%, #ff9a38);
    color: #ffffff;
    font-family: 'Almarai', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: .2s ease;
    margin-top: 6px;
    box-shadow: 0 12px 26px rgba(245,127,23,.25);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(245,127,23,.34);
}

.alert {
    border-radius: 13px;
    padding: 12px 14px;
    margin-bottom: 18px;
    line-height: 1.7;
    font-size: 13px;
}

.alert-error {
    background: #fff2f2;
    color: #a53b3b;
    border: 1px solid #f2d2d2;
}

.login-visual {
    position: relative;
    min-height: 640px;
    background:
        linear-gradient(180deg, rgba(126,48,0,.08), rgba(126,48,0,.30)),
        radial-gradient(circle at 72% 22%, rgba(255,255,255,.26), transparent 27%),
        linear-gradient(135deg, #ff9e45 0%, #f57f17 46%, #df6500 100%);
}

.login-visual:before,
.login-visual:after {
    content: "";
    position: absolute;
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 50%;
}

.login-visual:before {
    width: 410px;
    height: 410px;
    left: -80px;
    top: 50px;
}

.login-visual:after {
    width: 280px;
    height: 280px;
    left: 90px;
    top: 170px;
    border-color: rgba(255,238,217,.30);
}

.visual-overlay {
    position: absolute;
    inset: auto 46px 52px 46px;
    z-index: 2;
    color: #ffffff;
}

.visual-overlay span {
    color: #fff7ee;
    font-family: 'Almarai', sans-serif;
    font-size: 12px;
}

.visual-overlay h2 {
    color: #ffffff;
    font-family: 'Almarai', sans-serif;
    font-weight: 800;
    font-size: 31px;
    line-height: 1.6;
    margin: 10px 0;
}

.visual-overlay p {
    color: rgba(255,255,255,.88);
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    line-height: 2;
    margin: 0;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1050px) {
    .toolbar-form {
        grid-template-columns: 1fr 1fr;
    }

    .filter-btn,
    .reset-btn {
        width: 100%;
    }
}

@media (max-width: 980px) {
    .summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-visual {
        display: none;
    }
}

@media (max-width: 640px) {
    .content {
        width: min(100% - 22px, 1240px);

        padding-top: 21px;
    }

    .topbar {
        padding: 11px 12px;
    }

    .user-name {
        display: none;
    }

    .site-home-link {
        width: 40px;
        min-width: 40px;
        height: 40px;
        padding: 0;
        justify-content: center;
    }

    .site-home-text {
        display: none;
    }

    .brand span {
        display: block;
        font-size: 10px;
        margin-top: 3px;
    }

    .brand-logo-wrap {
        width: 74px;
        height: 42px;
        border-radius: 0;
    }

    .hero {
        border-radius: 22px;

        padding: 28px 22px;
    }

    .hero h1 {
        font-size: 29px;
    }

    .toolbar {
        border-radius: 19px;

        padding: 11px;
    }

    .toolbar-form {
        grid-template-columns: 1fr;
    }

    .summary-grid,
    .cards-grid {
        grid-template-columns: 1fr;
    }

    .summary-card,
    .place-card {
        border-radius: 20px;
    }

    .login-body {
        padding: 12px;
    }

    .login-shell {
        min-height: auto;

        border-radius: 24px;
    }

    .login-panel {
        padding: 38px 24px;
    }

    .login-panel h1 {
        font-size: 31px;
    }

    .captcha-row {
        grid-template-columns: 120px 1fr;
    }
}
