/* =========================================
   ACADEMY - Admin Dashboard CSS
   Aligned with User Dashboard Design System
   ========================================= */

/* ===== GOOGLE FONTS ===== */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@300;400;500;600;700&family=DM+Sans:wght@400;500;700&display=swap");

/* ===== CSS VARIABLES (Matching User Dashboard) ===== */
:root {
  /* Light Theme Colors */
  --dashboard-bg: #dfe5ef;
  --widget-bg: #dfe5ef;
  --widget-title-bg: #e0eaff;
  --primary-text: #002b69;
  --secondary-text: #3d3d3d;
  --accent-color: #0056d2;
  --gradient-btn: linear-gradient(135deg, #362fd9, #362fd9, #2e97a7);

  /* Additional Light Theme Colors */
  --card-bg: #ffffff;
  --border-color: #c5cfe0;
  --hover-bg: #d0d9e8;
  --success-color: #28a745;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --info-color: #17a2b8;

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 43, 105, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 43, 105, 0.12);
  --shadow-lg: 0 8px 24px rgba(0, 43, 105, 0.15);

  /* Typography */
  --font-primary:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-secondary: "Poppins", sans-serif;
  --font-display: "DM Sans", sans-serif;
}

[data-theme="dark"] {
  /* Dark Theme Colors */
  --dashboard-bg: #191d24;
  --widget-bg: #232935;
  --widget-title-bg: #232935;
  --primary-text: #dfe5ef;
  --secondary-text: #dadfe9;
  --accent-color: #0056d2;
  --gradient-btn: linear-gradient(135deg, #362fd9, #362fd9, #2e97a7);

  /* Additional Dark Theme Colors */
  --card-bg: #2a3142;
  --border-color: #3a4052;
  --hover-bg: #2f3648;
  --success-color: #34d058;
  --warning-color: #ffb020;
  --danger-color: #f85149;
  --info-color: #58a6ff;

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  background-color: var(--dashboard-bg);
  color: var(--primary-text);
  line-height: 1.6;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
  overflow-x: hidden;
}

/* ===== LAYOUT STRUCTURE ===== */
.app-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: 280px;
  background-color: var(--card-bg);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  z-index: 1000;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
}

/* Sidebar Logo */
.sidebar-logo {
  padding: 24px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-logo img {
  max-width: 160px;
  height: auto;
}

/* Sidebar Nav */
.sidebar-nav {
  flex: 1;
  padding: 20px 12px;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  margin-bottom: 6px;
  border-radius: 12px;
  color: var(--secondary-text);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
}

.nav-item i,
.nav-icon {
  font-size: 20px;
  width: 24px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-icon i {
  font-size: 20px;
}

.nav-text {
  flex: 1;
  white-space: nowrap;
}

.nav-item:hover {
  background-color: var(--hover-bg);
  color: var(--accent-color);
  transform: translateX(4px);
}

.nav-item.active {
  background-color: var(--accent-color);
  color: white;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.nav-item.active i,
.nav-item.active .nav-icon i {
  color: white;
}

/* Navigation Badges */
.nav-badge {
  padding: 3px 8px;
  background: var(--danger-color);
  color: white;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  min-width: 22px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-item.active .nav-badge {
  background: rgba(255, 255, 255, 0.9);
  color: var(--danger-color);
}

/* Sidebar Bottom Section */
.sidebar-bottom {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
}

.sidebar-nav-secondary {
  padding: 12px 12px 0 12px;
}

.sidebar-nav-secondary .nav-item {
  padding: 12px 18px;
  margin-bottom: 4px;
  font-size: 14px;
}

.sidebar-nav-secondary .nav-item i {
  font-size: 18px;
}

/* Sidebar Footer & Profile Card */
.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border-color);
  background-color: var(--widget-title-bg);
  position: relative;
}

.user-profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  background-color: var(--card-bg);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.user-profile-card:hover {
  background-color: var(--hover-bg);
}

.user-avatar,
.profile-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-color), #003d99);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}

.profile-avatar-wrapper {
  position: relative;
  flex-shrink: 0;
}

.profile-status-dot {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  background: var(--success-color);
  border: 3px solid var(--card-bg);
  border-radius: 50%;
}

.user-info,
.profile-details {
  flex: 1;
  min-width: 0;
}

.user-name,
.profile-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-email,
.profile-role {
  font-size: 12px;
  color: var(--secondary-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-chevron {
  color: var(--secondary-text);
  font-size: 12px;
  transition: transform 0.2s ease;
}

.user-profile-card.active .profile-chevron {
  transform: rotate(180deg);
}

/* Profile Dropdown */
.profile-dropdown {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 16px;
  right: 16px;
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  margin-bottom: 8px;
  overflow: hidden;
  z-index: 1000;
}

.profile-dropdown.show {
  display: block;
}

.profile-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--primary-text);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
}

.profile-dropdown-item:hover {
  background-color: var(--hover-bg);
  color: #e74c3c;
}

.profile-dropdown-item i {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

/* ===== MAIN CONTENT AREA ===== */
.main-content {
  flex: 1;
  margin-left: 280px;
  padding: 32px;
  min-height: 100vh;
  background-color: var(--dashboard-bg);
  transition: margin-left 0.3s ease;
}

/* ===== WELCOME BANNER ===== */
.welcome-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 32px;
  background: linear-gradient(135deg, var(--accent-color), #0041a8);
  border-radius: 16px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-md);
  color: white;
}

.welcome-text h1 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 6px;
  color: white;
}

