/* =========================================================
   GMaps Investor — Production UI Theme v25
   Clean SaaS dashboard theme, RTL/LTR ready, Bootstrap-friendly
   ========================================================= */
:root {
  --app-bg: #f3f6fb;
  --app-bg-2: #eaf0f8;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #eef4ff;
  --text: #0f172a;
  --text-2: #243044;
  --muted: #64748b;
  --line: #dce5f2;
  --line-2: #c7d4e8;
  --primary: #155eef;
  --primary-2: #0f46b8;
  --primary-soft: #e9f1ff;
  --teal: #0f766e;
  --green: #16a34a;
  --amber: #d97706;
  --red: #dc2626;
  --purple: #7c3aed;
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow-sm: 0 8px 24px rgba(15, 23, 42, .07);
  --shadow-md: 0 18px 50px rgba(15, 23, 42, .10);
  --shadow-lg: 0 28px 90px rgba(15, 23, 42, .16);
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 28px;
  --nav-h: 76px;
  --font-ar: 'Cairo', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-en: 'Inter', 'Cairo', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { min-height: 100%; margin: 0; }
body {
  font-family: var(--font-ar);
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(21, 94, 239, .12), transparent 30rem),
    radial-gradient(circle at bottom left, rgba(15, 118, 110, .10), transparent 28rem),
    linear-gradient(180deg, var(--app-bg) 0%, #eef3f9 100%);
  padding-top: var(--nav-h);
  line-height: 1.75;
}
html[dir="ltr"] body { font-family: var(--font-en); }
body.auth-page { padding-top: 0; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--primary); }
::selection { background: rgba(21,94,239,.16); }

/* Top navigation */
.navbar,
.glass-nav,
.navbar.navbar-dark,
.navbar.bg-white {
  min-height: var(--nav-h);
  background: rgba(15, 23, 42, .88) !important;
  border-bottom: 1px solid rgba(255,255,255,.09);
  box-shadow: 0 14px 40px rgba(15, 23, 42, .16);
  backdrop-filter: blur(18px);
}
.navbar .container, .navbar .container-fluid { gap: 1rem; }
.navbar-brand {
  color: #fff !important;
  font-weight: 900 !important;
  letter-spacing: -.02em;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
}
.navbar-brand::before {
  content: "";
  width: 34px; height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, #60a5fa, #155eef 52%, #0f766e);
  box-shadow: 0 10px 24px rgba(37,99,235,.35);
  display: inline-block;
}
.navbar-dark .navbar-nav .nav-link,
.navbar .nav-link {
  color: rgba(255,255,255,.74) !important;
  font-weight: 700;
  border-radius: 999px;
  padding: .58rem .85rem !important;
  transition: .18s ease;
}
.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active,
.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: #fff !important;
  background: rgba(255,255,255,.10);
}
.navbar .btn-light,
.navbar .btn-outline-light {
  border-radius: 999px !important;
  font-weight: 800;
}
.dropdown-menu {
  border: 1px solid rgba(148,163,184,.24);
  border-radius: 18px;
  box-shadow: var(--shadow-md);
  padding: .55rem;
}
.dropdown-item { border-radius: 12px; padding: .62rem .75rem; font-weight: 700; }

