/* ===================================================================
   BIGGLAND MANAGEMENT SYSTEM - MASTER MANAGER STYLESHEET
   Obsidian Dark, Neon Orange, Glassmorphic & Modern Dashboard
   =================================================================== */

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

:root {
  --bg-admin-dark: #0b0f17;
  --bg-admin-surface: #121724;
  --bg-admin-card: #141a29;
  --bg-admin-card-hover: #192134;
  --bg-table-header: rgba(255, 255, 255, 0.03);
  --bg-table-hover: rgba(255, 255, 255, 0.025);
  --bg-input: rgba(11, 15, 23, 0.7);

  --orange-primary: #ff6b00;
  --orange-bright: #ff8c00;
  --orange-light: #ffaa33;
  --orange-glow: rgba(255, 107, 0, 0.35);
  --orange-subtle: rgba(255, 107, 0, 0.12);

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --border-orange: rgba(255, 107, 0, 0.3);

  --text-white: #ffffff;
  --text-light: #e2e8f0;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --badge-success-bg: rgba(16, 185, 129, 0.15);
  --badge-success-text: #34d399;
  --badge-success-border: rgba(16, 185, 129, 0.3);

  --badge-danger-bg: rgba(239, 68, 68, 0.15);
  --badge-danger-text: #f87171;
  --badge-danger-border: rgba(239, 68, 68, 0.3);

  --badge-warning-bg: rgba(245, 158, 11, 0.15);
  --badge-warning-text: #fbbf24;
  --badge-warning-border: rgba(245, 158, 11, 0.3);

  --badge-info-bg: rgba(59, 130, 246, 0.15);
  --badge-info-text: #60a5fa;
  --badge-info-border: rgba(59, 130, 246, 0.3);

  --sidebar-width: 260px;
  --header-height: 70px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.35);
  --shadow-modal: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme Variables - Soft Slate, Eye-Friendly & Comfortable */
[data-theme="light"] {
  --bg-admin-dark: #f6f8fa;
  --bg-admin-surface: #ffffff;
  --bg-admin-card: #ffffff;
  --bg-admin-card-hover: #f8fafc;
  --bg-table-header: #f8fafc;
  --bg-table-hover: #f8fafc;
  --bg-input: #ffffff;

  --border-subtle: #e2e8f0;
  --border-strong: #cbd5e1;
  --border-orange: rgba(255, 107, 0, 0.35);

  --text-white: #0f172a;
  --text-light: #334155;
  --text-muted: #64748b;
  --text-dim: #94a3b8;

  --badge-success-bg: #ecfdf5;
  --badge-success-text: #059669;
  --badge-success-border: #a7f3d0;

  --badge-danger-bg: #fef2f2;
  --badge-danger-text: #dc2626;
  --badge-danger-border: #fecaca;

  --badge-warning-bg: #fffbeb;
  --badge-warning-text: #d97706;
  --badge-warning-border: #fde68a;

  --badge-info-bg: #eff6ff;
  --badge-info-text: #2563eb;
  --badge-info-border: #bfdbfe;

  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 14px rgba(0, 0, 0, 0.03);
  --shadow-modal: 0 20px 45px rgba(15, 23, 42, 0.15);
}

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

body {
  font-family: 'Kanit', 'Outfit', sans-serif;
  background-color: var(--bg-admin-dark);
  color: var(--text-light);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===================================================================
   ADMIN LAYOUT
   =================================================================== */
.admin-wrapper {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: var(--sidebar-width);
  background: var(--bg-admin-surface);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
  transition: var(--transition);
}

.sidebar-header {
  height: var(--header-height);
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar-logo-img {
  height: 42px;
  width: auto;
  object-fit: contain;
}

.sidebar-brand-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-white);
  letter-spacing: -0.5px;
}

.sidebar-brand-badge {
  font-size: 0.65rem;
  padding: 2px 6px;
  background: var(--orange-subtle);
  color: var(--orange-bright);
  border: 1px solid var(--orange-glow);
  border-radius: 4px;
  font-weight: 600;
  margin-left: 4px;
}

.sidebar-menu {
  flex: 1;
  padding: 20px 12px;
  overflow-y: auto;
  list-style: none;
}

.menu-category-title {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 10px 12px 6px;
  letter-spacing: 0.5px;
}

.sidebar-menu-item {
  margin-bottom: 4px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition);
}