.welcome-text h1 span {
  color: #ffd700;
}

.welcome-text p {
  font-size: 15px;
  opacity: 0.9;
  font-weight: 400;
  color: white;
}

.quick-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.btn-theme-toggle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.15);
  color: white;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-theme-toggle:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.05);
}

/* ===== CONTENT PAGES ===== */
.content-page {
  animation: fadeIn 0.3s ease;
}

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

/* ===== SECTION HEADER ===== */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 20px;
}

.section-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary-text);
  margin-bottom: 6px;
  font-family: var(--font-display);
}

.section-subtitle {
  color: var(--secondary-text);
  font-size: 15px;
}

.section-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

/* ===== REFRESH STATUS ===== */
.refresh-status {
  background: linear-gradient(135deg, var(--info-color), #0d8aa8);
  color: white;
  padding: 12px 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  display: none;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.refresh-status i {
  animation: spin 1s linear infinite;
}

/* ===== BUTTONS ===== */
.btn,
.action-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
  font-size: 14px;
  line-height: 1.4;
  box-shadow: var(--shadow-sm);
  font-family: var(--font-primary);
}

.btn:hover,
.action-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn:active,
.action-btn:active {
  transform: translateY(0);
}

.btn:disabled,
.action-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--gradient-btn);
  color: white;
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(54, 47, 217, 0.3);
}

.btn-success {
  background: linear-gradient(135deg, var(--success-color), #1e8f3c);
  color: white;
}

.btn-success:hover {
  box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger-color), #bd2130);
  color: white;
}

.btn-danger:hover {
  box-shadow: 0 6px 20px rgba(220, 53, 69, 0.3);
}

