/* ===========================
   BuildWise — Main Stylesheet
   =========================== */

:root {
  --bg: #0d0f14;
  --bg2: #131720;
  --bg3: #1a1f2e;
  --accent: #c8a96e;
  --accent2: #e8c98a;
  --text: #e8e9ed;
  --text2: #8b90a0;
  --border: rgba(200,169,110,0.15);
  --card: rgba(255,255,255,0.03);
  --radius: 16px;
  --danger: #ff5050;
  --success: #50c878;
  --warning: #ffb43c;
  --info: #508cff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Manrope', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

/* NOISE TEXTURE */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

/* =====================
   NAVIGATION
   ===================== */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 20px 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(13,15,20,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s;
}

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  color: var(--accent);
  letter-spacing: 1px;
  text-decoration: none;
}
.logo span { color: var(--text); font-style: italic; }

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}
.nav-links a {
  color: var(--text2);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent); }

.nav-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* =====================
   BUTTONS
   ===================== */
.btn {
  padding: 10px 24px;
  border-radius: 8px;
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text2);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #0d0f14;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(200,169,110,0.3); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-lg { padding: 16px 36px; font-size: 16px; border-radius: 12px; }

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--accent);
  color: var(--accent);
}
.btn-outline:hover { background: rgba(200,169,110,0.1); }

.btn-danger {
  background: transparent;
  border: 1px solid rgba(255,80,80,0.3);
  color: var(--danger);
}
.btn-danger:hover { background: rgba(255,80,80,0.1); }

/* =====================
   HERO
   ===================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 60px 80px;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 70% 50%, rgba(200,169,110,0.07) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 20% 80%, rgba(100,120,200,0.05) 0%, transparent 60%);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(200,169,110,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200,169,110,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at 60% 50%, black 20%, transparent 70%);
}

.hero-content {
  position: relative;
  max-width: 680px;
  animation: fadeInUp 0.8s ease both;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(200,169,110,0.1);
  border: 1px solid rgba(200,169,110,0.2);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 28px;
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(42px, 5vw, 72px);
  line-height: 1.1;
  margin-bottom: 24px;
}
.hero h1 em { font-style: italic; color: var(--accent); }

.hero > .hero-content > p {
  font-size: 18px;
  color: var(--text2);
  line-height: 1.7;
  margin-bottom: 40px;
  max-width: 520px;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-stats {
  position: absolute;
  right: 60px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 24px;
  animation: fadeInUp 0.8s 0.3s ease both;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 32px;
  backdrop-filter: blur(10px);
  min-width: 200px;
  animation: floatCard 4s ease-in-out infinite;
}
.stat-card:nth-child(2) { animation-delay: 1.5s; margin-left: 24px; }
.stat-card:nth-child(3) { animation-delay: 0.8s; }

.stat-num {
  font-family: 'Playfair Display', serif;
  font-size: 40px;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 4px;
}
.stat-label { font-size: 13px; color: var(--text2); }

/* =====================
   SECTIONS
   ===================== */
section { padding: 100px 60px; position: relative; }

.section-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.15;
  margin-bottom: 16px;
}
.section-sub {
  font-size: 17px;
  color: var(--text2);
  line-height: 1.7;
  max-width: 560px;
  margin-bottom: 60px;
}

/* =====================
   SERVICES
   ===================== */
.services { background: var(--bg2); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s;
}
.service-card:hover { border-color: rgba(200,169,110,0.3); transform: translateY(-4px); }
.service-card:hover::before { transform: scaleX(1); }

.service-icon {
  width: 52px; height: 52px;
  background: rgba(200,169,110,0.1);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  margin-bottom: 20px;
}
.service-card h3 { font-size: 20px; font-weight: 700; margin-bottom: 12px; }
.service-card p { color: var(--text2); font-size: 15px; line-height: 1.65; }

/* =====================
   PRICING
   ===================== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.price-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}
.price-card.featured {
  background: linear-gradient(135deg, rgba(200,169,110,0.12), rgba(200,169,110,0.04));
  border-color: rgba(200,169,110,0.35);
  transform: scale(1.03);
}

.price-badge {
  display: inline-block;
  padding: 4px 12px;
  background: var(--accent);
  color: #0d0f14;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 20px;
  width: fit-content;
}
.price-name { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.price-desc { color: var(--text2); font-size: 14px; line-height: 1.6; margin-bottom: 28px; flex: 1; }
.price-amount { font-family: 'Playfair Display', serif; font-size: 42px; color: var(--accent); margin-bottom: 4px; }
.price-currency { font-size: 14px; color: var(--text2); margin-bottom: 28px; }
.price-card .btn { width: 100%; }

/* =====================
   WHY US
   ===================== */