.sidebar-link i {
  font-size: 1.1rem;
  width: 24px;
  text-align: center;
  color: var(--text-dim);
  transition: var(--transition);
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-white);
}

.sidebar-link:hover i {
  color: var(--orange-bright);
}

.sidebar-link.active {
  background: linear-gradient(90deg, rgba(255, 107, 0, 0.18), rgba(255, 107, 0, 0.04));
  color: var(--orange-bright);
  border-left: 3px solid var(--orange-primary);
  font-weight: 600;
}

.sidebar-link.active i {
  color: var(--orange-bright);
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.2);
}

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  cursor: pointer;
  flex: 1;
  border: 1px solid transparent;
}

.user-profile-badge:hover {
  background: rgba(255, 107, 0, 0.1);
  border-color: rgba(255, 107, 0, 0.25);
}

.user-profile-badge.active {
  background: rgba(255, 107, 0, 0.15);
  border-color: var(--orange-glow);
}

.user-profile-badge:hover .user-name {
  color: var(--orange-bright);
}

.user-profile-badge:hover .user-avatar {
  box-shadow: 0 0 12px var(--orange-glow);
  transform: scale(1.05);
}

.user-profile-badge:hover .user-badge-gear {
  color: var(--orange-bright);
  transform: rotate(45deg);
  opacity: 1;
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange-primary), #ff4500);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  transition: var(--transition);
  flex-shrink: 0;
}

.user-info-text {
  overflow: hidden;
}

.user-info-text .user-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-white);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  transition: var(--transition);
}

.user-info-text .user-role {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: capitalize;
}

.btn-logout {
  color: #ffffff;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border: 1px solid rgba(239, 68, 68, 0.6);
  text-decoration: none;
  font-size: 0.95rem;
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(239, 68, 68, 0.35);
  cursor: pointer;
  flex-shrink: 0;
}

.btn-logout:hover {
  background: linear-gradient(135deg, #f87171, #ef4444);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.6);
  transform: translateY(-1px) scale(1.05);
}

.sidebar-link-logout {
  color: #f87171 !important;
}

.sidebar-link-logout i {
  color: #f87171 !important;
}

.sidebar-link-logout:hover {
  background: rgba(239, 68, 68, 0.16) !important;
  color: #ffffff !important;
  border-left: 3px solid #ef4444;
}

.sidebar-link-logout:hover i {
  color: #ffffff !important;
}

/* ===================================================================
   MAIN CONTENT AREA & TOPBAR
   =================================================================== */
.admin-main {
  flex: 1;
  margin-left: 0;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: 95px !important;
  background-color: var(--bg-admin-dark);
}

.admin-topbar {
  height: var(--header-height);
  background: var(--bg-admin-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 900;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.topbar-page-title {
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--text-white);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.2px;
}

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

.topbar-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-tool-pill {
  width: 38px;
  height: 38px;
  border-radius: 9999px;
  background: var(--bg-admin-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.95rem;
  flex-shrink: 0;
  outline: none;
  text-decoration: none;
}

.btn-tool-pill:hover {
  background: var(--orange-subtle);
  color: var(--orange-bright);
  border-color: var(--orange-primary);
  transform: translateY(-1px);
}

.btn-tool-pill.lang-toggle {
  width: auto;
  padding: 0 14px;
  gap: 7px;
  font-family: 'Kanit', sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
}

.btn-sidebar-toggle {
  display: inline-flex;
  background: var(--bg-admin-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-light);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.05rem;
  margin-right: 14px;
  transition: var(--transition);
}

.btn-sidebar-toggle:hover {
  background: var(--orange-subtle);
  color: var(--orange-bright);
  border-color: var(--border-orange);
}

.btn-view-site {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-admin-card);
  color: var(--text-light);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  border: 1px solid var(--border-subtle);
  transition: var(--transition);
}

.btn-view-site:hover {
  background: var(--orange-subtle);
  color: var(--orange-bright);
  border-color: var(--orange-glow);
}

.btn-topbar-logout {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--badge-danger-bg);
  color: var(--badge-danger-text);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  border: 1px solid var(--badge-danger-border);
  transition: var(--transition);
  cursor: pointer;
}

.btn-topbar-logout:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
  transform: translateY(-1px);
}

.admin-content {
  flex: 1;
  padding: 28px;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}