/* Global containers/cards */
.container-xxl.page-shell,
.page-shell,
.dashboard-shell { max-width: 1360px; padding-bottom: 4rem; }
.app-card,
.marketing-card,
.stat-tile,
.feature-box,
.cta-panel,
.auth-card-modern,
.card,
.admin-content,
.admin-sidebar,
.stat-glass-card,
.table-card,
.chart-container,
.recommendation-card {
  background: rgba(255,255,255,.92) !important;
  border: 1px solid rgba(148, 163, 184, .20) !important;
  box-shadow: var(--shadow-sm) !important;
  border-radius: var(--radius-lg) !important;
}
.app-card:hover,
.card:hover,
.stat-tile:hover,
.feature-box:hover,
.stat-glass-card:hover {
  box-shadow: var(--shadow-md) !important;
}
.card-header {
  background: linear-gradient(180deg, #fff, #f8fbff) !important;
  border-bottom: 1px solid var(--line) !important;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
  padding: 1rem 1.25rem;
}
.card-body { padding: 1.35rem; }

/* Hero sections */
.hero-clean { padding: 3.5rem 0 2.2rem; }
.page-hero,
.admin-header,
.report-header {
  position: relative;
  overflow: hidden;
  color: #fff !important;
  background:
    radial-gradient(circle at 12% 10%, rgba(125,211,252,.28), transparent 18rem),
    radial-gradient(circle at 90% 0%, rgba(34,197,94,.16), transparent 22rem),
    linear-gradient(135deg, #0f172a 0%, #1e3a8a 58%, #0f766e 100%) !important;
  border: 1px solid rgba(255,255,255,.10) !important;
  border-radius: 34px !important;
  box-shadow: var(--shadow-lg) !important;
  padding: clamp(1.6rem, 4vw, 3rem) !important;
  margin-bottom: 1.8rem;
}
.page-hero h1,
.admin-header h1,
.report-header h1 { color: #fff !important; letter-spacing: -.035em; }
.page-hero .text-muted,
.admin-header .text-muted,
.report-header .text-muted,
.admin-header .lead { color: rgba(255,255,255,.78) !important; }
.hero-inline-badge,
.hero-badge,
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  width: fit-content;
  padding: .48rem .9rem;
  border-radius: 999px;
  background: rgba(255,255,255,.13) !important;
  border: 1px solid rgba(255,255,255,.18) !important;
  color: #fff !important;
  font-weight: 900;
  box-shadow: none !important;
}
.hero-clean .hero-badge,
.auth-side .hero-badge {
  background: var(--primary-soft) !important;
  color: var(--primary-2) !important;
  border-color: #cfe0ff !important;
}

/* Buttons/forms */
.btn {
  border-radius: 15px !important;
  font-weight: 800 !important;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  box-shadow: none !important;
}
.btn-lg { min-height: 54px; padding-inline: 1.35rem; }
.btn-sm { min-height: 34px; }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2)) !important;
  border-color: transparent !important;
  box-shadow: 0 12px 26px rgba(21,94,239,.24) !important;
}
.btn-primary:hover { filter: brightness(.97); transform: translateY(-1px); }
.btn-outline-primary {
  color: var(--primary-2) !important;
  border-color: #b8cdf6 !important;
  background: rgba(255,255,255,.68) !important;
}
.btn-outline-primary:hover { background: var(--primary-soft) !important; color: var(--primary-2) !important; }
.btn-outline-danger, .btn-outline-warning, .btn-outline-success, .btn-outline-secondary { background: #fff !important; }
.form-label { font-weight: 900; color: var(--text); margin-bottom: .5rem; }
.form-control,
.form-select {
  border-radius: 16px !important;
  border: 1px solid var(--line-2) !important;
  background: #fbfdff !important;
  color: var(--text) !important;
  min-height: 48px;
  box-shadow: var(--shadow-xs) !important;
}
.form-control-lg, .form-select-lg { min-height: 60px; }
.form-control:focus,
.form-select:focus {
  background: #fff !important;
  border-color: rgba(21,94,239,.52) !important;
  box-shadow: 0 0 0 .22rem rgba(21,94,239,.12) !important;
}
.input-group-text { border-radius: 16px; border-color: var(--line-2); background: #f8fbff; font-weight: 800; }
.alert { border: 0 !important; border-radius: 18px !important; box-shadow: var(--shadow-xs); }

/* Landing */
.marketing-card { padding: clamp(1.4rem, 4vw, 2.4rem) !important; }
.stack-title,
.section-title { font-weight: 950 !important; letter-spacing: -.03em; }
.mini-feature {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .9rem 1rem;
  border-radius: 18px;
  background: #f8fbff;
  border: 1px solid var(--line);
  margin-top: .75rem;
}
.feature-icon {
  width: 58px; height: 58px;
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 1.25rem;
  margin-bottom: 1rem;
}
.stat-tile { padding: 1.5rem !important; text-align: center; }
.stat-value { font-size: clamp(2rem, 4vw, 3.3rem); font-weight: 950; color: var(--primary-2); line-height: 1; }
.stat-text { color: var(--muted); margin-top: .55rem; font-weight: 700; }

/* Auth */
.auth-shell { width: min(980px, calc(100vw - 32px)); margin: 32px auto; }
.auth-shell.wide { width: min(1120px, calc(100vw - 32px)); }
.auth-card-modern { display: grid; grid-template-columns: .92fr 1.08fr; overflow: hidden; min-height: 620px; }
.auth-side {
  padding: clamp(2rem, 4vw, 3.4rem) !important;
  background:
    radial-gradient(circle at top left, rgba(37,99,235,.12), transparent 22rem),
    linear-gradient(160deg, #f8fbff, #eef6ff) !important;
  border-inline-end: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-side h1 { font-weight: 950; letter-spacing: -.04em; color: var(--text); }
.auth-main { padding: clamp(2rem, 4vw, 3.4rem) !important; display: flex; flex-direction: column; justify-content: center; }
.auth-main a { color: var(--primary); font-weight: 800; }

/* Dashboard */
.page-hero { display: flex; justify-content: space-between; align-items: center; gap: 1.3rem; flex-wrap: wrap; }
.page-hero-copy { max-width: 760px; }
.page-actions { display: flex; gap: .75rem; flex-wrap: wrap; }
.user-chip {
  min-width: 230px;
  background: rgba(255,255,255,.13) !important;
  border: 1px solid rgba(255,255,255,.16) !important;
  box-shadow: none !important;
  color: #fff !important;
}
.user-chip span { color: rgba(255,255,255,.75) !important; }
.workspace-head,
.section-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; flex-wrap: wrap; }
.form-card, .workspace-card, .recent-card { padding: 1.5rem !important; }
.metrics-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.metric-box {
  padding: 1rem;
  border-radius: 18px;
  background: #f8fbff;
  border: 1px solid var(--line);
  min-height: 86px;
}
.metric-box--wide { grid-column: 1 / -1; background: #eef4ff; }
.metric-box span { display: block; color: var(--muted); font-weight: 800; font-size: .88rem; }
.metric-box strong { display: block; margin-top: .25rem; font-size: 1.05rem; color: var(--text); }
.progress-track, .bar { height: 12px; border-radius: 999px; overflow: hidden; background: #e2e8f0; }
.progress-fill-line, .bar span {
  display: block; height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #38bdf8);
  transition: width .35s ease;
}
.friendly-box {
  display: flex; align-items: center; gap: .75rem;
  padding: .95rem 1rem;
  border-radius: 18px;
  color: #1d4ed8;
  background: #eef5ff;
  border: 1px solid #cfe0ff;
  font-weight: 800;
}
.recent-list, .report-list-v2 { display: grid; gap: .8rem; }
.recent-item, .report-item-v2 {
  color: inherit;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fbfdff;
}
.recent-item:hover, .report-item-v2:hover { border-color: #a9c3f2; color: inherit; transform: translateY(-1px); }

/* Reports/results */
.report-header { margin-top: 1rem; }
.chart-container { padding: 1.35rem !important; }
.section-title { border: 0 !important; padding: 0 !important; margin: 1.5rem 0 1rem !important; display: flex; align-items: center; gap: .55rem; }
.section-title::before {
  content: "";
  width: 10px; height: 30px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--primary), var(--teal));
}
.stat-card { border-radius: var(--radius-lg) !important; border: 1px solid var(--line) !important; box-shadow: var(--shadow-sm) !important; }
.stat-number { font-weight: 950 !important; color: var(--primary-2); }
.recommendation-card { border-inline-start: 5px solid var(--primary) !important; border-inline-end: 0 !important; padding: 1.2rem !important; }
.table { --bs-table-bg: transparent; }
.table thead th { color: var(--muted); font-weight: 900; border-bottom-color: var(--line-2); }
.table tbody td { vertical-align: middle; border-color: var(--line); }
.badge { border-radius: 999px; padding: .45rem .7rem; font-weight: 900; }

/* Admin */
.admin-header { margin-top: 1rem; }
.admin-panel { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.admin-sidebar { position: sticky; top: calc(var(--nav-h) + 18px); padding: 1rem !important; }
.admin-menu { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; }
.admin-menu a {
  display: flex !important;
  align-items: center;
  gap: .6rem;
  padding: .75rem .9rem !important;
  border-radius: 15px !important;
  color: var(--text-2) !important;
  font-weight: 850;
}
.admin-menu a:hover,
.admin-menu a.active { background: var(--primary-soft) !important; color: var(--primary-2) !important; }
.admin-content { padding: 1.45rem !important; min-height: 620px; }
.admin-section { animation: fadeIn .22s ease both; }
.admin-stats,
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.admin-stat-card,
.stat-glass-card {
  padding: 1rem;
  border-radius: 20px;
  background: #f8fbff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
}
.admin-stat-number,
.stat-glass-card strong { display: block; font-size: 1.8rem; font-weight: 950; color: var(--primary-2); line-height: 1; }
.stat-label,
.stat-glass-card span { color: var(--muted); font-weight: 800; font-size: .88rem; }
.admin-table-container, .table-responsive { border-radius: 20px; }
.search-box { position: relative; }
.search-box i { position: absolute; top: 50%; transform: translateY(-50%); inset-inline-end: 1rem; color: var(--muted); }
.search-box .form-control { padding-inline-end: 2.5rem; }
.modal-content { border: 0; border-radius: 26px; box-shadow: var(--shadow-lg); }
.modal-header { border-bottom-color: var(--line); }
.modal-footer { border-top-color: var(--line); }

/* Compare page */
.compare-page .compare-shell { max-width: 1320px; }
.compare-page .compare-grid { display: grid; grid-template-columns: 360px minmax(0,1fr); gap: 1.25rem; align-items: start; }
.compare-page .candidate-item { display: block; cursor: pointer; border: 1px solid var(--line); border-radius: 18px; background: #fbfdff; padding: .9rem; transition: .18s ease; }
.compare-page .candidate-item:hover { border-color: #a9c3f2; transform: translateY(-1px); }
.compare-page .indicator-row { display: grid; gap: .55rem; }
.compare-page .indicator-card { border: 1px solid var(--line); border-radius: 20px; background: #fff; padding: 1rem; }
.compare-page .risk span { background: linear-gradient(90deg, var(--amber), var(--red)); }
.small-muted { font-size: .88rem; color: var(--muted); font-weight: 700; }

/* Utilities/responsive */
.text-muted { color: var(--muted) !important; }
.bg-white { background: #fff !important; }
.border { border-color: var(--line) !important; }
.rounded { border-radius: 14px !important; }
.opacity-90 { opacity: .9; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (max-width: 1200px) {
  .admin-panel, .compare-page .compare-grid { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; }
  .admin-menu { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 992px) {
  .auth-card-modern { grid-template-columns: 1fr; min-height: auto; }
  .auth-side { border-inline-end: 0; border-bottom: 1px solid var(--line); }
  .admin-stats, .stats-strip { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 768px) {
  :root { --nav-h: 70px; }
  .container, .container-xxl { padding-inline: 1rem; }
  .page-hero, .admin-header { border-radius: 24px !important; }
  .app-card, .card, .admin-content, .admin-sidebar, .auth-main, .auth-side { padding: 1rem !important; }
  .metrics-grid, .admin-stats, .stats-strip { grid-template-columns: 1fr; }
  .admin-menu { grid-template-columns: 1fr; }
  .recent-item, .report-item-v2 { flex-direction: column; align-items: flex-start; }
}