.why { background: var(--bg2); }

.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }

.why-item { display: flex; gap: 20px; }
.why-num {
  font-family: 'Playfair Display', serif;
  font-size: 48px;
  color: rgba(200,169,110,0.2);
  line-height: 1;
  min-width: 50px;
}
.why-item h4 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.why-item p { color: var(--text2); font-size: 14px; line-height: 1.65; }

/* =====================
   ORDER / CONTACT
   ===================== */
.order-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.contact-items { margin-top: 40px; display: flex; flex-direction: column; gap: 16px; }
.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.contact-icon {
  width: 40px; height: 40px;
  background: rgba(200,169,110,0.1);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.contact-label { font-size: 12px; color: var(--text2); margin-bottom: 2px; }
.contact-val { font-size: 15px; font-weight: 600; color: var(--text); text-decoration: none; }
.contact-val:hover { color: var(--accent); }

/* =====================
   FORMS
   ===================== */
.form-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px;
}
.form-card h3 { font-size: 22px; font-weight: 700; margin-bottom: 28px; display: flex; align-items: center; gap: 10px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 8px;
  letter-spacing: 0.3px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  color: var(--text);
  font-family: 'Manrope', sans-serif;
  font-size: 15px;
  outline: none;
  transition: all 0.2s;
  -webkit-appearance: none;
  appearance: none;
}
.form-group select {
  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='%238b90a0' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-color: rgba(255,255,255,0.04);
  padding-right: 40px;
  cursor: pointer;
}
.form-group select option { background: #1a1f2e; }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: rgba(200,169,110,0.4);
  background: rgba(200,169,110,0.04);
}
.form-group textarea { min-height: 100px; resize: vertical; }
.form-group input::placeholder,
.form-group textarea::placeholder { color: rgba(139,144,160,0.6); }

.form-submit { width: 100%; margin-top: 8px; }

.form-message {
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  margin-top: 12px;
  display: none;
  align-items: center;
  gap: 10px;
}
.form-message.success { background: rgba(80,200,120,0.1); border: 1px solid rgba(80,200,120,0.3); color: var(--success); }
.form-message.error { background: rgba(255,80,80,0.1); border: 1px solid rgba(255,80,80,0.3); color: var(--danger); }
.form-message.show { display: flex; }

/* =====================
   FOOTER
   ===================== */
footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 48px 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}
footer p { color: var(--text2); font-size: 14px; }

/* =====================
   MODAL
   ===================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 44px;
  width: 100%;
  max-width: 420px;
  position: relative;
  transform: scale(0.95) translateY(20px);
  transition: transform 0.3s;
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }

.modal-close {
  position: absolute;
  top: 18px; right: 18px;
  background: rgba(255,255,255,0.06);
  border: none;
  color: var(--text2);
  width: 32px; height: 32px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.modal-close:hover { background: rgba(255,255,255,0.1); color: var(--text); }

.modal-icon {
  width: 56px; height: 56px;
  background: rgba(200,169,110,0.12);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  margin-bottom: 20px;
}
.modal h3 { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.modal p.modal-sub { color: var(--text2); font-size: 14px; margin-bottom: 28px; }

.modal-error {
  padding: 12px 16px;
  background: rgba(255,80,80,0.1);
  border: 1px solid rgba(255,80,80,0.3);
  border-radius: 8px;
  color: var(--danger);
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}

/* =====================
   ADMIN PANEL
   ===================== */
.admin-panel {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 500;
  overflow-y: auto;
  display: none;
}
.admin-panel.open { display: block; }

.admin-nav {
  position: sticky;
  top: 0;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 16px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
}

.admin-tag {
  background: rgba(200,169,110,0.15);
  border: 1px solid rgba(200,169,110,0.3);
  color: var(--accent);
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.admin-role-superadmin { color: var(--accent); }
.admin-role-admin { color: var(--info); }

.admin-body { padding: 40px; }
.admin-header { margin-bottom: 36px; }
.admin-header h2 { font-size: 28px; font-weight: 700; margin-bottom: 4px; }
.admin-header p { color: var(--text2); font-size: 15px; }

/* Admin Tabs */
.admin-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 32px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px;
  width: fit-content;
}
.admin-tab {
  padding: 10px 24px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text2);
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.admin-tab.active { background: rgba(200,169,110,0.15); color: var(--accent); }
.admin-tab:hover:not(.active) { color: var(--text); }