/* ===================================================================
   ADMIN CARDS & CONTAINERS
   =================================================================== */
.admin-card,
.card {
  background: var(--bg-admin-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  margin-bottom: 24px;
  overflow: hidden;
  transition: var(--transition);
}

.card-header {
  padding: 16px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-table-header);
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-white);
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.card-body {
  padding: 22px;
}

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

@media (max-width: 768px) {
  .stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
  }

  .stats-grid .stat-card {
    padding: 12px 10px;
    gap: 10px;
    min-width: 0;
  }

  .stats-grid .stat-icon {
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
    border-radius: var(--radius-sm);
  }

  .stats-grid .stat-info {
    min-width: 0;
  }

  .stats-grid .stat-info .stat-value {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.15;
  }

  .stats-grid .stat-info .stat-label {
    font-size: 0.74rem;
    line-height: 1.25;
    margin-top: 2px;
  }
}

@media (max-width: 360px) {
  .stats-grid {
    gap: 8px;
  }

  .stats-grid .stat-card {
    padding: 10px 8px;
    gap: 8px;
  }

  .stats-grid .stat-icon {
    width: 32px;
    height: 32px;
    font-size: 0.95rem;
  }

  .stats-grid .stat-info .stat-value {
    font-size: 1.2rem;
  }

  .stats-grid .stat-info .stat-label {
    font-size: 0.68rem;
  }
}

.stat-card {
  background: var(--bg-admin-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-orange);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  background: var(--orange-subtle);
  color: var(--orange-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.stat-info {
  flex: 1;
  min-width: 0;
}

.stat-info .stat-value {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--text-white);
  line-height: 1.2;
}

.stat-info .stat-label {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ===================================================================
   MODERN EYE-FRIENDLY DATA TABLES
   =================================================================== */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table,
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
}

.table th,
.data-table th {
  padding: 13px 18px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-table-header);
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.table td,
.data-table td {
  padding: 14px 18px;
  font-size: 0.92rem;
  color: var(--text-light);
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
  transition: background-color 0.15s ease;
}

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

.table tbody tr:last-child td,
.data-table tbody tr:last-child td {
  border-bottom: none;
}

.table code {
  font-family: 'Outfit', monospace;
  font-size: 0.85rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-table-header);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

/* Table Item Elements */
.project-row-name {
  font-weight: 600;
  color: var(--text-white);
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.project-row-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.project-row-zone {
  display: none;
}

@media (max-width: 768px) {
  .th-project-code,
  .td-project-code,
  .th-project-zone,
  .td-project-zone,
  .th-project-actions,
  .td-project-actions,
  .project-row-desc {
    display: none !important;
  }

  .project-row-zone {
    display: flex !important;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 3px;
  }

  .project-row-zone i {
    color: var(--orange-bright);
    font-size: 0.72rem;
  }

  .project-table-row {
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(255, 107, 0, 0.15);
  }

  .project-table-row:active td {
    background: rgba(255, 107, 0, 0.08) !important;
  }
}

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

/* ===================================================================
   STATUS PILL BADGES (Soft, Comfortable, Harmonic)
   =================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.badge-success,
.badge-visited {
  background: var(--badge-success-bg);
  color: var(--badge-success-text);
  border: 1px solid var(--badge-success-border);
}

.badge-danger,
.badge-sold {
  background: var(--badge-danger-bg);
  color: var(--badge-danger-text);
  border: 1px solid var(--badge-danger-border);
}

.badge-warning,
.badge-new {
  background: var(--badge-warning-bg);
  color: var(--badge-warning-text);
  border: 1px solid var(--badge-warning-border);
}

.badge-info,
.badge-contacted {
  background: var(--badge-info-bg);
  color: var(--badge-info-text);
  border: 1px solid var(--badge-info-border);
}

.badge-closed {
  background: var(--badge-success-bg);
  color: var(--badge-success-text);
  border: 1px solid var(--badge-success-border);
}

/* ===================================================================
   CLEAN BUTTONS (No harsh glow, balanced aesthetic)
   =================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: var(--transition);
  line-height: 1.2;
}

.btn-primary {
  background: linear-gradient(135deg, #ff7a18, #ff5200);
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(255, 107, 0, 0.25);
}

.btn-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(255, 107, 0, 0.35);
}

.btn-secondary {
  background: var(--bg-admin-surface);
  color: var(--text-light);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background: var(--bg-admin-card-hover);
  color: var(--text-white);
  border-color: var(--border-strong);
}

.btn-danger {
  background: var(--badge-danger-bg);
  color: var(--badge-danger-text);
  border: 1px solid var(--badge-danger-border);
}

.btn-danger:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
  transform: translateY(-1px);
}

.btn-danger-outline {
  background: transparent;
  color: var(--badge-danger-text);
  border: 1px solid var(--badge-danger-border);
}

.btn-danger-outline:hover {
  background: var(--badge-danger-bg);
}

.btn-sm {
  padding: 5px 10px;
  font-size: 0.82rem;
  border-radius: 6px;
}

.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: var(--radius-sm);
  background: var(--bg-admin-card);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn-icon:hover {
  background: var(--orange-subtle);
  color: var(--orange-bright);
  border-color: var(--border-orange);
}

/* ===================================================================
   FORM CONTROLS & INPUTS
   =================================================================== */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 7px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-white);
  font-family: inherit;
  font-size: 0.92rem;
  outline: none;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--orange-primary);
  box-shadow: 0 0 0 3px var(--orange-subtle);
}

