/* ==========================================
   CSS VARIABLES (Design Tokens)
   ========================================== */
:root {
  /* Color palette */
  --primary-color: #4361ee;
  --primary-dark: #3a56d4;
  --primary-light: #4a6bff;
  --secondary-color: #7209b7;
  --success-color: #2a9d8f;
  --error-color: #e63946;
  --warning: #ffc107;
  --info: #0dcaf0;
  
  /* Extended color system */
  --bg: #f5f7fb;
  --surface: #ffffff;
  --muted: #6c757d;
  --text: #212529;
  --text-color: #333;
  --light-gray: rgba(230, 230, 200, 0.1);
  --medium-gray: #e9ecef;
  --dark-gray: #6c757d;

  /* Semantic colors */
  --border-color: rgba(16, 24, 40, 0.04);
  --border-light: rgba(255, 255, 255, 0.06);
  --hover-overlay: rgba(67, 97, 238, 0.03);
  --focus-ring: rgba(67, 97, 238, 0.15);

  /* Spacing & sizing */
  --gap-xs: 0.4rem;
  --gap-sm: 0.8rem;
  --gap: 1.2rem;
  --gap-lg: 1.6rem;
  --radius: 0.5rem;
  --radius-sm: 0.25rem;
  --radius-lg: 0.75rem;
  --card-padding: 1rem;

  /* Typography */
  --font-sans: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --base-size: 14px;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --line-height: 1.5;

  /* Elevation */
  --shadow-sm: 0 2px 6px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 6px 20px rgba(16, 24, 40, 0.08);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;
  --transition-slow: 0.3s ease;

  /* Z-index layers */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal: 5040;
  --z-popover: 5050;
  --z-tooltip: 5060;
  --z-toast: 5070;
}

.alert-info {
  background-color: rgba(150, 250, 255, 0.1) !important;
  border: 1px solid rgba(150, 250, 255, 0.6) !important;
}

/* ==========================================
   BASE STYLES & RESETS
   ========================================== */
* { 
  margin: 0;
  padding: 0;
  box-sizing: border-box; 
  font-family: var(--font-sans);
}

html, body { 
  height: 100%; 
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Keep selection disabled globally but allow in content */
html, body { 
  user-select: none;
  overflow-x: auto;
  overflow-y: auto; 
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text-color);
  font-size: var(--base-size);
  line-height: var(--line-height);
  margin: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Allow selection where it's expected */
.content, 
.card, 
input, 
textarea, 
select { 
  user-select: text; 
}

/* Accessible focus for interactive elements */
button:focus:not(.btn),
input:focus:not(.form-control),
select:focus:not(.form-select),
textarea:focus:not(.form-control) {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

/* ==========================================
   LAYOUT & CONTAINERS
   ========================================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--gap);
}

.content {
  margin-left: 0;
  padding: 1.5rem;
  transition: var(--transition-slow) ease;
  font-size: var(--text-xs);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ==========================================
   AUTHENTICATION COMPONENTS
   ========================================== */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

.auth-wrapper {
  display: flex;
  max-width: 1000px;
  width: 100%;
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.auth-left {
  flex: 1;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.auth-left h1 {
  font-size: 24px;
  margin-bottom: 20px;
}

.auth-left p {
  font-size: 14px;
  line-height: 1.6;
  opacity: 0.9;
}

.auth-right {
  flex: 1;
  padding: 40px;
}

.auth-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
}

.auth-logo img {
  max-width: 60px;
  height: auto;
}

.auth-title {
  text-align: center;
  margin-bottom: 30px;
  color: var(--primary-color);
  font-size: var(--text-lg);
  font-weight: 600;
}

.auth-form-group {
  margin-bottom: 20px;
}

.auth-form-row {
  display: flex;
  gap: 15px;
}

.auth-form-row .auth-form-group {
  flex: 1;
}

.auth-label {
  display: block;
  margin-left: 10px;
  font-size: 12px;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text);
}

.auth-input, 
.auth-select {
  width: 100%;
  padding: 17px 15px;
  background: var(--light-gray);
  border: 1px solid var(--medium-gray);
  border-radius: 4px;
  font-size: 13px;
  transition: all var(--transition-base);
}

.auth-input:focus, 
.auth-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.auth-password-container {
  position: relative;
}

.auth-toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--dark-gray);
}

.auth-error-message {
  color: var(--error-color);
  font-size: 14px;
  margin-top: 5px;
  display: none;
}

.auth-submit-btn {
  width: 100%;
  padding: 14px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--transition-base);
  margin-top: 10px;
}

.auth-submit-btn:hover {
  background-color: var(--primary-dark);
}

.auth-submit-btn:disabled {
  background-color: var(--dark-gray);
  cursor: not-allowed;
}

.auth-login-link {
  text-align: center;
  margin-top: 25px;
  font-size: 13px;
}

.auth-login-link a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.auth-login-link a:hover {
  text-decoration: underline;
}

.auth-success-message {
  background-color: rgba(42, 157, 143, 0.1);
  color: var(--success-color);
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 20px;
  text-align: center;
  display: none;
}

/* ==========================================
   NAVIGATION COMPONENTS
   ========================================== */
.sidebar {
  height: 100vh;
  width: 250px;
  position: fixed;
  top: 0;
  left: -250px;
  z-index: var(--z-fixed);
  overflow-y: auto;
  background: linear-gradient(180deg, var(--primary-color), var(--secondary-color) 80%);
  color: var(--surface);
  border-right: 1px solid var(--border-light);
  transition: left var(--transition-slow) ease, box-shadow var(--transition-slow);
  padding-bottom: 2rem;
}

.sidebar.show { 
  left: 0; 
}

.sidebar .logo {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.125rem 0.75rem;
  border-bottom: 1px solid var(--border-light);
}

.sidebar .logo img {
  height: 44px;
  max-width: 85%;
  object-fit: contain;
  -webkit-user-drag: none;
  pointer-events: none;
}