.btn-warning {
  background: linear-gradient(135deg, var(--warning-color), #e0a800);
  color: #212529;
}

.btn-warning:hover {
  box-shadow: 0 6px 20px rgba(255, 193, 7, 0.3);
}

.btn-secondary {
  background: linear-gradient(135deg, #6c757d, #5a6268);
  color: white;
}

.btn-secondary:hover {
  box-shadow: 0 6px 20px rgba(108, 117, 125, 0.3);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

/* ===== METRICS / STATS GRID ===== */
.stats-grid,
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card,
.metric-card {
  background-color: var(--card-bg);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

.stat-card:hover,
.metric-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.stat-card.loading {
  justify-content: center;
  min-height: 120px;
}

.stat-icon,
.metric-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  flex-shrink: 0;
}

.stat-content,
.metric-content {
  flex: 1;
}

.stat-content h3,
.metric-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-text);
  font-family: var(--font-display);
  margin-bottom: 4px;
  line-height: 1;
}

.stat-content p,
.metric-label {
  color: var(--secondary-text);
  font-weight: 500;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ===== WIDGET / TABLE CONTAINER ===== */
.widget,
.table-container {
  background-color: var(--card-bg);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.widget-header,
.table-header {
  padding: 20px 24px;
  background-color: var(--widget-title-bg);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.widget-header h3,
.table-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--primary-text);
  font-family: var(--font-secondary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.table-title i {
  color: var(--accent-color);
}

.widget-body {
  padding: 24px;
}

.table-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.table-search {
  position: relative;
  display: flex;
  align-items: center;
}

.table-search i {
  position: absolute;
  left: 16px;
  color: var(--secondary-text);
  z-index: 1;
}

.table-search input {
  padding: 12px 16px 12px 48px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  font-size: 14px;
  width: 280px;
  transition: all 0.3s ease;
  background: var(--card-bg);
  color: var(--primary-text);
  font-family: var(--font-primary);
}

.table-search input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(0, 86, 210, 0.1);
}

.table-content {
  overflow-x: auto;
}

/* ===== TABLE STYLES ===== */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

th {
  background-color: var(--widget-title-bg);
  font-weight: 600;
  color: var(--primary-text);
  position: sticky;
  top: 0;
  z-index: 10;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
}

tr {
  transition: background-color 0.2s ease;
}

tr:hover {
  background-color: var(--hover-bg);
}

/* ===== STATUS PILLS ===== */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 24px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-pill.approved,
.status-pill.verified {
  background: rgba(40, 167, 69, 0.15);
  color: var(--success-color);
  border: 1px solid rgba(40, 167, 69, 0.3);
}

.status-pill.pending {
  background: rgba(255, 193, 7, 0.15);
  color: var(--warning-color);
  border: 1px solid rgba(255, 193, 7, 0.3);
}

.status-pill.running {
  background: rgba(23, 162, 184, 0.15);
  color: var(--info-color);
  border: 1px solid rgba(23, 162, 184, 0.3);
}

.status-pill.stopped {
  background: rgba(149, 165, 166, 0.15);
  color: #95a5a6;
  border: 1px solid rgba(149, 165, 166, 0.3);
}

.status-pill i {
  font-size: 10px;
}

/* ===== INSTANCE/USER INFO STYLES ===== */
.instance-id {
  font-family: "Courier New", monospace;
  font-weight: 600;
  font-size: 13px;
  background: rgba(0, 86, 210, 0.08);
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--accent-color);
  border: 1px solid rgba(0, 86, 210, 0.15);
}

.victim-ip {
  font-family: "Courier New", monospace;
  font-weight: 600;
  font-size: 14px;
  background: rgba(40, 167, 69, 0.1);
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--success-color);
  border: 1px solid rgba(40, 167, 69, 0.3);
}

.time-remaining {
  font-family: "Courier New", monospace;
  font-weight: 600;
  color: var(--success-color);
  font-size: 14px;
}

.time-remaining.warning {
  color: var(--warning-color);
}

/* ===== ACTIVITY LOGS ===== */
.activity-row {
  transition: all 0.2s ease;
  padding: 8px 12px;
  margin: 2px 0;
  border-radius: 4px;
}

.activity-row:hover {
  transform: translateX(2px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.activity-row.login-activity {
  background-color: rgba(40, 167, 69, 0.08);
  border-left: 3px solid var(--success-color);
}

.activity-row.instance-activity {
  background-color: rgba(23, 162, 184, 0.08);
  border-left: 3px solid var(--info-color);
}

.activity-row.victim-activity {
  background-color: rgba(255, 193, 7, 0.08);
  border-left: 3px solid var(--warning-color);
}

.activity-row.admin-activity {
  background-color: rgba(220, 53, 69, 0.08);
  border-left: 3px solid var(--danger-color);
}

.activity-info {
  font-size: 12px;
  color: var(--secondary-text);
  margin-top: 4px;
  display: block;
  font-family: "Courier New", monospace;
  background: rgba(0, 0, 0, 0.03);
  padding: 6px 8px;
  border-radius: 4px;
  border-left: 2px solid var(--border-color);
}

/* ===== MODALS ===== */
.modal-overlay,
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.show,
.modal-backdrop.show {
  opacity: 1;
  visibility: visible;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  z-index: 2001;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid var(--border-color);
}

/* Modal size variants — applied to .modal element */
.modal.modal-sm {
  max-width: 460px;
}

.modal.modal-lg {
  max-width: 800px;
}

.modal.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.modal-content {
  width: 100%;
}

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

.modal-header h2,
.modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--primary-text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-header h2 i,
.modal-header h3 i {
  color: var(--accent-color);
}

.modal-close,
.close {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--secondary-text);
  padding: 0;
  line-height: 1;
  transition: color 0.2s;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.modal-close:hover,
.close:hover {
  color: var(--danger-color);
  background: rgba(220, 53, 69, 0.1);
}

.modal-body {
  padding: 24px;
}

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

/* ===== FORM STYLES ===== */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--primary-text);
  font-size: 14px;
}

.form-control,
.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  font-size: 14px;
  transition: all 0.3s ease;
  background: var(--card-bg);
  color: var(--primary-text);
  font-family: var(--font-primary);
}