.form-control::placeholder {
  color: var(--text-dim);
}

select.form-control {
  cursor: pointer;
}

/* File Upload Button & Input Styling */
.form-control[type="file"],
input[type="file"].form-control {
  padding: 6px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  font-size: 0.88rem;
  color: var(--text-muted);
  background: var(--bg-input);
  line-height: 1.5;
}

.form-control[type="file"]::file-selector-button,
input[type="file"].form-control::file-selector-button,
.form-control[type="file"]::-webkit-file-upload-button,
input[type="file"].form-control::-webkit-file-upload-button {
  background: linear-gradient(135deg, rgba(255, 107, 0, 0.2), rgba(255, 107, 0, 0.08));
  color: var(--orange-bright);
  border: 1px solid var(--border-orange);
  padding: 6px 14px;
  border-radius: 6px;
  font-family: 'Kanit', 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  margin-right: 12px;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.form-control[type="file"]::file-selector-button:hover,
input[type="file"].form-control::file-selector-button:hover,
.form-control[type="file"]::-webkit-file-upload-button:hover,
input[type="file"].form-control::-webkit-file-upload-button:hover {
  background: linear-gradient(135deg, #ff7a18, #ff5200);
  color: #ffffff;
  border-color: #ff7a18;
  box-shadow: 0 2px 10px rgba(255, 107, 0, 0.35);
  transform: translateY(-1px);
}

.form-control[type="file"]:hover {
  border-color: var(--border-orange);
}

[data-theme="light"] .form-control[type="file"] {
  color: var(--text-muted);
  background: #ffffff;
}

[data-theme="light"] .form-control[type="file"]::file-selector-button,
[data-theme="light"] input[type="file"].form-control::file-selector-button,
[data-theme="light"] .form-control[type="file"]::-webkit-file-upload-button,
[data-theme="light"] input[type="file"].form-control::-webkit-file-upload-button {
  background: rgba(255, 107, 0, 0.09);
  color: var(--orange-primary);
  border-color: rgba(255, 107, 0, 0.3);
}

[data-theme="light"] .form-control[type="file"]::file-selector-button:hover,
[data-theme="light"] input[type="file"].form-control::file-selector-button:hover,
[data-theme="light"] .form-control[type="file"]::-webkit-file-upload-button:hover,
[data-theme="light"] input[type="file"].form-control::-webkit-file-upload-button:hover {
  background: linear-gradient(135deg, #ff7a18, #ff5200);
  color: #ffffff;
}

/* ===================================================================
   MODALS & DIALOGS
   =================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-dialog {
  background: var(--bg-admin-surface);
  color: var(--text-light);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-modal);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 26px;
  position: relative;
  animation: modalFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.97) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

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

.modal-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-white);
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: var(--transition);
}

.modal-close-btn:hover {
  color: var(--text-white);
  background: var(--badge-danger-bg);
}

/* ===================================================================
   TOP-RIGHT FLOATING TOAST ALERTS & NOTIFICATIONS
   =================================================================== */
.manager-toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
  max-width: calc(100vw - 32px);
  width: 380px;
}

.manager-toast {
  pointer-events: auto;
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px 18px;
  border-radius: 14px;
  background: var(--bg-admin-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45), 0 4px 12px rgba(0, 0, 0, 0.25);
  animation: toastSlideInRight 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.manager-toast.toast-hiding {
  opacity: 0;
  transform: translateX(100%) scale(0.95);
  margin-bottom: -60px;
  pointer-events: none;
}

@keyframes toastSlideInRight {
  from {
    opacity: 0;
    transform: translateX(60px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.manager-toast .toast-icon {
  font-size: 1.35rem;
  line-height: 1;
  margin-top: 2px;
  flex-shrink: 0;
}

.manager-toast.toast-success {
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5), 0 0 24px rgba(16, 185, 129, 0.25);
}
.manager-toast.toast-success .toast-icon {
  color: #10b981;
  filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.4));
}
.manager-toast.toast-success .toast-progress {
  background: linear-gradient(90deg, #10b981, #34d399);
}

.manager-toast.toast-danger {
  border-color: rgba(239, 68, 68, 0.5);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5), 0 0 24px rgba(239, 68, 68, 0.25);
}
.manager-toast.toast-danger .toast-icon {
  color: #ef4444;
  filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.4));
}
.manager-toast.toast-danger .toast-progress {
  background: linear-gradient(90deg, #ef4444, #f87171);
}

.manager-toast .toast-content {
  flex: 1;
  min-width: 0;
}

.manager-toast .toast-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-white);
  line-height: 1.3;
  margin-bottom: 3px;
}

