/* ============================================================
   Spaze Business Connect — design system
   Palette: deep teal (primary), dark navy (secondary), white/gray bg
   ============================================================ */
:root {
  --teal-900: #063b3a;
  --teal-700: #0d5c56;
  --teal-600: #117a70;
  --teal-500: #16968a;
  --teal-100: #e3f5f2;
  --navy-900: #0b1f33;
  --navy-700: #16324a;
  --gray-50: #f7f9fa;
  --gray-100: #eef1f3;
  --gray-200: #dfe4e8;
  --gray-400: #9aa7b0;
  --gray-600: #5b6b74;
  --gray-800: #2b3a42;
  --white: #ffffff;
  --accent: #1fb6a6;
  --danger: #c0392b;
  --warning: #b7791f;
  --success: #1e8a5f;
  --radius: 10px;
  --shadow-sm: 0 1px 3px rgba(11,31,51,0.08);
  --shadow-md: 0 6px 20px rgba(11,31,51,0.10);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--gray-800);
  background: var(--gray-50);
  line-height: 1.55;
}
a { color: var(--teal-700); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { color: var(--navy-900); line-height: 1.2; margin: 0 0 .5rem; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--gray-600); }
.small { font-size: .85rem; }

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  padding: .7rem 1.4rem;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  font-size: .95rem;
  transition: transform .05s ease, box-shadow .15s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--teal-600); color: #fff; }
