@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

/* LiveLefkada Manager Panel - Sea Blue Theme */
:root {
  /* Color Palette */
  --primary: #0077B6;
  --primary-dark: #005a8c;
  --primary-light: #00B4D8;
  --accent: #d8f2f5;
  --accent-strong: #7fdce7;

  --success: #10b981;       /* Emerald 500 */
  --success-bg: #d1fae5;    /* Emerald 100 */
  --success-text: #065f46;  /* Emerald 800 */

  --warning: #f59e0b;       /* Amber 500 */
  --warning-bg: #fef3c7;    /* Amber 100 */
  --warning-text: #92400e;  /* Amber 800 */

  --danger: #ef4444;        /* Red 500 */
  --danger-bg: #fee2e2;     /* Red 100 */
  --danger-text: #991b1b;   /* Red 800 */

  --info-bg: #dbeafe;
  --info-text: #1d4ed8;

  /* Gray Scale */
  --bg: #f3f7f8;
  --white: #ffffff;
  --card: #ffffff;

  --text: #1e293b;          /* Slate 800 */
  --text-secondary: #64748b;/* Slate 500 */
  --border: #e2e8f0;        /* Slate 200 */

  /* Sidebar dark */
  --sidebar-bg: #003d5c;
  --sidebar-text: #90E0EF;
  --sidebar-text-hover: #f4feff;
  --sidebar-active-bg: rgba(255,255,255,0.08);
  --sidebar-active-border: #00B4D8;

  /* Layout constraints */
  --sidebar-w: 260px;
  --header-h: 70px;

  /* Border Radius & Shadows */
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 2px 6px rgba(15, 23, 42, 0.06);
  --shadow: 0 12px 30px rgba(8, 36, 43, 0.08);
  --shadow-md: 0 22px 50px rgba(8, 36, 43, 0.16);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(127, 220, 231, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(15, 108, 122, 0.10), transparent 22%),
    linear-gradient(180deg, #f7fbfc 0%, var(--bg) 100%);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(15, 108, 122, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 108, 122, 0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.18), transparent 70%);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: var(--primary-dark);
}

/* -- Login ------------------------------------------------- */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}
.login-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(255,255,255,0.9));
  border-radius: 24px;
  padding: 48px 40px;
  width: 400px;
  max-width: 90vw;
  box-shadow: var(--shadow-md);
  text-align: left;
  border: 1px solid rgba(15, 108, 122, 0.12);
  backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
}
.login-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: linear-gradient(90deg, var(--primary), var(--accent-strong));
}
.login-card h1 {
  font-family: 'Manrope', sans-serif;
  font-size: 30px;
  margin-bottom: 10px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
}
.login-card .subtitle {
  color: var(--text-secondary);
  margin-bottom: 32px;
  font-size: 14px;
  max-width: 28ch;
}
.login-card .logo {
  width: 68px;
  height: 68px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  margin-bottom: 24px;
  background: linear-gradient(135deg, rgba(15,108,122,0.14), rgba(127,220,231,0.34));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}
.login-card .form-group {
  text-align: left;
}
.login-card .btn {
  width: 100%;
  justify-content: center;
  padding: 12px;
  margin-top: 16px;
  font-size: 15px;
}

/* -- Layout ------------------------------------------------ */
.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-w);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0)),
    linear-gradient(180deg, #003d5c 0%, #004a6e 52%, #003552 100%);
  color: var(--sidebar-text);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform 0.3s ease;
  box-shadow: 24px 0 60px rgba(8, 36, 43, 0.18);
}
.sidebar-brand {
  height: var(--header-h);
  padding: 0 24px;
  font-size: 20px;
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  color: var(--white);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: -0.03em;
}
.sidebar-brand span {
  font-size: 24px;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(127, 220, 231, 0.16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}
.sidebar-nav {
  flex: 1;
  padding: 24px 0;
  overflow-y: auto;
}
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 24px;
  color: var(--sidebar-text);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
  margin: 4px 12px;
  border-radius: 14px;
}
.sidebar-nav a:hover {
  background: rgba(255,255,255,0.05);
  color: var(--sidebar-text-hover);
  transform: translateX(2px);
}
.sidebar-nav a.active {
  background: var(--sidebar-active-bg);
  color: var(--white);
  border-left-color: var(--sidebar-active-border);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.sidebar-nav a .icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
  opacity: 0.8;
}
.sidebar-nav a.active .icon {
  opacity: 1;
}