.manager-toast .toast-message {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.4;
  word-break: break-word;
}

.manager-toast .toast-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  font-size: 0.95rem;
  line-height: 1;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  margin: -4px -4px 0 0;
  flex-shrink: 0;
}

.manager-toast .toast-close:hover {
  color: var(--text-white);
  background: rgba(255, 255, 255, 0.08);
}

.manager-toast .toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  animation: toastProgressAnim 4.5s linear forwards;
}

@keyframes toastProgressAnim {
  from { width: 100%; }
  to { width: 0%; }
}

@media (max-width: 576px) {
  .manager-toast-container {
    top: 14px;
    right: 14px;
    max-width: calc(100vw - 28px);
    width: 360px;
  }
  .manager-toast {
    padding: 14px 14px 16px;
    gap: 10px;
  }
  .manager-toast .toast-title {
    font-size: 0.9rem;
  }
  .manager-toast .toast-message {
    font-size: 0.8rem;
  }
}

.alert {
  padding: 13px 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.92rem;
  font-weight: 500;
}

.alert-success {
  background: var(--badge-success-bg);
  border: 1px solid var(--badge-success-border);
  color: var(--badge-success-text);
}

.alert-danger {
  background: var(--badge-danger-bg);
  border: 1px solid var(--badge-danger-border);
  color: var(--badge-danger-text);
}

/* ===================================================================
   LOGIN PAGE
   =================================================================== */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: radial-gradient(circle at center, #141a24 0%, #080a0f 100%);
  position: relative;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-admin-surface);
  border: 1px solid var(--border-orange);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px var(--orange-glow);
  position: relative;
  z-index: 10;
}

.login-logo {
  text-align: center;
  margin-bottom: 28px;
}

.login-logo-img {
  height: 60px;
  margin-bottom: 12px;
}

.login-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-white);
}

.login-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Sidebar Backdrop Overlay */
.sidebar-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.sidebar-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.btn-sidebar-close {
  display: none;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-light);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-left: auto;
  font-size: 0.95rem;
  transition: var(--transition);
}

.btn-sidebar-close:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.5);
  transform: scale(1.05);
}

/* ===================================================================
   MASTER BOTTOM APP NAVIGATION DOCK (Universal All Modules)
   =================================================================== */
body.admin-body {
  padding-bottom: 85px !important;
}

.admin-sidebar {
  width: var(--sidebar-width);
  background: var(--bg-admin-surface);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1002;
  transform: translateX(-100%);
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.9);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-sidebar.open,
.admin-sidebar.active {
  transform: translateX(0);
}

.btn-sidebar-close {
  display: inline-flex;
}

.sidebar-backdrop {
  display: block;
}

.manager-bottom-nav {
  display: block;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(11, 14, 20, 0.97);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.75);
  padding-bottom: env(safe-area-inset-bottom, 8px);
  border-radius: 20px 20px 0 0;
  transition: var(--transition);
}

