/* =============================================================
   Mariundang.site - Standalone SaaS Admin Dashboard Styling
   Modern Enterprise Dark Slate & Indigo Glass Theme
   ============================================================= */

:root {
  --dash-bg-dark: #0B0F19;
  --dash-bg-card: #111827;
  --dash-border: #1E293B;
  --dash-border-hover: #334155;
  --dash-accent: #6366F1;
  --dash-accent-hover: #4F46E5;
  --dash-primary: #3B82F6;
  --dash-success: #10B981;
  --dash-warning: #F59E0B;
  --dash-danger: #EF4444;
  --dash-text: #F8FAFC;
  --dash-text-muted: #94A3B8;
  --dash-font-sans: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
  --dash-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body.saas-dashboard-body {
  background: var(--dash-bg-dark);
  color: var(--dash-text);
  font-family: var(--dash-font-sans);
  min-height: 100vh;
  padding: 24px 20px;
  line-height: 1.5;
}

.dash-container {
  max-width: 1320px;
  margin: 0 auto;
}

/* SAAS ADMIN HEADER */
.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--dash-bg-card);
  border: 1px solid var(--dash-border);
  border-radius: 14px;
  padding: 18px 24px;
  box-shadow: var(--dash-shadow);
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.dash-brand {
  display: flex;
  align-items: center;
  gap: 20px;
}

.dash-logo {
  display: inline-flex;
  align-items: center;
}

.brand-logo-img {
  height: 42px;
  width: auto;
  object-fit: contain;
  vertical-align: middle;
  background: #FFFFFF;
  padding: 4px 12px;
  border-radius: 8px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.4);
}

.dash-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #F8FAFC;
}

.dash-subtitle {
  font-size: 0.8rem;
  color: var(--dash-text-muted);
}

.badge-project {
  color: #818CF8;
  font-weight: 600;
}

#currentSlugTag {
  color: #38BDF8;
  font-family: monospace;
  font-weight: 600;
}

/* BUTTONS */
.btn-dash {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--dash-font-sans);
  font-size: 0.84rem;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-dash-primary {
  background: var(--dash-accent);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.btn-dash-primary:hover {
  background: var(--dash-accent-hover);
  transform: translateY(-1px);
}

.btn-dash-success {
  background: var(--dash-success);
  color: #FFFFFF;
}

.btn-dash-success:hover {
  background: #059669;
}

.btn-dash-secondary {
  background: #1E293B;
  color: var(--dash-text);
  border-color: #334155;
}

.btn-dash-secondary:hover {
  background: #334155;
}

.btn-dash-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #F87171;
  border-color: rgba(239, 68, 68, 0.3);
}

.btn-dash-danger:hover {
  background: rgba(239, 68, 68, 0.3);
}

.btn-dash-sm {
  padding: 6px 12px;
  font-size: 0.76rem;
  border-radius: 6px;
}

.w-100 {
  width: 100%;
}

/* STATS GRID */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--dash-bg-card);
  border: 1px solid var(--dash-border);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--dash-shadow);
}

.stat-icon {
  font-size: 1.8rem;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-blue {
  background: rgba(59, 130, 246, 0.15);
}

.icon-green {
  background: rgba(16, 185, 129, 0.15);
}

.icon-purple {
  background: rgba(99, 102, 241, 0.15);
}

.stat-label {
  font-size: 0.78rem;
  color: var(--dash-text-muted);

}

.stat-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: #FFFFFF;
}

.stat-value-slug {
  font-size: 1rem;
  font-weight: 700;
  color: #38BDF8;
  word-break: break-all;
  font-family: monospace;
}

/* MAIN CONTENT GRID */
.dash-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 24px;
}

@media (max-width: 992px) {
  .dash-grid {
    grid-template-columns: 1fr;
  }
}

.dash-col-left,
.dash-col-right {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* CARDS */
.dash-card {
  background: var(--dash-bg-card);
  border: 1px solid var(--dash-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--dash-shadow);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--dash-border);
  background: #0F172A;
}