.sidebar-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 12px;
  color: rgba(255,255,255,0.6);
}
.sidebar-footer .user-card {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.06);
}
.sidebar-footer .user-name {
  display: block;
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}

.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: var(--header-h);
  background: rgba(255,255,255,0.82);
  border-bottom: 1px solid rgba(15, 108, 122, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 10px 30px rgba(8, 36, 43, 0.05);
  backdrop-filter: blur(14px);
}
.topbar h2 {
  font-family: 'Manrope', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
}
.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar-right {
  gap: 14px;
}
.topbar-meta {
  color: var(--text-secondary);
  font-size: 14px;
}

.page-content {
  padding: 32px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  flex: 1;
}

.page-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  padding: 24px 28px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(127, 220, 231, 0.30), transparent 32%),
    linear-gradient(135deg, rgba(15,108,122,0.08), rgba(255,255,255,0.94));
  border: 1px solid rgba(15, 108, 122, 0.10);
  box-shadow: var(--shadow);
}
.page-intro h1,
.page-intro h3 {
  font-family: 'Manrope', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.04em;
  margin-bottom: 6px;
}
.page-intro p {
  color: var(--text-secondary);
  max-width: 56ch;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(15,108,122,0.08);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}
.surface-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.table-note {
  color: var(--text-secondary);
  font-size: 13px;
  margin-top: 4px;
}
.empty-row {
  text-align: center;
  padding: 40px;
  color: var(--text-secondary);
}
.table-title {
  font-weight: 700;
}
.table-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}
.date-nowrap {
  white-space: nowrap;
}
.action-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.badge-danger {
  background: var(--danger-bg);
  color: var(--danger-text);
  border-color: rgba(239,68,68,0.16);
}
.badge-success {
  background: var(--success-bg);
  color: var(--success-text);
  border-color: rgba(16,185,129,0.15);
}
.badge-secondary {
  background: #f1f5f9;
  color: var(--text-secondary);
  border-color: rgba(100,116,139,0.12);
}
.badge-high {
  background: #ffedd5;
  color: #9a3412;
  border-color: rgba(249,115,22,0.18);
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.detail-meta {
  margin-bottom: 16px;
}
.detail-label {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
}
.detail-section {
  margin-bottom: 16px;
}
.detail-section h3,
.detail-section h4 {
  margin-top: 4px;
  font-family: 'Manrope', sans-serif;
  letter-spacing: -0.02em;
}
.detail-code {
  margin-top: 4px;
  background: rgba(15,108,122,0.06);
  padding: 12px;
  border-radius: 12px;
  white-space: pre-wrap;
  font-size: 12px;
  border: 1px solid rgba(15,108,122,0.08);
}
.detail-textarea {
  width: 100%;
  margin-top: 4px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 13px;
  min-height: 96px;
}
.detail-note {
  margin-top: 16px;
  padding: 12px;
  background: rgba(15,108,122,0.06);
  border-radius: 12px;
}
.detail-inline-select {
  margin-left: 8px;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 12px;
}
.listing-link {
  cursor: pointer;
  color: var(--primary);
  font-weight: 700;
}
.listing-link:hover {
  color: var(--primary-dark);
}
.listing-detail-shell {
  display: grid;
  gap: 16px;
}
.listing-detail-summary {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.listing-detail-card {
  padding: 18px;
}
.listing-detail-card h4 {
  margin-bottom: 10px;
  font-family: 'Manrope', sans-serif;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.listing-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
}
.listing-detail-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 16px;
}
.listing-detail-item small {
  color: var(--text-secondary);
  display: block;
  margin-bottom: 4px;
}
.listing-detail-description {
  margin-top: 14px;
}
.listing-detail-description p {
  margin-top: 4px;
  line-height: 1.6;
}
.listing-detail-pair {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15,108,122,0.04);
  border: 1px solid rgba(15,108,122,0.06);
}
.listing-detail-pair strong {
  display: block;
  margin-bottom: 4px;
}
.listing-detail-gallery {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.listing-detail-thumb {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
}
.listing-language-block {
  margin-bottom: 12px;
}
.listing-language-code {
  text-transform: uppercase;
}
.listing-language-entry {
  margin-left: 16px;
  margin-top: 4px;
}
.listing-admin-note {
  border-left: 4px solid var(--danger);
}
.detail-error {
  color: var(--danger);
}
.section-stack {
  display: grid;
  gap: 24px;
}
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-box {
  min-width: 140px;
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(15,108,122,0.08);
  border-radius: 20px;
  padding: 18px 18px;
  box-shadow: var(--shadow-sm);
}
.stat-box .label {
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.stat-box .value {
  font-family: 'Manrope', sans-serif;
  font-size: 24px;
  font-weight: 800;
  margin-top: 6px;
  letter-spacing: -0.04em;
}
.coupon-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  background: rgba(15,108,122,0.08);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(15,108,122,0.10);
}
.select-compact {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.9);
}
.status-accent-danger { border-left: 3px solid var(--danger); }
.status-accent-warning { border-left: 3px solid var(--warning); }
.status-accent-primary { border-left: 3px solid var(--primary); }
.status-accent-success { border-left: 3px solid var(--success); }

