/* =========================================================
   ARTS DIGITAL - COURSE AUTOMATION HUB
   DESIGN SYSTEM & THEMES (DARK & LIGHT)
========================================================= */

:root {
  /* DARK THEME (DEFAULT) */
  --bg-primary: #0a0d14;
  --bg-secondary: #101623;
  --bg-surface: #172033;
  --bg-surface-hover: #1e2942;
  --bg-card: rgba(18, 25, 41, 0.75);
  --bg-input: rgba(0, 0, 0, 0.28);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: #c0264b;

  --brand-primary: #c0264b;
  --brand-primary-hover: #db2751;
  --brand-glow: rgba(192, 38, 75, 0.35);

  --accent-blue: #3b82f6;
  --accent-cyan: #06b6d4;
  --accent-purple: #8b5cf6;
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.12);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.12);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.12);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 25px var(--brand-glow);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --bg-canvas: radial-gradient(at 10% 10%, rgba(192, 38, 75, 0.12) 0px, transparent 40%),
               radial-gradient(at 90% 90%, rgba(59, 130, 246, 0.08) 0px, transparent 40%);
}

/* LIGHT THEME */
[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-surface: #f1f5f9;
  --bg-surface-hover: #e2e8f0;
  --bg-card: rgba(255, 255, 255, 0.92);
  --bg-input: #ffffff;
  --border-color: rgba(15, 23, 42, 0.1);
  --border-focus: #c0264b;

  --brand-primary: #c0264b;
  --brand-primary-hover: #a51d3e;
  --brand-glow: rgba(192, 38, 75, 0.2);

  --accent-blue: #2563eb;
  --accent-cyan: #0891b2;
  --accent-purple: #7c3aed;
  --success: #059669;
  --success-bg: rgba(5, 150, 105, 0.12);
  --warning: #d97706;
  --warning-bg: rgba(217, 119, 6, 0.12);
  --danger: #dc2626;
  --danger-bg: rgba(220, 38, 38, 0.12);

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;

  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 20px var(--brand-glow);

  --bg-canvas: radial-gradient(at 10% 10%, rgba(192, 38, 75, 0.06) 0px, transparent 40%),
               radial-gradient(at 90% 90%, rgba(37, 99, 235, 0.05) 0px, transparent 40%);
}

/* RESET & BASE */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  min-height: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  background-image: var(--bg-canvas);
  background-attachment: fixed;
  color: var(--text-main);
  line-height: 1.5;
  overflow-x: hidden;
  transition: background-color 0.25s ease, color 0.25s ease;
}

code {
  font-family: var(--font-mono);
  background: rgba(192, 38, 75, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85em;
  color: var(--brand-primary);
  font-weight: 600;
}

/* UTILITY CLASSES */
.hidden { display: none !important; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.mt-4 { margin-top: 1.5rem; }
.text-muted { color: var(--text-muted); }
.max-h-500 { max-height: 520px; }

/* ICONS */
.icon {
  width: 18px;
  height: 18px;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
  flex-shrink: 0;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  font-family: var(--font-sans);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-primary), #991b38);
  color: #fff;
  box-shadow: 0 2px 10px var(--brand-glow);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--brand-primary-hover), #b01f42);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px var(--brand-glow);
}

.btn-secondary {
  background: var(--bg-surface);
  border-color: var(--border-color);
  color: var(--text-main);
}
.btn-secondary:hover {
  background: var(--bg-surface-hover);
  border-color: rgba(192, 38, 75, 0.3);
}

.btn-outline {
  background: transparent;
  border-color: var(--border-color);
  color: var(--text-main);
}
.btn-outline:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  background: rgba(192, 38, 75, 0.08);
}

.btn-success {
  background: linear-gradient(135deg, #059669, #047857);
  color: white;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
}
.btn-success:hover {
  background: linear-gradient(135deg, #10b981, #059669);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}
.btn-ghost:hover {
  color: var(--text-main);
  background: var(--bg-surface);
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-md);
}

.btn-sm {
  padding: 5px 11px;
  font-size: 0.8rem;
}

.btn-block {
  width: 100%;
}

/* TOASTS */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  color: var(--text-main);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent-blue);
  font-size: 0.9rem;
  font-weight: 500;
  animation: slideIn 0.3s ease-out;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 280px;
  max-width: 420px;
}
.toast-success { border-left-color: var(--success); }
.toast-error { border-left-color: var(--danger); }
.toast-warning { border-left-color: var(--warning); }

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