.manager-bottom-nav-container {
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: 68px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  padding: 0 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.manager-bottom-nav-container::-webkit-scrollbar {
  display: none;
}

.manager-bottom-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.73rem;
  font-family: 'Kanit', 'Outfit', sans-serif;
  font-weight: 500;
  gap: 3px;
  flex: 1;
  min-width: 62px;
  max-width: 105px;
  padding: 6px 4px;
  border-radius: 10px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  user-select: none;
  background: transparent;
  border: none;
  outline: none;
  text-align: center;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.manager-bottom-item i {
  font-size: 1.15rem;
  color: #94a3b8;
  transition: all 0.2s ease;
}

.manager-bottom-item:hover,
.manager-bottom-item:active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.manager-bottom-item:hover i {
  color: var(--orange-bright);
  transform: translateY(-2px);
}

.manager-bottom-item.active {
  color: var(--orange-bright) !important;
  background: rgba(255, 107, 0, 0.12);
  border-bottom: 2px solid var(--orange-primary);
  font-weight: 600;
}

.manager-bottom-item.active i {
  transform: translateY(-2px);
  color: var(--orange-bright) !important;
  filter: drop-shadow(0 2px 8px var(--orange-glow));
}

.manager-bottom-center-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-width: 74px;
  max-width: 90px;
  position: relative;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.manager-center-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff6b00, #ff8c00);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 6px 20px rgba(255, 107, 0, 0.5), 0 0 16px var(--orange-glow);
  transform: translateY(-14px);
  border: 3.5px solid #080a0f;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.manager-center-label {
  font-size: 0.68rem;
  color: #ffaa33;
  font-weight: 600;
  margin-top: -10px;
  text-align: center;
  white-space: nowrap;
  transition: var(--transition);
}

.manager-bottom-center-btn:hover .manager-center-circle,
.manager-bottom-center-btn:active .manager-center-circle,
.manager-bottom-center-btn.active .manager-center-circle {
  transform: translateY(-18px) scale(1.08);
  box-shadow: 0 8px 25px rgba(255, 107, 0, 0.7), 0 0 24px rgba(255, 140, 0, 0.6);
}

.manager-bottom-center-btn:hover .manager-center-label {
  color: #ffffff;
}

/* Responsive Dock: All 10 items on Desktop, Clean 5 items on Mobile */
@media (min-width: 992px) {
  .manager-bottom-extra {
    display: flex !important;
  }
  .manager-bottom-nav-container {
    justify-content: space-evenly;
    max-width: 1360px;
    padding: 0 12px;
  }
  .manager-bottom-item {
    font-size: 0.78rem;
    min-width: 68px;
    max-width: 105px;
    padding: 6px 6px;
  }
  .manager-bottom-item i {
    font-size: 1.2rem;
  }
}

@media (max-width: 991px) {
  .manager-bottom-extra {
    display: none !important;
  }
  .admin-topbar {
    padding: 0 16px;
  }
  .topbar-page-title {
    font-size: 1.05rem;
  }
  .manager-bottom-nav-container {
    justify-content: space-around;
    padding: 0 8px;
    max-width: 500px;
  }
  .manager-bottom-item {
    flex: 1;
    min-width: unset;
    max-width: unset;
  }
}

@media (max-width: 640px) {
  .btn-view-site span,
  .btn-topbar-logout span {
    display: none;
  }
  .btn-view-site,
  .btn-topbar-logout {
    padding: 8px 10px;
  }
  .admin-content {
    padding: 16px 10px;
  }
}

/* ===================================================================
   FILE UPLOAD & MULTI-IMAGE GALLERY MANAGEMENT STYLES
   =================================================================== */
.upload-dropzone {
  border: 2px dashed rgba(255, 107, 0, 0.4);
  background: rgba(255, 107, 0, 0.03);
  border-radius: var(--radius-md);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
  border-color: var(--orange-bright);
  background: rgba(255, 107, 0, 0.08);
  box-shadow: 0 0 20px rgba(255, 107, 0, 0.2);
  transform: translateY(-1px);
}

.upload-dropzone-icon {
  font-size: 2.2rem;
  color: var(--orange-bright);
  margin-bottom: 10px;
  display: inline-block;
  transition: transform 0.2s ease;
}

.upload-dropzone:hover .upload-dropzone-icon {
  transform: scale(1.1);
}

