:root {
  --af-bg: #f5f8fc;
  --af-bg-soft: #eef4ff;
  --af-surface: #ffffff;
  --af-surface-soft: #f8fbff;
  --af-text: #0f172a;
  --af-muted: #64748b;
  --af-line: #d8e2f0;
  --af-navy: #07142b;
  --af-navy-2: #0b1b38;
  --af-blue: #2563eb;
  --af-indigo: #4f46e5;
  --af-cyan: #06b6d4;
  --af-emerald: #0f766e;
  --af-teal: #115e59;
  --af-amber: #f59e0b;
  --af-orange: #f4781a;
  --af-shadow-lg: 0 28px 72px rgba(8,26,58,.12);
  --af-shadow-md: 0 16px 34px rgba(8,26,58,.08);
  --af-radius-xl: 30px;
  --af-radius-lg: 22px;
  --af-radius-md: 16px;
}

* { box-sizing: border-box; }
html { direction: rtl; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: Tahoma, "Segoe UI", "Noto Sans Arabic", Arial, sans-serif;
  color: var(--af-text);
  line-height: 1.8;
  background:
    radial-gradient(circle at 12% -8%, rgba(79,70,229,.14), transparent 28%),
    radial-gradient(circle at 90% 0%, rgba(6,182,212,.11), transparent 22%),
    linear-gradient(180deg, #fbfdff 0%, var(--af-bg) 100%);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 3px solid rgba(37,99,235,.28); outline-offset: 2px; }

/* Public shell */
body.public-shell, body.customer-shell {
  background:
    radial-gradient(circle at 12% -8%, rgba(79,70,229,.12), transparent 28%),
    radial-gradient(circle at 85% 2%, rgba(244,120,26,.10), transparent 20%),
    linear-gradient(180deg, #fbfdff 0%, var(--af-bg) 100%);
}
.public-shell .shell,
.customer-shell .shell {
  width: min(1180px, calc(100% - 24px));
  margin: 0 auto;
  padding: 18px 0 44px;
}
.public-shell .content,
.customer-shell .content { margin-top: 18px; }
.public-shell .topbar,
.customer-shell header {
  position: sticky;
  top: 12px;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 18px;
  border-radius: 26px;
  border: 1px solid rgba(255,255,255,.45);
  background: rgba(7,20,43,.92);
  color: #f8fbff;
  box-shadow: var(--af-shadow-lg);
  backdrop-filter: blur(14px);
}
.public-shell .brand,
.customer-shell header > div:first-child,
.admin-shell .admin-brand { display: grid; gap: 4px; }
.public-shell .brand strong,
.customer-shell header a,
.admin-shell .admin-brand h1 { font-size: 1.08rem; font-weight: 900; }
.public-shell .brand span,
.customer-shell .customer-note,
.admin-shell .admin-brand p { color: rgba(248,251,255,.72); font-size: .88rem; }
.public-shell .nav,
.customer-shell .customer-nav {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
}
.public-shell .nav a,
.public-shell .nav button,
.customer-shell .customer-nav a,
.customer-shell .customer-nav button,
.public-shell .site-button,
.customer-shell .link-button,
.admin-shell .admin-action-button,
.admin-shell .admin-action-button--secondary,
.admin-shell .admin-action-button--danger,
.admin-shell .logout-button {
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, color .16s ease;
}
.public-shell .nav a,
.public-shell .nav button,
.customer-shell .customer-nav a,
.customer-shell .customer-nav button,
.customer-shell .link-button { background: rgba(255,255,255,.08); color: #f8fbff; }
.public-shell .nav a:hover,
.public-shell .nav button:hover,
.customer-shell .customer-nav a:hover,
.customer-shell .customer-nav button:hover,
.customer-shell .link-button:hover,
.admin-shell .admin-action-button:hover,
.admin-shell .admin-action-button--secondary:hover,
.admin-shell .admin-action-button--danger:hover,
.admin-shell .logout-button:hover { transform: translateY(-1px); }
.public-shell .nav .cta,
.public-shell .site-button--primary,
.customer-shell .link-button--primary,
.admin-shell .admin-action-button {
  background: linear-gradient(135deg, var(--af-orange), #ff9f33);
  color: #2d1700;
  box-shadow: 0 18px 28px rgba(244,120,26,.22);
}
.public-shell .nav .customer,
.customer-shell .customer-nav .customer,
.public-shell .site-button--secondary,
.customer-shell .link-button--secondary,
.admin-shell .admin-action-button--secondary {
  background: rgba(37,99,235,.10);
  color: #dbeafe;
  border-color: rgba(255,255,255,.10);
}
.admin-shell .admin-action-button--secondary { color: #0f172a; background: #eef2f7; border-color: #e2e8f0; box-shadow: none; }
.admin-shell .admin-action-button--danger { background: linear-gradient(135deg, #dc2626, #991b1b); color: #fff; }

.shell-card,
.panel,
.preview-card,
.download-page,
.admin-panel,
.auth-card,
.settings-card,
.card {
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,251,255,.98));
  border: 1px solid rgba(216,226,240,.96);
  border-radius: var(--af-radius-xl);
  box-shadow: var(--af-shadow-lg);
}

/* Home / public */
.public-shell .shell-card,
.public-shell .hero-card,
.public-shell .featured-card,
.public-shell .stats-card,
.public-shell .featured-tenders article,
.public-shell .featured-tenders .tender-card,
.public-shell .tender-card,
.public-shell .feature-card,
.public-shell .public-section,
.public-shell .public-block {
  padding: clamp(20px, 4vw, 34px);
}
.public-shell h1,
.public-shell h2,
.customer-shell h1,
.customer-shell h2,
.admin-shell h1,
.admin-shell h2 {
  margin: 0;
  line-height: 1.12;
  letter-spacing: -.02em;
}
.public-shell .shell-card h1,
.public-shell .hero-card h1,
.public-shell .download-title,
.public-shell .preview-hero h1,
.public-shell .page-title,
.customer-shell .panel h1,
.customer-shell .auth-card h1,
.customer-shell .dashboard-title,
.admin-shell .admin-toolbar__title,
.admin-shell .page-header h1,
.admin-shell .admin-panel h1 {
  font-size: clamp(1.9rem, 4.3vw, 3.4rem);
}
.public-shell .hero-grid,
.public-shell .featured-tenders,
.public-shell .stats-grid,
.public-shell .cards-grid,
.public-shell .preview-grid,
.public-shell .download-meta-grid,
.customer-shell .dashboard-grid,
.customer-shell .details-grid,
.admin-shell .admin-summary-grid,
.admin-shell .admin-table-card-grid,
.admin-shell .admin-grid,
.admin-shell .metrics-grid,
.admin-shell .report-grid {
  display: grid;
  gap: 16px;
}
.public-shell .hero-grid,
.public-shell .featured-tenders,
.public-shell .cards-grid,
.public-shell .stats-grid,
.public-shell .download-meta-grid,
.customer-shell .details-grid,
.admin-shell .admin-summary-grid,
.admin-shell .admin-grid,
.admin-shell .report-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.public-shell .hero-copy,
.public-shell .hero-stage,
.public-shell .feature-card,
.public-shell .stats-card,
.public-shell .tender-card,
.public-shell .preview-card,
.customer-shell .dashboard-card,
.customer-shell .detail-card,
.admin-shell .admin-summary-card,
.admin-shell .admin-panel,
.admin-shell .metric-card,
.admin-shell .report-card { position: relative; overflow: hidden; }
.public-shell .hero-copy,
.public-shell .hero-stage,
.public-shell .download-hero,
.public-shell .preview-hero,
.customer-shell .dashboard-hero,
.admin-shell .dashboard-hero,
.admin-shell .admin-toolbar,
.admin-shell .section-head { display: grid; gap: 12px; }
.public-shell .hero-copy,
.public-shell .download-hero,
.public-shell .preview-hero,
.customer-shell .dashboard-hero,
.admin-shell .dashboard-hero {
  border-radius: var(--af-radius-xl);
  border: 1px solid rgba(216,226,240,.96);
  background:
    radial-gradient(circle at 100% 0%, rgba(244,120,26,.10), transparent 22%),
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,251,255,.98));
  box-shadow: var(--af-shadow-lg);
}
.public-shell .hero-copy,
.public-shell .download-hero,
.public-shell .preview-hero,
.customer-shell .dashboard-hero,
.admin-shell .dashboard-hero { padding: clamp(22px, 4vw, 38px); }
.public-shell .eyebrow,
.customer-shell .eyebrow,
.admin-shell .eyebrow,
.public-shell .preview-eyebrow,
.public-shell .download-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--af-blue); font-size: 12px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase;
}
.public-shell .eyebrow:before,
.customer-shell .eyebrow:before,
.admin-shell .eyebrow:before,
.public-shell .preview-eyebrow:before,
.public-shell .download-kicker:before {
  content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--af-amber); box-shadow: 0 0 0 5px rgba(245,158,11,.14);
}
.public-shell p,
.customer-shell p,
.admin-shell p { color: var(--af-muted); }
.public-shell .lead,
.public-shell .preview-hero p,
.public-shell .download-copy,
.customer-shell .note,
.admin-shell .admin-toolbar__description,
.admin-shell .page-header p { line-height: 1.9; }
.public-shell .site-button,
.public-shell .button,
.public-shell .preview-cta,
.public-shell .download-cta,
.customer-shell .link-button,
.admin-shell .admin-action-button,
.admin-shell .admin-action-button--secondary,
.admin-shell .admin-action-button--danger,
.admin-shell .logout-button {
  text-decoration: none !important;
  border: 0;
}
.public-shell .site-button--ghost,
.public-shell .download-cta--ghost,
.public-shell .preview-cta--ghost,
.customer-shell .link-button--ghost,
.admin-shell .admin-action-button--secondary {
  background: #eef2f7;
  color: #243044;
  border-color: #e2e8f0;
  box-shadow: none;
}
.public-shell .site-button--primary,
.public-shell .download-cta--primary,
.public-shell .preview-cta,
.customer-shell .link-button--primary,
.admin-shell .admin-action-button {
  background: linear-gradient(135deg, var(--af-orange), #ff9f33);
  color: #2d1700;
  box-shadow: 0 18px 28px rgba(244,120,26,.22);
}
.public-shell .site-button--teal,
.customer-shell .link-button--teal,
.admin-shell .admin-action-button--teal {
  background: linear-gradient(135deg, var(--af-emerald), var(--af-teal));
  color: #fff;
  box-shadow: 0 18px 28px rgba(15,118,110,.20);
}
.public-shell .site-stat,
.public-shell .stats-card,
.public-shell .feature-card,
.public-shell .tender-card,
.public-shell .preview-metric,
.public-shell .meta-card,
.customer-shell .dashboard-stat,
.customer-shell .subscription-stat,
.admin-shell .admin-summary-card,
.admin-shell .metric-card,
.admin-shell .report-card,
.admin-shell .admin-table-shell,
.admin-shell .admin-form-shell {
  border: 1px solid rgba(216,226,240,.96);
  border-radius: 20px;
  background: linear-gradient(180deg, #fff, #f8fbff);
  box-shadow: var(--af-shadow-md);
}
.public-shell .featured-tenders,
.public-shell .cards-grid,
.public-shell .stats-grid,
.customer-shell .dashboard-grid,
.admin-shell .admin-summary-grid,
.admin-shell .metrics-grid,
.admin-shell .report-grid { margin-top: 16px; }
.public-shell .tender-card strong,
.public-shell .feature-card h3,
.public-shell .stats-card strong,
.customer-shell .dashboard-card h3,
.admin-shell .admin-summary-card__label,
.admin-shell .admin-table__title,
.admin-shell .admin-toolbar__title { color: var(--af-navy); }
.public-shell .tender-card .meta,
.public-shell .stats-card span,
.customer-shell .note,
.admin-shell .admin-table__muted,
.admin-shell .admin-summary-card__hint { color: var(--af-muted); }
.public-shell .preview-hero {
  color: #f8fbff;
  background:
    radial-gradient(circle at top right, rgba(244,120,26,.14), transparent 22%),
    linear-gradient(135deg, var(--af-navy) 0%, #123b86 56%, #0f4c81 100%);
}
.public-shell .preview-hero p,
.public-shell .preview-hero .preview-meta__item span { color: rgba(248,251,255,.92); }
.public-shell .preview-hero .preview-meta__item,
.public-shell .preview-locked,
.public-shell .preview-card,
.public-shell .download-page,
.public-shell .download-note { background: rgba(255,255,255,.98); }
.public-shell .preview-meta__item,
.public-shell .preview-tag,
.public-shell .preview-metric,
.public-shell .meta-card,
.public-shell .download-note,
.public-shell .download-actions .download-cta,
.public-shell .download-page { border: 1px solid rgba(216,226,240,.96); }
.public-shell .preview-tag {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px; padding: 0 14px; border-radius: 999px;
  background: #fff8ea; border-color: rgba(244,120,26,.28); color: #8a4b0d; font-weight: 700;
}
.public-shell .preview-locked {
  background: radial-gradient(circle at top right, rgba(244,120,26,.10), transparent 24%), #fff;
}
.public-shell .preview-cta-row,
.public-shell .preview-actions,
.public-shell .download-actions,
.customer-shell .actions,
.admin-shell .admin-row-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.public-shell .download-page {
  display: grid; gap: 18px;
  padding: clamp(18px, 4vw, 40px);
  background:
    radial-gradient(circle at 100% 0%, rgba(244,120,26,.12), transparent 24%),
    linear-gradient(180deg, var(--af-navy) 0%, #0b2b63 42%, #fffaf3 42%, #ffffff 100%);
}
.public-shell .download-hero {
  text-align: center; justify-items: center;
  background: linear-gradient(180deg, rgba(7,20,43,.98), rgba(11,27,56,.98));
  color: #f6f9ff;
}
.public-shell .download-title { font-size: clamp(2.1rem, 6vw, 4.4rem); }
.public-shell .download-cta--primary {
  min-height: 72px; min-width: min(100%, 420px); font-size: 1.08rem;
}
.public-shell .download-cta--primary::before {
  content: ''; width: 22px; height: 22px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3a1 1 0 0 1 1 1v9.59l3.3-3.3a1 1 0 0 1 1.4 1.42l-5.01 5a1 1 0 0 1-1.38 0l-5.01-5a1 1 0 1 1 1.4-1.42l3.3 3.3V4a1 1 0 0 1 1-1Zm-7 16a1 1 0 0 0 0 2h14a1 1 0 0 0 0-2H5Z' fill='black'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3a1 1 0 0 1 1 1v9.59l3.3-3.3a1 1 0 0 1 1.4 1.42l-5.01 5a1 1 0 0 1-1.38 0l-5.01-5a1 1 0 1 1 1.4-1.42l3.3 3.3V4a1 1 0 0 1 1-1Zm-7 16a1 1 0 0 0 0 2h14a1 1 0 0 0 0-2H5Z' fill='black'/%3E%3C/svg%3E") center/contain no-repeat;
}
.public-shell .download-meta-grid { margin-top: 2px; }
.public-shell .meta-card { padding: 16px; }
.public-shell .meta-card strong { display: block; margin-bottom: 8px; color: var(--af-navy); }
.public-shell .meta-card__value { display: block; color: #10203a; overflow-wrap: anywhere; }
.public-shell .meta-card__value--mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .84rem; }
.public-shell .download-note--success { background: rgba(15,118,110,.10); border-color: rgba(15,118,110,.18); color: #0f766e; }
.public-shell .download-note--warning { background: rgba(244,120,26,.10); border-color: rgba(244,120,26,.18); color: #8a4b0d; }
.public-shell .featured-tenders article,
.public-shell .tender-card,
.public-shell .feature-card,
.public-shell .stats-card { display: grid; gap: 10px; }
.public-shell .hero-badges,
.public-shell .trust,
.public-shell .metric-pill,
.public-shell .preview-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.public-shell .hero-badges span,
.public-shell .trust span,
.public-shell .metric-pill,
.public-shell .preview-tag,
.customer-shell .status-pill,
.admin-shell .admin-badge { font-weight: 700; }
.public-shell .trust span,
.public-shell .metric-pill { padding: 9px 12px; border-radius: 999px; border: 1px solid var(--af-line); background: rgba(255,255,255,.96); }
.public-shell .metric-pill b { display: block; font-size: 18px; }
.public-shell .metric-pill span { display: block; color: var(--af-muted); font-size: 12px; }
.public-shell .preview-metrics,
.public-shell .download-meta-grid,
.customer-shell .details-grid,
.admin-shell .admin-summary-grid,
.admin-shell .metrics-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.public-shell .preview-note,
.public-shell .download-note,
.customer-shell .status-box,
.admin-shell .status-box {
  padding: 14px 16px; border-radius: 18px; line-height: 1.9;
}
.public-shell .preview-note,
.public-shell .download-note,
.customer-shell .status-box { border: 1px solid var(--af-line); background: rgba(247,250,255,.98); }
.public-shell .preview-cta--ghost,
.public-shell .download-cta--secondary,
.public-shell .preview-cta--ghost,
.customer-shell .link-button--ghost,
.admin-shell .logout-button {
  background: #eef2f7; color: #243044; border-color: #e2e8f0; box-shadow: none;
}
.public-shell .download-actions .download-cta,
.public-shell .preview-cta,
.public-shell .preview-cta--ghost,
.public-shell .download-cta,
.customer-shell .link-button,
.admin-shell .admin-action-button,
.admin-shell .admin-action-button--secondary,
.admin-shell .admin-action-button--danger,
.admin-shell .logout-button { width: auto; }
.public-shell .download-actions .download-cta { min-width: 0; }

/* Customer area */
.customer-shell .panel,
.customer-shell .auth-card,
.customer-shell .dashboard-card,
.customer-shell .detail-card {
  padding: clamp(20px, 4vw, 34px);
}
.customer-shell .auth-card,
.customer-shell .panel { background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,251,255,.98)); }
.customer-shell .auth-visual,
.customer-shell .auth-card,
.customer-shell .dashboard-hero { display: grid; gap: 14px; }
.customer-shell .auth-links,
.customer-shell .actions,
.customer-shell .customer-nav { margin-top: 16px; }
.customer-shell label { display: grid; gap: 8px; font-weight: 700; color: var(--af-navy); }
.customer-shell input,
.customer-shell textarea,
.customer-shell select,
.admin-shell input,
.admin-shell textarea,
.admin-shell select {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: var(--af-text);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}
.customer-shell textarea,
.admin-shell textarea { min-height: 120px; resize: vertical; }
.customer-shell .alert,
.admin-shell .alert,
.admin-shell .alert-box,
.admin-shell .status-box { border-radius: 16px; padding: 14px 16px; }
.customer-shell .alert,
.admin-shell .alert,
.admin-shell .alert-box { border: 1px solid rgba(244,120,26,.22); background: rgba(255,248,234,.98); color: #8a4b0d; }
.customer-shell .link-button { color: #fff; }
.customer-shell .link-button--primary,
.customer-shell .link-button--teal { color: #fff; }
.customer-shell .customer-nav .play-link,
.customer-shell .link-button.play-link { background: linear-gradient(135deg, var(--af-orange), #ff9f33); color: #2d1700; }
.customer-shell .dashboard-hero,
.customer-shell .detail-card,
.customer-shell .dashboard-card { background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,251,255,.98)); }
.customer-shell .dashboard-grid,
.customer-shell .details-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.customer-shell .dashboard-card,
.customer-shell .detail-card,
.customer-shell .status-box { border: 1px solid rgba(216,226,240,.96); border-radius: 20px; box-shadow: var(--af-shadow-md); }
.customer-shell .status-box.success { background: rgba(15,118,110,.08); color: #0f766e; }
.customer-shell .status-box.warning { background: rgba(244,120,26,.08); color: #8a4b0d; }
.customer-shell .status-box.danger { background: rgba(220,38,38,.08); color: #991b1b; }

/* Admin area */
.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  background:
    radial-gradient(circle at 12% -8%, rgba(79,70,229,.10), transparent 28%),
    radial-gradient(circle at 88% 0%, rgba(6,182,212,.10), transparent 18%),
    linear-gradient(180deg, #f8fbff 0%, #eef4ff 56%, #f5f8fc 100%);
}
.admin-shell .admin-sidebar {
  padding: 22px 18px;
  background: linear-gradient(180deg, rgba(7,20,43,.98), rgba(11,27,56,.98));
  color: #dbe5f5;
  box-shadow: 18px 0 40px rgba(8,26,58,.12);
  border-inline-end: 1px solid rgba(255,255,255,.06);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
}
.admin-shell .admin-main { min-width: 0; }
.admin-shell .admin-topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 16px 22px;
  border-bottom: 1px solid rgba(216,226,240,.82);
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(8,26,58,.04);
}
.admin-shell .admin-topbar p,
.admin-shell .page-header p,
.admin-shell .admin-toolbar__description,
.admin-shell .admin-table__muted { color: var(--af-muted); }
.admin-shell .admin-content { padding: 24px; display: grid; gap: 20px; align-content: start; }
.admin-shell .admin-panel,
.admin-shell .settings-card,
.admin-shell .report-card,
.admin-shell .admin-form-shell,
.admin-shell .admin-toolbar,
.admin-shell .page-header,
.admin-shell .section-head,
.admin-shell .dashboard-hero {
  padding: clamp(18px, 3vw, 28px);
}
.admin-shell .admin-panel,
.admin-shell .settings-card,
.admin-shell .report-card,
.admin-shell .admin-form-shell { border-radius: var(--af-radius-xl); }
.admin-shell .admin-toolbar__meta { display: grid; gap: 6px; }
.admin-shell .admin-summary-grid,
.admin-shell .metrics-grid,
.admin-shell .report-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.admin-shell .admin-summary-card,
.admin-shell .metric-card,
.admin-shell .report-card {
  padding: 18px 20px;
  border-radius: 20px;
  background: linear-gradient(180deg, #fff, #f8fbff);
  border: 1px solid rgba(216,226,240,.96);
  box-shadow: var(--af-shadow-md);
}
.admin-shell .admin-summary-card__label { margin: 0; color: var(--af-muted); font-size: .85rem; font-weight: 800; }
.admin-shell .admin-summary-card__value { margin: 6px 0 0; font-size: 1.7rem; font-weight: 900; color: var(--af-navy); }
.admin-shell .admin-summary-card__hint { margin: 0; color: var(--af-muted); font-size: .88rem; }
.admin-shell .admin-table-shell { overflow: hidden; border-radius: 20px; }
.admin-shell .admin-table-wrap { overflow-x: auto; }
.admin-shell .admin-table { width: 100%; border-collapse: collapse; min-width: 920px; }
.admin-shell .admin-table thead th {
  background: linear-gradient(180deg, #f8fbff, #eef4ff);
  color: #4b5563;
  text-align: right;
  padding: 14px 12px;
  font-size: .86rem;
  border-bottom: 1px solid rgba(216,226,240,.96);
  white-space: nowrap;
}
.admin-shell .admin-table tbody td {
  padding: 16px 12px;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: top;
}
.admin-shell .admin-row-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.admin-shell .admin-badge {
  display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 6px 10px;
  border-radius: 999px; background: #e2e8f0; color: #334155; font-size: .78rem;
}
.admin-shell .admin-badge--info { background: #dbeafe; color: #1d4ed8; }
.admin-shell .admin-badge--success { background: #dcfce7; color: #166534; }
.admin-shell .admin-badge--warning { background: #fef3c7; color: #92400e; }
.admin-shell .admin-badge--danger { background: #fee2e2; color: #991b1b; }
.admin-shell .admin-toolbar,
.admin-shell .page-header,
.admin-shell .section-head,
.admin-shell .hero-actions,
.admin-shell .table-toolbar,
.admin-shell .filters,
.admin-shell .segmented { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.admin-shell .page-header h1 { font-size: clamp(1.9rem, 4vw, 3rem); }
.admin-shell .field-stack,
.admin-shell .form-grid,
.admin-shell .admin-form-grid,
.admin-shell .settings-grid,
.admin-shell .timeline,
.admin-shell .summary-list { display: grid; gap: 14px; }
.admin-shell .form-grid,
.admin-shell .admin-form-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.admin-shell .logout-form { margin: 0; }
.admin-shell .logout-button { color: #991b1b; border: 1px solid rgba(220,38,38,.22); background: #fff5f5; }
.admin-shell .admin-hero-note,
.admin-shell .status-box,
.admin-shell .note-box { border-radius: 18px; padding: 14px 16px; border: 1px solid var(--af-line); background: rgba(255,255,255,.98); }
.admin-shell .status-box.success { background: rgba(15,118,110,.08); color: #0f766e; }
.admin-shell .status-box.warning { background: rgba(244,120,26,.08); color: #8a4b0d; }
.admin-shell .status-box.danger { background: rgba(220,38,38,.08); color: #991b1b; }
.admin-shell .mobile-only { display: none !important; }
.admin-shell .desktop-only { display: block; }

/* Tables and forms */
.public-shell table,
.customer-shell table,
.admin-shell table { width: 100%; border-collapse: collapse; }
.public-shell th,
.public-shell td,
.customer-shell th,
.customer-shell td,
.admin-shell th,
.admin-shell td { vertical-align: top; }
.public-shell .table-shell,
.admin-shell .table-shell,
.customer-shell .table-shell { overflow-x: auto; border-radius: 20px; border: 1px solid rgba(216,226,240,.96); background: #fff; box-shadow: var(--af-shadow-md); }
.public-shell .table-shell table,
.admin-shell .table-shell table,
.customer-shell .table-shell table { min-width: 860px; }
.public-shell .table-shell th,
.admin-shell .table-shell th,
.customer-shell .table-shell th {
  background: linear-gradient(180deg, #f8fbff, #eef4ff); color: #4b5563; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; font-weight: 900;
}
.public-shell .table-shell td,
.admin-shell .table-shell td,
.customer-shell .table-shell td { border-bottom: 1px solid #e5e7eb; }

@media (max-width: 1080px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-shell .admin-sidebar { position: relative; height: auto; }
  .admin-shell .admin-content { padding: 18px; }
  .admin-shell .admin-table { min-width: 760px; }
}
@media (max-width: 920px) {
  .public-shell .shell,
  .customer-shell .shell { width: min(100% - 20px, 1180px); }
  .public-shell .topbar,
  .customer-shell header,
  .admin-shell .admin-topbar { padding: 14px; }
  .public-shell .nav,
  .customer-shell .customer-nav { width: 100%; }
  .public-shell .nav a,
  .public-shell .nav button,
  .customer-shell .customer-nav a,
  .customer-shell .customer-nav button { flex: 1 1 auto; }
  .public-shell .preview-cta-row,
  .public-shell .preview-actions,
  .public-shell .download-actions,
  .customer-shell .actions,
  .admin-shell .admin-row-actions,
  .admin-shell .hero-actions { flex-direction: column; align-items: stretch; }
  .public-shell .download-actions .download-cta,
  .public-shell .preview-cta,
  .public-shell .preview-cta--ghost,
  .public-shell .download-cta,
  .customer-shell .link-button,
  .admin-shell .admin-action-button,
  .admin-shell .admin-action-button--secondary,
  .admin-shell .admin-action-button--danger,
  .admin-shell .logout-button { width: 100%; }
  .public-shell .hero-grid,
  .public-shell .cards-grid,
  .public-shell .preview-metrics,
  .public-shell .download-meta-grid,
  .customer-shell .dashboard-grid,
  .customer-shell .details-grid,
  .admin-shell .admin-summary-grid,
  .admin-shell .metrics-grid,
  .admin-shell .report-grid,
  .admin-shell .form-grid,
  .admin-shell .admin-form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .public-shell .download-page,
  .public-shell .shell-card,
  .public-shell .preview-card,
  .customer-shell .panel,
  .customer-shell .auth-card,
  .admin-shell .admin-panel,
  .admin-shell .settings-card,
  .admin-shell .report-card { padding: 18px; }
  .public-shell .preview-hero,
  .public-shell .download-hero,
  .customer-shell .dashboard-hero,
  .admin-shell .dashboard-hero { padding: 18px; }
  .public-shell .download-cta--primary { min-width: 100%; }
  .admin-shell .desktop-only { display: none !important; }
  .admin-shell .mobile-only { display: block !important; }
}
/* Strong overrides for legacy inline styles */
.public-shell .shell-card,
.public-shell .panel,
.public-shell .preview-card,
.public-shell .download-page,
.public-shell .download-hero,
.public-shell .preview-hero,
.public-shell .hero-card,
.public-shell .featured-card,
.public-shell .stats-card,
.public-shell .tender-card,
.public-shell .feature-card,
.customer-shell .panel,
.customer-shell .auth-card,
.customer-shell .dashboard-card,
.customer-shell .detail-card,
.admin-shell .admin-panel,
.admin-shell .admin-summary-card,
.admin-shell .metric-card,
.admin-shell .report-card,
.admin-shell .admin-table-shell,
.admin-shell .status-box,
.admin-shell .admin-toolbar,
.admin-shell .page-header,
.admin-shell .section-head,
.admin-shell .dashboard-hero {
  border-radius: var(--af-radius-xl) !important;
  border: 1px solid rgba(216,226,240,.96) !important;
  box-shadow: var(--af-shadow-lg) !important;
}
.public-shell .shell-card,
.public-shell .panel,
.public-shell .preview-card,
.public-shell .download-page,
.customer-shell .panel,
.customer-shell .auth-card,
.customer-shell .dashboard-card,
.customer-shell .detail-card,
.admin-shell .admin-panel,
.admin-shell .admin-summary-card,
.admin-shell .metric-card,
.admin-shell .report-card,
.admin-shell .admin-table-shell {
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,251,255,.98)) !important;
  padding: clamp(18px, 4vw, 34px) !important;
}
.public-shell .download-page,
.public-shell .preview-hero,
.public-shell .download-hero {
  background:
    radial-gradient(circle at 100% 0%, rgba(244,120,26,.12), transparent 24%),
    linear-gradient(180deg, var(--af-navy) 0%, #0b2b63 42%, #fffaf3 42%, #ffffff 100%) !important;
  color: #fff !important;
}
.public-shell .preview-hero h1,
.public-shell .download-hero h1,
.public-shell .preview-hero p,
.public-shell .download-hero p,
.public-shell .preview-hero span,
.public-shell .download-hero span { color: inherit !important; }
.public-shell .site-button,
.public-shell .button,
.public-shell .preview-cta,
.public-shell .download-cta,
.customer-shell .link-button,
.admin-shell .admin-action-button,
.admin-shell .admin-action-button--secondary,
.admin-shell .admin-action-button--danger,
.admin-shell .logout-button {
  min-height: 46px !important;
  border-radius: 999px !important;
}
.public-shell .download-cta--primary,
.public-shell .preview-cta,
.customer-shell .link-button--primary,
.admin-shell .admin-action-button {
  background: linear-gradient(135deg, var(--af-orange), #ff9f33) !important;
  color: #2d1700 !important;
}
.public-shell .download-cta--secondary,
.public-shell .preview-cta--ghost,
.customer-shell .link-button--ghost,
.admin-shell .admin-action-button--secondary,
.admin-shell .logout-button {
  background: #eef2f7 !important;
  color: #243044 !important;
  border-color: #e2e8f0 !important;
}
.public-shell .featured-tenders article,
.public-shell .cards-grid > *,
.public-shell .stats-grid > *,
.customer-shell .dashboard-grid > *,
.customer-shell .details-grid > *,
.admin-shell .admin-summary-grid > *,
.admin-shell .metrics-grid > *,
.admin-shell .report-grid > * {
  padding: 18px !important;
}
.public-shell .preview-note,
.public-shell .download-note,
.customer-shell .status-box,
.admin-shell .status-box,
.admin-shell .admin-hero-note,
.admin-shell .note-box {
  background: rgba(247,250,255,.98) !important;
  border: 1px solid var(--af-line) !important;
}
.admin-shell input,
.admin-shell textarea,
.admin-shell select,
.customer-shell input,
.customer-shell textarea,
.customer-shell select {
  background: #fff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 14px !important;
}
.public-shell .nav a,
.public-shell .nav button,
.customer-shell .customer-nav a,
.customer-shell .customer-nav button {
  border-radius: 999px !important;
}
@media (max-width: 920px) {
  .public-shell .preview-cta-row,
  .public-shell .preview-actions,
  .public-shell .download-actions,
  .customer-shell .actions,
  .admin-shell .admin-row-actions,
  .admin-shell .hero-actions { flex-direction: column !important; align-items: stretch !important; }
}
body.admin-page {
  background:
    radial-gradient(circle at 12% -8%, rgba(79,70,229,.10), transparent 28%),
    radial-gradient(circle at 88% 0%, rgba(6,182,212,.10), transparent 18%),
    linear-gradient(180deg, #f8fbff 0%, #eef4ff 56%, #f5f8fc 100%);
}
.auth-shell {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px 0;
  width: min(100%, 1180px);
  margin: 0 auto;
}
body.admin-page .auth-shell {
  width: min(100%, 520px);
}
.public-shell .topbar .nav {
  flex: 1 1 auto;
  justify-content: flex-end;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  position: static !important;
  height: auto !important;
  padding: 0 !important;
}
.public-shell .topbar .nav a,
.public-shell .topbar .nav button {
  background: rgba(255,255,255,.12) !important;
  border: 1px solid rgba(255,255,255,.16) !important;
  color: #fff !important;
  box-shadow: 0 12px 24px rgba(0,0,0,.10);
}
.public-shell .topbar .nav a.customer,
.public-shell .topbar .nav .customer {
  background: linear-gradient(135deg, #f4781a, #ff9f33) !important;
  color: #2f1700 !important;
  border-color: transparent !important;
}


.public-shell .topbar .nav a.is-current,
.public-shell .topbar .nav button.is-current {
  background: linear-gradient(135deg, #f4781a, #ff9f33) !important;
  color: #2f1700 !important;
  border-color: transparent !important;
  box-shadow: 0 14px 26px rgba(244,120,26,.24);
}
.public-shell .topbar .nav a,
.public-shell .topbar .nav button {
  background: rgba(255,255,255,.15) !important;
  border: 1px solid rgba(255,255,255,.18) !important;
  color: #fff !important;
  box-shadow: 0 12px 24px rgba(0,0,0,.10);
}


/* Shared public/customer footer */
.site-footer {
  margin-top: 18px;
  padding: 0 0 28px;
}
.site-footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 18px;
  border-radius: 24px;
  border: 1px solid rgba(216,226,240,.96);
  background: rgba(255,255,255,.94);
  box-shadow: var(--af-shadow-md);
}
.site-footer__brand {
  display: grid;
  gap: 4px;
  max-width: 48ch;
}
.site-footer__brand strong {
  font-size: 1.02rem;
  color: #081a3a;
  font-weight: 900;
}
.site-footer__brand span {
  color: var(--af-muted);
  line-height: 1.8;
}
.site-footer__links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}
.site-footer__links a {
  min-height: 40px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--af-line);
  background: #f8fbff;
  color: #1f2a44;
  font-weight: 800;
}
.site-footer__links a:hover {
  background: #fff;
}
@media (max-width: 720px) {
  .site-footer__inner {
    padding: 14px;
  }
  .site-footer__links a {
    flex: 1 1 calc(50% - 10px);
    justify-content: center;
  }
}
