/* Al Nour NFC — self-hosted interface refresh */
@font-face {
  font-family: "Tajawal";
  src: url("../fonts/Tajawal-Regular.ttf") format("truetype");
  font-style: normal; font-weight: 400; font-display: swap;
}
@font-face {
  font-family: "Tajawal";
  src: url("../fonts/Tajawal-Bold.ttf") format("truetype");
  font-style: normal; font-weight: 700 900; font-display: swap;
}
:root {
  color-scheme: light;
  --an-ink: #192b3b;
  --an-muted: #687886;
  --an-blue: #3d6574;
  --an-blue-deep: #243e4b;
  --an-gold: #f7c908;
  --an-gold-soft: #fff7d5;
  --an-canvas: #f5f7f8;
  --an-surface: #fff;
  --an-line: #e5eaed;
  --an-radius: 18px;
  --an-shadow: 0 14px 40px rgba(25, 43, 59, .09);
  --an-font: "Inter", "Tajawal", "Segoe UI", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { width: 100%; max-width: 100%; overflow-x: clip; }
body { color: var(--an-ink); font-family: var(--an-font); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid rgba(247, 201, 8, .72); outline-offset: 3px; }

/* Font Awesome 7 is served from Firebase Hosting, so icons need no CDN. */

.navbar, .navbar-dashboard, .navbar-profile {
  min-height: 68px; height: auto; padding: 12px clamp(16px, 4vw, 52px);
  background: rgba(255,255,255,.96); border-bottom: 1px solid rgba(25,43,59,.07);
  box-shadow: 0 6px 24px rgba(25,43,59,.05); backdrop-filter: blur(14px);
}
.navbar { position: sticky; top: 0; }
.navbar-dashboard, .navbar-profile { z-index: 1000; }
.nav-logo { max-width: 190px; max-height: 44px; object-fit: contain; }
.middle-menu { gap: clamp(12px, 2vw, 28px); align-items: center; }
.middle-menu-item, .navbar a { color: var(--an-ink); transition: color .18s ease, background .18s ease; }
.middle-menu-item:hover, .navbar a:hover { color: var(--an-blue); }
.a-div-button-w-img, .div-button-w-img, .c-div-button-w-img-hero,
.btn, button, input[type="submit"] {
  border-radius: 12px; font-weight: 700; transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.a-div-button-w-img, .c-div-button-w-img-hero, .btn.primary, input[type="submit"] {
  color: #263746 !important; background: var(--an-gold) !important; border: 1px solid #e6bb00;
  box-shadow: 0 7px 18px rgba(204,164,0,.18);
}
.a-div-button-w-img:hover, .c-div-button-w-img-hero:hover, .btn.primary:hover, input[type="submit"]:hover {
  transform: translateY(-2px); box-shadow: 0 11px 24px rgba(204,164,0,.25);
}

.main-page { width: 100%; max-width: 100%; overflow: clip; }
.hero-section {
  min-height: min(740px, calc(100svh - 68px)); padding: clamp(32px, 5vw, 64px) clamp(24px, 7vw, 104px) !important;
  display: grid !important; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); align-items: center;
  gap: clamp(24px, 4vw, 64px); background: linear-gradient(125deg, #f3f7f8 0%, #fff 56%, #fff9df 100%) !important;
}
.hero-section .section-heading { width: 100%; }
.hero-section .slideshow { width: 100%; align-self: center; }
.hero-section .slideshow img { display: block; width: 100%; max-height: 540px; object-fit: contain; }
.hero-section .slideshowTwo { display: none; }
.hero-section h1, .section-heading h1 { color: var(--an-ink); font-size: clamp(2.5rem, 5vw, 4rem) !important; line-height: 1.16; letter-spacing: -.035em; background-color: transparent !important; }
.hero-section h2 { font-size: clamp(1.15rem, 2.4vw, 2rem) !important; line-height: 1.55; }
.hero-kicker { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 18px; color: var(--an-blue); font-size: .78rem; font-weight: 800; letter-spacing: .14em; }
.hero-kicker i { display: grid; width: 34px; height: 34px; place-items: center; color: #273c46; background: var(--an-gold); border-radius: 11px; letter-spacing: 0; }
.features-section-two, .features-section, .section { padding: clamp(48px, 7vw, 92px) clamp(18px, 6vw, 80px) !important; }
.features-title { color: var(--an-ink); font-size: clamp(2rem, 4vw, 3.4rem) !important; letter-spacing: -.03em; }
.feature2, .feature, .pricing__item { background: var(--an-surface); border: 1px solid var(--an-line); border-radius: var(--an-radius); box-shadow: var(--an-shadow); transition: transform .2s ease, box-shadow .2s ease; }
.feature2:hover, .feature:hover, .pricing__item:hover { transform: translateY(-5px); box-shadow: 0 20px 48px rgba(25,43,59,.13); }
.feature-title2, .feature-desc2 { line-height: 1.55; }

/* Sign-in, account and recovery screens */
body:has(.wrap), body:has(.loginCard) { min-height: 100vh; background: radial-gradient(ellipse at 12% 5%, rgba(247,201,8,.15), transparent 34%), linear-gradient(145deg,#f3f6f7,#fbfaf5 72%); }
.wrap { max-width: 720px; width: calc(100% - 32px); min-height: calc(100vh - 108px); margin: 20px auto 40px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; }
.wrap .hero { min-height: 0; padding: clamp(20px,4vw,48px); border: 1px solid rgba(61,101,116,.1); border-radius: 28px; background: linear-gradient(145deg,rgba(255,255,255,.84),rgba(255,255,255,.52)); }
.wrap .hero h1 { font-size: clamp(2.2rem,4.3vw,3.6rem); line-height: 1.12; color: var(--an-ink); letter-spacing: -.04em; }
.wrap .card, .loginCard { position: relative; width: min(100%, 520px) !important; max-width: 520px; margin: 0 auto; padding: clamp(28px,4vw,42px); background: var(--an-surface); border: 1px solid rgba(25,43,59,.08); border-radius: 24px; box-shadow: 0 22px 65px rgba(25,43,59,.12); }
.auth-icon { display: grid; width: 54px; height: 54px; place-items: center; margin: 0 auto 18px; border-radius: 17px; background: var(--an-gold-soft); color: var(--an-blue-deep); font-size: 22px; }
.wrap .card h1, .wrap .card h2, .loginCard h1 { color: var(--an-ink); letter-spacing: -.025em; }
.loginCard { margin: 0 auto; }
label { color: var(--an-muted); font-weight: 650; }
input:not([type="checkbox"]):not([type="radio"]):not([type="color"]), select, textarea {
  min-height: 46px; border: 1px solid #dce3e7 !important; border-radius: 11px !important; background: #fff;
  color: var(--an-ink); transition: border-color .16s ease, box-shadow .16s ease;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--an-blue) !important; box-shadow: 0 0 0 4px rgba(61,101,116,.12) !important; }
.btn:not(.primary), button:not(.primary):not(.mobile-menu-btn) { background: transparent; color: var(--an-ink); border: none; }

/* Signed-in workspace, card/profile editor and lists */
#sidebar { background: #fff; border-right: 1px solid var(--an-line); box-shadow: 8px 0 28px rgba(25,43,59,.035); }
#sidebar a { border-radius: 11px; margin: 3px 10px; transition: background .18s ease, color .18s ease; }
#sidebar li > a > svg { display: none; }
#sidebar li > a > i { width: 24px; flex: 0 0 24px; color: var(--an-blue); text-align: center; font-size: 17px; }
#sidebar li > a > span { margin-inline-start: 12px; }
#sidebar a:hover, #sidebar .sidebar-active { background: #f2f6f6 !important; color: var(--an-blue-deep) !important; }
.sidebar-active span, .sidebar-active svg { color: var(--an-gold) !important; fill: var(--an-gold) !important; }
.main { background: var(--an-canvas) !important; }
#sidebar { top: 68px !important; left: 0 !important; width: 250px !important; height: calc(100dvh - 68px) !important; padding: 14px 12px !important; overflow-y: auto !important; transform: translate3d(0,0,0) !important; }
#sidebar ul { padding: 0; margin: 0; list-style: none; }
#sidebar li { list-style: none; }
#sidebar li > a { display: flex; align-items: center; min-height: 48px; padding: 10px 12px !important; color: var(--an-ink) !important; font-size: .92rem; font-weight: 650 !important; }
#main-content { flex: 1 1 auto; width: calc(100% - 250px) !important; min-width: 0; min-height: calc(100vh - 68px) !important; height: auto !important; margin: 0 0 0 250px !important; padding: 68px clamp(18px, 2.8vw, 42px) 30px !important; background: var(--an-canvas) !important; overflow-x: hidden; }
#main-content > main { width: 100%; max-width: 1680px; margin: 0 auto; }
#main-content .pt-6 { padding-top: 20px; }
#main-content .px-4 { padding-inline: 0; }
#main-content .bg-white { background-color: #fff !important; }
#main-content .shadow { box-shadow: 0 8px 28px rgba(25,43,59,.07); }
#main-content .rounded-lg { border-radius: 17px; }
#main-content .p-4 { padding: 22px; }
#main-content .mb-4 { margin-bottom: 18px; }
#main-content .flex { display: flex; }
#main-content .items-center { align-items: center; }
#main-content .justify-between { justify-content: space-between; }
#main-content .text-xl { font-size: 1.15rem; }
#main-content .font-bold { font-weight: 750; }
#main-content h3 { color: var(--an-ink); }
#topup-section { display: grid !important; grid-template-columns: minmax(0,1.25fr) minmax(320px,.75fr); align-items: start; gap: 22px !important; width: 100%; }
#main-content .resp-col-main, #main-content .resp-col-side { width: auto !important; min-width: 0; padding: clamp(18px,2.1vw,30px) !important; border: 1px solid var(--an-line); border-radius: 18px; }
#main-contente { min-height: 460px; }
#preview-card { position: sticky; top: 90px; width: 100% !important; max-width: 480px; margin: 0 auto !important; border: 1px solid rgba(25,43,59,.08); }
#logo-preview[src=""], #logo-preview:not([src]) { visibility: hidden; }
#main-content .resp-row { align-items: start; gap: 20px !important; }
#main-content input:not([type="checkbox"]):not([type="radio"]):not([type="color"]), #main-content select, #main-content textarea { max-width: 100%; }
#main-content .work-day-row { padding: 8px 10px; border-bottom: 1px solid #eef1f2; }
#main-content .work-day-row:last-child { border-bottom: 0; }
#main-content .color-box { border: 1px solid var(--an-line); box-shadow: none; }
#main-content .image-box { min-height: 46px; border-color: var(--an-line); border-radius: 12px; }
#main-content .btn.primary { min-height: 44px; }
.card, .panel, .tableContainer, .modal-content, [class*="dashboard-card"] { border-radius: var(--an-radius); }
table { border-collapse: separate; border-spacing: 0; overflow: hidden; border: 1px solid var(--an-line); border-radius: 14px; background: white; }
th { background: #f5f8f8; color: var(--an-blue-deep); font-size: .78rem; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
td, th { padding: 13px 15px; border-bottom: 1px solid #edf0f2; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fffcf0; }

@media (max-width: 760px) {
  .navbar, .navbar-dashboard, .navbar-profile { padding: 10px 16px; }
  .middle-menu { display: none !important; }
  .main-page, .hero-section, .features-section-two { width: 100vw !important; max-width: 100vw !important; }
  .hero-section { min-height: 0; display: flex !important; flex-direction: column-reverse; gap: 14px; padding: 30px 20px 44px !important; }
  .hero-section .slideshow { display: none !important; }
  .hero-section .slideshowTwo { display: block; width: min(100%, 420px); margin: 0 auto 14px; }
  .hero-section .slideshowTwo img { display: block; width: 100%; max-height: 300px; object-fit: contain; }
  .hero-section .section-heading { width: 100%; }
  .hero-section .section-heading { display: flex; flex-direction: column; align-items: center; text-align: center; }
  .hero-section .section-heading h1, .hero-section .section-heading h2 { width: 100%; max-width: 100%; overflow-wrap: break-word; }
  .hero-section .section-heading .c-div-button-w-img-hero { align-self: center; }
  .hero-section h1 { font-size: clamp(1.8rem, 8vw, 2rem) !important; line-height: 1.28; }
  .wrap { min-height: 0; gap: 18px; margin-top: 16px; }
  .wrap .hero { padding: 22px; }
  .wrap .card, .loginCard { max-width: 520px; }
  .hero-section { text-align: center; }
  .feature2, .feature { max-width: 100%; }
  .tableContainer { overflow-x: auto; }
  table { min-width: 680px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; } }
@media (max-width: 1024px) {
  #sidebar { top: 0 !important; width: 270px !important; height: 100dvh !important; padding: 82px 12px 18px !important; transform: translate3d(calc(-100% - 2px),0,0) !important; z-index: 1001; }
  #sidebar.open { transform: translate3d(0,0,0) !important; }
  .menu-toggle { display: flex !important; align-items: center; justify-content: center; color: var(--an-blue-deep); }
  #main-content { width: 100% !important; margin: 0 !important; padding: 68px 20px 24px !important; }
  #topup-section { grid-template-columns: minmax(0,1fr); }
  #main-content .resp-col-main, #main-content .resp-col-side { width: 100% !important; }
  #preview-card { position: static; }
}
