/* ============================================================
   OSC Digital — Global Styles & Design System
   Yarsi Pratama University
   ============================================================ */

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

/* ============================================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================================ */
:root {
  /* Colors */
  --primary:        #F05A28;
  --primary-dark:   #D94D1E;
  --primary-light:  #FFF3EE;
  --primary-border: #FBCAB5;
  --red:            #C62828;
  --red-light:      #FFEBEE;
  --red-border:     #FFCDD2;
  --dark:           #242628;
  --dark-hover:     #2F3236;
  --dark-2:         #1A1C1E;
  --medium-gray:    #6B7075;
  --light-gray:     #F1F2F3;
  --border:         #E5E7EA;
  --border-dark:    #D0D3D7;
  --white:          #FFFFFF;
  --bg:             #F7F8FA;
  --bg-alt:         #F1F2F3;

  /* Status Colors */
  --success:        #2E7D32;
  --success-light:  #E8F5E9;
  --warning:        #E65100;
  --warning-light:  #FFF3E0;
  --info:           #1565C0;
  --info-light:     #E3F2FD;

  /* Layout */
  --sidebar-width:           260px;
  --sidebar-collapsed-width: 72px;
  --topbar-height:           64px;
  --content-padding:         24px;

  /* Typography */
  --font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  --font-xs:  11px;
  --font-sm:  12px;
  --font-base:14px;
  --font-md:  15px;
  --font-lg:  18px;
  --font-xl:  22px;
  --font-2xl: 28px;
  --font-3xl: 36px;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;

  /* Border Radius */
  --radius-sm:  4px;
  --radius:     8px;
  --radius-md:  10px;
  --radius-lg:  14px;
  --radius-xl:  20px;
  --radius-full:9999px;

  /* Shadows */
  --shadow-xs:  0 1px 2px rgba(0,0,0,0.06);
  --shadow-sm:  0 1px 4px rgba(0,0,0,0.08), 0 0 1px rgba(0,0,0,0.04);
  --shadow:     0 2px 8px rgba(0,0,0,0.08), 0 0 1px rgba(0,0,0,0.04);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.10), 0 0 1px rgba(0,0,0,0.04);
  --shadow-lg:  0 8px 32px rgba(0,0,0,0.12), 0 0 1px rgba(0,0,0,0.04);

  /* Transitions */
  --transition:      all 0.2s ease;
  --transition-slow: all 0.3s ease;
  --transition-fast: all 0.15s ease;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-base);
  font-weight: 400;
  line-height: 1.6;
  color: var(--dark);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--primary-dark);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

button {
  font-family: var(--font-family);
  cursor: pointer;
  border: none;
  background: none;
}

input, select, textarea {
  font-family: var(--font-family);
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--dark);
}

h1 { font-size: var(--font-2xl); }
h2 { font-size: var(--font-xl); }
h3 { font-size: var(--font-lg); }
h4 { font-size: var(--font-md); }
h5 { font-size: var(--font-base); }

p { margin-bottom: 0; }

.text-primary    { color: var(--primary) !important; }
.text-red        { color: var(--red) !important; }
.text-dark       { color: var(--dark) !important; }
.text-muted      { color: var(--medium-gray) !important; }
.text-success    { color: var(--success) !important; }
.text-warning    { color: var(--warning) !important; }
.text-info       { color: var(--info) !important; }

.text-xs   { font-size: var(--font-xs) !important; }
.text-sm   { font-size: var(--font-sm) !important; }
.text-base { font-size: var(--font-base) !important; }
.text-md   { font-size: var(--font-md) !important; }
.text-lg   { font-size: var(--font-lg) !important; }
.text-xl   { font-size: var(--font-xl) !important; }

.fw-300 { font-weight: 300 !important; }
.fw-400 { font-weight: 400 !important; }
.fw-500 { font-weight: 500 !important; }
.fw-600 { font-weight: 600 !important; }
.fw-700 { font-weight: 700 !important; }
.fw-800 { font-weight: 800 !important; }

.text-center { text-align: center !important; }
.text-left   { text-align: left !important; }
.text-right  { text-align: right !important; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  font-size: var(--font-base);
  font-weight: 500;
  line-height: 1;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Primary Button */
.btn-primary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}
.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(240,90,40,0.30);
  transform: translateY(-1px);
}