.admin-tab-content { display: none; }
.admin-tab-content.active { display: block; }

/* Stats */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 36px;
}
.admin-stat {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.admin-stat-val {
  font-family: 'Playfair Display', serif;
  font-size: 36px;
  color: var(--accent);
  margin-bottom: 4px;
}
.admin-stat-label { color: var(--text2); font-size: 13px; }

/* Table */
.table-wrap {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 32px;
}
.table-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.table-header h3 { font-size: 17px; font-weight: 700; }
.table-header-actions { display: flex; gap: 10px; align-items: center; }

table { width: 100%; border-collapse: collapse; }
th {
  background: rgba(255,255,255,0.02);
  padding: 12px 24px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  color: var(--text2);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}
td {
  padding: 16px 24px;
  font-size: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.02); }

/* Status badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
}
.status-new { background: rgba(80,140,255,0.12); color: var(--info); }
.status-process { background: rgba(255,180,60,0.12); color: var(--warning); }
.status-done { background: rgba(80,200,120,0.12); color: var(--success); }

.role-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.role-superadmin { background: rgba(200,169,110,0.15); color: var(--accent); border: 1px solid rgba(200,169,110,0.3); }
.role-admin { background: rgba(80,140,255,0.12); color: var(--info); border: 1px solid rgba(80,140,255,0.3); }

/* Action buttons in table */
.td-action { display: flex; gap: 8px; flex-wrap: wrap; }
.action-btn {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text2);
  transition: all 0.2s;
  font-family: 'Manrope', sans-serif;
  white-space: nowrap;
}
.action-btn:hover { border-color: var(--accent); color: var(--accent); }
.action-btn.success { border-color: rgba(80,200,120,0.3); color: var(--success); }
.action-btn.success:hover { background: rgba(80,200,120,0.1); }
.action-btn.danger { border-color: rgba(255,80,80,0.3); color: var(--danger); }
.action-btn.danger:hover { background: rgba(255,80,80,0.1); }

/* Empty state */
.empty-state {
  padding: 64px 24px;
  text-align: center;
  color: var(--text2);
}
.empty-state-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state h4 { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.empty-state p { font-size: 14px; }

/* Add user form inside admin */
.add-user-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 32px;
}
.add-user-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 24px; }

/* Spinner */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(13,15,20,0.3);
  border-top-color: #0d0f14;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* =====================
   ANIMATIONS
   ===================== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes floatCard {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* =====================
   SCROLLBAR
   ===================== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(200,169,110,0.3); border-radius: 3px; }

/* =====================
   RESPONSIVE
   ===================== */
@media (max-width: 1100px) {
  nav { padding: 16px 24px; }
  .nav-links { display: none; }
  section { padding: 70px 24px; }
  .hero { padding: 120px 24px 80px; }
  .hero-stats { display: none; }
  .services-grid,
  .pricing-grid,
  .why-grid { grid-template-columns: 1fr; }
  .price-card.featured { transform: none; }
  .order-wrapper { grid-template-columns: 1fr; }
  footer { padding: 32px 24px; flex-direction: column; text-align: center; }
  .admin-stats { grid-template-columns: 1fr 1fr; }
  .admin-body { padding: 16px; }
  .admin-nav { padding: 14px 16px; }
  .form-row { grid-template-columns: 1fr; }
  .admin-tabs { width: 100%; overflow-x: auto; }
}

/* =====================
   FONT AWESOME OVERRIDES
   ===================== */
.service-icon i,
.contact-icon i {
  font-size: inherit;
  line-height: 1;
}
.contact-icon {
  font-size: 18px;
  color: var(--accent);
}
.hero-tag i,
.section-tag i { margin-right: 4px; }
.btn i { pointer-events: none; }
.admin-tab i { margin-right: 6px; }
.table-header h3 i { margin-right: 8px; color: var(--accent); }
.empty-state-icon i { font-size: 48px; color: var(--text2); }
.modal-icon i { font-size: 28px; color: var(--accent); }
.form-card h3 i { color: var(--accent); }
.add-user-card h3 i { color: var(--accent); }

/* =====================
   SKELETON LOADING
   ===================== */
.skeleton {
  min-height: 200px;
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.03) 25%,
    rgba(255,255,255,0.07) 50%,
    rgba(255,255,255,0.03) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border: 1px solid var(--border) !important;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