.card-header h2 {
  font-size: 0.96rem;
  font-weight: 700;
  color: #F8FAFC;
}

.card-header svg {
  stroke: var(--dash-accent);
}

.card-header-between {
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.header-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-export-btns {
  display: flex;
  gap: 8px;
}

.card-body {
  padding: 20px;
}

/* FORMS */
.form-group {
  margin-bottom: 16px;
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-group.col {
  flex: 1;
}

label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #CBD5E1;
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  background: #0F172A;
  border: 1px solid var(--dash-border);
  border-radius: 8px;
  padding: 9px 12px;
  color: #F8FAFC;
  font-family: var(--dash-font-sans);
  font-size: 0.84rem;
  outline: none;
  transition: all 0.2s ease;
}

.form-control:focus {
  border-color: var(--dash-accent);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
}

.form-hint {
  display: block;
  font-size: 0.72rem;
  color: var(--dash-text-muted);
  margin-top: 4px;
}

.form-hint code {
  color: #38BDF8;
  background: #0F172A;
  padding: 1px 4px;
  border-radius: 4px;
}

/* SEARCH & TABLE */
.table-search-wrap {
  margin-bottom: 16px;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.dash-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.dash-table th {
  background: #0F172A;
  color: var(--dash-text-muted);
  font-weight: 600;
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--dash-border);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dash-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--dash-border);
  vertical-align: middle;
}

.dash-table tr:hover {
  background: rgba(30, 41, 59, 0.5);
}

.badge-cat {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(99, 102, 241, 0.15);
  color: #818CF8;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.guest-link-box {
  font-size: 0.76rem;
  color: #38BDF8;
  word-break: break-all;
  font-family: monospace;
}

.action-btn-group {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.btn-act {
  background: #1E293B;
  border: 1px solid #334155;
  color: #F8FAFC;
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 0.74rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-act-wa {
  background: #25D366;
  color: #000;
  font-weight: 700;
  border: none;
}

.btn-act-wa:hover {
  background: #20BA5A;
}

.btn-act-copy {
  background: rgba(99, 102, 241, 0.15);
  color: #818CF8;
}

.btn-act-del {
  background: rgba(239, 68, 68, 0.15);
  color: #F87171;
}

/* TOGGLE SENT CHECKBOX BADGE */
.toggle-sent-badge {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.toggle-sent-badge input[type="checkbox"] {
  display: none;
}

.sent-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.sent-active {
  background: rgba(16, 185, 129, 0.2);
  color: #10B981;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.sent-pending {
  background: rgba(148, 163, 184, 0.15);
  color: #94A3B8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.toggle-sent-badge:hover .sent-pill {
  transform: scale(1.03);
}

/* PAGINATION CONTROLS */
.pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--dash-border);
  font-size: 0.8rem;
  color: var(--dash-text-muted);
}

.pagination-btns {
  display: flex;
  gap: 6px;
}

.btn-page {
  background: #1E293B;
  border: 1px solid #334155;
  color: var(--dash-text);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-page:hover:not(:disabled) {
  background: var(--dash-accent);
  color: #FFFFFF;
  border-color: var(--dash-accent);
}

.btn-page:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* TOAST */
.dash-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--dash-accent);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 10px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 10000;
}

.dash-toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* CLIENT TAB MENU SYSTEM */
.dash-tab-nav {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 12px;
  flex-wrap: wrap;
}

.dash-tab-btn {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94A3B8;
  padding: 12px 22px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dash-tab-btn:hover {
  background: rgba(51, 65, 85, 0.9);
  color: #F8FAFC;
  border-color: rgba(255, 255, 255, 0.25);
}

.dash-tab-btn.active {
  background: linear-gradient(135deg, #6366F1 0%, #4F46E5 100%);
  color: #FFFFFF;
  border-color: #818CF8;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}

.client-tab-pane {
  animation: fadeInTab 0.3s ease forwards;
}

@keyframes fadeInTab {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}