/* Secondary Button */
.btn-secondary {
  background: var(--white);
  color: var(--dark);
  border-color: var(--border-dark);
}
.btn-secondary:hover:not(:disabled) {
  background: var(--light-gray);
  border-color: var(--border-dark);
}

/* Danger Button */
.btn-danger {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}
.btn-danger:hover:not(:disabled) {
  background: #B71C1C;
  border-color: #B71C1C;
  color: var(--white);
  box-shadow: 0 4px 12px rgba(198,40,40,0.30);
  transform: translateY(-1px);
}

/* Ghost Button */
.btn-ghost {
  background: transparent;
  color: var(--medium-gray);
  border-color: transparent;
}
.btn-ghost:hover:not(:disabled) {
  background: var(--light-gray);
  color: var(--dark);
}

/* Outline Primary */
.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover:not(:disabled) {
  background: var(--primary-light);
}

/* Success Button */
.btn-success {
  background: var(--success);
  color: var(--white);
  border-color: var(--success);
}
.btn-success:hover:not(:disabled) {
  background: #1B5E20;
  color: var(--white);
  transform: translateY(-1px);
}

/* Button Sizes */
.btn-xs  { padding: 5px 10px; font-size: var(--font-xs); border-radius: var(--radius-sm); }
.btn-sm  { padding: 7px 14px; font-size: var(--font-sm); }
.btn-lg  { padding: 12px 24px; font-size: var(--font-md); border-radius: var(--radius-md); }
.btn-xl  { padding: 14px 32px; font-size: var(--font-lg); border-radius: var(--radius-md); }

/* Icon Button */
.btn-icon {
  width: 36px; height: 36px;
  padding: 0;
  border-radius: var(--radius);
  display: inline-flex; align-items: center; justify-content: center;
}
.btn-icon.btn-sm { width: 30px; height: 30px; }
.btn-icon.btn-lg { width: 44px; height: 44px; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  overflow: hidden;
}

