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

:root {
  --bg: #F7F5EF;
  --navy: #142B36;
  --navy-soft: #1E3A47;
  --emerald-banner: #062C32;
  --surface: #FFFFFF;
  --surface-muted: #F1EEE6;
  --brass: #A68B5B;
  --brass-soft: #EFE8DA;
  --gold-startup: #C9962E;
  --muted: #667078;
  --divider: #E4E0D8;
  --success: #3F6B4A;
  --success-soft: #E3EDE4;
  --warning: #B5822E;
  --warning-soft: #F6EBD6;
  --danger: #9B3B3B;
  --danger-soft: #F3E1E1;
  --text: #142B36;
  --on-navy: #FFFFFF;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --shadow-card: 0 4px 12px rgba(20, 43, 54, 0.06);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'IBM Plex Sans Arabic', 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 24px;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font-family: inherit;
}

/* ===== Mulk-style Rising Build Startup Animation ===== */
.startup-overlay {
  position: fixed;
  inset: 0;
  background: #FFFFFF;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
.startup-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
}
.startup-center {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: -40px;
}
.startup-glow {
  position: absolute;
  top: calc(74px - 120px);
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(231, 182, 75, 0.28) 0%, rgba(231, 182, 75, 0) 70%);
  opacity: 0;
  transform: scale(0.8);
  animation: startupGlow 0.8s cubic-bezier(0.22, 1, 0.36, 1) 1.1s forwards;
}
.startup-logo-box {
  position: relative;
  width: 148px;
  height: 148px;
}
.startup-reveal {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  height: 0;
}
.startup-reveal.sil {
  animation: startupRiseSil 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards,
             startupFadeSil 0.52s cubic-bezier(0.22, 1, 0.36, 1) 0.7s forwards;
}
.startup-reveal.col {
  animation: startupRiseCol 0.52s cubic-bezier(0.22, 1, 0.36, 1) 0.7s forwards;
}
.startup-reveal img {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 148px;
  height: 148px;
  object-fit: contain;
}
.startup-ground {
  margin-top: 10px;
  width: 156px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--gold-startup);
  transform: scaleX(0);
  animation: startupGround 0.32s cubic-bezier(0.22, 1, 0.36, 1) 0s forwards;
}
.startup-name {
  margin-top: 28px;
  font-size: 40px;
  line-height: 54px;
  font-weight: 700;
  color: #07282E;
  opacity: 0;
  transform: translateY(14px);
  animation: startupName 0.42s cubic-bezier(0.22, 1, 0.36, 1) 1.2s forwards;
}
@keyframes startupGround {
  to { transform: scaleX(1); }
}
@keyframes startupRiseSil {
  to { height: 148px; }
}
@keyframes startupFadeSil {
  to { opacity: 0.1; }
}
@keyframes startupRiseCol {
  to { height: 148px; }
}
@keyframes startupGlow {
  0% { opacity: 0; transform: scale(0.8); }
  38% { opacity: 0.95; transform: scale(1.1); }
  100% { opacity: 0; transform: scale(1.12); }
}
@keyframes startupName {
  to { opacity: 1; transform: translateY(0); }
}

/* ===== App Shell & Container ===== */
.app-shell {
  max-width: 680px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 16px 16px 104px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.app-shell.with-sticky-footer {
  padding-bottom: 164px;
}

/* ===== Top Header Row ===== */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 4px;
}
.brand-lockup {
  font-size: 26px;
  line-height: 34px;
  font-weight: 700;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.icon-btn {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--navy);
  transition: background 0.15s;
}
.icon-btn:hover {
  background: rgba(20, 43, 54, 0.05);
}
.badge-dot {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 9px;
  height: 9px;
  border-radius: 5px;
  background: var(--brass);
  border: 1.5px solid var(--bg);
}

/* ===== Screen Header (Back + Title + Right Action) ===== */
.screen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  gap: 12px;
}
.screen-header-title {
  font-size: 20px;
  line-height: 30px;
  font-weight: 700;
  color: var(--navy);
  flex: 1;
}

/* ===== Typography Variants ===== */
.t-display { font-size: 32px; line-height: 44px; font-weight: 700; }
.t-h1 { font-size: 26px; line-height: 36px; font-weight: 700; color: var(--text); }
.t-h2 { font-size: 20px; line-height: 30px; font-weight: 700; color: var(--text); }
.t-h3 { font-size: 17px; line-height: 26px; font-weight: 700; color: var(--text); }
.t-body { font-size: 15px; line-height: 24px; color: var(--text); }
.t-small { font-size: 13px; line-height: 20px; color: var(--muted); }
.t-caption { font-size: 12px; line-height: 18px; color: var(--muted); }
.t-numeral { font-size: 28px; line-height: 36px; font-weight: 700; color: var(--text); }

/* ===== Segmented Control ===== */
.segmented {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius-md);
  padding: 4px;
  gap: 4px;
}
.seg-item {
  flex: 1;
  min-height: 44px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--navy);
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.seg-item.active {
  background: var(--brass);
  color: var(--on-navy);
}

/* ===== Search Box ===== */
.search-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.search-box {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius-md);
  padding: 0 16px;
  min-height: 54px;
  gap: 10px;
}
.search-box input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 15px;
  color: var(--text);
  padding: 12px 0;
}
.search-box input::placeholder {
  color: var(--muted);
}
.search-submit {
  border: none;
  background: transparent;
  color: var(--navy);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}
.filter-btn {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--navy);
  color: var(--on-navy);
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