.logo-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  cursor: default;
  background: transparent;
  z-index: 2;
}

.sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar ul li {
  padding: 0.75rem 1.125rem;
  font-size: var(--text-sm);
  font-weight: 400;
  color: inherit;
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all var(--transition-base);
}

.sidebar ul li span {
  display: flex;
  align-items: center;
  gap: var(--gap);
}

.sidebar ul li i { 
  font-size: 1.2rem; 
}

.sidebar a:link, 
.sidebar a:visited {
  color: inherit;
  text-decoration: none;
}

.sidebar ul li:hover {
  background: rgba(255, 255, 255, 0.08);
  border-left: 3px solid rgba(255, 255, 255, 0.08);
  transform: translateX(4px);
}

.sidebar ul li.active {
  background: rgba(255, 255, 255, 0.12);
  border-left: 3px solid rgba(255, 255, 255, 0.22);
  color: var(--surface);
}

.submenu {
  display: none;
  list-style: none;
  padding-left: 0.5rem;
  background: rgba(255, 255, 255, .1);
}

.submenu li {
  padding: 0.5rem 0;
  padding-left: 2.125rem;
  font-size: var(--text-xs) !important;
  color: rgba(255, 255, 255, 0.9);
}

.submenu li:hover { 
  color: #fff; 
}

.rotate {
  transition: transform var(--transition-base);
  font-size: var(--text-base);
  margin-left: auto;
}

.rotate.down { 
  transform: rotate(90deg); 
}

.sidebar::-webkit-scrollbar { 
  width: 8px; 
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.12);
  border-radius: var(--radius-sm);
}

.topbar {
  height: 60px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gap);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  border-bottom: 1px solid var(--border-color);
}

.logo-img {
  height: 30px;
  width: auto;
  object-fit: contain;
}

.profile-pic {
  height: 38px;
  width: 38px;
  border-radius: 50%;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color var(--transition-fast);
}

.profile-pic:hover { 
  border-color: var(--primary-color); 
}

.nav-icons {
  display: flex;
  align-items: center;
  gap: var(--gap);
}

.nav-icons i {
  font-size: 1.2rem;
  cursor: pointer;
  color: rgba(33, 37, 41, 0.7);
  transition: color var(--transition-fast);
}

.nav-icons i:hover { 
  color: var(--primary-color); 
}

.sidebar-toggle {
  font-size: 1.4rem;
  color: var(--primary-color);
  cursor: pointer;
  display: block;
}

.nav-icons .dropdown-toggle::after { 
  display: none !important; 
}

.dropdown-menu {
  width: 280px;
  max-height: 350px;
  overflow-y: auto;
  word-wrap: break-word;
  white-space: normal;
  border-radius: var(--radius);
  border: none;
  box-shadow: var(--shadow-md);
  padding: 0.5rem 0;
  font-size: var(--text-sm);
}

.dropdown-item {
  white-space: normal;
  word-break: break-word;
  color: var(--text);
  display: flex;
  align-items: flex-start;
  gap: var(--gap-sm);
  line-height: var(--line-height);
  padding: 0.45rem 0.8rem;
  transition: background var(--transition-fast);
}

.dropdown-item:hover { 
  background: var(--hover-overlay); 
}

.dropdown-item-text {
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--muted);
  padding: 0.45rem 0.8rem;
}

.dropdown-divider { 
  margin: 0.4rem 0; 
}

.profile-dropdown .dropdown-menu { 
  width: 220px; 
}

.profile-dropdown .dropdown-item i {
  font-size: var(--text-base);
  color: var(--muted);
}

.profile-dropdown .dropdown-item:hover i { 
  color: var(--primary-color); 
}

/* ==========================================
   BUTTONS
   ========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--gap-sm);
  padding: 0.45rem 0.9rem;
  border-radius: calc(var(--radius) - 0.1rem);
  font-weight: 600;
  font-size: var(--text-sm);
  line-height: 1;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  box-shadow: none;
  text-decoration: none;
}

.btn:active { 
  transform: translateY(1px); 
}

.btn:focus {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.btn[disabled],
.btn.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
}

.btn-success {
  background: var(--success-color);
  border-color: var(--success-color);
  color: #fff;
}

.btn-danger {
  background: var(--error-color);
  border-color: var(--error-color);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--primary-color);
  border: 1px solid rgba(67, 97, 238, 0.15);
}

.btn-outline:hover { 
  background: var(--hover-overlay); 
}

.btn-ghost {
  background: transparent;
  border: 1px dashed transparent;
  color: var(--text);
}

.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: var(--text-xs);
  border-radius: calc(var(--radius) - 0.2rem);
}

.btn-lg {
  padding: 0.75rem 1.25rem;
  font-size: var(--text-lg);
}

.btn-block { 
  display: flex; 
  width: 100%; 
}

.btn-icon {
  padding: 0.45rem;
  border-radius: var(--radius-sm);
  width: 36px;
  height: 36px;
  justify-content: center;
}

.btn-primary-custom {
  background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
  border: none;
  border-radius: var(--radius);
  padding: 0.75rem 2rem;
  font-weight: 600;
  transition: all var(--transition-base);
  box-shadow: 0 4px 15px rgba(74, 107, 255, 0.3);
  color: #fff;
}

.btn-primary-custom:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(74, 107, 255, 0.4);
  color: #fff;
}

.action-btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

/* ==========================================
   CARDS
   ========================================== */
.card {
  background: var(--surface);
  padding: var(--card-padding);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  height: auto !important;
  overflow: hidden;
  transition: all var(--transition-base);
}