/* -- Hamburger (mobile) ------------------------------------ */
.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text);
  padding: 4px;
  border-radius: 10px;
}
.hamburger:hover {
  background: rgba(15,108,122,0.08);
}
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(2px);
  z-index: 99;
}

/* -- Forms ------------------------------------------------- */
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
}

input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="url"], select, textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}
input::placeholder, textarea::placeholder {
  color: #94a3b8;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}
textarea {
  resize: vertical;
  min-height: 100px;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.switch-row:last-child {
  border-bottom: none;
}
.switch {
  position: relative;
  width: 44px;
  height: 24px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.switch .slider {
  position: absolute;
  inset: 0;
  background: #cbd5e1;
  border-radius: 24px;
  cursor: pointer;
  transition: 0.3s ease;
}
.switch .slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.3s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.switch input:checked + .slider {
  background: var(--success);
}
.switch input:checked + .slider::before {
  transform: translateX(20px);
}

/* -- Buttons ----------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  line-height: 1.2;
}
.btn:active {
  transform: scale(0.98);
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  box-shadow: 0 12px 24px rgba(15, 108, 122, 0.18);
}
.btn-primary:hover {
  filter: brightness(0.98);
  transform: translateY(-1px);
}
.btn-success {
  background: var(--success);
  color: white;
}
.btn-success:hover { background: #059669; }
.btn-warning {
  background: var(--warning);
  color: white;
}
.btn-warning:hover { background: #d97706; }
.btn-danger {
  background: var(--danger);
  color: white;
}
.btn-danger:hover { background: #dc2626; }
.btn-outline {
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(15, 108, 122, 0.12);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.98);
  border-color: rgba(15,108,122,0.24);
}
.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
}
.btn-icon {
  padding: 8px;
  min-width: 36px;
}

/* -- Cards & Stats ----------------------------------------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}
.stat-card {
  background: var(--card);
  border-radius: 22px;
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(15,108,122,0.08);
  display: flex;
  align-items: center;
  gap: 20px;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.stat-card::after {
  content: '';
  position: absolute;
  inset: auto -20px -20px auto;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(127,220,231,0.18), transparent 70%);
}
.stat-icon {
  width: 56px; height: 56px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}
.stat-icon.blue { background: var(--info-bg); color: var(--info-text); }
.stat-icon.green { background: var(--success-bg); color: var(--success-text); }
.stat-icon.orange { background: var(--warning-bg); color: var(--warning-text); }
.stat-icon.cyan { background: #e0f2fe; color: #0369a1; }
.stat-icon.red { background: var(--danger-bg); color: var(--danger-text); }
.stat-info h3 {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
  letter-spacing: -0.5px;
}
.stat-info p {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-top: 4px;
}

.card {
  background: var(--card);
  border-radius: 24px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(15,108,122,0.08);
  margin-bottom: 24px;
  overflow: hidden;
}
.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(15,108,122,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, rgba(15,108,122,0.04), rgba(255,255,255,0));
}
.card-header h3 {
  font-family: 'Manrope', sans-serif;
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
}
.card-body {
  padding: 24px;
}

/* -- Tables ------------------------------------------------ */
.table-wrapper {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  text-align: left;
}
thead th {
  padding: 16px 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(15,108,122,0.05);
  border-bottom: 1px solid rgba(15,108,122,0.10);
  white-space: nowrap;
}
tbody td {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(15,108,122,0.08);
  vertical-align: middle;
  color: var(--text);
}
tbody tr {
  transition: background-color 0.15s ease;
}
tbody tr:hover {
  background: rgba(127,220,231,0.08);
}
tbody tr:last-child td {
  border-bottom: none;
}
td .actions {
  display: flex;
  gap: 8px;
}

/* -- Badges ------------------------------------------------ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.3px;
  border: 1px solid transparent;
}
.badge-active { background: var(--success-bg); color: var(--success-text); border-color: rgba(16,185,129,0.15); }
.badge-pending { background: var(--warning-bg); color: var(--warning-text); border-color: rgba(245,158,11,0.16); }
.badge-rejected { background: var(--danger-bg); color: var(--danger-text); border-color: rgba(239,68,68,0.16); }
.badge-paused { background: #f1f5f9; color: var(--text-secondary); border-color: rgba(100,116,139,0.12); }
.badge-admin { background: var(--danger-bg); color: var(--danger-text); border-color: rgba(239,68,68,0.16); }
.badge-superuser { background: #f3e8ff; color: #7e22ce; border-color: rgba(126,34,206,0.12); }
.badge-operator { background: var(--warning-bg); color: var(--warning-text); border-color: rgba(245,158,11,0.16); }
.badge-user { background: var(--info-bg); color: var(--info-text); border-color: rgba(37,99,235,0.12); }
.badge-verified { background: var(--success-bg); color: var(--success-text); border-color: rgba(16,185,129,0.15); }
.badge-unverified { background: #f1f5f9; color: var(--text-secondary); border-color: rgba(100,116,139,0.12); }

/* -- Search / Toolbar -------------------------------------- */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  padding: 18px 20px;
  border-radius: 20px;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(15,108,122,0.08);
  box-shadow: var(--shadow-sm);
}
.toolbar > div {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.search-input {
  min-width: 300px;
  position: relative;
}
.search-input input {
  padding-left: 40px;
  padding-right: 16px;
  height: 40px;
  border-radius: var(--radius-sm);
}
.search-input .icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 16px;
}
.filter-select {
  min-width: 180px;
  height: 40px;
}

/* -- Modal ------------------------------------------------- */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(2px);
  z-index: 200;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.modal-backdrop.show {
  display: flex;
  opacity: 1;
}
.modal {
  background: var(--white);
  border-radius: 24px;
  width: 600px;
  max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-backdrop.show .modal {
  transform: translateY(0);
}
.modal-lg { width: 900px; }
.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(15,108,122,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, rgba(15,108,122,0.05), rgba(255,255,255,0.92));
  position: sticky;
  top: 0;
  z-index: 10;
}
.modal-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}
.modal-close {
  background: var(--bg);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}
.modal-close:hover {
  background: #e2e8f0;
  color: var(--text);
}
.modal-body {
  padding: 24px;
}
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(15,108,122,0.08);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: rgba(15,108,122,0.04);
  border-bottom-left-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
}

