/* =========================================
   CMFI School Management System - Modern Installation Wizard CSS
   Designed for local/offline deployment
   ========================================= */

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

:root {
  --primary-color: #3b82f6;
  --primary-hover: #2563eb;
  --primary-glow: rgba(59, 130, 246, 0.35);
  --success-color: #10b981;
  --success-glow: rgba(16, 185, 129, 0.2);
  --danger-color: #ef4444;
  --danger-glow: rgba(239, 68, 68, 0.2);
  --bg-gradient: linear-gradient(135deg, #090d16 0%, #0f172a 50%, #1e1b4b 100%);
  --panel-bg: rgba(30, 41, 59, 0.55);
  --panel-border: rgba(255, 255, 255, 0.06);
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  --input-bg: rgba(15, 23, 42, 0.5);
  --input-border: rgba(255, 255, 255, 0.08);
  --input-focus: #3b82f6;
  --card-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
}

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

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-gradient);
  color: var(--text-secondary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem 1.5rem;
  overflow-x: hidden;
}

/* ── Container Layout ── */
.container.pmx {
  width: 100%;
  max-width: 780px !important;
  margin: 0 auto;
}

/* Logo branding */
.logo {
  text-align: center;
  margin-bottom: 2rem;
}

.logo img {
  max-height: 64px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(59, 130, 246, 0.3));
}

/* Premium Card Panel */
.panel.p-shadow {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 20px;
  box-shadow: var(--card-shadow);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

/* ── Step Navigation (Progress Timeline) ── */
.tabs-custom .nav-tabs {
  display: flex;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.3);
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--panel-border);
  margin: 0;
  gap: 0.5rem;
  list-style: none;
}

.tabs-custom .nav-tabs > li {
  flex: 1;
  text-align: center;
  position: relative;
}

.tabs-custom .nav-tabs > li a {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--text-muted);
  transition: all 0.3s ease;
  font-size: 0.75rem;
  font-weight: 500;
}

.tabs-custom .nav-tabs > li a i {
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px !important;
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
  color: var(--text-muted);
  position: relative;
  z-index: 2;
}

.tabs-custom .nav-tabs > li a h5 {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 0;
  margin-bottom: 0;
  letter-spacing: 0.02em;
  transition: all 0.3s ease;
}

/* Connector lines between steps */
.tabs-custom .nav-tabs > li:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 19px;
  left: calc(50% + 19px);
  width: calc(100% - 38px);
  height: 2px;
  background: rgba(255, 255, 255, 0.05);
  z-index: 1;
  transition: all 0.3s ease;
}

/* Active & Completed States */
.tabs-custom .nav-tabs > li.active a i {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
  box-shadow: 0 0 15px var(--primary-glow);
}

.tabs-custom .nav-tabs > li.active a h5 {
  color: var(--text-primary);
}

/* Completed Steps style (all steps before active get success style) */
.tabs-custom .nav-tabs > li.completed a i {
  background: var(--success-color);
  border-color: var(--success-color);
  color: #fff;
  box-shadow: 0 0 15px var(--success-glow);
}

.tabs-custom .nav-tabs > li.completed a h5 {
  color: var(--text-secondary);
}

.tabs-custom .nav-tabs > li.completed::after {
  background: var(--success-color);
}

/* ── Content Tab Area ── */
.tab-content {
  padding: 2.25rem;
  background: transparent;
  border: none;
  box-shadow: none;
}

/* ── Requirements Table (Step 1) ── */
.table {
  width: 100%;
  margin-bottom: 0;
  border-collapse: separate;
  border-spacing: 0 0.5rem;
}

.table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: none;
  padding: 0.75rem 1rem;
}

.table td {
  background: rgba(15, 23, 42, 0.25);
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  padding: 1rem;
  font-size: 0.88rem;
  vertical-align: middle;
}

.table td:first-child {
  border-left: 1px solid rgba(255, 255, 255, 0.03);
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
  font-weight: 500;
}

.table td:last-child {
  border-right: 1px solid rgba(255, 255, 255, 0.03);
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
  text-align: right;
}

.table tr:hover td {
  background: rgba(15, 23, 42, 0.4);
  color: var(--text-primary);
}

/* Labels & Status badges */
.label {
  display: inline-block;
  padding: 0.35em 0.75em;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: 6px;
}

.label-success {
  background-color: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.label-danger {
  background-color: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}

/* ── Forms and Inputs ── */
.form-horizontal .form-group {
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 1.5rem;
}

.form-horizontal .control-label {
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.9rem;
  text-align: left;
  padding-top: 8px;
}

.form-control {
  background: var(--input-bg) !important;
  border: 1px solid var(--input-border) !important;
  border-radius: 10px !important;
  color: var(--text-primary) !important;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  height: 48px;
  padding: 0.375rem 1rem;
  box-shadow: none !important;
  transition: border-color 0.2s, box-shadow 0.2s !important;
}

.form-control:focus {
  border-color: var(--input-focus) !important;
  box-shadow: 0 0 0 3px var(--primary-glow) !important;
}

.required {
  color: var(--danger-color);
  margin-left: 2px;
}

/* Form Footer Controls */
.panel-footer {
  background: rgba(15, 23, 42, 0.2);
  border-top: 1px solid var(--panel-border);
  padding: 1.25rem 2.25rem;
  margin: 0;
}

/* ── Buttons ── */
.btn {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  transition: all 0.2s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
}

.btn-default {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
  color: #fff;
  box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-default:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--primary-glow);
  opacity: 0.95;
}

.btn-default:active:not(:disabled) {
  transform: translateY(0);
}

.btn-default:disabled {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  box-shadow: none;
  cursor: not-allowed;
}

/* ── Custom Select2 Styling Overrides ── */
.select2-container--bootstrap .select2-selection {
  background-color: var(--input-bg) !important;
  border: 1px solid var(--input-border) !important;
  border-radius: 10px !important;
  color: var(--text-primary) !important;
  height: 48px !important;
  padding: 8px 12px !important;
}

.select2-container--bootstrap .select2-selection--single .select2-selection__rendered {
  color: var(--text-primary) !important;
}

.select2-dropdown {
  background-color: #1e293b !important;
  border: 1px solid var(--panel-border) !important;
  border-radius: 10px !important;
}

.select2-results__option {
  color: var(--text-secondary) !important;
  padding: 8px 12px !important;
}

.select2-results__option--highlighted {
  background-color: var(--primary-color) !important;
  color: #fff !important;
}

/* ── Error / Alert Banners ── */
.alert {
  padding: 1rem 1.25rem;
  border-radius: 10px;
  font-size: 0.88rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: none;
}

.alert-danger {
  background-color: rgba(239, 68, 68, 0.12) !important;
  border: 1px solid rgba(239, 68, 68, 0.2) !important;
  color: #fca5a5 !important;
}

label.error {
  display: block;
  font-size: 0.78rem;
  color: #f87171;
  margin-top: 0.35rem;
  padding-left: 2px;
}

/* ── Footer bottom branding ── */
center {
  color: var(--text-muted);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

center a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

center a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

/* Congratulations step */
.fi-msg-s {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.fi-msg-s li {
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.fi-msg-s a {
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
  font-size: 1.1rem;
  transition: color 0.2s;
}

.fi-msg-s a:hover {
  color: #60a5fa;
  text-decoration: underline;
}