/* Ensure card content determines height */
.card > * {
    flex-shrink: 1;
    min-height: 0;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.dashboard {
  display: grid;
  gap: var(--gap-sm);
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.dash-card {
  background: var(--surface);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.dash-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.dash-card .card-body {
  padding: var(--gap) var(--gap);
  display: flex;
  align-items: center;
  gap: var(--gap);
}

.dash-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.dash-card h6 {
  text-transform: uppercase;
  font-size: var(--text-xs);
  letter-spacing: 0.3px;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.dash-card h5 {
  margin: 0;
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1.1;
}

.dash-card p {
  font-size: var(--text-xs);
  color: #6b7280;
  margin-top: 0.15rem;
}

.card-progress {
  background: #f1f2f4;
  height: 4px;
  border-radius: 3px;
  overflow: hidden;
  margin: 0 var(--gap) var(--gap);
}

.card-progress span {
  display: block;
  height: 100%;
  border-radius: 3px;
}

.search-card {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: none;
  overflow: hidden;
  transition: all var(--transition-base);
  background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
}

.search-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.card-header-custom {
  background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
  color: white;
  padding: 1.5rem;
  border-bottom: none;
}

.card-header-custom h3 {
  margin: 0;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
}

.card-header-custom h3 i { 
  font-size: 1.5rem; 
}

.profile-card {
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: none;
  overflow: hidden;
  transition: all var(--transition-base);
  height: 100%;
}

.profile-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.profile-card .card-header {
  background: transparent;
  border-bottom: 1px solid var(--border-color);
  padding: 1.25rem 1.5rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
}

.profile-card .card-body {
  padding: 1.5rem;
}

/* ==========================================
   FORM ELEMENTS (General)
   ========================================== */
.input-base,
.input-filled,
.input-underline,
.custom-textarea,
.custom-select,
input[type="date"],
.form-control[type="file"] {
  border-radius: var(--radius-sm);
  border: 1px solid #bfc8d8;
  padding: 0.625rem 0.875rem;
  transition: all var(--transition-base);
  font-size: var(--text-sm);
}

.input-base:focus,
.input-filled:focus,
.custom-select:focus,
.custom-textarea:focus,
input[type="date"]:focus,
.form-control[type="file"]:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 6px rgba(74, 107, 255, 0.3);
  background-color: #fff;
}

.input-filled { 
  background-color: #f2f4f7; 
}

.input-underline {
  border: none;
  border-bottom: 2px solid #bfc8d8;
  border-radius: 0;
  background: transparent;
  transition: var(--transition-base);
}

.input-underline:focus {
  border-bottom-color: var(--primary-light);
  box-shadow: none;
}

.input-rounded {
  border-radius: 30px;
  border: 1px solid #bfc8d8;
  padding: 0.625rem 1.25rem;
  transition: var(--transition-base);
}

.input-rounded:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 6px rgba(74, 107, 255, 0.3);
}

textarea.custom-textarea {
  min-height: 90px;
  resize: vertical;
}

select.custom-select {
  background-color: #fdfdfd;
  cursor: pointer;
}

.form-check-input[type="radio"]:checked {
  background-color: var(--primary-light);
  border-color: var(--primary-light);
}

.form-check-input[type="checkbox"]:checked {
  background-color: var(--success-color);
  border-color: var(--success-color);
}

.form-check.form-switch .form-check-input {
  width: 2.5em;
  height: 1.3em;
  border: 1px solid #bfc8d8;
}

.form-check.form-switch .form-check-input:checked {
  background-color: var(--primary-light);
  border-color: var(--primary-light);
}

.form-range::-webkit-slider-thumb {
  background: var(--primary-light);
  border: none;
}

.form-range::-moz-range-thumb {
  background: var(--primary-light);
  border: none;
}

.form-control[type="file"] {
  border: 1px dashed #bfc8d8;
  padding: 0.625rem;
  border-radius: var(--radius-sm);
  background: #fafbfd;
  transition: var(--transition-base);
}

.form-control[type="file"]:hover {
  border-color: var(--primary-light);
  background: #f0f6ff;
}

input[type="color"] {
  border: 2px solid #bfc8d8;
  border-radius: var(--radius-sm);
  width: 60px;
  height: 40px;
  cursor: pointer;
  transition: border-color var(--transition-base);
}

input[type="color"]:focus { 
  border-color: var(--primary-light); 
}

.form-control-custom {
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  border: 2px solid #e2e8f0;
  transition: all var(--transition-base);
  font-size: var(--text-base);
}

.form-control-custom:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 0.25rem rgba(74, 107, 255, 0.15);
}

.search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  z-index: 5;
}

.input-group { position: relative; }

.input-group .form-control { padding-left: 45px; }

/* ==========================================
   FORM SECTIONS & ENHANCEMENTS
   ========================================== */
.form-section {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  border-left: 4px solid var(--primary-color);
}

.section-header {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #e9ecef;
}

.section-icon {
  background: var(--primary-color);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  font-size: 1.2rem;
}

.section-title {
  font-weight: 600;
  color: #2c3e50;
  margin: 0;
}