/* -- Map --------------------------------------------------- */
#polygon-map {
  width: 100%;
  height: 400px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

/* -- Toast ------------------------------------------------- */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.toast {
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  color: white;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  min-width: 300px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.toast::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 20px;
  background-size: contain;
}
.toast-success { background: var(--text); }
.toast-success::before { content: '\2705'; }
.toast-error { background: var(--danger); }
.toast-error::before { content: '\274C'; }
.toast-info { background: var(--primary); }
.toast-info::before { content: '\2139\FE0F'; }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* -- Loading ----------------------------------------------- */
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 40px auto;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border-radius: var(--radius);
}

/* -- Empty State ------------------------------------------- */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-secondary);
}

.progress-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(15,108,122,0.10);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--accent-strong));
}
.empty-state .icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.8;
}
.empty-state h3 {
  font-size: 18px;
  color: var(--text);
  margin-bottom: 8px;
  font-weight: 600;
}
.empty-state p {
  font-size: 14px;
}

/* -- Utilities --------------------------------------------- */
.text-right { text-align: right; }
.text-center { text-align: center; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }

/* -- Responsive -------------------------------------------- */
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }
  .main-content { margin-left: 0; }
  .hamburger { display: block; }
  .page-content { padding: 24px; }
}
@media (max-width: 768px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .listing-detail-grid,
  .listing-detail-grid-3 { grid-template-columns: 1fr; }
  .surface-grid { grid-template-columns: 1fr; }
  .page-intro { padding: 20px; }
  .page-content { padding: 16px; }
  .topbar { padding: 0 16px; }
  .modal-lg { width: 95vw; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .search-input { min-width: 100%; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .toast-container { right: 16px; left: 16px; top: 16px; }
  .toast { min-width: 100%; }
}

/* -- Host Panel Additions -- */
.badge-host { background: var(--primary); color: #fff; }
.badge-success { background: var(--success); color: #fff; }
.badge-warning { background: var(--warning); color: #fff; }
.badge-danger { background: var(--danger); color: #fff; }
.badge-info { background: #3b82f6; color: #fff; }
.badge-secondary { background: #64748b; color: #fff; }
.badge-paused { background: #94a3b8; color: #fff; }

.quick-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.quick-actions .btn { font-size: 13px; }

.listing-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

.step-bar { display: flex; gap: 4px; margin-bottom: 24px; }
.step-bar .step { flex: 1; height: 4px; background: var(--border); border-radius: 2px; }
.step-bar .step.active { background: var(--primary); }
.step-bar .step.done { background: var(--success); }

.form-step { display: none; }
.form-step.active { display: block; }

.tab-bar { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 16px; }
.tab-bar .tab { padding: 10px 20px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; font-weight: 500; color: var(--text-secondary); }
.tab-bar .tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-bar .tab .tab-badge { background: var(--danger); color: #fff; font-size: 11px; padding: 1px 6px; border-radius: 10px; margin-left: 6px; }

.grid-designer { display: grid; gap: 2px; }
.grid-header { display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 12px; color: var(--text-secondary); }
.grid-cell { width: 56px; height: 56px; border: 1px solid var(--border); border-radius: 4px; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 11px; transition: background 0.15s; }
.grid-cell:hover { opacity: 0.7; }
.grid-cell.umbrella { background: #fef3c7; border-color: #f59e0b; color: #92400e; }
.grid-cell.sunbed { background: #dbeafe; border-color: #3b82f6; color: #1e40af; }
.grid-cell.gazebo { background: #d1fae5; border-color: #10b981; color: #065f46; }
.grid-cell.vip { background: #fce7f3; border-color: #ec4899; color: #9d174d; }
.grid-cell.table { background: #e0e7ff; border-color: #6366f1; color: #3730a3; }

.calendar-grid { overflow-x: auto; }
.calendar-grid table { border-collapse: collapse; min-width: 100%; }
.calendar-grid th, .calendar-grid td { border: 1px solid var(--border); padding: 4px; text-align: center; min-width: 80px; font-size: 12px; }
.calendar-grid th { background: var(--bg); font-weight: 600; position: sticky; top: 0; z-index: 1; }
.calendar-grid .room-name { position: sticky; left: 0; background: #fff; z-index: 2; text-align: left; padding-left: 8px; min-width: 120px; font-weight: 500; }
.calendar-grid .cell-available { background: #d1fae5; }
.calendar-grid .cell-blocked { background: #fee2e2; }
.calendar-grid .cell-closed { background: #e2e8f0; }
.calendar-grid .cell-booked { background: var(--primary-light); color: #fff; font-size: 10px; cursor: pointer; }

.chat-layout { display: flex; gap: 0; height: calc(100vh - 180px); }
.chat-list { width: 340px; border-right: 1px solid var(--border); overflow-y: auto; }
.chat-thread { flex: 1; display: flex; flex-direction: column; }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px; }
.chat-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); }
.chat-input input { flex: 1; }
.chat-bubble { max-width: 70%; padding: 10px 14px; border-radius: 12px; margin-bottom: 8px; font-size: 14px; }
.chat-bubble.sent { background: var(--primary); color: #fff; margin-left: auto; border-bottom-right-radius: 4px; }
.chat-bubble.received { background: var(--bg); margin-right: auto; border-bottom-left-radius: 4px; }
.conversation-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; border-bottom: 1px solid var(--border); }
.conversation-item:hover { background: var(--bg); }
.conversation-item.unread { background: #f0f9ff; }
.conversation-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--primary-light); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex-shrink: 0; }

.breadcrumb { font-size: 13px; color: var(--text-secondary); margin-bottom: 16px; }
.breadcrumb a { color: var(--primary); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

@media (max-width: 768px) {
  .chat-layout { flex-direction: column; height: auto; }
  .chat-list { width: 100%; border-right: none; border-bottom: 1px solid var(--border); max-height: 300px; }
  .chat-thread { min-height: 400px; }
}
