/* ==========================================================================
   A QUO CONSULTING - Executive Admin Dashboard Stylesheet
   ========================================================================== */

:root {
  --bg-body: #0a0f16;
  --bg-sidebar: #0e1520;
  --bg-card: #131b26;
  --bg-card-hover: #172230;
  --bg-input: #0b111a;
  --border-color: #1e2c3d;
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-focus: #56d5c4;
  
  --teal-primary: #56d5c4;
  --teal-hover: #45c2b2;
  --teal-glow: rgba(86, 213, 196, 0.22);
  --teal-soft: rgba(86, 213, 196, 0.1);
  
  --blue-accent: #38bdf8;
  --blue-soft: rgba(56, 189, 248, 0.1);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --danger: #f43f5e;
  --danger-bg: rgba(244, 63, 94, 0.12);
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.12);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.12);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
  color: #ffffff;
  font-weight: 700;
  letter-spacing: -0.02em;
}

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

/* ==========================================================================
   LOGIN SCREEN
   ========================================================================== */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(circle at 50% 20%, rgba(86, 213, 196, 0.08) 0%, transparent 60%),
              radial-gradient(circle at 80% 80%, rgba(56, 189, 248, 0.05) 0%, transparent 50%),
              var(--bg-body);
  position: relative;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 2;
  backdrop-filter: blur(12px);
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--teal-primary), transparent);
  border-radius: 3px;
}

.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #182635 0%, #0d1620 100%);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal-primary);
  font-size: 20px;
  box-shadow: 0 0 20px var(--teal-glow);
}

.login-brand h1 {
  font-size: 22px;
  margin: 0;
  letter-spacing: 0.5px;
}

.login-brand h1 span {
  color: var(--teal-primary);
}

.login-header p {
  color: var(--text-muted);
  font-size: 13.5px;
  margin: 0;
}

.login-alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.login-alert.error {
  background: var(--danger-bg);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #fecdd3;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon-wrap i.field-icon {
  position: absolute;
  left: 14px;
  color: var(--text-dim);
  font-size: 14px;
  pointer-events: none;
}

.input-icon-wrap input,
.form-control {
  width: 100%;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 12px 14px;
  font-size: 14px;
  border-radius: var(--radius-md);
  transition: var(--transition);
  font-family: inherit;
}

.input-icon-wrap input {
  padding-left: 42px;
  padding-right: 42px;
}

.input-icon-wrap input:focus,
.form-control:focus {
  outline: none;
  border-color: var(--teal-primary);
  box-shadow: 0 0 0 3px var(--teal-glow);
  background-color: #0d1522;
}

.password-toggle {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 6px;
  font-size: 14px;
  transition: var(--transition);
}
.password-toggle:hover {
  color: var(--teal-primary);
}

.btn-primary {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--teal-primary) 0%, #38bdf8 100%);
  color: #0b141e;
  border: none;
  padding: 13px 20px;
  font-size: 14.5px;
  font-weight: 700;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: 0 4px 16px var(--teal-glow);
  transition: var(--transition);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(86, 213, 196, 0.4);
}
.btn-primary:active {
  transform: translateY(0);
}

.login-footer-info {
  margin-top: 24px;
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
}

/* ==========================================================================
   APP SHELL / DASHBOARD LAYOUT
   ========================================================================== */
.admin-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* TOPBAR */
.admin-topbar {
  background: var(--bg-sidebar);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--teal-soft);
  color: var(--teal-primary);
  border: 1px solid rgba(86, 213, 196, 0.3);
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.5px;
}

.topbar-brand h1 {
  font-size: 18px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.topbar-brand h1 span {
  color: var(--teal-primary);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-muted);
}

.user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--teal-primary);
  color: #09121a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12px;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition);
}
.btn-ghost:hover {
  background: var(--bg-card);
  color: var(--text-main);
  border-color: var(--teal-primary);
}

.btn-ghost.danger:hover {
  border-color: var(--danger);
  color: var(--danger);
  background: var(--danger-bg);
}

/* NAVIGATION TABS */
.admin-nav {
  background: #0c131d;
  border-bottom: 1px solid var(--border-color);
  padding: 0 28px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.nav-tab {
  padding: 14px 18px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  font-family: 'Montserrat', sans-serif;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition);
  white-space: nowrap;
}

.nav-tab:hover {
  color: var(--text-main);
}

.nav-tab.active {
  color: var(--teal-primary);
  border-bottom-color: var(--teal-primary);
}

.tab-badge {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 999px;
}

/* MAIN CONTENT AREA */
.admin-container {
  max-width: 1380px;
  width: 100%;
  margin: 0 auto;
  padding: 28px 24px 60px;
  flex: 1;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.25s ease-out;
}
.tab-pane.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   METRIC STATS CARDS
   ========================================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--teal-primary);
  opacity: 0.6;
}

.stat-card.accent-blue::after { background: var(--blue-accent); }
.stat-card.accent-purple::after { background: #a855f7; }
.stat-card.accent-green::after { background: var(--success); }

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.stat-icon.teal { background: var(--teal-soft); color: var(--teal-primary); }
.stat-icon.blue { background: var(--blue-soft); color: var(--blue-accent); }
.stat-icon.purple { background: rgba(168, 85, 247, 0.1); color: #c084fc; }
.stat-icon.green { background: var(--success-bg); color: var(--success); }

.stat-info .stat-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 4px;
}

.stat-info .stat-value {
  font-size: 26px;
  font-weight: 800;
  color: #ffffff;
  font-family: 'Montserrat', sans-serif;
  line-height: 1.1;
}

.stat-info .stat-sub {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 4px;
}

/* ==========================================================================
   PANELS & DATA TABLES
   ========================================================================== */
.card-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 28px;
}

