/* Property Manager — shared styles (public + app + tenant) */
:root {
  --brand: #0f766e;         /* teal */
  --brand-dark: #115e59;
  --accent: #f59e0b;
  --bg: #f9fafb;
  --card: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --ok: #059669;
  --warn: #d97706;
  --danger: #dc2626;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--ink);
  font-size: 15px; line-height: 1.5;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Layout */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 240px; background: var(--card); border-right: 1px solid var(--border);
  padding: 20px 0; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar .brand {
  padding: 0 20px 20px; border-bottom: 1px solid var(--border); margin-bottom: 16px;
}
.sidebar .brand h1 { margin: 0; font-size: 18px; color: var(--brand-dark); }
.sidebar .brand small { color: var(--muted); font-size: 12px; }
.sidebar nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px; color: var(--ink); font-weight: 500;
  border-left: 3px solid transparent;
}
.sidebar nav a:hover { background: #f3f4f6; text-decoration: none; }
.sidebar nav a.active {
  background: #ecfdf5; border-left-color: var(--brand); color: var(--brand-dark);
}
.main { flex: 1; padding: 24px 32px; }

/* Header */
.page-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.page-head h2 { margin: 0; font-size: 24px; }

/* Cards */
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: 8px;
  padding: 20px; margin-bottom: 16px;
}
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 16px; }
.stat .label { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .5px; }
.stat .value { font-size: 28px; font-weight: 700; color: var(--ink); margin-top: 4px; }
.stat .sub { color: var(--muted); font-size: 13px; margin-top: 4px; }

/* Table */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px; }
th { background: #f9fafb; font-weight: 600; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
tr:hover td { background: #fafbfb; }

/* Forms */
label { display: block; font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
input, select, textarea {
  width: 100%; padding: 8px 12px; border: 1px solid var(--border);
  border-radius: 6px; font-size: 14px; font-family: inherit; background: white;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}
.form-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 12px; }
.form-row.cols-3 { grid-template-columns: repeat(3, 1fr); }

/* Buttons */
.btn {
  display: inline-block; padding: 8px 16px; border-radius: 6px;
  font-size: 14px; font-weight: 500; border: 1px solid transparent; cursor: pointer;
  text-decoration: none;
}
.btn-primary { background: var(--brand); color: white; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-secondary { background: white; color: var(--ink); border-color: var(--border); }
.btn-secondary:hover { background: #f3f4f6; }
.btn-danger { background: var(--danger); color: white; }
.btn-sm { padding: 4px 10px; font-size: 13px; }

/* Badges */
.badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 500; }
.badge-ok { background: #d1fae5; color: #065f46; }
.badge-warn { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-muted { background: #f3f4f6; color: #4b5563; }

/* Modal */
.modal-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 50;
  align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: white; border-radius: 8px; width: 100%; max-width: 600px;
  max-height: 90vh; overflow: auto;
}
.modal-header { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-header h3 { margin: 0; }
.modal-body { padding: 20px; }
.modal-footer { padding: 16px 20px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; }
.modal-close { background: none; border: none; font-size: 24px; cursor: pointer; color: var(--muted); }

/* Public landing */
.hero {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: white; padding: 80px 20px; text-align: center;
}
.hero h1 { font-size: 48px; margin: 0 0 16px; }
.hero p { font-size: 20px; margin: 0 0 32px; opacity: 0.9; }
.hero .pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; max-width: 900px; margin: 40px auto 0; }
.hero .plan {
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
  padding: 24px; border-radius: 8px; text-align: left;
}
.hero .plan h3 { margin: 0; font-size: 20px; }
.hero .plan .price { font-size: 32px; font-weight: 700; margin: 8px 0 16px; }
.hero .plan ul { padding-left: 20px; margin: 0; font-size: 14px; }

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