.upload-dropzone-title {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-white);
  margin-bottom: 4px;
}

.upload-dropzone-hint {
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* Selected Previews Grid */
.gallery-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.gallery-preview-item {
  position: relative;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: var(--transition);
}

.gallery-preview-item:hover {
  border-color: var(--border-orange);
  transform: translateY(-2px);
}

.gallery-preview-img-box {
  width: 100%;
  height: 95px;
  position: relative;
  background: #000;
}

.gallery-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-preview-remove-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  background: rgba(239, 68, 68, 0.88);
  color: #fff;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
  z-index: 5;
}

.gallery-preview-remove-btn:hover {
  background: #dc2626;
  transform: scale(1.15);
}

.gallery-preview-info {
  padding: 6px 8px;
  font-size: 0.75rem;
  background: rgba(15, 19, 26, 0.95);
  border-top: 1px solid var(--border-subtle);
}

.gallery-preview-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-light);
  font-weight: 500;
}

.gallery-preview-size {
  color: var(--orange-light);
  font-size: 0.7rem;
  margin-top: 2px;
}

/* Existing Gallery Cards */
.existing-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.existing-gallery-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: var(--transition);
}

.existing-gallery-card:hover {
  border-color: var(--border-orange);
}

.existing-gallery-card.is-cover {
  border-color: var(--orange-bright);
  box-shadow: 0 0 12px rgba(255, 107, 0, 0.35);
}

.existing-gallery-card .cover-badge {
  position: absolute;
  top: 6px;
  left: 28px;
  background: var(--orange-bright);
  color: #000;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  z-index: 5;
  box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.existing-gallery-card .gallery-card-checkbox-wrapper {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 6;
}

.existing-gallery-card .gallery-card-checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--orange-bright);
}

.existing-gallery-card .quick-delete-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  background: rgba(239, 68, 68, 0.9);
  color: #fff;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
  z-index: 6;
  box-shadow: 0 2px 5px rgba(0,0,0,0.4);
}

.existing-gallery-card .quick-delete-btn:hover {
  background: #dc2626;
  transform: scale(1.15);
}

.existing-gallery-thumb-box {
  width: 100%;
  height: 105px;
  background: #000;
  position: relative;
}

.existing-gallery-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.existing-gallery-actions {
  padding: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  background: rgba(15, 19, 26, 0.95);
  border-top: 1px solid var(--border-subtle);
}

.existing-gallery-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.btn-action-xs {
  font-size: 0.74rem;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
  background: rgba(255,255,255,0.06);
  color: var(--text-light);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-action-xs:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

.btn-action-danger {
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}

.btn-action-danger:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #fff;
}

.btn-action-cover {
  color: var(--orange-bright);
  border-color: rgba(255, 107, 0, 0.3);
}

.btn-action-cover:hover {
  background: var(--orange-primary);
  color: #fff;
}

/* Cover Image Preview Box */
.cover-preview-container {
  display: flex;
  gap: 14px;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  padding: 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
}

.cover-preview-img-wrapper {
  width: 120px;
  height: 80px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-orange);
  background: #000;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.cover-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Facility Preset Buttons */
.btn-preset-facility {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-light);
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.btn-preset-facility:hover {
  background: var(--orange-soft);
  color: var(--orange-bright);
  border-color: var(--border-orange);
  transform: translateY(-1px);
}

.btn-action-primary {
  color: var(--orange-bright);
  border-color: var(--border-orange);
  background: var(--orange-soft);
}

.btn-action-primary:hover {
  background: var(--orange-primary);
  color: #fff;
}

/* ===================================================================
   TOP-RIGHT FLOATING TOAST NOTIFICATION SYSTEM
   =================================================================== */
.manager-toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 440px;
  width: calc(100% - 36px);
  pointer-events: none;
}