.section-description {
  color: #6c757d;
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

.form-label {
  font-weight: 600;
  color: #495057;
  margin-bottom: 0.5rem;
}

.input-hint {
  font-size: 0.8rem;
  color: #6c757d;
  margin-top: 0.25rem;
  display: block;
}

.input-hint i {
  color: var(--primary-color);
  margin-right: 0.25rem;
}

.required-field::after {
  content: " *";
  color: var(--error-color);
}

.character-count {
  font-size: 0.8rem;
  color: #6c757d;
  text-align: right;
  margin-top: 0.25rem;
}

.input-group-hint {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  background: #e9ecef;
  border: 1px solid #ced4da;
  color: #495057;
  font-size: 0.875rem;
}

.preview-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.preview-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.preview-content {
  font-size: 0.9rem;
  opacity: 0.9;
}

.step-indicator {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 10px;
}

.step {
  display: flex;
  align-items: center;
  flex: 1;
}

.step-number {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #dee2e6;
  color: #6c757d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  margin-right: 0.75rem;
  font-size: 0.9rem;
}

.step.active .step-number {
  background: var(--primary-color);
  color: white;
}

.step.completed .step-number {
  background: var(--success-color);
  color: white;
}

.step-text {
  font-size: 0.9rem;
  color: #6c757d;
  font-weight: 500;
}

.step.active .step-text {
  color: var(--primary-color);
  font-weight: 600;
}

.step.completed .step-text {
  color: var(--success-color);
}

.step-connector {
  flex: 1;
  height: 2px;
  background: #dee2e6;
  margin: 0 1rem;
}

.step.completed .step-connector {
  background: var(--success-color);
}

.feature-highlight {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
  border-radius: 10px;
  padding: 1.5rem;
  margin-top: 2rem;
  text-align: center;
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.feature-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.feature-description {
  font-size: 0.9rem;
  opacity: 0.9;
}

/* ==========================================
   TABLES
   ========================================== */
table {
  color: var(--text);
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 0;
}

table th,
table td {
  padding: 0.75rem 0.625rem;
  text-align: left;
  border-top: 1px solid var(--border-color);
}

table th {
  border-top: none;
  font-weight: 600;
}

.upload-table input[type="number"] {
  width: 70px;
  padding: 0.3125rem;
  text-align: center;
  border-radius: var(--radius-sm);
  border: 1px solid #ccc;
  font-size: var(--text-sm);
}

.upload-table tr:nth-child(even) input { 
  border-color: var(--primary-color); 
}

.upload-table tr:nth-child(odd) input { 
  border-color: #20c997; 
}

.upload-table .upload-btn {
  text-align: right;
  margin-top: 0.9375rem;
}

.table-plain {
  background-color: #fff;
  color: #212529;
}

.table-plain th,
.table-plain td { 
  border: 1px solid #dee2e6; 
}

.table-striped-custom th,
.table-striped-custom td { 
  border: 1px solid #dee2e6; 
}

.table-striped-custom tbody tr:nth-child(odd) { 
  background-color: #f8f9fa; 
}

.table-bordered-custom th,
.table-bordered-custom td { 
  border: 2px solid #343a40; 
}

.table-hover-custom th,
.table-hover-custom td { 
  border: 1px solid #dee2e6; 
}

.table-hover-custom tbody tr:hover {
  background-color: #e9ecef;
  cursor: pointer;
}

.table-dark-custom {
  background-color: #212529;
  color: #fff;
}

.table-dark-custom th,
.table-dark-custom td { 
  border: 1px solid #495057; 
}

.table-dark-custom tbody tr:nth-child(odd) { 
  background-color: #343a40; 
}

.table-colored {
  background-color: #e3f2fd;
  color: #0d47a1;
}

.table-colored th,
.table-colored td { 
  border: 1px solid #90caf9; 
}

.table-gradient {
  color: #fff;
  background: linear-gradient(135deg, #2196f3, #21cbf3);
}

.table-gradient th,
.table-gradient td { 
  border: 1px solid rgba(255, 255, 255, 0.2); 
}

.table-minimal {
  border: none;
  background-color: #ffffff;
}

.table-minimal th {
  border-bottom: 2px solid var(--primary-color);
  color: var(--primary-color);
  font-weight: bold;
}

.table-minimal td { 
  border-bottom: 1px solid #e9ecef; 
}

.table-glass {
  backdrop-filter: blur(6px);
  background-color: rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-sm);
}

.table-glass th,
.table-glass td { 
  border: 1px solid rgba(255, 255, 255, 0.4); 
}

.table-shadow {
  background-color: #fff;
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-sm);
}

.table-shadow th,
.table-shadow td {
  border: none;
  padding: 0.75rem 0.9375rem;
}

/* ==========================================
   NOTIFICATIONS & MODALS
   ========================================== */
.toast-container {
  position: fixed;
  top: 15px;
  right: 15px;
  z-index: var(--z-toast);
}

.notifier-container {
  position: fixed;
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--gap-sm);
  padding: 0.9375rem;
  pointer-events: none;
  font-family: var(--font-sans);
}

.notifier-top-right {
  top: 15px;
  right: 15px;
  align-items: flex-end;
}

.notifier-bottom-right {
  bottom: 15px;
  right: 15px;
  align-items: flex-end;
}

.notifier-top-left {
  top: 15px;
  left: 15px;
  align-items: flex-start;
}

.notifier-bottom-left {
  bottom: 15px;
  left: 15px;
  align-items: flex-start;
}

.notifier {
  min-width: 280px;
  max-width: 380px;
  background: #fff;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
  overflow: hidden;
  padding: 0.625rem 0.9375rem;
  border-left: 3px solid transparent;
  color: #333;
  font-size: var(--text-xs);
  font-weight: 500;
  pointer-events: all;
  animation: slideIn 0.5s ease forwards;
  opacity: 0;
  transform: translateX(30px);
}