.card-header {
  padding: 18px var(--content-padding);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-title {
  font-size: var(--font-md);
  font-weight: 600;
  color: var(--dark);
  margin: 0;
}

.card-subtitle {
  font-size: var(--font-sm);
  color: var(--medium-gray);
  margin-top: 2px;
}

.card-body {
  padding: var(--content-padding);
}

.card-footer {
  padding: 14px var(--content-padding);
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  font-size: var(--font-xs);
  font-weight: 600;
  border-radius: var(--radius-full);
  white-space: nowrap;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.badge-primary   { background: var(--primary-light); color: var(--primary-dark); border: 1px solid var(--primary-border); }
.badge-red       { background: var(--red-light); color: var(--red); border: 1px solid var(--red-border); }
.badge-success   { background: var(--success-light); color: var(--success); border: 1px solid #A5D6A7; }
.badge-warning   { background: var(--warning-light); color: var(--warning); border: 1px solid #FFCC80; }
.badge-info      { background: var(--info-light); color: var(--info); border: 1px solid #90CAF9; }
.badge-dark      { background: var(--light-gray); color: var(--dark); border: 1px solid var(--border-dark); }
.badge-gray      { background: #F5F5F5; color: var(--medium-gray); border: 1px solid var(--border); }

/* Dot indicator */
.badge-dot {
  padding: 0;
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.badge-dot.success { background: #4CAF50; }
.badge-dot.error   { background: var(--red); }
.badge-dot.warning { background: #FF9800; }
.badge-dot.info    { background: #2196F3; }

/* Notification badge (floating number) */
.notif-badge {
  position: absolute;
  top: -4px; right: -4px;
  background: var(--red);
  color: white;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px; height: 18px;
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--white);
}

/* ============================================================
   FORMS
   ============================================================ */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 6px;
}

.form-label .required {
  color: var(--red);
  margin-left: 2px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  font-size: var(--font-base);
  font-family: var(--font-family);
  color: var(--dark);
  background: var(--white);
  border: 1.5px solid var(--border-dark);
  border-radius: var(--radius);
  outline: none;
  transition: var(--transition);
  line-height: 1.5;
}

.form-control::placeholder {
  color: var(--medium-gray);
  opacity: 0.8;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(240,90,40,0.12);
}

.form-control:disabled {
  background: var(--light-gray);
  color: var(--medium-gray);
  cursor: not-allowed;
}

.form-control.is-invalid {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(198,40,40,0.10);
}

.form-control.is-valid {
  border-color: var(--success);
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236B7075' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 36px;
}

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

.form-hint {
  font-size: var(--font-xs);
  color: var(--medium-gray);
  margin-top: 5px;
}

.invalid-feedback {
  font-size: var(--font-xs);
  color: var(--red);
  margin-top: 5px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

/* Input with icon */
.input-wrapper {
  position: relative;
}

.input-wrapper .input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--medium-gray);
  display: flex;
  align-items: center;
}

.input-wrapper .form-control {
  padding-left: 40px;
}

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  font-size: var(--font-sm);
  font-weight: 500;
  border: 1px solid;
  margin-bottom: 16px;
}

.alert-success { background: var(--success-light); color: var(--success); border-color: #A5D6A7; }
.alert-error   { background: var(--red-light); color: var(--red); border-color: var(--red-border); }
.alert-warning { background: var(--warning-light); color: var(--warning); border-color: #FFCC80; }
.alert-info    { background: var(--info-light); color: var(--info); border-color: #90CAF9; }

.alert svg { flex-shrink: 0; margin-top: 1px; }

.alert-dismissible {
  position: relative;
}
.alert-close {
  position: absolute; top: 10px; right: 12px;
  background: none; border: none; cursor: pointer;
  color: inherit; opacity: 0.6;
  padding: 2px;
}
.alert-close:hover { opacity: 1; }

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: var(--font-sm);
  font-weight: 500;
  min-width: 280px;
  max-width: 380px;
  pointer-events: all;
  animation: toast-slide-in 0.3s ease;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
}

.toast.toast-out {
  animation: toast-slide-out 0.3s ease forwards;
}

.toast-success { background: var(--success); color: white; }
.toast-error   { background: var(--red); color: white; }
.toast-warning { background: var(--warning); color: white; }
.toast-info    { background: var(--dark); color: white; }

.toast-icon  { flex-shrink: 0; }
.toast-body  { flex: 1; }
.toast-close { flex-shrink: 0; background: none; border: none; cursor: pointer; color: inherit; opacity: 0.7; padding: 0; }
.toast-close:hover { opacity: 1; }

@keyframes toast-slide-in {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
@keyframes toast-slide-out {
  from { transform: translateX(0); opacity: 1; }
  to   { transform: translateX(100%); opacity: 0; }
}

/* ============================================================
   MODALS
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(36,38,40,0.55);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 40px);
  margin: auto;
  display: flex;
  flex-direction: column;
  transform: scale(0.95) translateY(10px);
  transition: transform 0.2s ease;
  overflow: hidden;
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

.modal-lg { max-width: 740px; }
.modal-sm { max-width: 420px; }

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

.modal-title {
  font-size: var(--font-md);
  font-weight: 700;
  color: var(--dark);
}

.modal-close {
  width: 32px; height: 32px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  background: var(--light-gray);
  color: var(--medium-gray);
  border: none; cursor: pointer;
  transition: var(--transition-fast);
}
.modal-close:hover { background: var(--border); color: var(--dark); }

.modal-body {
  padding: 24px;
  overflow-y: auto;
  max-height: calc(85vh - 120px);
  flex: 1;
  -webkit-overflow-scrolling: touch;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
  background: var(--bg-alt);
}

/* ============================================================
   TABS
   ============================================================ */
.tabs {
  border-bottom: 2px solid var(--border);
  display: flex;
  gap: 0;
}

.tab-item {
  padding: 12px 20px;
  font-size: var(--font-sm);
  font-weight: 500;
  color: var(--medium-gray);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition-fast);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 7px;
}

.tab-item:hover {
  color: var(--primary);
}

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

.tab-content { padding: 20px 0; }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ============================================================
   STATUS INDICATORS
   ============================================================ */
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.status-online  { background: #4CAF50; box-shadow: 0 0 0 3px rgba(76,175,80,0.25); }
.status-offline { background: var(--red); }
.status-warning { background: #FF9800; }
.status-idle    { background: var(--medium-gray); }

/* ============================================================
   DROPDOWNS
   ============================================================ */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  z-index: 500;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px) scale(0.98);
  transition: all 0.15s ease;
}

.dropdown-menu.show {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0) scale(1);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: var(--font-sm);
  color: var(--dark);
  cursor: pointer;
  transition: var(--transition-fast);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  text-decoration: none;
}
.dropdown-item:hover { background: var(--light-gray); color: var(--primary); }
.dropdown-item.danger { color: var(--red); }
.dropdown-item.danger:hover { background: var(--red-light); }

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

.dropdown-header {
  padding: 8px 16px 4px;
  font-size: var(--font-xs);
  font-weight: 600;
  color: var(--medium-gray);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--font-sm);
  color: var(--medium-gray);
}

.breadcrumb a {
  color: var(--medium-gray);
  text-decoration: none;
  transition: var(--transition-fast);
}
.breadcrumb a:hover { color: var(--primary); }

.breadcrumb-sep {
  color: var(--border-dark);
  font-size: 12px;
}

.breadcrumb .current {
  color: var(--dark);
  font-weight: 500;
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.d-flex        { display: flex !important; }
.d-block       { display: block !important; }
.d-none        { display: none !important; }
.d-grid        { display: grid !important; }
.align-center  { align-items: center !important; }
.align-start   { align-items: flex-start !important; }
.align-end     { align-items: flex-end !important; }
.justify-center{ justify-content: center !important; }
.justify-between{ justify-content: space-between !important; }
.justify-end   { justify-content: flex-end !important; }
.gap-1  { gap: var(--space-1) !important; }
.gap-2  { gap: var(--space-2) !important; }
.gap-3  { gap: var(--space-3) !important; }
.gap-4  { gap: var(--space-4) !important; }
.gap-6  { gap: var(--space-6) !important; }
.flex-1 { flex: 1 !important; }

.mt-1 { margin-top: var(--space-1) !important; }
.mt-2 { margin-top: var(--space-2) !important; }
.mt-3 { margin-top: var(--space-3) !important; }
.mt-4 { margin-top: var(--space-4) !important; }
.mt-6 { margin-top: var(--space-6) !important; }
.mb-1 { margin-bottom: var(--space-1) !important; }
.mb-2 { margin-bottom: var(--space-2) !important; }
.mb-3 { margin-bottom: var(--space-3) !important; }
.mb-4 { margin-bottom: var(--space-4) !important; }
.mb-6 { margin-bottom: var(--space-6) !important; }

.p-0  { padding: 0 !important; }
.p-4  { padding: var(--space-4) !important; }
.p-6  { padding: var(--space-6) !important; }

.w-100  { width: 100% !important; }
.h-100  { height: 100% !important; }

.rounded    { border-radius: var(--radius) !important; }
.rounded-full { border-radius: var(--radius-full) !important; }

.shadow     { box-shadow: var(--shadow) !important; }
.shadow-sm  { box-shadow: var(--shadow-sm) !important; }
.shadow-md  { box-shadow: var(--shadow-md) !important; }

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  text-align: center;
}

.empty-state-icon {
  width: 72px; height: 72px;
  background: var(--light-gray);
  border-radius: var(--radius-xl);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  color: var(--medium-gray);
}

.empty-state-title {
  font-size: var(--font-lg);
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 8px;
}

.empty-state-desc {
  font-size: var(--font-sm);
  color: var(--medium-gray);
  max-width: 320px;
  margin-bottom: 24px;
  line-height: 1.7;
}

/* Error State */
.error-state {
  text-align: center;
  padding: 48px 24px;
}

.error-state-icon {
  width: 64px; height: 64px;
  background: var(--red-light);
  border-radius: var(--radius-xl);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  color: var(--red);
}

/* Avatar */
.avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--primary-light);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  color: var(--primary);
  font-size: var(--font-sm);
  flex-shrink: 0;
}

.avatar-sm { width: 32px; height: 32px; font-size: var(--font-xs); }
.avatar-md { width: 48px; height: 48px; font-size: var(--font-md); }
.avatar-lg { width: 64px; height: 64px; font-size: var(--font-lg); }
.avatar-xl { width: 96px; height: 96px; font-size: var(--font-xl); }

.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* Divider */
.divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

/* Loading Spinner */
.spinner {
  width: 20px; height: 20px;
  border: 2.5px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Section */
.section-title {
  font-size: var(--font-sm);
  font-weight: 700;
  color: var(--medium-gray);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}

/* Grid utilities */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* File Upload */
.file-upload-area {
  border: 2px dashed var(--border-dark);
  border-radius: var(--radius-md);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg-alt);
}

.file-upload-area:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.file-upload-area input[type="file"] {
  display: none;
}

/* Scrollbar styling */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-dark); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--medium-gray); }

/* ============================================================
   ADDITIONAL COMPONENTS
   ============================================================ */

/* Badge extras */
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-red     { background: var(--red-light); color: var(--red); }

/* Margin utilities */
.mb-6  { margin-bottom: 24px; }
.mb-4  { margin-bottom: 16px; }
.mb-8  { margin-bottom: 32px; }

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: var(--font-sm);
}