.form-control:focus,
.form-input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(0, 86, 210, 0.1);
}

.form-help {
  font-size: 12px;
  color: var(--secondary-text);
  margin-top: 6px;
  display: block;
  line-height: 1.4;
}

.form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.form-row .form-group {
  flex: 1;
}

.checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: normal;
  gap: 8px;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

textarea.form-control,
textarea.form-input {
  resize: vertical;
  min-height: 100px;
}

/* ===== WARNING/INFO MESSAGES ===== */
.warning-message {
  background: rgba(255, 193, 7, 0.1);
  border-left: 4px solid var(--warning-color);
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--warning-color);
  font-weight: 600;
}

.warning-message i {
  font-size: 24px;
}

.success-message {
  background: rgba(40, 167, 69, 0.1);
  border-left: 4px solid var(--success-color);
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--success-color);
  font-weight: 600;
}

.success-message i {
  font-size: 24px;
}

.user-info-box,
.instance-info {
  background: var(--widget-bg);
  padding: 16px;
  border-radius: 12px;
  margin: 16px 0;
  line-height: 1.8;
  border: 1px solid var(--border-color);
}

/* ===== USER DETAILS ===== */
.user-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.user-detail-item {
  background: var(--widget-bg);
  padding: 16px;
  border-radius: 12px;
  border-left: 3px solid var(--accent-color);
}

.user-detail-label {
  font-size: 12px;
  color: var(--secondary-text);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.user-detail-value {
  font-size: 15px;
  color: var(--primary-text);
  font-weight: 600;
}

/* ===== LOADING STATES ===== */
.loading-spinner {
  border: 3px solid var(--border-color);
  border-top: 3px solid var(--accent-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--secondary-text);
}

.no-data,
.no-instances-modern {
  text-align: center;
  padding: 60px 20px;
  color: var(--secondary-text);
}

.no-data i,
.no-instances-modern i {
  font-size: 64px;
  color: var(--border-color);
  margin-bottom: 16px;
  display: block;
}

.no-data p,
.no-instances-modern p {
  font-size: 16px;
  font-weight: 500;
}

.error-message {
  text-align: center;
  padding: 60px 20px;
  color: var(--danger-color);
  font-weight: 600;
}

.error-message i {
  font-size: 64px;
  margin-bottom: 16px;
  display: block;
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 420px;
  width: calc(100% - 48px);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px;
  margin-bottom: 12px;
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  border-left: 4px solid var(--accent-color);
  animation: toastSlideIn 0.35s ease-out forwards;
  pointer-events: auto;
  min-width: 0;
  max-height: 200px;
  overflow: hidden;
  transition:
    max-height 0.35s ease,
    padding 0.35s ease,
    margin-bottom 0.35s ease,
    opacity 0.35s ease;
}

.toast.toast-success,
.toast.success {
  border-left-color: #00b894;
}

.toast.toast-error,
.toast.error {
  border-left-color: #e74c3c;
}

.toast.toast-warning,
.toast.warning {
  border-left-color: #f39c12;
}

.toast.toast-info,
.toast.info {
  border-left-color: #0984e3;
}

.toast-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
}

.toast-success .toast-icon,
.toast.success .toast-icon {
  background: rgba(0, 184, 148, 0.15);
  color: #00b894;
}