/* LOGIN OVERLAY */
.login-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 9, 15, 0.85);
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.glass-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.login-card {
  width: 100%;
  max-width: 440px;
  padding: 40px;
  animation: modalPop 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.brand-badge {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(192, 38, 75, 0.15);
  color: var(--brand-primary);
  border: 1px solid rgba(192, 38, 75, 0.3);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.login-brand h1 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
}
.login-brand p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* FORM ELEMENTS */
.form-group {
  margin-bottom: 18px;
}
.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(192, 38, 75, 0.18);
}

.login-hint {
  margin-top: 16px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* APP WRAPPER */
.app-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* HEADER */
.app-header {
  min-height: 68px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
  gap: 12px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--brand-primary), #6366f1);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 2px 10px var(--brand-glow);
}
.logo-icon svg {
  width: 20px;
  height: 20px;
}
.logo-text {
  display: flex;
  flex-direction: column;
}
.logo-title {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--text-main);
}
.logo-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* STATUS PILL */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  transition: all 0.2s;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-checking .status-dot { background: var(--warning); box-shadow: 0 0 8px var(--warning); }
.status-checking { color: var(--warning); border-color: rgba(245, 158, 11, 0.3); }

.status-online .status-dot { background: var(--success); box-shadow: 0 0 8px var(--success); }
.status-online { color: var(--success); border-color: rgba(16, 185, 129, 0.3); background: var(--success-bg); }

.status-offline .status-dot { background: var(--danger); box-shadow: 0 0 8px var(--danger); }
.status-offline { color: var(--danger); border-color: rgba(239, 68, 68, 0.3); background: var(--danger-bg); }

/* NAV TABS */
.nav-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-surface);
  padding: 4px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  overflow-x: auto;
  max-width: 100%;
}
.nav-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  white-space: nowrap;
}
.nav-tab:hover {
  color: var(--text-main);
  background: rgba(192, 38, 75, 0.08);
}
.nav-tab.active {
  color: #fff;
  background: var(--brand-primary);
  box-shadow: 0 2px 8px var(--brand-glow);
}

/* HEADER RIGHT */
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}
.user-info {
  display: flex;
  flex-direction: column;
}
.user-name {
  font-size: 0.82rem;
  font-weight: 700;
}
.user-role-badge {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--brand-primary);
  letter-spacing: 0.5px;
}

/* MAIN CONTENT */
.app-main {
  flex: 1;
  padding: 24px;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
}

.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); }
}

/* SECTION TOOLBAR */
.section-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}
.toolbar-left h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
}
.toolbar-left .subtitle {
  font-size: 0.84rem;
  color: var(--text-muted);
}
.toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* SEARCH & FILTERS */
.search-box {
  position: relative;
  width: 260px;
}
.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
}
.search-box input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.85rem;
}
.search-box input:focus {
  outline: none;
  border-color: var(--brand-primary);
}

.select-filter {
  padding: 8px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.85rem;
}

/* CARDS */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

/* DATA TABLE */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
  min-width: 700px;
}
.data-table th {
  background: var(--bg-surface);
  padding: 12px 16px;
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  vertical-align: middle;
}
.data-table tr:hover td {
  background: var(--bg-surface-hover);
}
.data-table tr:last-child td {
  border-bottom: none;
}