.panel-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(19, 27, 38, 0.7);
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.panel-title h2 {
  font-size: 18px;
  margin: 0;
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

/* Search bar & toolbar */
.toolbar-wrap {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(14, 21, 32, 0.5);
}

.search-input-wrap {
  position: relative;
  min-width: 280px;
  flex: 1;
  max-width: 420px;
}

.search-input-wrap i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 14px;
}

.search-input-wrap input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 9px 14px 9px 38px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  outline: none;
  transition: var(--transition);
}

.search-input-wrap input:focus {
  border-color: var(--teal-primary);
  box-shadow: 0 0 0 2px var(--teal-glow);
}

.selection-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge-counter {
  font-size: 12px;
  background: var(--teal-soft);
  color: var(--teal-primary);
  border: 1px solid rgba(86, 213, 196, 0.3);
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
}

/* TABLE STYLING */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13.5px;
}

.data-table th {
  background: #0e1520;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.data-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: var(--transition);
}

.data-table tbody tr:hover {
  background: var(--bg-card-hover);
}

.data-table tbody tr.selected {
  background: rgba(86, 213, 196, 0.05);
}

/* Checkbox styling */
.custom-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--teal-primary);
  cursor: pointer;
}

/* Contact badges & items */
.contact-name {
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.booking-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(86, 213, 196, 0.08);
  border: 1px solid rgba(86, 213, 196, 0.25);
  color: var(--teal-primary);
  font-size: 12px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 6px;
  white-space: nowrap;
}

.booking-badge.unspecified {
  background: rgba(148, 163, 184, 0.08);
  border-color: rgba(148, 163, 184, 0.2);
  color: var(--text-muted);
}

.btn-action-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 13px;
}
.btn-action-icon:hover {
  color: var(--teal-primary);
  border-color: var(--teal-primary);
  background: var(--teal-soft);
}
.btn-action-icon.danger:hover {
  color: var(--danger);
  border-color: var(--danger);
  background: var(--danger-bg);
}

.empty-state {
  padding: 60px 24px;
  text-align: center;
}

.empty-state-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--teal-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.empty-state h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--text-muted);
  max-width: 440px;
  margin: 0 auto 20px;
  font-size: 14px;
}

/* ==========================================================================
   MASS EMAIL / NEWSLETTER COMPOSER
   ========================================================================== */
.composer-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
}

@media (max-width: 1024px) {
  .composer-grid {
    grid-template-columns: 1fr;
  }
}

.recipient-selector-box {
  background: #0e1520;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 20px;
}

.target-options {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.target-radio-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  cursor: pointer;
  transition: var(--transition);
}

.target-radio-label:hover {
  border-color: var(--teal-primary);
}

.target-radio-label input[type="radio"]:checked + span {
  color: var(--teal-primary);
  font-weight: 700;
}

.placeholder-tags-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  background: rgba(86, 213, 196, 0.05);
  border: 1px dashed rgba(86, 213, 196, 0.3);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.tag-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--teal-primary);
  font-size: 12px;
  font-family: monospace;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
}
.tag-btn:hover {
  background: var(--teal-primary);
  color: #0b141e;
}

.composer-textarea {
  min-height: 260px;
  resize: vertical;
  line-height: 1.6;
}

.sidebar-tips-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  height: fit-content;
}

.sidebar-tips-card h4 {
  font-size: 15px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--teal-primary);
}

.sidebar-tips-card ul {
  list-style: none;
  font-size: 13px;
  color: var(--text-muted);
}

.sidebar-tips-card ul li {
  margin-bottom: 10px;
  display: flex;
  gap: 8px;
  line-height: 1.4;
}

.sidebar-tips-card ul li i {
  color: var(--teal-primary);
  font-size: 12px;
  margin-top: 3px;
  flex-shrink: 0;
}

/* ==========================================================================
   MODALS
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 13, 0.75);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
  animation: fadeIn 0.2s ease-out;
}
.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 17px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  transition: var(--transition);
}
.modal-close:hover {
  color: var(--text-main);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  background: rgba(14, 21, 32, 0.5);
}

/* Detail view list */
.detail-grid {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px 16px;
  font-size: 13.5px;
}
.detail-label {
  color: var(--text-dim);
  font-weight: 600;
}
.detail-value {
  color: var(--text-main);
  word-break: break-word;
}

.message-box {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  white-space: pre-wrap;
  color: #e2e8f0;
  line-height: 1.6;
}

/* ==========================================================================
   TOAST NOTIFICATIONS
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  min-width: 280px;
  max-width: 420px;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.info { border-left: 4px solid var(--teal-primary); }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   RESPONSIVENESS
   ========================================================================== */
@media (max-width: 768px) {
  .admin-topbar {
    padding: 12px 16px;
  }
  .admin-nav {
    padding: 0 16px;
  }
  .admin-container {
    padding: 16px 12px 40px;
  }
  .panel-header, .toolbar-wrap {
    padding: 14px 16px;
  }
  .user-badge span {
    display: none;
  }
  .detail-grid {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .detail-label {
    margin-top: 8px;
  }
}