.toast-error .toast-icon,
.toast.error .toast-icon {
  background: rgba(231, 76, 60, 0.15);
  color: #e74c3c;
}

.toast-warning .toast-icon,
.toast.warning .toast-icon {
  background: rgba(243, 156, 18, 0.15);
  color: #f39c12;
}

.toast-info .toast-icon,
.toast.info .toast-icon {
  background: rgba(9, 132, 227, 0.15);
  color: #0984e3;
}

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

.toast-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-text);
  margin-bottom: 4px;
}

.toast-message {
  font-size: 13px;
  color: var(--secondary-text);
  line-height: 1.4;
  word-wrap: break-word;
}

.toast-close {
  background: none;
  border: none;
  color: var(--secondary-text);
  cursor: pointer;
  padding: 4px;
  font-size: 14px;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.toast-close:hover {
  opacity: 1;
}

.toast.toast-hiding {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  margin-bottom: 0;
  opacity: 0;
  transform: translateX(60px);
  pointer-events: none;
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(80px);
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-bottom: 0;
  }
  to {
    opacity: 1;
    transform: translateX(0);
    max-height: 200px;
    padding-top: 16px;
    padding-bottom: 16px;
    margin-bottom: 12px;
  }
}

/* Toast mobile responsiveness */
@media (max-width: 480px) {
  .toast-container {
    top: 12px;
    right: 12px;
    max-width: none;
    width: calc(100% - 24px);
  }
  .toast {
    padding: 12px 14px;
    margin-bottom: 8px;
    border-radius: 10px;
    gap: 10px;
  }
  .toast-title {
    font-size: 13px;
  }
  .toast-message {
    font-size: 12px;
  }
}

/* ===== BULK ACTIONS ===== */
.bulk-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  padding: 16px;
  background: var(--widget-bg);
  border-radius: 12px;
  align-items: center;
  border: 1px solid var(--border-color);
}

.bulk-actions.hidden {
  display: none;
}

.bulk-select-all {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--primary-text);
}

/* ===== PAGINATION ===== */
.pagination-container {
  padding: 20px;
  background: var(--widget-bg);
  border-top: 1px solid var(--border-color);
  border-radius: 0 0 16px 16px;
}

.pagination-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ===== BADGES ===== */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-admin {
  background: linear-gradient(135deg, var(--danger-color), #bd2130);
  color: white;
}

.badge-verified {
  background: linear-gradient(135deg, var(--success-color), #1e8f3c);
  color: white;
}

/* ===== RECENT ACTIVITY SUMMARY ===== */
.recent-activity-summary {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.recent-activity-summary h3 {
  margin-bottom: 20px;
  color: var(--primary-text);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 600;
  font-family: var(--font-secondary);
}

.recent-activity-summary h3 i {
  color: var(--accent-color);
}

#recentActivityList {
  max-height: 400px;
  overflow-y: auto;
}

.activity-summary-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
  gap: 12px;
  flex-wrap: wrap;
}

.activity-summary-item:last-child {
  border-bottom: none;
}

.activity-summary-text {
  font-size: 14px;
  color: var(--primary-text);
  flex: 1;
  min-width: 0;
  word-wrap: break-word;
  line-height: 1.6;
}

.activity-summary-text strong {
  color: var(--accent-color);
  font-weight: 600;
}

.activity-summary-time {
  font-size: 12px;
  color: var(--secondary-text);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ===== PASSWORD INPUT ===== */
.password-input-container {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-container input {
  flex: 1;
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--secondary-text);
  font-size: 16px;
  transition: color 0.2s;
}

.password-toggle:hover {
  color: var(--accent-color);
}

.password-actions {
  margin-top: 8px;
}

/* ===== DURATION INPUT ===== */
.duration-input-group {
  display: flex;
  gap: 12px;
}

.duration-input-group input,
.duration-input-group select {
  flex: 1;
}

/* ===== UTILITIES ===== */
.text-center {
  text-align: center;
}

.mb-2,
.mb-20 {
  margin-bottom: 16px;
}

.mb-3 {
  margin-bottom: 24px;
}

.mt-2,
.mt-20 {
  margin-top: 16px;
}

.hidden {
  display: none !important;
}

/* ===== MOBILE MENU TOGGLE ===== */
.sidebar-toggle {
  display: none;
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1100;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background-color: var(--accent-color);
  color: white;
  border: none;
  font-size: 20px;
  cursor: pointer;
  box-shadow: var(--shadow-md);
}

/* Legacy sidebarToggle ID support */
#sidebarToggle {
  display: none;
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1100;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background-color: var(--accent-color);
  color: white;
  border: none;
  font-size: 20px;
  cursor: pointer;
  box-shadow: var(--shadow-md);
}

/* ===== OVERLAY FOR MOBILE ===== */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
  .stats-grid,
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.show,
  .sidebar.active {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
    padding: 20px 16px;
  }

  #sidebarToggle,
  .sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .main-content {
    padding-top: 80px;
  }

  .sidebar-overlay.show {
    display: block;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-actions {
    width: 100%;
  }

  .section-title {
    font-size: 24px;
  }

  .stats-grid,
  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .table-search input {
    width: 100%;
  }

  .table-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .modal {
    width: 95%;
    max-width: none;
  }

  .welcome-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
  }

  .welcome-text h1 {
    font-size: 24px;
  }

  .widget-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .action-btn,
  .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ===== MODULE MANAGER ===== */

/* Wider modal for compose editing — applied to .modal, not .modal-content */
.modal.modal-wide {
  max-width: 850px;
}

/* Module filters bar */
.module-filters {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: center;
}

.module-filters select {
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--card-bg);
  color: var(--primary-text);
  font-size: 13px;
  min-width: 140px;
  cursor: pointer;
  transition: border-color 0.2s;
}