.table-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-surface);
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* BADGES */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.badge-shift-mj { background: rgba(16, 185, 129, 0.15); color: #059669; border: 1px solid rgba(16, 185, 129, 0.35); }
.badge-shift-lm { background: rgba(245, 158, 11, 0.15); color: #d97706; border: 1px solid rgba(245, 158, 11, 0.35); }
.badge-shift-sab { background: rgba(148, 163, 184, 0.18); color: var(--text-muted); border: 1px solid rgba(148, 163, 184, 0.35); }
.badge-shift-mv { background: rgba(244, 114, 182, 0.18); color: #db2777; border: 1px solid rgba(244, 114, 182, 0.35); }
.badge-neutral { background: var(--bg-surface); color: var(--text-muted); border: 1px solid var(--border-color); }

/* UPLOAD DROPZONE */
.upload-card {
  padding: 32px 24px;
  border: 2px dashed rgba(192, 38, 75, 0.3);
  background: var(--bg-surface);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}
.upload-card:hover, .upload-card.drag-over {
  border-color: var(--brand-primary);
  background: rgba(192, 38, 75, 0.08);
  box-shadow: var(--shadow-glow);
}
.dropzone-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  background: var(--bg-secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-primary);
  border: 1px solid var(--border-color);
}
.dropzone-icon svg { width: 28px; height: 28px; }
.upload-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.upload-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* EDITABLE GRID */
.editable-grid input {
  width: 100%;
  padding: 6px 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.85rem;
  font-family: inherit;
}
.editable-grid input:focus {
  border-color: var(--brand-primary);
  outline: none;
}
.table-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
}

/* DIFF TABLE */
.diff-table th { font-size: 0.75rem; }
.diff-cell-box {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.82rem;
}
.diff-old {
  color: var(--danger);
  text-decoration: line-through;
  opacity: 0.75;
}
.diff-new {
  color: var(--success);
  font-weight: 700;
}
.diff-unchanged {
  color: var(--text-muted);
}
.diff-summary-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.diff-chip {
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 600;
}
.diff-chip-green { background: var(--success-bg); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.3); }
.diff-chip-yellow { background: var(--warning-bg); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.3); }
.diff-chip-red { background: var(--danger-bg); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.3); }

/* ADMIN SECTION */
.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.admin-card {
  padding: 24px;
}
.admin-card .card-header {
  margin-bottom: 20px;
}
.admin-card .card-header h3 {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 4px;
}
.admin-card .card-header p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.profiles-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.profile-item {
  padding: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s;
}
.profile-item.active-profile {
  border-color: var(--success);
  background: var(--success-bg);
}
.profile-item-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.profile-title {
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.profile-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.profile-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* MODALS */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 14, 0.7);
  backdrop-filter: blur(10px);
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-dialog {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 580px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  animation: modalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}
.modal-lg { max-width: 780px; }
.modal-xl { max-width: 1100px; }

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-header h3 {
  font-size: 1.15rem;
  font-weight: 800;
}
.modal-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
}
.modal-close-btn:hover { color: var(--text-main); }

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

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-surface);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.form-row {
  display: flex;
  gap: 14px;
}
.flex-1 { flex: 1; }
.flex-2 { flex: 2; }

.form-fieldset {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 18px;
  background: var(--bg-surface);
}
.form-fieldset legend {
  padding: 0 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-cyan);
}
.fieldset-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.conn-test-result {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
}
.conn-test-result.success {
  background: var(--success-bg);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: var(--success);
}
.conn-test-result.error {
  background: var(--danger-bg);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: var(--danger);
}

/* =========================================================
   RESPONSIVE DESIGN (TABLETS, IPADS, MOBILE, IFRAMES)
========================================================= */

@media (max-width: 1024px) {
  .app-header {
    padding: 10px 16px;
  }
  .nav-tabs {
    order: 3;
    width: 100%;
    margin-top: 4px;
  }
  .admin-grid {
    grid-template-columns: 1fr;
  }
  .form-row {
    flex-wrap: wrap;
  }
  .flex-2, .flex-1 {
    flex: 1 1 100%;
  }
}

@media (max-width: 768px) {
  .app-main {
    padding: 16px;
  }
  .section-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }
  .toolbar-right {
    width: 100%;
  }
  .search-box {
    width: 100%;
  }
  .select-filter {
    width: 100%;
  }
  .modal-dialog {
    max-width: 100%;
    margin: 8px;
    max-height: 96vh;
  }
  .modal-header, .modal-body, .modal-footer {
    padding: 16px;
  }
  .user-info {
    display: none;
  }
}

@media (max-width: 480px) {
  .logo-title {
    font-size: 0.85rem;
  }
  .logo-subtitle {
    display: none;
  }
  .status-pill .status-text {
    display: none;
  }
  .nav-tab span {
    font-size: 0.78rem;
  }
  .btn {
    padding: 7px 12px;
    font-size: 0.82rem;
  }
}