@keyframes slideIn {
  0% {
    opacity: 0;
    transform: translateX(30px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOut {
  0% {
    opacity: 1;
    transform: translateX(0);
  }
  100% {
    opacity: 0;
    transform: translateX(30px);
  }
}

.notifier .icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.notifier .close-btn {
  margin-left: auto;
  cursor: pointer;
  font-weight: bold;
  color: #999;
  transition: color var(--transition-base);
}

.notifier .close-btn:hover { 
  color: #333; 
}

.notifier-success {
  border-left-color: var(--success-color);
  background: #eaf7ec;
}

.notifier-success .icon { 
  color: var(--success-color); 
}

.notifier-error {
  border-left-color: var(--error-color);
  background: #fdecea;
}

.notifier-error .icon { 
  color: var(--error-color); 
}

.notifier-warning {
  border-left-color: var(--warning);
  background: #fff8e5;
}

.notifier-warning .icon { 
  color: var(--warning); 
}

.notifier-info {
  border-left-color: var(--info);
  background: #e9f8fb;
}

.notifier-info .icon { 
  color: var(--info); 
}
.confirmation-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: var(--z-modal);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
  padding: 1rem;
}

.confirmation-modal.show {
  opacity: 1;
  pointer-events: all;
}

.confirmation-content {
  background: #fff;
  border-radius: var(--radius);
  width: 90%;
  max-width: 400px;

  /* CRITICAL FIX */
  max-height: 80vh;
  display: flex;
  flex-direction: column;

  overflow: hidden;

  padding: 1.25rem 1.5625rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  position: relative;
  text-align: center;
  animation: fadeInScale 0.3s ease forwards;
}

.confirmation-content .confirmation-icon {
  font-size: 3rem;
  color: var(--warning);
}

.confirmation-close {
  font-size: 1.5rem;
  cursor: pointer;
  border: none;
  background: transparent;
  color: #999;
  transition: color var(--transition-base);
  position: absolute;
  top: 10px;
  right: 10px;
}

/* BODY (holds icon, title, message) */
.confirmation-body {
  margin-top: 1.25rem;
  font-size: var(--text-xs);
  color: #444;

  display: flex;
  flex-direction: column;
  gap: 0.75rem;

  /* CRITICAL FIX */
  flex: 1;
  min-height: 0; /* ALLOWS INSIDE SCROLL */

  overflow: hidden;
}

/* ONLY MESSAGE SCROLLS */
.confirmation-message {
  overflow-y: auto;

  /* CRITICAL FIX */
  flex: 1;
  min-height: 0;

  padding-right: 6px;
}

/* Optional scrollbar styling */
.confirmation-message::-webkit-scrollbar {
  width: 6px;
}
.confirmation-message::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}

.confirmation-footer {
  margin-top: 1.25rem;
  display: flex;
  justify-content: center;
  gap: var(--gap-sm);

  flex-shrink: 0;
  padding-top: 0.75rem;
  border-top: 1px solid #eee;
}


@keyframes fadeInScale {
  0% { 
    opacity: 0; 
    transform: scale(0.85); 
  }
  100% { 
    opacity: 1; 
    transform: scale(1); 
  }
}

.modal-confirm .modal-content {
  border-radius: var(--radius);
  text-align: center;
  padding: 1.25rem;
}

.modal-confirm .icon-box {
  font-size: 3.75rem;
  color: var(--warning);
  margin-bottom: 0.625rem;
}

.confirmation-content.confirmation-md {
  max-width: 500px;
}

.confirmation-content.confirmation-lg {
  max-width: 700px;
}

.confirmation-md .confirmation-body,
.confirmation-lg .confirmation-body {
  padding: 1.5rem;
}

.confirmation-lg .confirmation-body {
  padding: 2rem;
}

/* ==========================================
   PROFILE COMPONENTS
   ========================================== */
.profile-header {
  background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
  color: white;
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.profile-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M0,0 L100,0 L100,100 Z" fill="rgba(255,255,255,0.05)"/></svg>');
  background-size: cover;
}

.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.2);
  object-fit: cover;
  position: relative;
  z-index: 2;
}

.profile-stats {
  display: flex;
  justify-content: space-around;
  text-align: center;
  margin-top: 1.5rem;
  position: relative;
  z-index: 2;
}

.stat-item {
  padding: 0 1rem;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  display: block;
}

.stat-label {
  font-size: var(--text-sm);
  opacity: 0.9;
}

.info-item {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
}

.info-item:last-child {
  border-bottom: none;
}

.info-label {
  font-weight: 600;
  color: var(--muted);
}

.info-value {
  color: var(--text);
  text-align: right;
}

.action-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.action-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: var(--gap);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.action-item:last-child {
  border-bottom: none;
}

.action-item:hover {
  background-color: rgba(74, 107, 255, 0.05);
  padding-left: 0.5rem;
}

.action-item i {
  width: 24px;
  text-align: center;
  color: var(--primary-color);
}

.profile-actions {
  display: flex;
  gap: var(--gap);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.skill-item {
  margin-bottom: 1rem;
}

.skill-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.progress {
  height: 8px;
  border-radius: var(--radius-sm);
}

.activity-timeline {
  position: relative;
  padding-left: 2rem;
}

.activity-timeline::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(0, 0, 0, 0.1);
}

.timeline-item {
  position: relative;
  margin-bottom: 1.5rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: 5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary-color);
  border: 2px solid white;
  box-shadow: 0 0 0 2px var(--primary-color);
}

.timeline-date {
  font-size: var(--text-sm);
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.timeline-content {
  font-size: var(--text-sm);
}

/* ==========================================
   SEARCH & CROPPER COMPONENTS
   ========================================== */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.search-overlay.active {
  display: flex;
  opacity: 1;
}

.search-container {
  background: white;
  border-radius: 24px;
  padding: 2rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: scale(0.9);
  transition: transform 0.3s ease;
  max-width: 600px;
  width: 90%;
  position: relative;
}

.search-overlay.active .search-container {
  transform: scale(1);
}

.search-input-wrapper {
  position: relative;
  margin-bottom: 1rem;
}

.search-input {
  width: 100%;
  padding: 1rem 1.5rem;
  padding-right: 50px;
  border: 2px solid #e0e0e0;
  border-radius: 50px;
  font-size: 1.1rem;
  outline: none;
  transition: all 0.3s ease;
  background: #f8f9fa;
}

.search-input:focus {
  border-color: #4285f4;
  background: white;
  box-shadow: 0 4px 20px rgba(66, 133, 244, 0.15);
}

.search-input::placeholder {
  color: #9aa0a6;
}

.search-button {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: #4285f4;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.search-button:hover {
  background: #3367d6;
  transform: translateY(-50%) scale(1.05);
}

.search-button:active {
  transform: translateY(-50%) scale(0.95);
}

.search-close {
  position: absolute;
  top: -2rem;
  right: -2rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #5f6368;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.search-close:hover {
  background: #f1f3f4;
  color: #202124;
}

.search-hint {
  text-align: center;
  color: #5f6368;
  font-size: 0.9rem;
  margin-top: 1rem;
}

.search-results {
  margin-top: 1rem;
  max-height: 300px;
  overflow-y: auto;
}


/* Search Results Styling */
.search-results {
    margin-top: 1.5rem;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid #e0e0e0;
}

.results-header {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #dee2e6;
}

.results-header h4 {
    margin: 0;
    color: #333;
    font-size: 1rem;
    font-weight: 600;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
    cursor: pointer;
}

.result-item:hover {
    border-color: #4285f4;
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.1);
    transform: translateY(-1px);
}

