/* SADU Homes - Sahm Al Aqaria inspired theme */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #f9f7f4;
  --text: #1f2933;
  --muted: #4b5563;
  --primary-dark: #0f0c29;
  --primary: #d69464;
  --primary-light: #e8b899;
  --accent: #0f0c29;
  --accent-strong: #0a0820;
  --card: #ffffff;
  --border: #e5e7eb;
  --shadow: 0 10px 40px rgba(0,0,0,0.08);
}

body {
  font-family: 'Cairo', 'Tajawal', 'Segoe UI', 'Arial', sans-serif;
  background: var(--bg);
  color: var(--text);
  direction: rtl;
  line-height: 1.65;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--accent-strong); }

/* Header Navigation */
.site-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  max-width: 1380px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.site-logo {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
}

.main-nav {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.nav-link {
  color: #fff;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  transition: all 0.25s ease;
}

.nav-link:hover { background: rgba(255,255,255,0.12); }
.nav-link.active { background: rgba(255,255,255,0.22); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.14); }

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  padding: 12px 26px;
  border-radius: 10px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 12px 24px rgba(200,162,75,0.25);
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(200,162,75,0.3); color:#fff; }

.btn-secondary {
  background: #0f3a36;
  color: #fff;
  padding: 12px 20px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover { background: #0b2a2f; }

.btn-danger {
  background: #c0392b;
  color: #fff;
  padding: 10px 18px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
}

/* Container */
.container {
  max-width: 1380px;
  margin: 0 auto;
  padding: 32px 24px;
}

/* Hero */
.hero {
  background: radial-gradient(circle at 20% 20%, rgba(200,162,75,0.14), transparent 35%),
              radial-gradient(circle at 80% 0%, rgba(29,90,82,0.18), transparent 35%),
              linear-gradient(135deg, var(--primary-dark), var(--primary-light));
  color: #fff;
  padding: 90px 28px;
  border-radius: 16px;
  margin-bottom: 44px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  pointer-events: none;
}

.hero h1 {
  font-size: 42px;
  margin-bottom: 14px;
  font-weight: 800;
}

.hero p { font-size: 18px; opacity: 0.92; max-width: 680px; margin: 0 auto 26px; }

/* Project Cards */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
}

.project-card {
  background: var(--card);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.project-card:hover { transform: translateY(-4px); box-shadow: 0 14px 40px rgba(0,0,0,0.12); }

.project-card-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  padding: 22px;
}

.project-card h3 { font-size: 22px; margin-bottom: 6px; font-weight: 800; }
.project-date { font-size: 13px; opacity: 0.9; }

.project-card-body { padding: 20px; }

.project-stats { display: flex; gap: 18px; justify-content: space-between; margin-bottom: 12px; }
.stat { text-align: center; flex: 1; }
.stat-value { font-size: 24px; font-weight: 800; color: var(--primary); display: block; }
.stat-label { font-size: 13px; color: var(--muted); }

.project-actions { display: flex; gap: 10px; margin-top: 16px; }
.project-actions a { flex: 1; text-align: center; }

/* Data Tables */
.data-table-wrapper { background: var(--card); border-radius: 14px; padding: 22px; box-shadow: var(--shadow); border: 1px solid var(--border); }

.table-title { font-size: 22px; color: var(--primary-dark); font-weight: 800; margin-bottom: 14px; }

.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table thead th {
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 13px 14px;
  text-align: right;
  border: 1px solid var(--primary-dark);
  font-weight: 700;
}

.data-table tbody td {
  padding: 12px 14px;
  border: 1px solid #d8dee6;
  background: #fff;
}

.data-table tbody tr:hover { background: #f8f7f2; }

/* Status colors */
.status-available { background: #d9f3e6 !important; color: #0f5132; font-weight: 700; }
.status-reserved { background: #fff1c6 !important; color: #8a5a00; font-weight: 700; }
.status-sold { background: #fde2e1 !important; color: #9b1c1c; font-weight: 700; }

/* Floor section */
.floor-section { margin-bottom: 32px; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border); }
.floor-header { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; padding: 16px 18px; font-weight: 800; display: flex; justify-content: space-between; align-items: center; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-group label { font-weight: 700; color: var(--text); margin-bottom: 6px; display: block; }
input, select, textarea { width: 100%; padding: 12px 14px; border: 1px solid #d8dee6; border-radius: 10px; font-size: 15px; background: #fff; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(200,162,75,0.25); }
input[type="file"] { padding: 10px; }

/* Dashboard */
.dashboard-card { background: var(--card); padding: 24px; border-radius: 14px; box-shadow: var(--shadow); border: 1px solid var(--border); margin-bottom: 24px; }
.dashboard-card h2 { color: var(--primary-dark); font-size: 20px; margin-bottom: 16px; font-weight: 800; }

/* Alerts */
.alert { padding: 14px 16px; border-radius: 10px; margin: 12px 0; font-weight: 700; }
.alert-success { background: #d9f3e6; color: #0f5132; border: 1px solid #b7e4cd; }
.alert-error { background: #fde2e1; color: #9b1c1c; border: 1px solid #f4c7c7; }
.alert-info { background: #e8eef7; color: #0b2a2f; border: 1px solid #cfd8e6; }

/* Footer */
.site-footer { background: #0b2a2f; color: #cbd5e1; padding: 30px 20px; text-align: center; margin-top: 60px; }
.site-footer p { margin: 8px 0; }

/* Login */
.login-container { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--primary-dark), var(--primary)); padding: 24px; }
.login-box { background: #fff; padding: 40px; border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,0.25); width: 100%; max-width: 440px; border: 1px solid #d8dee6; }
.login-header h1 { color: var(--primary-dark); margin-bottom: 8px; font-weight: 800; }
.login-header p { color: var(--muted); margin-bottom: 22px; }

/* Responsive */
@media (max-width: 992px) {
  .projects-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
  .hero { padding: 70px 22px; }
}

@media (max-width: 768px) {
  .header-container { flex-direction: column; align-items: flex-start; }
  .main-nav { width: 100%; }
  .hero h1 { font-size: 32px; }
  .projects-grid { grid-template-columns: 1fr; }
  .project-stats { flex-direction: column; align-items: stretch; }
}