.module-filters select:focus {
  outline: none;
  border-color: var(--accent-color);
}

/* Module title cell */
.module-title-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.module-title-cell strong {
  font-size: 14px;
}

.module-key {
  font-size: 11px;
  color: var(--secondary-text);
  font-family: "SF Mono", "Fira Code", monospace;
  opacity: 0.7;
}

/* Module action buttons */
.module-actions {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

/* Status badges for module lifecycle */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
  white-space: nowrap;
}

.status-draft {
  background: rgba(108, 117, 125, 0.15);
  color: #6c757d;
}

.status-building {
  background: rgba(0, 123, 255, 0.15);
  color: #007bff;
  animation: statusPulse 2s infinite;
}

.status-built {
  background: rgba(40, 167, 69, 0.15);
  color: #28a745;
}

.status-failed {
  background: rgba(220, 53, 69, 0.15);
  color: #dc3545;
}

.status-pending {
  background: rgba(255, 193, 7, 0.15);
  color: #d39e00;
}

.status-approved {
  background: rgba(40, 167, 69, 0.15);
  color: #28a745;
}

.status-rejected {
  background: rgba(220, 53, 69, 0.15);
  color: #dc3545;
}

.status-disabled {
  background: rgba(108, 117, 125, 0.12);
  color: #868e96;
}

.status-deleted {
  background: rgba(73, 80, 87, 0.12);
  color: #495057;
  text-decoration: line-through;
}

.status-active {
  background: rgba(40, 167, 69, 0.15);
  color: #28a745;
}

.status-inactive {
  background: rgba(108, 117, 125, 0.12);
  color: #868e96;
}

/* Completed and queued status for build jobs */
.status-completed {
  background: rgba(40, 167, 69, 0.15);
  color: #28a745;
}
.status-queued {
  background: rgba(0, 123, 255, 0.12);
  color: #007bff;
}
.status-claimed {
  background: rgba(0, 123, 255, 0.15);
  color: #007bff;
}
.status-transferring {
  background: rgba(255, 193, 7, 0.15);
  color: #d39e00;
}
.status-timed_out {
  background: rgba(220, 53, 69, 0.12);
  color: #dc3545;
}
.status-cancelled {
  background: rgba(108, 117, 125, 0.12);
  color: #868e96;
}

@keyframes statusPulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

/* OS type badges */
.os-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.os-linux {
  background: rgba(255, 165, 0, 0.15);
  color: #e67e22;
}
.os-windows {
  background: rgba(0, 120, 215, 0.15);
  color: #0078d7;
}
.os-bsd {
  background: rgba(170, 0, 0, 0.15);
  color: #aa0000;
}
.os-other {
  background: rgba(108, 117, 125, 0.12);
  color: #6c757d;
}