.result-info {
    flex: 1;
}

.result-name {
    font-weight: 500;
    color: #202124;
    margin-bottom: 0.25rem;
    font-size: 16px;
}

.result-meta {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.result-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.staff-badge {
    color: #330227;
}

.student-badge {
    color: #420000;
}

.result-id {
    font-size: 0.875rem;
    color: #5f6368;
}

.result-select-btn {
    background: #4285f4;
    border: none;
    border-radius: 6px;
    width: 36px;
    height: 36px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-left: 1rem;
}

.result-select-btn:hover {
    background: #3367d6;
    transform: scale(1.05);
}

.no-results {
    text-align: center;
    padding: 2rem;
    color: #5f6368;
    font-style: italic;
}

/* Scrollbar styling */
.search-results::-webkit-scrollbar {
    width: 6px;
}

.search-results::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.search-results::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

.search-results::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}


.results-header {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #dee2e6;
}

.results-header h4 {
    margin: 0;
    color: #333;
    font-size: 1rem;
    font-weight: 600;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Style for anchor tag result items */
.result-item {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
    cursor: pointer;
    margin-bottom: 0.5rem;
}

.result-item:hover {
    text-decoration: none;
    color: inherit;
    border-color: #4285f4;
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.1);
    transform: translateY(-1px);
}

.result-item:last-child {
    margin-bottom: 0;
}

.result-info {
    flex: 1;
}

.result-name {
    font-weight: 400;
    color: #1c52f5;
    margin-bottom: 0.25rem;
    font-size: 15px;
}

.result-meta {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.result-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.staff-badge {
    color: #330227;
}

.student-badge {
    color: #420000;
}

.result-id {
    font-size: 0.875rem;
    color: #5f6368;
}

.result-select-btn {
    background: #4285f4;
    border: none;
    border-radius: 6px;
    width: 36px;
    height: 36px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-left: 1rem;
}

.result-select-btn:hover {
    background: #3367d6;
    transform: scale(1.05);
}

.no-results {
    text-align: center;
    padding: 2rem;
    color: #5f6368;
    font-style: italic;
}




.crop-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.crop-overlay.active {
  display: flex;
  opacity: 1;
}

.crop-container {
  background: white;
  border-radius: 16px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.crop-overlay.active .crop-container {
  transform: scale(1);
}

.crop-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid #e9ecef;
  background: #f8f9fa;
  flex-shrink: 0;
}

.crop-header h5 {
  margin: 0;
  color: #2c3e50;
  font-weight: 600;
}

.crop-header h5 i {
  color: #6c757d;
  margin-right: 0.5rem;
}

.crop-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #6c757d;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.crop-close:hover {
  background: #e9ecef;
  color: #dc3545;
}

.crop-preview-area {
  display: flex;
  flex: 1;
  min-height: 400px;
  max-height: calc(90vh - 140px);
  overflow: hidden;
  position: relative;
}

.crop-main {
  flex: 1;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
  border-right: 1px solid #e9ecef;
  position: relative;
  overflow: hidden;
}

.crop-main-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.crop-main img {
  max-width: 100%;
  max-height: 100%;
  display: block;
}

.crop-sidebar {
  width: 250px;
  padding: 1.5rem;
  background: white;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  border-left: 1px solid #e9ecef;
  flex-shrink: 0;
}

.preview-container {
  text-align: center;
}

.preview-container h6 {
  margin: 0 0 1rem 0;
  color: #495057;
  font-size: 0.9rem;
  font-weight: 600;
}

