:root { --ink:#10231c; --muted:#5c6e66; --line:#dde7e1; --surface:#f5f8f6; --accent:#d8ff59; }
* { box-sizing:border-box; }
body { margin:0; font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; color:var(--ink); background:#fff; }
a { color:inherit; text-decoration:none; }
.container { width:min(1120px, calc(100% - 32px)); margin-inline:auto; }
.site-header { border-bottom:1px solid var(--line); background:rgba(255,255,255,.95); position:sticky; top:0; }
.nav-wrap { min-height:68px; display:flex; align-items:center; justify-content:space-between; }
.brand { font-size:1.4rem; font-weight:900; letter-spacing:-.04em; }
nav { display:flex; align-items:center; gap:22px; font-size:.95rem; }
.inline-form { display:inline; } .link-button { border:0; background:none; padding:0; cursor:pointer; font:inherit; }
.hero { background:var(--surface); padding:100px 0; }
.hero-content { max-width:820px; }
.eyebrow { font-weight:800; letter-spacing:.14em; font-size:.78rem; }
h1 { font-size:clamp(3rem,8vw,6.6rem); line-height:.93; letter-spacing:-.065em; margin:18px 0 24px; }
.lead { max-width:650px; color:var(--muted); font-size:1.2rem; line-height:1.7; }
.primary-button { display:inline-flex; margin-top:20px; padding:14px 22px; background:var(--ink); color:white; border:0; border-radius:999px; font-weight:800; cursor:pointer; }
.section { padding:76px 0; } .section h2 { font-size:2.2rem; letter-spacing:-.04em; }
.cards { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; }
.cards article { padding:26px; border:1px solid var(--line); border-radius:18px; background:white; }
.cards p { color:var(--muted); line-height:1.6; }
.auth-section { padding:72px 0; } .auth-card { max-width:480px; margin:auto; border:1px solid var(--line); border-radius:20px; padding:30px; }
.auth-card h1 { font-size:2.2rem; letter-spacing:-.04em; }
.auth-card input { width:100%; padding:12px; border:1px solid var(--line); border-radius:10px; }
@media (max-width:760px) { nav a:first-child { display:none; } .cards { grid-template-columns:1fr; } .hero { padding:72px 0; } }

.nav-cta { padding:9px 15px; border-radius:999px; background:var(--ink); color:#fff; font-weight:800; }
.messages { padding-top:18px; }
.alert { padding:12px 14px; border-radius:12px; margin-bottom:14px; line-height:1.45; }
.alert-success { background:#eaf8ee; color:#185c2d; border:1px solid #bfe3c8; }
.alert-error { background:#fff0f0; color:#8a1f1f; border:1px solid #f1c1c1; }
.form-intro { color:var(--muted); margin-top:-10px; margin-bottom:26px; line-height:1.6; }
.stack-form { display:grid; gap:18px; }
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.form-span-2 { grid-column:1 / -1; }
.form-group { display:grid; gap:7px; }
.form-group label { font-size:.9rem; font-weight:800; }
.form-group input:not([type="radio"]), .form-group select, .form-group textarea { width:100%; padding:12px 13px; border:1px solid var(--line); border-radius:11px; background:#fff; font:inherit; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline:2px solid var(--accent); border-color:var(--ink); }
.form-group ul { margin:4px 0 0; padding-left:20px; color:var(--muted); font-size:.84rem; line-height:1.5; }
.form-group #id_account_type { display:grid; grid-template-columns:1fr 1fr; gap:10px; padding:0; list-style:none; }
.form-group #id_account_type label { display:flex; gap:8px; align-items:center; padding:13px; border:1px solid var(--line); border-radius:12px; cursor:pointer; }
.help-text { color:var(--muted); line-height:1.45; }
.field-error { color:#a12626; font-weight:700; }
.full-button { width:100%; justify-content:center; margin-top:2px; }
.auth-switch { margin:22px 0 0; color:var(--muted); text-align:center; }
.auth-switch a { color:var(--ink); font-weight:900; text-decoration:underline; text-underline-offset:3px; }
.auth-card-wide { max-width:680px; }
.account-section { padding:64px 0 90px; }
.page-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; margin-bottom:30px; }
.page-heading h1 { font-size:clamp(2.4rem,5vw,4rem); margin:10px 0; }
.page-heading p { color:var(--muted); }
.role-badge { padding:9px 13px; border-radius:999px; background:var(--accent); font-weight:900; white-space:nowrap; }
.account-grid { display:grid; grid-template-columns:280px 1fr; gap:24px; align-items:start; }
.profile-summary, .settings-card { border:1px solid var(--line); border-radius:20px; padding:24px; background:#fff; }
.profile-summary { display:grid; gap:8px; justify-items:center; text-align:center; color:var(--muted); }
.profile-summary strong { color:var(--ink); font-size:1.1rem; }
.avatar { width:104px; height:104px; border-radius:50%; object-fit:cover; margin-bottom:8px; }
.avatar-placeholder { display:grid; place-items:center; background:var(--surface); color:var(--ink); font-size:1.8rem; font-weight:900; }
.settings-card h2 { margin-top:0; font-size:1.5rem; }
@media (max-width:760px) {
  .form-grid, .account-grid { grid-template-columns:1fr; }
  .form-span-2 { grid-column:auto; }
  .form-group #id_account_type { grid-template-columns:1fr; }
  .page-heading { flex-direction:column; }
  .auth-card { padding:22px; }
}

/* Owner portal */
.owner-shell { min-height:calc(100vh - 68px); padding:58px 0 90px; background:var(--surface); }
.owner-heading { align-items:center; }
.owner-heading .primary-button { margin-top:0; }
.metric-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:16px; margin-bottom:42px; }
.metric-card { min-height:148px; padding:22px; border:1px solid var(--line); border-radius:18px; background:#fff; display:flex; flex-direction:column; justify-content:space-between; }
.metric-card span { color:var(--muted); font-weight:700; }
.metric-card strong { font-size:2.7rem; letter-spacing:-.06em; }
.metric-card small { color:var(--muted); }
.muted-metric { background:#edf2ef; }
.panel-heading { display:flex; justify-content:space-between; align-items:end; gap:20px; margin-bottom:17px; }
.panel-heading h2 { margin:0 0 6px; font-size:1.55rem; }
.panel-heading p { color:var(--muted); margin:0; }
.panel-heading a { font-weight:900; }
.venue-list { display:grid; gap:12px; }
.venue-row { padding:20px 22px; border:1px solid var(--line); border-radius:17px; background:#fff; display:flex; justify-content:space-between; align-items:center; gap:20px; }
.venue-row h3 { margin:10px 0 5px; font-size:1.2rem; }
.venue-row p { margin:0; color:var(--muted); }
.venue-row-meta { display:flex; align-items:center; gap:20px; color:var(--muted); font-size:.9rem; }
.status-pill { display:inline-flex; padding:5px 9px; border-radius:999px; font-size:.72rem; line-height:1; font-weight:900; text-transform:uppercase; letter-spacing:.06em; }
.status-draft { background:#fff2c6; color:#705200; }
.status-active { background:#dcf7e5; color:#176033; }
.status-inactive { background:#e8ecea; color:#53605a; }
.secondary-button { display:inline-flex; justify-content:center; align-items:center; padding:10px 15px; border:1px solid var(--line); border-radius:999px; background:#fff; color:var(--ink); font-weight:800; white-space:nowrap; }
.empty-state { padding:58px 24px; border:1px dashed #b8c7bf; border-radius:20px; text-align:center; background:#fff; }
.empty-state h2 { margin:12px 0 8px; }
.empty-state p { max-width:570px; margin:0 auto 8px; color:var(--muted); line-height:1.6; }
.empty-icon { font-size:2.4rem; }
.venue-card-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:18px; }
.venue-card { padding:24px; border:1px solid var(--line); border-radius:20px; background:#fff; }
.venue-card-top, .venue-actions { display:flex; justify-content:space-between; align-items:center; gap:15px; }
.venue-card h2 { margin:24px 0 10px; }
.venue-card p { color:var(--muted); margin:5px 0; line-height:1.5; }
.venue-code { color:var(--muted); font-size:.78rem; }
.venue-actions { margin-top:26px; padding-top:18px; border-top:1px solid var(--line); color:var(--muted); font-size:.85rem; }
.form-page-container { max-width:900px; }
.form-page-container .page-heading h1 { margin-bottom:8px; }
.back-link { display:inline-flex; margin-bottom:12px; color:var(--muted); font-weight:800; }
.form-actions { display:flex; justify-content:flex-end; gap:12px; padding-top:8px; }
.no-margin { margin-top:0; }
@media (max-width:900px) { .metric-grid { grid-template-columns:repeat(2,1fr); } }
@media (max-width:760px) {
  .owner-shell { padding-top:38px; }
  .metric-grid, .venue-card-grid { grid-template-columns:1fr; }
  .venue-row, .venue-row-meta { align-items:flex-start; flex-direction:column; }
  .venue-row-meta { width:100%; }
  .venue-row-meta .secondary-button { width:100%; }
  .form-actions { flex-direction:column-reverse; }
  .form-actions > * { width:100%; }
}

/* Courts */
.court-search-section, .court-detail-section { background:var(--surface); min-height:calc(100vh - 68px); }
.court-card-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; }
.court-card { padding:24px; border:1px solid var(--line); border-radius:20px; background:#fff; }
.court-card-top { display:flex; justify-content:space-between; align-items:center; gap:14px; }
.court-card h2 { margin:22px 0 8px; }
.court-card p { color:var(--muted); line-height:1.5; }
.court-type { color:var(--muted); font-size:.78rem; font-weight:900; letter-spacing:.08em; text-transform:uppercase; }
.court-rate { color:var(--ink) !important; font-size:1.15rem; font-weight:900; }
.court-booking-layout { display:grid; grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr); gap:24px; align-items:start; }
.court-summary-card, .schedule-card { border:1px solid var(--line); border-radius:24px; padding:28px; background:#fff; }
.court-summary-card h1 { font-size:clamp(2.7rem,6vw,5rem); margin:16px 0 20px; }
.court-summary-card p { color:var(--muted); line-height:1.6; }
.price-display { display:flex; align-items:baseline; gap:8px; margin-top:30px; }
.price-display strong { font-size:2rem; }
.price-display span { color:var(--muted); }
.schedule-card h2 { margin-top:0; }
.date-form { display:grid; grid-template-columns:1fr auto; gap:10px; align-items:end; }
.date-form label { grid-column:1 / -1; font-weight:800; }
.date-form input { width:100%; padding:12px 13px; border:1px solid var(--line); border-radius:11px; font:inherit; }
.schedule-date { margin:28px 0 14px; color:var(--muted); }
.time-slot-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; }
.time-slot { padding:14px 10px; border:1px solid var(--line); border-radius:12px; background:#fff; color:var(--ink); font:inherit; font-weight:800; text-align:center; }
.time-slot:disabled { opacity:1; cursor:not-allowed; }
.module-note { margin:18px 0 0; padding:13px 14px; border-radius:12px; background:var(--surface); color:var(--muted); font-size:.88rem; line-height:1.5; }
@media (max-width:900px) { .court-card-grid { grid-template-columns:repeat(2,1fr); } }
@media (max-width:760px) {
  .court-card-grid, .court-booking-layout, .time-slot-grid { grid-template-columns:1fr; }
  .date-form { grid-template-columns:1fr; }
}


/* Booking module */
.booking-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(340px,520px);gap:2rem;align-items:start}.booking-card,.booking-confirmation,.table-card,.summary-card{background:#fff;border:1px solid #e5e7eb;border-radius:16px;padding:1.25rem}.date-row{display:flex;gap:.75rem}.date-row input{flex:1}.slot-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.65rem;margin:1rem 0}.slot-option{display:flex;flex-direction:column;border:1px solid #d1d5db;border-radius:10px;padding:.75rem;cursor:pointer}.slot-option:has(input:checked){border-color:#111827;background:#f3f4f6}.slot-option input{margin:0 0 .35rem}.slot-disabled{opacity:.5;cursor:not-allowed;background:#f9fafb}.booking-total{display:flex;justify-content:space-between;gap:1rem;padding:1rem 0;border-top:1px solid #e5e7eb}.btn-block{display:block;width:100%;text-align:center}.btn-danger{background:#b91c1c;color:#fff}.narrow-container{max-width:820px}.detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;margin:1.5rem 0}.detail-grid div{display:flex;flex-direction:column;gap:.25rem}.detail-grid span,.muted{color:#6b7280}.responsive-table{overflow-x:auto}table{width:100%;border-collapse:collapse}th,td{text-align:left;padding:.85rem;border-bottom:1px solid #e5e7eb}.status{display:inline-block;padding:.25rem .55rem;border-radius:999px;font-size:.8rem}.status-confirmed{background:#dcfce7;color:#166534}.status-cancelled{background:#fee2e2;color:#991b1b}@media(max-width:760px){.booking-layout{grid-template-columns:1fr}.slot-grid,.detail-grid{grid-template-columns:1fr}.date-row,.booking-total{flex-direction:column}}


.owner-form-page {
  min-height: calc(100vh - 70px);
  padding: 48px 0 80px;
  background: #f6f8fb;
}

.owner-form-container {
  max-width: 1120px;
}

.owner-form-header {
  margin-bottom: 28px;
}

.back-link {
  display: inline-flex;
  margin-bottom: 22px;
  color: #596273;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

.back-link:hover {
  color: #172033;
}

.owner-form-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.owner-form-heading h1 {
  margin: 6px 0 8px;
  color: #172033;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
}

.owner-form-subtitle {
  margin: 0;
  color: #737c8d;
  font-size: 1rem;
}

.court-summary-badge {
  min-width: 180px;
  padding: 16px 18px;
  border: 1px solid #e1e5ec;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(23, 32, 51, 0.05);
}

.court-summary-badge span,
.court-summary-badge strong,
.court-summary-badge small {
  display: block;
}

.court-summary-label {
  margin-bottom: 5px;
  color: #8a93a3;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.court-summary-badge strong {
  color: #172033;
  font-size: 1rem;
}

.court-summary-badge small {
  margin-top: 3px;
  color: #747d8c;
}

.owner-form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 24px;
  align-items: start;
}

.owner-form-card {
  padding: 30px;
  border: 1px solid #e1e5ec;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 12px 36px rgba(23, 32, 51, 0.06);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group-full {
  grid-column: 1 / -1;
}

.form-group label {
  color: #30394a;
  font-size: 0.9rem;
  font-weight: 750;
}

.required-mark {
  color: #d64545;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid #d9dee7;
  border-radius: 10px;
  background: #ffffff;
  color: #172033;
  font: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group textarea {
  min-height: 110px;
  resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #246bfd;
  box-shadow: 0 0 0 4px rgba(36, 107, 253, 0.1);
}

.form-help {
  color: #8a93a3;
  font-size: 0.8rem;
  line-height: 1.45;
}

.field-error {
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: #c73939;
  font-size: 0.82rem;
  font-weight: 600;
}

.form-alert {
  margin-bottom: 22px;
  padding: 14px 16px;
  border-radius: 10px;
}

.form-alert-error {
  border: 1px solid #f0c4c4;
  background: #fff3f3;
  color: #b52d2d;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid #edf0f4;
}

.btn {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary {
  border-color: #246bfd;
  background: #246bfd;
  color: #ffffff;
}

.btn-primary:hover {
  background: #1858d9;
}

.btn-secondary {
  border-color: #d9dee7;
  background: #ffffff;
  color: #30394a;
}

.btn-secondary:hover {
  border-color: #b9c0cc;
  background: #f8f9fb;
}

.owner-form-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-card,
.sidebar-notice {
  padding: 20px;
  border: 1px solid #e1e5ec;
  border-radius: 14px;
  background: #ffffff;
}

.sidebar-card-label {
  margin: 0 0 8px;
  color: #8a93a3;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar-card h3 {
  margin: 0 0 4px;
  color: #172033;
}

.sidebar-card > p:last-child {
  margin: 0;
  color: #747d8c;
}

.sidebar-detail {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid #edf0f4;
  font-size: 0.88rem;
}

.sidebar-detail:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.sidebar-detail span {
  color: #7d8695;
}

.sidebar-detail strong {
  color: #30394a;
  text-align: right;
}

.sidebar-notice {
  border-color: #d7e3ff;
  background: #f3f7ff;
}

.sidebar-notice strong {
  color: #244f9c;
}

.sidebar-notice p {
  margin: 7px 0 0;
  color: #61759d;
  font-size: 0.85rem;
  line-height: 1.55;
}

@media (max-width: 900px) {
  .owner-form-layout {
    grid-template-columns: 1fr;
  }

  .owner-form-sidebar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar-notice {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .owner-form-page {
    padding-top: 28px;
  }

  .owner-form-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .court-summary-badge {
    width: 100%;
  }

  .owner-form-card {
    padding: 20px;
  }

  .form-grid,
  .owner-form-sidebar {
    grid-template-columns: 1fr;
  }

  .form-group-full,
  .sidebar-notice {
    grid-column: auto;
  }

  .form-actions {
    flex-direction: column-reverse;
  }

  .form-actions .btn {
    width: 100%;
  }
}