/* ===========================
   AiOM — All in One for Maintenance — Main Stylesheet
   =========================== */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;900&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --brand:      #1A2E4A;
  --brand-mid:  #243f65;
  --orange:     #F5720A;
  --orange-lt:  #FEF0E6;
  --orange-mid: #FDDAB9;
  --light:      #F8F9FA;
  --muted:      #6B7280;
  --border:     #E5E7EB;
  --white:      #ffffff;
  --text:       #1A2E4A;
  --radius:     12px;
  --shadow:     0 2px 12px rgba(0,0,0,0.08);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Cairo', sans-serif;
  direction: rtl;
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

/* ---- BUTTONS ---- */
.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 15px;
  font-family: 'Cairo', sans-serif;
  cursor: pointer;
  border: none;
  transition: transform 0.15s, opacity 0.15s;
}
.btn:hover { transform: scale(1.02); }
.btn-orange  { background: var(--orange); color: #fff; }
.btn-outline { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,0.4); }
.btn-outline:hover { background: rgba(255,255,255,0.1); }
.btn-dark    { background: var(--brand); color: #fff; }
.btn-ghost   { background: transparent; color: var(--brand); border: 1.5px solid var(--border); }

/* ---- NAVBAR ---- */
.navbar {
  background: var(--brand);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 2px 16px rgba(0,0,0,0.15);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo-dot {
  width: 10px;
  height: 10px;
  background: var(--orange);
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.logo-abbr {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: #fff;
  line-height: 1;
}
.logo-abbr span,
.logo-abbr .i-letter { color: var(--orange); }
.logo-full {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,0.55);
  line-height: 1.3;
  max-width: 130px;
  display: block;
  border-right: 1.5px solid rgba(255,255,255,0.2);
  padding-right: 10px;
}
.footer-fullname {
  color: rgba(255,255,255,0.35);
  font-size: 12px;
  margin-top: 2px;
  font-weight: 400;
}
@media (max-width: 480px) {
  .logo-full { display: none; }
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.nav-links a {
  color: rgba(255,255,255,0.8);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: #fff; }
.nav-cta {
  background: var(--orange) !important;
  color: #fff !important;
  padding: 8px 18px;
  border-radius: 8px;
  font-weight: 700 !important;
}
.hamburger {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}
.mobile-menu {
  display: none;
  flex-direction: column;
  background: var(--brand-mid);
  padding: 1rem 1.5rem;
}
.mobile-menu a {
  color: rgba(255,255,255,0.85);
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  font-size: 15px;
}
.mobile-menu.open { display: flex; }

/* ---- HERO ---- */
.hero {
  background: var(--brand);
  padding: 5rem 1.5rem 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  min-height: 520px;
  overflow: hidden;
  position: relative;
}
.hero::before {
  content: '';
  position: absolute;
  top: -100px; left: -100px;
  width: 400px; height: 400px;
  background: var(--orange);
  opacity: 0.06;
  border-radius: 50%;
}
.hero-content { max-width: 560px; position: relative; }
.badge {
  display: inline-block;
  background: rgba(245,114,10,0.15);
  color: var(--orange);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(245,114,10,0.3);
}
.hero h1 {
  color: #fff;
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 900;
  line-height: 1.3;
  margin-bottom: 1.2rem;
}
.hero h1 .highlight { color: var(--orange); }
.hero p {
  color: rgba(255,255,255,0.7);
  font-size: 16px;
  margin-bottom: 2.5rem;
  line-height: 1.9;
}
.hero-btns { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-visual { position: relative; flex-shrink: 0; }
.floating-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.fcard {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  padding: 16px 20px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  backdrop-filter: blur(4px);
  animation: float 4s ease-in-out infinite;
}
.fc1 { animation-delay: 0s; }
.fc2 { animation-delay: 0.7s; }
.fc3 { animation-delay: 1.4s; }
.fc4 { animation-delay: 2.1s; }
@keyframes float {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

/* ---- STATS ---- */
.stats-bar {
  background: var(--orange);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  padding: 1rem 0;
}
.stat {
  text-align: center;
  padding: 0.8rem 2.5rem;
  color: #fff;
  border-left: 1px solid rgba(255,255,255,0.3);
}
.stat:last-child { border-left: none; }
.stat-n { font-size: 26px; font-weight: 900; display: block; }
.stat-l { font-size: 13px; opacity: 0.85; }

/* ---- SECTIONS ---- */
.section { padding: 5rem 0; }
.section-gray { background: var(--light); }

.section-head {
  text-align: center;
  margin-bottom: 3rem;
}
.eyebrow {
  display: block;
  color: var(--orange);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.section-head h2 {
  font-size: clamp(22px, 3.5vw, 32px);
  font-weight: 800;
  margin-bottom: 0.5rem;
}
.section-head p { color: var(--muted); font-size: 15px; }

/* ---- STEPS ---- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}
.step-card {
  background: var(--light);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  text-align: center;
}
.step-num {
  width: 48px;
  height: 48px;
  background: var(--brand);
  color: #fff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 900;
  margin: 0 auto 1rem;
}
.step-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 0.5rem; color: var(--brand); }
.step-card p  { font-size: 13px; color: var(--muted); line-height: 1.7; }

/* ---- SERVICES ---- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
}
.service-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  display: block;
}
.service-card:hover {
  border-color: var(--orange);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.s-icon  { font-size: 28px; display: block; margin-bottom: 0.75rem; }
.s-name  { font-size: 14px; font-weight: 700; color: var(--brand); margin-bottom: 4px; }
.s-count { font-size: 12px; color: var(--muted); }

/* ---- PATHS ---- */
.paths-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
.path-card {
  border-radius: 20px;
  padding: 2.5rem;
}
.path-dark { background: var(--brand); color: #fff; }
.path-light { background: var(--orange-lt); color: var(--brand); border: 1px solid var(--orange-mid); }
.path-icon { font-size: 40px; display: block; margin-bottom: 1rem; }
.path-card h3 { font-size: 22px; font-weight: 800; margin-bottom: 0.75rem; }
.path-card p  { font-size: 14px; line-height: 1.8; margin-bottom: 1.5rem; opacity: 0.85; }
.path-card ul { list-style: none; margin-bottom: 2rem; }
.path-card ul li {
  font-size: 13px;
  padding: 6px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.chk {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
}
.chk-white  { background: rgba(255,255,255,0.2); color: #fff; }
.chk-orange { background: var(--orange); color: #fff; }

/* ---- FORMS ---- */
.form-page { min-height: 100vh; display: flex; flex-direction: column; }
.form-hero {
  background: var(--brand);
  padding: 3rem 1.5rem 2rem;
  text-align: center;
  color: #fff;
}
.form-hero h1 { font-size: 28px; font-weight: 800; margin-bottom: 0.5rem; }
.form-hero p   { color: rgba(255,255,255,0.65); font-size: 15px; }

.form-body { flex: 1; padding: 3rem 1.5rem; }
.form-card {
  max-width: 720px;
  margin: 0 auto;
  background: var(--white);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 4px 30px rgba(0,0,0,0.08);
  border: 1px solid var(--border);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-full  { grid-column: 1 / -1; }
.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
}
.form-group input,
.form-group select,
.form-group textarea {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  font-family: 'Cairo', sans-serif;
  color: var(--text);
  background: var(--white);
  transition: border 0.2s;
  direction: rtl;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(245,114,10,0.1);
}
.form-group textarea { resize: vertical; min-height: 100px; }

.form-submit {
  width: 100%;
  margin-top: 1.5rem;
  padding: 15px;
  background: var(--orange);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  font-family: 'Cairo', sans-serif;
  transition: transform 0.15s;
}
.form-submit:hover { transform: scale(1.01); }

.form-note {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  margin-top: 1rem;
}

/* ---- ALERT / SUCCESS ---- */
.alert {
  padding: 1rem 1.25rem;
  border-radius: 10px;
  margin-bottom: 1.5rem;
  font-size: 14px;
  font-weight: 600;
  display: none;
}
.alert-success { background: #D1FAE5; color: #065F46; border: 1px solid #6EE7B7; }
.alert-error   { background: #FEE2E2; color: #991B1B; border: 1px solid #FCA5A5; }

/* ---- ADMIN ---- */
.admin-layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 240px;
  background: var(--brand);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 0;
  flex-shrink: 0;
}
.sidebar-logo {
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  padding: 0 1.5rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 1rem;
}
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,0.7);
  padding: 12px 1.5rem;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}
.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: rgba(255,255,255,0.08);
  color: #fff;
}
.sidebar-nav a.active { border-right: 3px solid var(--orange); }
.sidebar-nav span { font-size: 16px; }

.main-content { flex: 1; background: var(--light); overflow: auto; }
.topbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topbar h2 { font-size: 18px; font-weight: 700; }
.admin-body { padding: 2rem; }

.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; margin-bottom: 2.5rem; }
.metric-card {
  background: var(--white);
  border-radius: 14px;
  padding: 1.5rem;
  border: 1px solid var(--border);
}
.metric-label { font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.metric-val   { font-size: 28px; font-weight: 900; color: var(--brand); }
.metric-sub   { font-size: 12px; color: var(--muted); margin-top: 4px; }
.metric-orange .metric-val { color: var(--orange); }

.table-card {
  background: var(--white);
  border-radius: 14px;
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 2rem;
}
.table-head {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.table-head h3 { font-size: 16px; font-weight: 700; }
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
table th {
  background: var(--light);
  padding: 12px 16px;
  text-align: right;
  font-weight: 600;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
table td {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  vertical-align: middle;
}
.badge-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}
.badge-new      { background: #DBEAFE; color: #1D4ED8; }
.badge-active   { background: #D1FAE5; color: #065F46; }
.badge-pending  { background: #FEF3C7; color: #92400E; }
.badge-done     { background: #F3F4F6; color: #374151; }
.badge-rejected { background: #FEE2E2; color: #991B1B; }

.action-btns { display: flex; gap: 6px; }
.btn-sm {
  padding: 5px 12px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: 'Cairo', sans-serif;
}
.btn-approve  { background: #D1FAE5; color: #065F46; }
.btn-reject   { background: #FEE2E2; color: #991B1B; }
.btn-view     { background: var(--light); color: var(--brand); border: 1px solid var(--border); }

/* ---- FOOTER ---- */
.footer { background: #111827; padding: 3.5rem 0 0; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}
.footer-logo { color: #fff; font-size: 20px; font-weight: 900; margin-bottom: 0.75rem; }
.footer-brand p { color: rgba(255,255,255,0.45); font-size: 13px; line-height: 1.7; }
.footer-links h4,
.footer-contact h4 { color: #fff; font-size: 14px; font-weight: 700; margin-bottom: 1rem; }
.footer-links a {
  display: block;
  color: rgba(255,255,255,0.5);
  font-size: 13px;
  margin-bottom: 8px;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--orange); }
.footer-contact p { color: rgba(255,255,255,0.5); font-size: 13px; margin-bottom: 8px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 1.5rem 0;
  text-align: center;
}
.footer-bottom p { color: rgba(255,255,255,0.3); font-size: 13px; }

/* ---- TOAST ---- */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: #10B981;
  color: #fff;
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  font-family: 'Cairo', sans-serif;
  z-index: 9999;
  display: none;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  white-space: nowrap;
}
.toast.show { display: block; animation: slideUp 0.3s ease; }
@keyframes slideUp {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
  .hero { flex-direction: column; text-align: center; padding: 3rem 1.5rem; }
  .hero-btns { justify-content: center; }
  .hero-visual { display: none; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .admin-layout { flex-direction: column; }
  .sidebar { width: 100%; flex-direction: row; flex-wrap: wrap; padding: 0.5rem; }
  .sidebar-logo { padding: 0.5rem 1rem; border: none; margin: 0; }
  .sidebar-nav { display: flex; flex-wrap: wrap; }
  .sidebar-nav a { padding: 8px 12px; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .hamburger { display: block; }
  .paths-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .stat { padding: 0.6rem 1.2rem; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---- Phone Input with Prefix ---- */
.phone-input-wrap {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.phone-prefix {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 0 12px;
  font-size: 14px;
  font-family: 'Cairo', sans-serif;
  background: var(--white);
  color: var(--text);
  cursor: pointer;
  transition: border 0.2s;
  min-width: 100px;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 10px center;
  padding-left: 28px;
}
.phone-prefix:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(245,114,10,0.1);
}
.phone-input-wrap input {
  flex: 1;
}

/* ---- City Select ---- */
.city-select {
  width: 100%;
}