.breadcrumb a {
  color: var(--medium-gray);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition-fast);
}

.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .current { color: var(--dark); font-weight: 600; }
.breadcrumb .breadcrumb-sep { color: var(--border-dark); display: flex; align-items: center; }

/* Status dot */
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.status-online  { background: var(--success); box-shadow: 0 0 0 3px var(--success-light); }
.status-offline { background: var(--red); }
.status-warning { background: var(--warning); box-shadow: 0 0 0 3px var(--warning-light); }

/* Notification badge (topbar) */
.notif-badge {
  position: absolute;
  top: 4px; right: 4px;
  background: var(--red);
  color: white;
  font-size: 9px;
  font-weight: 700;
  min-width: 16px; height: 16px;
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
  line-height: 1;
}

/* Dropdown menu */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 300;
  min-width: 180px;
  overflow: hidden;
  display: none;
  animation: dropIn 0.15s ease;
}

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

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

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: var(--font-sm);
  color: var(--dark);
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-fast);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.dropdown-item:hover {
  background: var(--bg-alt);
  text-decoration: none;
}

.dropdown-item.danger { color: var(--red); }
.dropdown-item.danger:hover { background: var(--red-light); }

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

/* Toast System */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--dark);
  color: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  min-width: 300px;
  max-width: 400px;
  pointer-events: all;
  animation: toastIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-left: 4px solid transparent;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px) scale(0.9); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}

