:root {
  --primary: #b8860b;
  --primary-light: #d4a843;
  --primary-dark: #8b6914;
  --bg-dark: #09090e;
  --bg-sidebar: #11111e;
  --bg-card: rgba(25, 25, 45, 0.4);
  --border-color: rgba(255, 255, 255, 0.08);
  --text-white: #ffffff;
  --text-muted: #8e8e9f;
  --success: #2ec4b6;
  --warning: #ff9f1c;
  --danger: #e71d36;
  --info: #00b4d8;
  --font-family: 'Poppins', sans-serif;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-dark);
  color: var(--text-white);
  overflow-x: hidden;
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: fixed;
  left: 0; top: 0;
  z-index: 100;
}
.sidebar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
  padding-left: 10px;
}
.sidebar-logo-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-size: 18px;
}
.sidebar-logo-text {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
}
.sidebar-logo-text span {
  display: block;
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.sidebar-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}
.sidebar-link i {
  font-size: 18px;
  width: 20px;
  text-align: center;
}
.sidebar-link:hover, .sidebar-link.active {
  color: var(--text-white);
  background-color: rgba(184, 134, 11, 0.12);
}
.sidebar-link.active {
  border-left: 3px solid var(--primary);
  background-color: rgba(184, 134, 11, 0.15);
}
.sidebar-footer {
  margin-top: auto;
}

/* Main Content Area */
.main-content {
  margin-left: 260px;
  padding: 40px;
  width: calc(100% - 260px);
  min-height: 100vh;
}

/* Header */
.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 35px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 20px;
}
.top-header h1 {
  font-size: 26px;
  font-weight: 600;
}
.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}
.avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background-color: var(--primary);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600;
}

/* Dashboard Cards */
.widgets-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}
.widget-card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow);
}
.widget-info h3 {
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.widget-info .value {
  font-size: 28px;
  font-weight: 700;
}
.widget-icon {
  width: 50px; height: 50px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.widget-card:nth-child(1) .widget-icon { background: rgba(0, 180, 216, 0.15); color: var(--info); }
.widget-card:nth-child(2) .widget-icon { background: rgba(255, 159, 28, 0.15); color: var(--warning); }
.widget-card:nth-child(3) .widget-icon { background: rgba(46, 196, 182, 0.15); color: var(--success); }
.widget-card:nth-child(4) .widget-icon { background: rgba(184, 134, 11, 0.15); color: var(--primary-light); }

/* Tabs container */
.tab-content {
  display: none;
  animation: fadeIn 0.4s ease;
}
.tab-content.active {
  display: block;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Sections & Panel Cards */
.panel-card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 30px;
  box-shadow: var(--shadow);
  margin-bottom: 30px;
}
.panel-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
}
.panel-card-header h2 {
  font-size: 18px;
  font-weight: 600;
}

/* Table styling */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
th {
  padding: 16px;
  color: var(--text-muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  border-bottom: 1.5px solid var(--border-color);
}
td {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
}
tr:hover td {
  background-color: rgba(255,255,255,0.02);
}

/* Status Badges */
.badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}
.badge-pending { background-color: rgba(255, 159, 28, 0.15); color: var(--warning); }
.badge-called { background-color: rgba(0, 180, 216, 0.15); color: var(--info); }
.badge-scheduled { background-color: rgba(184, 134, 11, 0.15); color: var(--primary-light); }
.badge-completed { background-color: rgba(46, 196, 182, 0.15); color: var(--success); }
.badge-cancelled { background-color: rgba(231, 29, 54, 0.15); color: var(--danger); }

/* Form inputs & structure */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}
.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}
.form-group {
  margin-bottom: 20px;
}
.form-group-full {
  grid-column: 1 / -1;
}
label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
input[type="text"], input[type="email"], input[type="tel"], input[type="password"], textarea, select {
  width: 100%;
  padding: 12px 16px;
  background-color: rgba(255,255,255,0.04);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-white);
  font-family: var(--font-family);
  font-size: 14px;
  outline: none;
  transition: var(--transition);
}
input[type="text"]:focus, input[type="email"]:focus, input[type="tel"]:focus, input[type="password"]:focus, textarea:focus, select:focus {
  border-color: var(--primary);
  background-color: rgba(255,255,255,0.08);
}
textarea {
  resize: vertical;
  min-height: 120px;
}