.manager-toast {
  pointer-events: auto;
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px 16px 16px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(20, 27, 40, 0.96), rgba(12, 16, 26, 0.98));
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 2px 10px rgba(0, 0, 0, 0.35);
  animation: managerToastSlideInRight 0.38s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.manager-toast.toast-hiding {
  animation: managerToastSlideOutRight 0.32s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Success Toast Variant */
.manager-toast.toast-success {
  border-left: 4.5px solid #10b981;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.6), 0 0 24px rgba(16, 185, 129, 0.22);
}

.manager-toast.toast-success .toast-icon {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.35));
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.manager-toast.toast-success .toast-progress {
  background: linear-gradient(90deg, #10b981, #34d399, #6ee7b7);
}

/* Danger / Error Toast Variant */
.manager-toast.toast-danger,
.manager-toast.toast-error {
  border-left: 4.5px solid #ef4444;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.6), 0 0 24px rgba(239, 68, 68, 0.22);
}

.manager-toast.toast-danger .toast-icon,
.manager-toast.toast-error .toast-icon {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(185, 28, 28, 0.35));
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.manager-toast.toast-danger .toast-progress,
.manager-toast.toast-error .toast-progress {
  background: linear-gradient(90deg, #ef4444, #f87171, #fca5a5);
}

/* Info / Warning Variant */
.manager-toast.toast-info {
  border-left: 4.5px solid var(--orange-bright);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.6), 0 0 24px rgba(255, 107, 0, 0.22);
}

.manager-toast.toast-info .toast-icon {
  background: rgba(255, 107, 0, 0.18);
  color: var(--orange-bright);
  border: 1px solid rgba(255, 107, 0, 0.4);
}

.manager-toast.toast-info .toast-progress {
  background: linear-gradient(90deg, #ff6b00, #ff8c00, #ffaa33);
}

/* Toast Icon */
.toast-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* Toast Content */
.toast-content {
  flex: 1;
  min-width: 0;
  padding-top: 1px;
}

.toast-title {
  font-family: 'Kanit', sans-serif;
  font-size: 0.98rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 3px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.toast-message {
  font-family: 'Kanit', sans-serif;
  font-size: 0.86rem;
  color: #cbd5e1;
  line-height: 1.45;
  word-break: break-word;
  font-weight: 400;
}

/* Toast Close Button */
.toast-close {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: -2px;
  margin-right: -4px;
  flex-shrink: 0;
}

.toast-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  transform: scale(1.08);
}

/* Toast Progress Bar */
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3.5px;
  width: 100%;
  transform-origin: left;
  animation: managerToastProgress 4.5s linear forwards;
}

.manager-toast:hover .toast-progress {
  animation-play-state: paused;
}

/* Light Theme overrides */
[data-theme="light"] .manager-toast {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14), 0 2px 8px rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .toast-title {
  color: #0f172a;
}

[data-theme="light"] .toast-message {
  color: #475569;
}

[data-theme="light"] .toast-close {
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.06);
  color: #64748b;
}

[data-theme="light"] .toast-close:hover {
  background: rgba(0, 0, 0, 0.08);
  color: #0f172a;
}

/* Animations */
@keyframes managerToastSlideInRight {
  0% {
    opacity: 0;
    transform: translate3d(50px, -8px, 0) scale(0.94);
  }
  70% {
    transform: translate3d(-4px, 0, 0) scale(1.01);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes managerToastSlideOutRight {
  0% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    max-height: 180px;
    margin-bottom: 12px;
  }
  100% {
    opacity: 0;
    transform: translate3d(60px, -6px, 0) scale(0.92);
    max-height: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
  }
}

@keyframes managerToastProgress {
  0% {
    transform: scaleX(1);
  }
  100% {
    transform: scaleX(0);
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .preview-device-toggle {
    display: none !important;
  }
  .topbar-desktop-add-btn {
    display: none !important;
  }
}

@media (max-width: 640px) {
  .manager-toast-container {
    top: 14px;
    right: 12px;
    left: 12px;
    width: auto;
    max-width: unset;
  }
  .manager-toast {
    padding: 14px 14px;
    border-radius: 14px;
  }
}

/* Floating Action Button (FAB) */
.btn-fab-add {
  position: fixed;
  bottom: calc(76px + env(safe-area-inset-bottom, 10px));
  right: 18px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff6b00 0%, #ff8800 100%);
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 8px 24px rgba(255, 107, 0, 0.45), 0 3px 10px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  cursor: pointer;
  z-index: 995;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-decoration: none;
}

.btn-fab-add:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 12px 30px rgba(255, 107, 0, 0.6), 0 4px 14px rgba(0, 0, 0, 0.6);
  color: #ffffff;
}

.btn-fab-add:active {
  transform: scale(0.95);
}

@media (min-width: 769px) {
  .btn-fab-add {
    bottom: 28px;
    right: 28px;
  }
}