.btn-primary:hover { background: var(--teal-700); }
.btn-secondary { background: var(--navy-700); color: #fff; }
.btn-secondary:hover { background: var(--navy-900); }
.btn-outline { background: transparent; border-color: var(--teal-600); color: var(--teal-700); }
.btn-outline:hover { background: var(--teal-100); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: .45rem .9rem; font-size: .85rem; }
.btn-block { display: block; width: 100%; text-align: center; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }

/* ---- Header ---- */
.site-header { background: var(--navy-900); position: sticky; top: 0; z-index: 50; box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: .9rem 20px; }
.brand { display: flex; align-items: center; gap: .5rem; color: #fff; font-weight: 700; font-size: 1.1rem; }
.brand:hover { text-decoration: none; }
.brand-mark { background: var(--teal-500); color: var(--navy-900); font-weight: 800; padding: .25rem .5rem; border-radius: 6px; font-size: .85rem; letter-spacing: .04em; }
.main-nav { display: flex; align-items: center; gap: 1.4rem; }
.main-nav a { color: #d8e3ea; font-weight: 500; }
.main-nav a:hover { color: #fff; text-decoration: none; }
.nav-cta { color: #fff !important; }
.nav-toggle { display: none; background: none; border: none; color: #fff; font-size: 1.5rem; cursor: pointer; }

/* ---- Flash ---- */
.flash-wrap { margin-top: 1rem; }
.flash { padding: .8rem 1rem; border-radius: var(--radius); margin-bottom: .6rem; font-size: .92rem; }
.flash-success { background: #e5f6ee; color: var(--success); border: 1px solid #bfe8d3; }
.flash-error { background: #fdecea; color: var(--danger); border: 1px solid #f6c6c0; }
.flash-info { background: var(--teal-100); color: var(--teal-700); border: 1px solid #bfe3dd; }

/* ---- Hero ---- */
.hero { background: linear-gradient(135deg, var(--navy-900) 0%, var(--teal-900) 100%); color: #fff; padding: 4rem 0 3rem; }
.hero h1 { color: #fff; font-size: 2.4rem; max-width: 780px; }
.hero p.lead { color: #cfe3e0; font-size: 1.15rem; max-width: 640px; margin-bottom: 1.6rem; }
.hero-ctas { display: flex; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap; }
.search-panel { background: #fff; border-radius: var(--radius); padding: 1.2rem; box-shadow: var(--shadow-md); }
.search-row { display: flex; gap: .7rem; flex-wrap: wrap; }
.search-row .field { flex: 1 1 200px; }
.search-row input, .search-row select { width: 100%; }

/* ---- Forms ---- */
label { display: block; font-weight: 600; margin-bottom: .3rem; font-size: .9rem; color: var(--navy-700); }
input[type=text], input[type=email], input[type=tel], input[type=url], input[type=password], input[type=number], input[type=date], input[type=time], textarea, select {
  width: 100%; padding: .65rem .8rem; border: 1px solid var(--gray-200); border-radius: 8px; font-size: .95rem; font-family: inherit; background: #fff; color: var(--gray-800);
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--teal-500); box-shadow: 0 0 0 3px rgba(22,150,138,0.15); }
textarea { resize: vertical; min-height: 90px; }
.form-group { margin-bottom: 1.1rem; }
.form-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.form-row .form-group { flex: 1 1 220px; }
.field-hint { color: var(--gray-600); font-size: .82rem; margin-top: .25rem; }
.field-error { color: var(--danger); font-size: .82rem; margin-top: .25rem; }
.checkbox-row { display: flex; align-items: flex-start; gap: .5rem; margin-bottom: .7rem; }
.checkbox-row input { width: auto; margin-top: .25rem; }
.checkbox-row label { font-weight: 500; margin: 0; }
fieldset { border: none; padding: 0; margin: 0; }

/* ---- Cards / sections ---- */
.section { padding: 3rem 0; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 1.4rem; flex-wrap: wrap; gap: .5rem; }
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); border: 1px solid var(--gray-100); }
.card-pad { padding: 1.4rem; }

.grid { display: grid; gap: 1.2rem; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.category-card, .tower-card { display: block; padding: 1.2rem; text-align: center; border-radius: var(--radius); background: #fff; border: 1px solid var(--gray-100); box-shadow: var(--shadow-sm); transition: transform .1s ease, box-shadow .15s ease; }
.category-card:hover, .tower-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); text-decoration: none; }
.category-card .icon { font-size: 1.6rem; display: block; margin-bottom: .5rem; }
.category-card .name { font-weight: 600; color: var(--navy-900); }

.biz-card { display: flex; flex-direction: column; overflow: hidden; }
.biz-card-top { display: flex; gap: 1rem; padding: 1.2rem 1.2rem 0; }
.biz-logo { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; background: var(--gray-100); flex-shrink: 0; }
.biz-card-body { padding: 1rem 1.2rem 1.3rem; flex: 1; display: flex; flex-direction: column; }
.biz-name { font-size: 1.05rem; margin-bottom: .15rem; }
.biz-meta { color: var(--gray-600); font-size: .85rem; margin-bottom: .5rem; }
.biz-desc { font-size: .9rem; color: var(--gray-600); flex: 1; margin-bottom: .8rem; }
.biz-actions { display: flex; gap: .5rem; margin-top: auto; }
.biz-loc { display: inline-flex; align-items: center; gap: .3rem; font-size: .82rem; color: var(--teal-700); background: var(--teal-100); padding: .2rem .55rem; border-radius: 100px; margin-bottom: .5rem; width: fit-content; }

/* ---- Badges ---- */
.badge { display: inline-block; padding: .2rem .6rem; border-radius: 100px; font-size: .74rem; font-weight: 700; letter-spacing: .02em; }
.badge-pending { background: #fdf3e0; color: var(--warning); }
.badge-approved { background: #e5f6ee; color: var(--success); }
.badge-rejected { background: #fdecea; color: var(--danger); }
.badge-suspended { background: var(--gray-200); color: var(--gray-600); }
.badge-draft { background: var(--gray-100); color: var(--gray-600); }
.badge-verified { background: var(--teal-100); color: var(--teal-700); }
.badge-featured { background: #fff4d6; color: #8a6100; }

/* ---- Steps (multi-step form) ---- */
.steps-bar { display: flex; justify-content: space-between; margin-bottom: 2rem; overflow-x: auto; gap: .3rem; }
.step-pill { flex: 1; text-align: center; padding: .6rem .4rem; border-bottom: 3px solid var(--gray-200); font-size: .78rem; color: var(--gray-600); white-space: nowrap; }
.step-pill.active { border-color: var(--teal-600); color: var(--teal-700); font-weight: 700; }
.step-pill.done { border-color: var(--teal-300, #7fd3c8); color: var(--teal-600); }

/* ---- Directory / filters ---- */
.directory-layout { display: grid; grid-template-columns: 260px 1fr; gap: 1.6rem; align-items: start; }
@media (max-width: 860px) { .directory-layout { grid-template-columns: 1fr; } }
.filter-panel { position: sticky; top: 90px; }
.filter-group { margin-bottom: 1.2rem; }
.filter-group h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--gray-600); margin-bottom: .5rem; }
.filter-chip-list { display: flex; flex-wrap: wrap; gap: .4rem; }
.filter-chip { font-size: .82rem; padding: .3rem .7rem; border-radius: 100px; border: 1px solid var(--gray-200); color: var(--gray-600); }
.filter-chip.active { background: var(--teal-600); color: #fff; border-color: var(--teal-600); }

.empty-state { text-align: center; padding: 3rem 1rem; color: var(--gray-600); }
.empty-state .icon { font-size: 2.4rem; margin-bottom: .8rem; }

.pagination { display: flex; gap: .4rem; margin-top: 1.6rem; flex-wrap: wrap; }
.page-link { padding: .45rem .8rem; border-radius: 6px; border: 1px solid var(--gray-200); color: var(--gray-800); font-size: .88rem; }
.page-link.active { background: var(--teal-600); color: #fff; border-color: var(--teal-600); }

/* ---- Profile page ---- */
.profile-cover { height: 220px; background: linear-gradient(135deg, var(--teal-700), var(--navy-900)); background-size: cover; background-position: center; }
.profile-header { display: flex; gap: 1.4rem; align-items: flex-end; margin-top: -50px; padding: 0 1.4rem; }
.profile-logo { width: 110px; height: 110px; border-radius: 14px; border: 4px solid #fff; background: #fff; object-fit: cover; box-shadow: var(--shadow-md); }
.profile-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 1.6rem; margin-top: 1.6rem; }
@media (max-width: 860px) { .profile-grid { grid-template-columns: 1fr; } }
.contact-item { display: flex; justify-content: space-between; padding: .55rem 0; border-bottom: 1px solid var(--gray-100); font-size: .92rem; }
.contact-item:last-child { border-bottom: none; }
.qr-box { text-align: center; padding: 1rem; }
.offering-card { border: 1px solid var(--gray-100); border-radius: 8px; padding: 1rem; margin-bottom: .8rem; }

/* ---- How it works / why join ---- */
.step-card { text-align: center; padding: 1.4rem; }
.step-number { width: 42px; height: 42px; border-radius: 50%; background: var(--teal-100); color: var(--teal-700); display: flex; align-items: center; justify-content: center; font-weight: 700; margin: 0 auto .8rem; }

/* ---- Footer ---- */
.site-footer { background: var(--navy-900); color: #b9c6cf; margin-top: 3rem; padding: 3rem 0 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1.4fr; gap: 1.6rem; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.site-footer h4 { color: #fff; font-size: .9rem; margin-bottom: .7rem; }
.site-footer a { display: block; color: #b9c6cf; margin-bottom: .4rem; font-size: .88rem; }
.site-footer a:hover { color: #fff; }
.brand-footer { margin-bottom: .6rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 2rem; padding-top: 1.2rem; }

/* ---- Tables (admin) ---- */
table.data-table { width: 100%; border-collapse: collapse; background: #fff; }
table.data-table th, table.data-table td { padding: .7rem .8rem; border-bottom: 1px solid var(--gray-100); text-align: left; font-size: .9rem; }
table.data-table th { background: var(--gray-50); color: var(--gray-600); font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; }
table.data-table tr:hover { background: var(--gray-50); }

/* ---- Admin layout ---- */
.admin-body { display: flex; min-height: 100vh; }
.admin-sidebar { width: 230px; background: var(--navy-900); color: #cfe0e8; flex-shrink: 0; }
.admin-sidebar a { display: block; color: #cfe0e8; padding: .7rem 1.3rem; font-size: .9rem; }
.admin-sidebar a:hover, .admin-sidebar a.active { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.admin-sidebar .brand { padding: 1.2rem 1.3rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.admin-main { flex: 1; padding: 1.6rem 2rem; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.4rem; }
.stat-tile { background: #fff; border-radius: var(--radius); padding: 1.2rem; box-shadow: var(--shadow-sm); border: 1px solid var(--gray-100); }
.stat-tile .num { font-size: 1.8rem; font-weight: 800; color: var(--navy-900); }
.stat-tile .label { color: var(--gray-600); font-size: .85rem; }
.admin-toolbar { display: flex; gap: .7rem; margin-bottom: 1rem; flex-wrap: wrap; align-items: center; }

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .main-nav { position: absolute; top: 100%; left: 0; right: 0; background: var(--navy-900); flex-direction: column; padding: 1rem 1.4rem; display: none; align-items: flex-start; gap: .8rem; }
  .main-nav.open { display: flex; }
  .hero h1 { font-size: 1.7rem; }
  .admin-body { flex-direction: column; }
  .admin-sidebar { width: 100%; }
  .profile-header { flex-direction: column; align-items: flex-start; }
}