/* Image Upload Widget */
.upload-widget {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px;
  background-color: rgba(255,255,255,0.02);
  border: 1px dashed var(--border-color);
  border-radius: 12px;
}
.upload-preview {
  width: 80px; height: 80px;
  border-radius: 8px;
  object-fit: cover;
  background-color: rgba(255,255,255,0.05);
  border: 1px solid var(--border-color);
}
.upload-preview-fallback {
  width: 80px; height: 80px;
  border-radius: 8px;
  background-color: rgba(255,255,255,0.05);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-size: 24px;
  border: 1px solid var(--border-color);
}
.upload-btn-wrapper {
  position: relative;
  overflow: hidden;
  display: inline-block;
}
.btn-upload {
  background-color: rgba(255,255,255,0.08);
  border: 1px solid var(--border-color);
  color: var(--text-white);
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}
.btn-upload:hover {
  background-color: rgba(255,255,255,0.12);
}
.upload-btn-wrapper input[type=file] {
  font-size: 100px;
  position: absolute;
  left: 0; top: 0;
  opacity: 0;
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  font-family: var(--font-family);
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  box-shadow: 0 4px 15px rgba(184, 134, 11, 0.2);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(184, 134, 11, 0.35);
}
.btn-secondary {
  background-color: rgba(255,255,255,0.08);
  color: var(--text-white);
  border: 1px solid var(--border-color);
}
.btn-secondary:hover {
  background-color: rgba(255,255,255,0.12);
}
.btn-danger {
  background-color: rgba(231, 29, 54, 0.15);
  color: var(--danger);
  border: 1px solid rgba(231, 29, 54, 0.25);
}
.btn-danger:hover {
  background-color: rgba(231, 29, 54, 0.25);
}
.btn-success {
  background-color: rgba(46, 196, 182, 0.15);
  color: var(--success);
  border: 1px solid rgba(46, 196, 182, 0.25);
}
.btn-success:hover {
  background-color: rgba(46, 196, 182, 0.25);
}
.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 6px;
}

.actions-cell {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Service / Review Items list view */
.items-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background-color: rgba(255,255,255,0.02);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  transition: var(--transition);
}
.item-row:hover {
  border-color: rgba(184, 134, 11, 0.3);
}
.item-meta {
  display: flex;
  align-items: center;
  gap: 16px;
}
.item-icon {
  width: 44px; height: 44px;
  background-color: rgba(184, 134, 11, 0.1);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--primary-light);
  font-size: 18px;
}
.item-img {
  width: 44px; height: 44px;
  object-fit: cover;
  border-radius: 8px;
}
.item-details h4 {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 2px;
}
.item-details p {
  font-size: 12px;
  color: var(--text-muted);
}
.item-actions {
  display: flex;
  gap: 8px;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(0,0,0,0.8);
  backdrop-filter: blur(5px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}
.modal-overlay.active {
  display: flex;
}
.modal-card {
  background-color: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  width: 100%;
  max-width: 600px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-header h3 {
  font-size: 18px;
  font-weight: 600;
}
.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  transition: var(--transition);
}
.modal-close:hover {
  color: var(--text-white);
}
.modal-body {
  padding: 24px;
}
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Feature tags inside list builder */
.features-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  padding: 12px;
  background-color: rgba(255,255,255,0.02);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  min-height: 50px;
}
.tag-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: rgba(184, 134, 11, 0.12);
  color: var(--primary-light);
  padding: 6px 12px;
  border-radius: 50px;
  font-size: 12px;
}
.tag-item i {
  cursor: pointer;
  color: var(--danger);
}
.tag-input-row {
  display: flex;
  gap: 10px;
}

/* Responsive Dashboard */
@media (max-width: 1100px) {
  .widgets-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 900px) {
  body {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    padding: 20px;
  }
  .sidebar-menu {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 10px;
  }
  .main-content {
    margin-left: 0;
    width: 100%;
    padding: 20px;
  }
  .widgets-grid {
    grid-template-columns: 1fr;
  }
  .form-grid, .form-grid-3 {
    grid-template-columns: 1fr;
  }
}

/* Notification banner */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: var(--success);
  color: white;
  padding: 16px 24px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  display: none;
  align-items: center;
  gap: 12px;
  z-index: 2000;
  animation: slideInUp 0.3s ease;
}
.toast.toast-danger {
  background-color: var(--danger);
}
.toast.show {
  display: flex;
}
@keyframes slideInUp {
  from { transform: translateY(100px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