/* Category badges */
.category-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}

.cat-easy {
  background: rgba(40, 167, 69, 0.12);
  color: #28a745;
}
.cat-medium {
  background: rgba(255, 193, 7, 0.12);
  color: #d39e00;
}
.cat-advanced {
  background: rgba(220, 53, 69, 0.12);
  color: #dc3545;
}

/* Compose editor textarea */
.compose-editor {
  font-family: "SF Mono", "Fira Code", "Consolas", monospace !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
  tab-size: 2;
  white-space: pre;
  background: #1a1d23 !important;
  color: #e4e8eb !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 8px !important;
  padding: 16px !important;
  resize: vertical;
}

.compose-editor::placeholder {
  color: rgba(228, 232, 235, 0.3);
}

/* Resource limits section */
.resource-limits-section {
  background: var(--widget-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 20px;
}

.resource-limits-section h4 {
  margin: 0 0 16px 0;
  font-size: 14px;
  color: var(--primary-text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.resource-limits-section h4 i {
  color: var(--accent-color);
}

.resource-limits-section .form-row {
  margin-bottom: 0;
}

/* Build log terminal panel */
.build-log-panel {
  background: #0d1117;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  margin-top: 20px;
  overflow: hidden;
}

.build-log-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #161b22;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.build-log-header h3 {
  margin: 0;
  font-size: 14px;
  color: #58a6ff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.build-log-content {
  padding: 12px 16px;
  max-height: 400px;
  overflow-y: auto;
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
  font-size: 12px;
  line-height: 1.6;
}

.build-log-line {
  padding: 2px 0;
  color: #c9d1d9;
  word-break: break-all;
}

.build-log-line .log-time {
  color: #484f58;
  margin-right: 8px;
}

.build-log-line .log-level {
  font-weight: 600;
  margin-right: 6px;
}

.log-info .log-level {
  color: #58a6ff;
}
.log-warn .log-level {
  color: #d29922;
}
.log-error {
  color: #f85149;
}
.log-error .log-level {
  color: #f85149;
}
.log-step .log-level {
  color: #3fb950;
}
.log-debug {
  color: #484f58;
}
.log-debug .log-level {
  color: #484f58;
}

.build-log-empty,
.build-log-error {
  color: #484f58;
  text-align: center;
  padding: 24px;
  font-style: italic;
}

.build-log-error {
  color: #f85149;
}

/* Module detail modal grid */
.module-detail-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.detail-section {
  background: var(--widget-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px 20px;
}

.detail-section h4 {
  margin: 0 0 12px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-color);
}

.detail-table {
  width: 100%;
  font-size: 13px;
}

.detail-table td,
.detail-table th {
  padding: 6px 12px;
  border-bottom: 1px solid var(--border-color);
}

.detail-table td:first-child,
.detail-table th:first-child {
  font-weight: 600;
  color: var(--secondary-text);
  white-space: nowrap;
  width: 140px;
}

.detail-table code {
  background: rgba(0, 0, 0, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
}

/* Compose preview in detail view */
.compose-preview {
  background: #0d1117;
  color: #c9d1d9;
  padding: 16px;
  border-radius: 8px;
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
  font-size: 12px;
  line-height: 1.5;
  overflow-x: auto;
  white-space: pre;
  max-height: 300px;
  overflow-y: auto;
  margin: 0;
}

/* Small action button variant */
.btn-sm {
  padding: 4px 8px !important;
  font-size: 11px !important;
  min-width: unset !important;
}

/* Empty state for module table */
.empty-state {
  text-align: center;
  padding: 48px 20px !important;
  color: var(--secondary-text);
}

.empty-state p {
  margin-top: 8px;
  font-size: 14px;
}

/* Form elements used in module form */
#addModuleForm input[type="text"],
#addModuleForm textarea,
#addModuleForm select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--card-bg);
  color: var(--primary-text);
  font-size: 14px;
  transition: border-color 0.2s;
}

#addModuleForm input[type="text"]:focus,
#addModuleForm textarea:focus,
#addModuleForm select:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(0, 86, 210, 0.1);
}

#addModuleForm label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 13px;
  color: var(--primary-text);
}