/* ===== Hero Banner (Dark Emerald #062C32) ===== */
.hero-banner {
  background: var(--emerald-banner);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(218, 187, 125, 0.22);
  overflow: hidden;
  display: flex;
  min-height: 190px;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.hero-banner:hover {
  transform: translateY(-1px);
}
.hero-banner-text {
  flex: 1.15;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}
.hero-banner-title {
  font-size: 26px;
  line-height: 36px;
  font-weight: 700;
  color: var(--on-navy);
  white-space: pre-line;
}
.hero-banner-cta {
  align-self: flex-start;
  background: var(--brass);
  color: var(--on-navy);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hero-banner-art {
  flex: 0.85;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: rgba(218, 187, 125, 0.06);
}
.hero-banner-art img {
  width: 136px;
  height: 136px;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.28));
}

/* ===== Section Title ===== */
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* ===== Cards & Company Card ===== */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--divider);
  padding: 16px;
  box-shadow: var(--shadow-card);
}
.company-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.company-card {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--divider);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.company-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(20, 43, 54, 0.09);
}
.company-card-link {
  display: block;
  cursor: pointer;
}
.company-cover {
  position: relative;
  width: 100%;
  height: 180px;
  background: var(--surface-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.company-cover.compact {
  height: 128px;
}
.company-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.demo-tag {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(20, 43, 54, 0.78);
  color: var(--on-navy);
  font-size: 12px;
  line-height: 18px;
  padding: 3px 8px;
  border-radius: 6px;
}
.save-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--navy);
  z-index: 2;
  box-shadow: 0 2px 6px rgba(20, 43, 54, 0.12);
}
.company-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.company-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.company-logo {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--divider);
  object-fit: contain;
  flex-shrink: 0;
}
.company-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
}
.company-price {
  font-size: 17px;
  line-height: 26px;
  font-weight: 700;
  color: var(--brass);
}

/* ===== Chips ===== */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 20px;
  font-weight: 500;
  border: 1px solid transparent;
  background: var(--surface-muted);
  color: var(--navy);
}
.chip.clickable {
  cursor: pointer;
}
.chip.selected {
  background: var(--navy);
  color: var(--on-navy);
  border-color: var(--navy);
}
.chip.tone-brass {
  background: var(--brass-soft);
  color: var(--brass);
}
.chip.tone-success {
  background: var(--success-soft);
  color: var(--success);
}
.chip.tone-warning {
  background: var(--warning-soft);
  color: var(--warning);
}

/* ===== Buttons ===== */
.btn {
  min-height: 52px;
  border-radius: var(--radius-md);
  padding: 0 16px;
  font-size: 15px;
  font-weight: 600;
  border: 1.5px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: opacity 0.15s;
  width: 100%;
}
.btn:hover { opacity: 0.92; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary {
  background: var(--navy);
  color: var(--on-navy);
}
.btn-secondary {
  background: var(--surface);
  color: var(--navy);
  border-color: var(--brass);
}
.btn-brass {
  background: var(--brass);
  color: var(--on-navy);
}
.btn-danger {
  background: var(--danger);
  color: #FFFFFF;
}

/* ===== How It Works Step Icon ===== */
.how-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.step-icon {
  width: 32px;
  height: 32px;
  border-radius: 16px;
  background: var(--brass-soft);
  color: var(--brass);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ===== Inputs & Fields ===== */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.input-label {
  font-size: 13px;
  line-height: 20px;
  font-weight: 500;
  color: var(--muted);
}
.input-control {
  min-height: 50px;
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  font-size: 15px;
  color: var(--text);
  width: 100%;
  outline: none;
}
.input-control:focus {
  border-color: var(--brass);
}
.field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  gap: 12px;
}
.divider {
  height: 1px;
  background: var(--divider);
  width: 100%;
}

/* ===== Company Profile Tabs & Lock Box ===== */
.detail-cover {
  position: relative;
  width: 100%;
  height: 220px;
  border-radius: var(--radius-lg);
  background: var(--surface-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.detail-tabs {
  display: flex;
  border-bottom: 1px solid var(--divider);
  gap: 8px;
}
.detail-tab {
  flex: 1;
  padding: 12px 8px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}
.detail-tab.active {
  background: var(--brass);
  color: var(--on-navy);
}
.lock-box {
  background: var(--brass-soft);
  padding: 12px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ===== Sticky Action Footer (Company Details) ===== */
.sticky-action-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 68px;
  background: var(--bg);
  border-top: 1px solid var(--divider);
  padding: 12px 16px;
  z-index: 90;
}
.sticky-action-inner {
  max-width: 650px;
  margin: 0 auto;
  display: flex;
  gap: 12px;
}

/* ===== Bottom Navigation Tab Bar (Mobile App Identical) ===== */
.bottom-tabs {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 68px;
  background: var(--surface);
  border-top: 1px solid var(--divider);
  z-index: 100;
  display: flex;
  justify-content: center;
}
.bottom-tabs-inner {
  width: 100%;
  max-width: 680px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 6px 8px;
}
.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--navy);
  font-size: 11px;
  font-weight: 500;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 4px 0;
}
.tab-item.active {
  color: var(--brass);
  font-weight: 600;
}

/* ===== Account Row Items ===== */
.row-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--text);
  text-align: inherit;
}
.row-item-start {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 500;
}
.row-item-end {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

/* ===== Modal / Sheet (Filters & Auth) ===== */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 43, 54, 0.45);
  z-index: 500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet-panel {
  background: var(--bg);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  border-radius: 18px 18px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sheet-body {
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.sheet-footer {
  padding: 16px;
  border-top: 1px solid var(--divider);
  background: var(--bg);
  display: flex;
  gap: 12px;
}
.chip-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.scroll-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.scroll-chips::-webkit-scrollbar {
  display: none;
}