.toast-out {
  animation: toastOut 0.3s ease forwards;
}

@keyframes toastOut {
  to { opacity: 0; transform: translateX(40px); }
}

.toast-success { border-color: #4CAF50; }
.toast-error   { border-color: var(--red); }
.toast-warning { border-color: #FF9800; }
.toast-info    { border-color: var(--primary); }

.toast-icon { flex-shrink: 0; margin-top: 1px; }
.toast-success .toast-icon { color: #4CAF50; }
.toast-error   .toast-icon { color: #EF9A9A; }
.toast-warning .toast-icon { color: #FFCC80; }
.toast-info    .toast-icon { color: var(--primary); }

.toast-body {
  flex: 1;
  font-size: var(--font-sm);
  line-height: 1.5;
}

.toast-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: var(--transition-fast);
}

.toast-close:hover { color: white; }

/* Form Row 3 Columns */
.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

/* Card Variants */
.card.card-flat { box-shadow: none; border: 1px solid var(--border); }
.card-body.p-0 { padding: 0; }

/* Required field marker */
.required { color: var(--red); }

/* Invalid form control */
.form-control.is-invalid {
  border-color: var(--red);
}

.invalid-feedback {
  font-size: var(--font-xs);
  color: var(--red);
  margin-top: 4px;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.tab-item {
  padding: 10px 18px;
  font-size: var(--font-sm);
  font-weight: 500;
  color: var(--medium-gray);
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition-fast);
  white-space: nowrap;
  border-radius: var(--radius) var(--radius) 0 0;
}

.tab-item:hover { color: var(--dark); }

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

.tab-pane { display: none; }
.tab-pane.active { display: block; }

