/* مولدتي العراق – design tokens follow the supplied reference screens */
@font-face { font-family: 'Cairo'; font-weight: 400; font-display: swap; src: url('../vendor/fonts/cairo/cairo-arabic-400-normal.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: 'Cairo'; font-weight: 600; font-display: swap; src: url('../vendor/fonts/cairo/cairo-arabic-600-normal.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: 'Cairo'; font-weight: 700; font-display: swap; src: url('../vendor/fonts/cairo/cairo-arabic-700-normal.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: 'Cairo'; font-weight: 800; font-display: swap; src: url('../vendor/fonts/cairo/cairo-arabic-800-normal.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: 'Cairo'; font-weight: 400; font-display: swap; src: url('../vendor/fonts/cairo/cairo-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Cairo'; font-weight: 700; font-display: swap; src: url('../vendor/fonts/cairo/cairo-latin-700-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
    --brand-900: #0a2463;
    --brand-800: #0b2f7f;
    --brand-700: #0d3b99;
    --brand-600: #1565e0;
    --brand-500: #1f74f0;
    --brand-100: #e7effd;
    --brand-50: #f3f7fe;
    --success: #16a34a;
    --success-100: #e8f7ee;
    --energy: #f5b400;
    --energy-100: #fff5d6;
    --danger: #dc2626;
    --danger-100: #fdecec;
    --ink: #0f1c3f;
    --muted: #6b7a99;
    --line: #e3e9f4;
    --surface: #ffffff;
    --bg: #f2f5fb;
    --radius: 16px;
    --radius-sm: 12px;
    --shadow: 0 6px 24px rgba(10, 36, 99, .08);
    --bs-primary: #1565e0;
    --bs-primary-rgb: 21, 101, 224;
    --bs-success: #16a34a;
    --bs-success-rgb: 22, 163, 74;
    --bs-warning-rgb: 245, 180, 0;
    --bs-danger-rgb: 220, 38, 38;
    --bs-body-font-family: 'Cairo', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
    --bs-body-color: #0f1c3f;
    --bs-border-radius: 12px;
}

html, body { background: var(--bg); }
body { font-family: var(--bs-body-font-family); color: var(--ink); -webkit-font-smoothing: antialiased; }
a { color: var(--brand-600); text-decoration: none; }
.ltr { direction: ltr; unicode-bidi: embed; display: inline-block; }
.fw-800 { font-weight: 800; }
.text-muted { color: var(--muted) !important; }
.text-energy { color: var(--energy) !important; }
.bg-brand { background: var(--brand-900) !important; }
.bg-brand-soft { background: var(--brand-50) !important; }

/* Buttons – large, touch friendly */
.btn { font-weight: 700; border-radius: var(--radius-sm); padding: .6rem 1.1rem; }
.btn-lg { padding: .85rem 1.4rem; font-size: 1.05rem; border-radius: 14px; }
.btn-primary { --bs-btn-bg: var(--brand-600); --bs-btn-border-color: var(--brand-600); --bs-btn-hover-bg: var(--brand-700); --bs-btn-hover-border-color: var(--brand-700); --bs-btn-active-bg: var(--brand-800); }
.btn-outline-primary { --bs-btn-color: var(--brand-600); --bs-btn-border-color: var(--brand-600); --bs-btn-hover-bg: var(--brand-600); --bs-btn-hover-border-color: var(--brand-600); }
.btn-success { --bs-btn-bg: var(--success); --bs-btn-border-color: var(--success); }

.form-control, .form-select { border-radius: var(--radius-sm); border-color: var(--line); padding: .7rem .9rem; min-height: 48px; }
.form-control:focus, .form-select:focus { border-color: var(--brand-500); box-shadow: 0 0 0 .2rem rgba(21, 101, 224, .15); }
.form-label { font-weight: 600; font-size: .92rem; margin-bottom: .35rem; }
.input-icon { position: relative; }
.input-icon > .bi { position: absolute; inset-inline-start: .9rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-icon > .form-control { padding-inline-start: 2.5rem; }

.card { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-header { background: transparent; border-bottom: 1px solid var(--line); font-weight: 700; padding: .9rem 1.1rem; }
.card-body { padding: 1.1rem; }

.badge { font-weight: 700; padding: .4em .7em; border-radius: 999px; }
.badge.text-bg-warning { color: #5b4300 !important; }
.badge-soft-success { background: var(--success-100); color: var(--success); }
.badge-soft-danger { background: var(--danger-100); color: var(--danger); }

/* ---------------- Mobile shell (public + customer) ---------------- */
.mobile-shell { max-width: 520px; margin: 0 auto; min-height: 100vh; background: var(--brand-900); display: flex; flex-direction: column; }
.mobile-topbar { color: #fff; padding: .9rem 1rem; display: flex; align-items: center; gap: .75rem; min-height: 60px; }
.mobile-topbar .title { flex: 1; text-align: center; font-weight: 800; font-size: 1.1rem; margin: 0; }
.mobile-topbar a, .mobile-topbar button { color: #fff; font-size: 1.35rem; background: none; border: 0; line-height: 1; position: relative; }
.mobile-topbar .dot { position: absolute; top: -2px; inset-inline-end: -4px; background: var(--danger); color: #fff; border-radius: 99px; font-size: .6rem; padding: 1px 5px; }
.mobile-content { background: var(--bg); flex: 1; border-radius: 26px 26px 0 0; padding: 1.1rem 1rem 6rem; }
.mobile-content.white { background: #fff; }
.bottom-nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 520px; background: #fff; border-top: 1px solid var(--line); display: flex; justify-content: space-around; padding: .45rem .25rem calc(.45rem + env(safe-area-inset-bottom)); z-index: 1030; box-shadow: 0 -4px 20px rgba(10, 36, 99, .06); }
.bottom-nav a { flex: 1; text-align: center; color: var(--muted); font-size: .72rem; font-weight: 600; }
.bottom-nav a .bi { display: block; font-size: 1.35rem; margin-bottom: 1px; }
.bottom-nav a.active { color: var(--brand-600); }

.brand-hero { text-align: center; padding: 1rem 0 .5rem; }
.brand-hero img { width: 190px; max-width: 60%; }
.brand-hero h1 { font-weight: 800; font-size: 2rem; margin: .6rem 0 .2rem; color: var(--ink); }
.brand-hero p { color: #3b4a6b; font-weight: 600; }

.role-card { display: flex; align-items: center; gap: 1rem; border-radius: 20px; color: #fff; padding: 1.35rem 1.3rem; margin-bottom: 1rem; box-shadow: 0 10px 24px rgba(21, 101, 224, .25); transition: transform .15s; }
.role-card:hover { color: #fff; transform: translateY(-2px); }
.role-card .bi { font-size: 2.6rem; }
.role-card h2 { font-size: 1.35rem; font-weight: 800; margin: 0; }
.role-card p { margin: .2rem 0 0; opacity: .92; font-size: .9rem; }
.role-card.blue { background: linear-gradient(180deg, #1f74f0, #1257d6); }
.role-card.green { background: linear-gradient(180deg, #1aab4f, #12903f); box-shadow: 0 10px 24px rgba(22, 163, 74, .25); }
.skyline { height: 90px; background: url('../images/skyline.svg') bottom center / cover no-repeat; opacity: .5; }

.gen-card { display: flex; gap: .9rem; align-items: center; background: #fff; border-radius: var(--radius); padding: 1rem; border: 1px solid var(--line); box-shadow: var(--shadow); }
.gen-card .logo { width: 64px; height: 64px; border-radius: 14px; background: var(--brand-50); display: grid; place-items: center; overflow: hidden; flex-shrink: 0; }
.gen-card .logo img { width: 100%; height: 100%; object-fit: contain; }
.gen-card h3 { font-weight: 800; font-size: 1.15rem; margin: 0; }
.gen-card .meta { color: var(--muted); font-size: .85rem; }

.info-list { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.info-list .row-item { display: flex; justify-content: space-between; align-items: center; padding: .8rem 1rem; border-bottom: 1px solid var(--line); gap: 1rem; }
.info-list .row-item:last-child { border-bottom: 0; }
.info-list .row-item .k { color: var(--muted); font-size: .9rem; }
.info-list .row-item .v { font-weight: 700; text-align: left; }
.info-list .row-item.total { background: var(--brand-50); }
.info-list .row-item.total .v { color: var(--brand-600); font-size: 1.15rem; }

.price-pill { background: var(--energy-100); border-radius: var(--radius); padding: 1rem 1.1rem; display: flex; align-items: center; justify-content: space-between; }
.price-pill .amount { font-size: 1.6rem; font-weight: 800; }
.price-pill .bi { font-size: 2rem; color: var(--energy); }

.amp-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: .5rem; }
.amp-options input { display: none; }
.amp-options label { border: 2px solid var(--line); border-radius: 12px; text-align: center; padding: .55rem .25rem; font-weight: 800; cursor: pointer; background: #fff; }
.amp-options label small { display: block; font-weight: 600; color: var(--muted); font-size: .7rem; }
.amp-options input:checked + label { border-color: var(--brand-600); background: var(--brand-50); color: var(--brand-700); }

.calc-box { background: var(--brand-900); color: #fff; border-radius: var(--radius); padding: 1rem 1.1rem; }
.calc-box .formula { opacity: .85; font-size: .95rem; direction: ltr; text-align: right; }
.calc-box .total { font-size: 1.8rem; font-weight: 800; color: var(--energy); }

.result-hero { text-align: center; padding: 1.4rem 1rem; border-radius: var(--radius); }
.result-hero.success { background: var(--success-100); color: var(--success); }
.result-hero.failed { background: var(--danger-100); color: var(--danger); }
.result-hero.pending { background: var(--energy-100); color: #8a6500; }
.result-hero .bi { font-size: 3.4rem; }
.result-hero h2 { font-weight: 800; margin: .4rem 0 0; }

.sub-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }
.sub-card + .sub-card { margin-top: .75rem; }
.sub-card .amount { font-size: 1.25rem; font-weight: 800; }

.list-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem 1rem; display: flex; gap: .8rem; align-items: center; }
.list-card + .list-card { margin-top: .6rem; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--brand-100); color: var(--brand-700); display: grid; place-items: center; font-weight: 800; flex-shrink: 0; }

/* ---------------- Panel layout (admin + owner) ---------------- */
.panel-wrap { display: flex; min-height: 100vh; }
.sidebar { width: 262px; background: var(--brand-900); color: #cfd9f3; flex-shrink: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar .brand { display: flex; align-items: center; gap: .6rem; padding: 1rem 1.1rem; color: #fff; font-weight: 800; font-size: 1.1rem; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.sidebar .brand img { width: 44px; }
.sidebar .nav-link { color: #cfd9f3; display: flex; align-items: center; gap: .7rem; padding: .62rem 1.1rem; border-radius: 10px; margin: 2px .6rem; font-weight: 600; }
.sidebar .nav-link .bi { font-size: 1.1rem; }
.sidebar .nav-link:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.sidebar .nav-link.active { background: var(--brand-600); color: #fff; }
.sidebar .nav-section { color: #7d8fbd; font-size: .72rem; padding: .9rem 1.4rem .3rem; font-weight: 700; }
.panel-main { flex: 1; min-width: 0; }
.panel-topbar { background: #fff; border-bottom: 1px solid var(--line); padding: .7rem 1.2rem; display: flex; align-items: center; gap: .8rem; position: sticky; top: 0; z-index: 1020; }
.panel-topbar .title { font-weight: 800; font-size: 1.05rem; margin: 0; flex: 1; }
.panel-content { padding: 1.3rem; }
@media (max-width: 991.98px) {
    .sidebar { position: fixed; inset-inline-start: 0; top: 0; z-index: 1045; transform: translateX(100%); transition: transform .2s; }
    [dir="rtl"] .sidebar { transform: translateX(100%); }
    .sidebar.show { transform: translateX(0) !important; }
    .panel-content { padding: .9rem; }
    .sidebar-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 1040; display: none; }
    .sidebar-backdrop.show { display: block; }
}

.stat-card { border-radius: var(--radius); padding: 1rem 1.1rem; color: #fff; display: flex; flex-direction: column; gap: .15rem; min-height: 112px; box-shadow: var(--shadow); }
.stat-card .bi { font-size: 1.6rem; opacity: .95; }
.stat-card .label { font-size: .88rem; opacity: .95; font-weight: 600; }
.stat-card .value { font-size: 1.35rem; font-weight: 800; }
.stat-card.blue { background: linear-gradient(160deg, #2a7ff5, #1257d6); }
.stat-card.green { background: linear-gradient(160deg, #22b35a, #12903f); }
.stat-card.orange { background: linear-gradient(160deg, #f7a823, #ef8a0c); }
.stat-card.red { background: linear-gradient(160deg, #f0524f, #d62f2c); }
.stat-card.navy { background: linear-gradient(160deg, #173c8c, #0a2463); }
.stat-card.teal { background: linear-gradient(160deg, #13a3a3, #0b7d86); }
.stat-card.white { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.stat-card.white .label { color: var(--muted); }

.owner-hero { background: #fff; border-radius: var(--radius); border: 1px solid var(--line); padding: 1rem 1.2rem; display: flex; gap: 1rem; align-items: center; box-shadow: var(--shadow); }
.owner-hero .logo { width: 72px; height: 72px; border-radius: 16px; background: var(--brand-50); display: grid; place-items: center; overflow: hidden; }
.owner-hero .logo img { width: 100%; height: 100%; object-fit: contain; }

.table { --bs-table-bg: transparent; margin-bottom: 0; }
.table thead th { color: var(--muted); font-size: .8rem; font-weight: 700; border-bottom-width: 1px; white-space: nowrap; background: var(--brand-50); }
.table td { vertical-align: middle; }
.table-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.filter-bar { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem; margin-bottom: 1rem; }
.pagination { margin: 1rem 0 0; flex-wrap: wrap; }
.empty-state { text-align: center; padding: 2.2rem 1rem; color: var(--muted); }
.empty-state .bi { font-size: 2.6rem; color: #b6c3de; display: block; margin-bottom: .4rem; }

.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.2rem; background: linear-gradient(180deg, var(--brand-900) 0 38%, var(--bg) 38%); }
.auth-card { width: 100%; max-width: 440px; background: #fff; border-radius: 22px; padding: 1.6rem 1.4rem; box-shadow: 0 20px 50px rgba(10, 36, 99, .18); }
.auth-card .logo { width: 110px; display: block; margin: -4.2rem auto .4rem; background: #fff; border-radius: 50%; padding: 6px; box-shadow: var(--shadow); }
.auth-card h1 { font-weight: 800; font-size: 1.45rem; text-align: center; margin-bottom: .25rem; }
.auth-card .sub { text-align: center; color: var(--muted); margin-bottom: 1.2rem; }
.divider-or { display: flex; align-items: center; gap: .8rem; color: var(--muted); margin: 1rem 0; }
.divider-or::before, .divider-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.qr-box { background: #fff; border-radius: var(--radius); padding: 1rem; display: inline-block; border: 1px solid var(--line); }
.qr-box svg { width: 220px; height: 220px; display: block; }

.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding: 0 1.4rem .9rem 0; border-inline-start: 2px solid var(--line); margin-inline-start: .4rem; }
.timeline li::before { content: ''; position: absolute; inset-inline-start: -7px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--brand-600); }
.chat { display: flex; flex-direction: column; gap: .6rem; }
.chat .msg { max-width: 85%; padding: .65rem .9rem; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.chat .msg.staff { align-self: flex-end; background: var(--brand-50); border-color: var(--brand-100); }
.chat .msg .who { font-size: .75rem; color: var(--muted); font-weight: 700; }

@media print {
    .no-print, .sidebar, .panel-topbar, .bottom-nav, .mobile-topbar { display: none !important; }
    body, .mobile-content, .panel-content { background: #fff !important; padding: 0 !important; }
    .card, .info-list { box-shadow: none !important; }
}

/* خط الاشتراك: each line's colour (its icon), its name with the icon, and the three cards to choose it on the forms. */
.line-golden { color: #d4a000; }
.line-commercial { color: #ea7a0c; }
.line-standard { color: #5b7a99; }
.line-icon { flex-shrink: 0; vertical-align: -.25em; }
.line-badge { display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; }
.line-choice { display: block; height: 100%; padding: .75rem .9rem; border: 2px solid var(--line); border-radius: var(--radius-sm); background: #fff; cursor: pointer; }
.line-choice:hover { border-color: var(--brand-500); }
.btn-check:checked + .line-choice { border-color: var(--brand-600); background: var(--brand-50); box-shadow: 0 0 0 .2rem rgba(21, 101, 224, .12); }
.btn-check:focus-visible + .line-choice { outline: 2px solid var(--brand-600); outline-offset: 2px; }