.preview-box {
  width: 150px;
  height: 150px;
  border: 2px dashed #dee2e6;
  border-radius: 8px;
  overflow: hidden;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.preview-box img {
  max-width: 100%;
  max-height: 100%;
  display: block;
}

.crop-controls {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.crop-controls .btn {
  width: 44px;
  height: 44px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 1.1rem;
}

.crop-footer {
  padding: 1.5rem 2rem;
  border-top: 1px solid #e9ecef;
  display: flex !important;
  justify-content: flex-end;
  gap: 1rem;
  background: #f8f9fa;
  flex-shrink: 0;
  min-height: 80px;
  align-items: center;
}

.crop-footer .btn {
  min-width: 100px;
}

.cropper-container {
  direction: ltr;
  font-size: 0;
  line-height: 0;
  position: relative;
  touch-action: none;
  user-select: none;
}

.cropper-view-box,
.cropper-face {
  border-radius: 50%;
}

.cropper-view-box {
  outline: 2px solid #4285f4;
  outline-color: rgba(66, 133, 244, 0.75);
}

.cropper-line {
  background-color: #4285f4;
}

.cropper-point {
  background-color: #4285f4;
  width: 8px;
  height: 8px;
  opacity: 0.75;
}

.cropper-point.point-se {
  background-color: #34a853;
}

/* ==========================================
   UTILITY CLASSES
   ========================================== */
.bg-blue { background: linear-gradient(135deg, var(--primary-color), var(--primary-dark)); }
.bg-green { background: linear-gradient(135deg, var(--success-color), #1e7e34); }
.bg-orange { background: linear-gradient(135deg, #fd7e14, #e8590c); }
.bg-purple { background: linear-gradient(135deg, var(--secondary-color), #563d7c); }
.bg-pink { background: linear-gradient(135deg, #e83e8c, #c2185b); }
.bg-red { background: linear-gradient(135deg, var(--error-color), #b21f2d); }
.bg-teal { background: linear-gradient(135deg, #20c997, #138f6e); }
.bg-yellow { background: linear-gradient(135deg, var(--warning), #e0a800); }
.bg-gray { background: linear-gradient(135deg, var(--muted), #495057); }
.bg-success { background: var(--success-color) !important; }
.bg-gradient-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}
.bg-light-warning {
  background-color: rgba(255, 193, 7, 0.1) !important;
}
.bg-purple {
  background-color: var(--secondary-color) !important;
}
.bg-orange {
  background-color: #fd7e14 !important;
}

.progress-blue { background: var(--primary-color); }
.progress-green { background: var(--success-color); }
.progress-orange { background: #fd7e14; }
.progress-purple { background: var(--secondary-color); }
.progress-pink { background: #e83e8c; }
.progress-red { background: var(--error-color); }
.progress-teal { background: #20c997; }
.progress-yellow { background: var(--warning); }
.progress-gray { background: var(--muted); }

.flex { display: flex; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.stack { display: flex; flex-direction: column; gap: var(--gap-sm); }
.gap-xs { gap: var(--gap-xs); }
.gap-sm { gap: var(--gap-sm); }
.gap { gap: var(--gap); }
.gap-lg { gap: var(--gap-lg); }
.text-muted { color: var(--muted); }
.text-center { text-align: center; }
.w-100 { width: 100%; }
.ml-auto { margin-left: auto; }
.mr-auto { margin-right: auto; }

.badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 700;
}

.badge-pill { border-radius: 999px; }
.badge-primary { background: var(--primary-color); color: #fff; }
.badge-muted { background: rgba(16, 24, 40, 0.06); color: var(--muted); }

.status-badge {
  padding: 0.35em 0.65em;
  font-size: 0.75em;
  font-weight: 700;
  border-radius: 0.25rem;
}

.status-active {
  background-color: #d1e7dd;
  color: #0f5132;
}

.status-pending {
  background-color: #fff3cd;
  color: #664d03;
}

.role-badge {
  padding: 0.35em 0.65em;
  font-size: 0.75em;
  font-weight: 700;
  border-radius: 0.25rem;
  background-color: #e2e3e5;
  color: #41464b;
}

.badge-status {
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: var(--text-xs);
  font-weight: 600;
}

.sr-only {
  position: absolute !important;
  height: 1px;
  width: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

form .btn { align-self: flex-start; }

/* ==========================================
   TYPOGRAPHY & CONTENT
   ========================================== */
.pg-title {
  margin: 0 0 var(--gap-xs);
  color: var(--muted);
  font-size: var(--text-base);
  font-weight: 600;
}

.content-title {
  color: var(--primary-color);
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: var(--gap);
}

.feature-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: white;
  font-size: 1.5rem;
}

.info-text {
  color: var(--muted);
  font-size: var(--text-sm);
  margin-top: 0.5rem;
  text-align: center;
}

.loading-spinner,
.error-message,
.auth-error {
  display: none;
}

.table-responsive {
  min-height: 400px;
}

.avatar-sm {
  width: 32px;
  height: 32px;
  font-size: 0.8rem;
  font-weight: 600;
}

.avatar-placeholder {
  width: 80px;
  height: 80px;
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */
@media (max-width: 768px) {
  .auth-wrapper {
    flex-direction: column;
  }
  
  .auth-left {
    padding: 30px;
  }
  
  .auth-right {
    padding: 30px;
  }
  
  .auth-form-row {
    flex-direction: column;
    gap: 0;
  }

  .dropdown-menu {
    width: 90vw;
    max-height: 60vh;
  }
  
  .profile-stats {
    flex-direction: column;
    gap: var(--gap);
  }
  
  .profile-header {
    padding: 1.5rem 1rem;
    text-align: center;
  }
  
  .profile-actions {
    justify-content: center;
  }
  
  .info-item {
    flex-direction: column;
    gap: 0.25rem;
  }
  
  .info-value {
    text-align: left;
  }
  
  .content {
    padding: 1rem;
  }
  
  .search-container {
    margin: 1rem;
    padding: 1.5rem;
  }
  
  .search-input {
    font-size: 1rem;
    padding: 0.875rem 1.25rem;
    padding-right: 45px;
  }
  
  .search-button {
    width: 36px;
    height: 36px;
  }
  
  .crop-preview-area {
    flex-direction: column;
    max-height: none;
    min-height: 300px;
  }
  
  .crop-sidebar {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-left: none;
    border-top: 1px solid #e9ecef;
  }
  
  .preview-box {
    width: 100px;
    height: 100px;
    margin: 0;
  }
  
  .crop-main {
    min-height: 250px;
    border-right: none;
    border-bottom: 1px solid #e9ecef;
  }
  
  .crop-controls {
    order: -1;
  }
  
  .preview-container {
    text-align: left;
  }
  
  .preview-container h6 {
    margin-bottom: 0.5rem;
  }
  
  .crop-footer {
    padding: 1rem;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .crop-footer .btn {
    width: 100%;
  }

  .step-indicator {
    flex-direction: column;
    gap: 1rem;
  }
  
  .step-connector {
    display: none;
  }
  
  .step {
    width: 100%;
  }
}

.mobile-display {
  display: inline-block;
}

.desktop-display {
  display: none;
}

@media (min-width: 993px) {
  .sidebar { 
    left: 0; 
  }
  
  .topbar { 
    margin-left: 240px; 
  }
  
  .content {
    font-size: var(--text-xs);
    margin-left: 240px;
  }
  
  .sidebar-toggle { 
    display: none; 
  }
  .mobile-display {
    display: none;
  }
  
  .desktop-display {
    display: inline-block;
  }
}


.pg-title {
  margin-left: 0.625rem;
  padding: 0.3125rem;
  color: #353535;
  font-size: var(--text-lg);
}

.badge {
  font-size: 0.75rem;
  padding: 0.375rem 0.75rem;
}

.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
}

.pg-title {
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: #2c3e50;
}

.card {
  border: none;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  border-radius: 0.5rem;
}

.card-title {
  color: #2c3e50;
  font-weight: 600;
}

.table > :not(caption) > * > * {
  padding: 0.75rem 0.5rem;
}

.student-info .border-bottom:last-child {
  border-bottom: none !important;
}

.card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
}

.table-hover tbody tr:hover {
  background-color: rgba(67, 97, 238, 0.04);
}

/*
.modal .modal-content {
  width: auto !important;
}
*/

/* Dramatic version with side emergence */
.icon-emoji-dramatic {
    position: relative;
    width: 160px; /* Wider to accommodate side movement */
    height: 100px;
    margin: 0 auto;
    perspective: 500px;
    overflow: visible !important; /* Ensure emoji isn't clipped */
}

.icon-emoji-dramatic .calculator-icon {
    position: absolute;
    width: 70px;
    height: 70px;
    background: linear-gradient(145deg, #28a745, #20c997);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    left: 45px; /* Centered in wider container */
    top: 10px;
    box-shadow: 
        0 6px 20px rgba(40, 167, 69, 0.4),
        inset 0 2px 4px rgba(255,255,255,0.3);
    z-index: 2;
    animation: calculatorGlowSide 7s infinite ease-in-out;
}

.icon-emoji-dramatic .calculator-icon i {
    font-size: 2.5rem;
    color: white;
    
}

.icon-emoji-dramatic .emoji-burst {
    position: absolute;
    width: 60px;
    height: 60px;
    left: 50px; /* Start inside calculator */
    top: 20px;
    z-index: 1;
    opacity: 0;
    transform: scale(0.3);
    animation: emojiBurstSide 7s infinite ease-in-out;
}

/* Calculator animation - reacts to emoji emergence */
@keyframes calculatorGlowSide {
    0%, 40% {
        transform: translateX(0) rotateY(0deg);
        box-shadow: 
            0 6px 20px rgba(40, 167, 69, 0.4),
            inset 0 2px 4px rgba(255,255,255,0.3);
    }
    10%, 30% {
        transform: translateX(-2px) rotateY(-3deg);
        box-shadow: 
            0 8px 25px rgba(40, 167, 69, 0.5),
            inset 0 2px 4px rgba(255,255,255,0.3);
    }
    41% {
        transform: translateX(-5px) scale(0.95) rotateY(10deg);
        box-shadow: 
            0 4px 15px rgba(40, 167, 69, 0.3),
            inset 0 2px 4px rgba(255,255,255,0.2);
    }
    50%, 90% {
        transform: translateX(-10px) scale(0.9) rotateY(15deg);
        box-shadow: 
            0 2px 10px rgba(40, 167, 69, 0.2),
            inset 0 2px 4px rgba(255,255,255,0.1);
        opacity: 0.8;
    }
    100% {
        transform: translateX(0) rotateY(0deg);
        box-shadow: 
            0 6px 20px rgba(40, 167, 69, 0.4),
            inset 0 2px 4px rgba(255,255,255,0.3);
        opacity: 1;
    }
}

/* Emoji emerges to the right side */
@keyframes emojiBurstSide {
    0%, 40% {
        opacity: 0;
        transform: scale(0.3) translateX(0);
        filter: blur(8px) brightness(0.8);
    }
    /* Slide out to the right */
    41% {
        opacity: 0.2;
        transform: scale(0.4) translateX(10px);
        filter: blur(4px) brightness(0.9);
    }
    44% {
        opacity: 0.5;
        transform: scale(0.6) translateX(25px);
        filter: blur(2px) brightness(1);
    }
    47% {
        opacity: 0.8;
        transform: scale(0.8) translateX(40px);
        filter: blur(0px) brightness(1.1);
    }
    /* Stay to the right for 3 seconds */
    50%, 88% {
        opacity: 1;
        transform: scale(1) translateX(50px);
        filter: blur(0px) brightness(1.2);
        z-index: 3;
    }
    /* Gentle side-to-side while visible */
    55% {
        transform: scale(1.05) translateX(52px);
    }
    65% {
        transform: scale(1) translateX(50px);
    }
    75% {
        transform: scale(1.03) translateX(51px);
    }
    85% {
        transform: scale(1) translateX(50px);
    }
    /* Slide back into calculator */
    89% {
        opacity: 0.8;
        transform: scale(0.8) translateX(40px);
        filter: blur(0px) brightness(1.1);
    }
    92% {
        opacity: 0.5;
        transform: scale(0.6) translateX(25px);
        filter: blur(2px) brightness(1);
    }
    95% {
        opacity: 0.2;
        transform: scale(0.4) translateX(10px);
        filter: blur(4px) brightness(0.9);
    }
    100% {
        opacity: 0;
        transform: scale(0.3) translateX(0);
        filter: blur(8px) brightness(0.8);
        z-index: 1;
    }
}

/* Emoji bounce effect */
.emoji-burst img {
    border-radius: 50%;
    box-shadow: 
        0 6px 20px rgba(255, 193, 7, 0.5),
        0 0 40px rgba(255, 220, 64, 0.4);
    animation: emojiBounce 2s infinite ease-in-out;
}

@keyframes emojiBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* Optional: Connection line between calculator and emoji */
.icon-emoji-dramatic .connection-line {
    position: absolute;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, rgba(40, 167, 69, 0.5), rgba(255, 193, 7, 0.5));
    top: 50px;
    left: 110px;
    z-index: 2;
    opacity: 0;
    animation: lineExtend 7s infinite ease-in-out;
}

@keyframes lineExtend {
    0%, 40%, 95%, 100% {
        width: 0;
        opacity: 0;
        left: 110px;
    }
    47%, 88% {
        width: 40px;
        opacity: 0.6;
        left: 110px;
    }
}