/* Responsive adjustments for module page */
@media (max-width: 768px) {
  .module-filters {
    flex-direction: column;
  }

  .module-filters select {
    width: 100%;
  }

  .module-actions {
    justify-content: flex-start;
  }

  .modal.modal-wide {
    max-width: 95%;
  }
}

/* ═════════════════════════════════════════════════
   CORPORATE ADMIN STYLES
   ═════════════════════════════════════════════════ */

/* Sidebar section label */
.nav-section-label {
  padding: 16px 18px 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--secondary-text);
  opacity: 0.6;
  margin-top: 8px;
  border-top: 1px solid var(--border-color);
}

/* Org avatar in table rows */
.org-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-color), #003d99);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}

/* Organization detail header */
.org-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.org-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.org-header-info .section-title {
  margin-bottom: 0;
}

/* Organization tabs */
.org-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0;
  overflow-x: auto;
}

.org-tab {
  padding: 12px 20px;
  border: none;
  background: none;
  color: var(--secondary-text);
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-family: var(--font-primary);
}

.org-tab:hover {
  color: var(--accent-color);
  background: rgba(0, 86, 210, 0.05);
}

.org-tab.active {
  color: var(--accent-color);
  border-bottom-color: var(--accent-color);
  font-weight: 600;
}

.org-tab i {
  font-size: 14px;
}

/* Tab panes */
.org-tab-pane {
  animation: fadeIn 0.3s ease;
}

/* Role badges */
.role-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
}

.role-badge.role-org_admin {
  background: rgba(220, 53, 69, 0.12);
  color: var(--danger-color);
  border: 1px solid rgba(220, 53, 69, 0.3);
}

.role-badge.role-instructor {
  background: rgba(0, 86, 210, 0.12);
  color: var(--accent-color);
  border: 1px solid rgba(0, 86, 210, 0.3);
}

.role-badge.role-org_user {
  background: rgba(40, 167, 69, 0.12);
  color: var(--success-color);
  border: 1px solid rgba(40, 167, 69, 0.3);
}

/* Invite tokens */
.invite-token-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.invite-token {
  font-family: "Courier New", monospace;
  font-size: 13px;
  font-weight: 600;
  background: rgba(0, 86, 210, 0.08);
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--accent-color);
  border: 1px solid rgba(0, 86, 210, 0.15);
}

/* Workshop access codes */
.access-code {
  font-family: "Courier New", monospace;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 1px;
  background: rgba(40, 167, 69, 0.1);
  padding: 6px 12px;
  border-radius: 8px;
  color: var(--success-color);
  border: 1px solid rgba(40, 167, 69, 0.3);
}

/* Copy button */
.copy-btn {
  background: none;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  color: var(--secondary-text);
  transition: all 0.2s ease;
  font-size: 13px;
}

.copy-btn:hover {
  color: var(--accent-color);
  background: rgba(0, 86, 210, 0.05);
  border-color: var(--accent-color);
}

/* Org settings grid */
.org-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.org-limit-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px 20px;
  transition: all 0.2s ease;
}

.org-limit-card:hover {
  box-shadow: var(--shadow-sm);
}

.limit-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--secondary-text);
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.limit-label i {
  color: var(--accent-color);
  font-size: 14px;
}

.limit-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-text);
  font-family: var(--font-display);
}

/* Status pills for org statuses */
.status-pill.active {
  background: rgba(40, 167, 69, 0.15);
  color: var(--success-color);
  border: 1px solid rgba(40, 167, 69, 0.3);
}

.status-pill.suspended {
  background: rgba(255, 193, 7, 0.15);
  color: var(--warning-color);
  border: 1px solid rgba(255, 193, 7, 0.3);
}

.status-pill.archived {
  background: rgba(149, 165, 166, 0.15);
  color: #95a5a6;
  border: 1px solid rgba(149, 165, 166, 0.3);
}

/* ═══ Form select inside tables ═══ */
select.form-control {
  appearance: auto;
  cursor: pointer;
}
