/* ==============================
       GLOBAL THEME VARIABLES
    ============================== */
:root {
  /* Colors */
  --purple: #4e44a9;
  --purple-light: #7e83b4;
  --purple-dark: #3d3585;
  --lavender: #bab5e5;
  --lavender-light: #e4e2f6;
  --dark: #1d1b20;
  --gray-dark: #555;
  --gray: #999;
  --gray-light: #e0e0e0;
  --white: #ffffff;
  --background: #f5f5f5;
  
  /* Status Colors */
  --success: #4caf50;
  --warning: #ff9800;
  --error: #f44336;
  --info: #2196f3;

  /* Typography */
  --font: "Roboto", sans-serif;
  --font-mono: "Courier New", monospace;
  --fs-xs: 0.875rem;
  --fs-sm: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: 1.5rem;
  --fs-xl: 2rem;
  --fs-xxl: 2.5rem;
  
  /* Font Weights */
  --fw-light: 300;
  --fw-normal: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-black: 900;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-xxl: 4rem;

  /* Radius */
  --radius: 1rem;
  --radius-sm: 0.5rem;
  --radius-lg: 1.5rem;
  --radius-full: 9999px;

  /* Shadow */
  --shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 6px 18px rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 10px 30px rgba(0, 0, 0, 0.2);
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
  
  /* Z-index */
  --z-dropdown: 100;
  --z-sticky: 500;
  --z-modal: 1000;
  --z-tooltip: 1500;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  background: var(--background);
  color: var(--dark);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all var(--transition-base);
}

a:hover {
  opacity: 0.8;
}

button {
  border: none;
  background: none;
  font: inherit;
  cursor: pointer;
  transition: all var(--transition-base);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

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

input,
textarea,
select {
  font: inherit;
  color: inherit;
  border: 1px solid var(--gray-light);
  border-radius: var(--radius-sm);
  padding: var(--space-sm);
  width: 100%;
  transition: all var(--transition-base);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(78, 68, 169, 0.1);
}

/* ==============================
   HEADER
============================== */
.header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  padding: var(--space-lg) var(--space-md);
  background: var(--purple);
  color: var(--white);
  text-align: center;
  transition: all var(--transition-base);
  box-shadow: var(--shadow);
}

.header.scrolled {
  padding: var(--space-sm) var(--space-md);
  box-shadow: var(--shadow-lg);
  justify-content: flex-start;
}

.header-logo {
  width: 6rem;
  height: 6rem;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: var(--space-sm);
  transition: all var(--transition-base);
  border: 3px solid var(--white);
}

.header.scrolled .header-logo {
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 0;
  margin-right: var(--space-sm);
}

.header-content {
  max-width: 800px;
  transition: all var(--transition-base);
}

.header.scrolled .header-content {
  text-align: left;
  max-width: none;
}

.header-title {
  font-size: var(--fs-xl);
  font-weight: var(--fw-black);
  transition: all var(--transition-base);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.header.scrolled .header-title {
  font-size: var(--fs-md);
  text-shadow: none;
}

.header-subtitle {
  font-size: var(--fs-md);
  font-weight: var(--fw-semibold);
  margin: var(--space-xs) 0;
  transition: all var(--transition-base);
  display: block;
}

.header.scrolled .header-subtitle {
  display: none;
}

.header-desc {
  font-size: var(--fs-sm);
  color: var(--lavender-light);
  transition: all var(--transition-base);
  opacity: 1;
  max-height: 100px;
  overflow: hidden;
  display: block;
}

.header.scrolled .header-desc {
  display: none;
}

/* ==============================
   NAVIGATION
============================== */
.nav {
  position: sticky;
  top: 0;
  z-index: calc(var(--z-sticky) - 1);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm);
  background: var(--purple-light);
  padding: var(--space-sm) var(--space-md);
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.header.scrolled ~ .nav {
  top: 4.5rem;
  padding: var(--space-xs) var(--space-md);
  gap: var(--space-xs);
}

.nav a {
  padding: var(--space-xs) var(--space-md);
  font-weight: var(--fw-bold);
  border-radius: var(--radius);
  color: var(--white);
  transition: all var(--transition-base);
  white-space: nowrap;
}

.header.scrolled ~ .nav a {
  padding: var(--space-xs) var(--space-sm);
  font-size: var(--fs-xs);
}

.nav a:hover,
.nav .active {
  background: var(--purple);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.error-notify {
  background: var(--error);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--space-lg);
  color: white;
  text-align: center;
}

.alert-notify {
  background: var(--warning);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--space-lg);
  color: white;
  text-align: center;
}



/* ==============================
       MAIN LAYOUT
    ============================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-lg) var(--space-md);
}

.wrapper {
  background: var(--lavender-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--space-lg);
}


.section {
  margin-bottom: var(--space-xl);
}

.section-title {
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  color: var(--purple);
  margin-bottom: var(--space-md);
  border-bottom: 3px solid var(--purple);
  padding-bottom: var(--space-sm);
}

/* ==============================
       GRID SYSTEM
    ============================== */
.grid {
  display: grid;
  gap: var(--space-md);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* ==============================
       FLEXBOX UTILITIES
    ============================== */
.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

/* ==============================
       CARD COMPONENT
    ============================== */
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
  box-shadow: var(--shadow);
  transition: all var(--transition-base);
  border: 1px solid transparent;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--purple-light);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--lavender-light);
}

.card-title {
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  color: var(--purple);
}

.card-subtitle {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--gray-dark);
  margin-bottom: var(--space-xs);
}

.card-desc {
  font-size: var(--fs-sm);
  color: var(--dark);
  margin: var(--space-sm) 0;
  line-height: 1.7;
}

.card-meta {
  font-size: var(--fs-xs);
  color: var(--gray-dark);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-top: var(--space-sm);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--gray-light);
}

.card-footer {
  margin-top: var(--space-md);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--gray-light);
  display: flex;
  gap: var(--space-sm);
  justify-content: flex-end;
}

/* Card Variants */
.card-primary {
  background: var(--purple);
  color: var(--white);
}

.card-primary .card-title {
  color: var(--white);
}

.card-outline {
  background: transparent;
  border: 2px solid var(--purple);
}

/* ==============================
       BUTTONS
    ============================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  background: var(--purple);
  color: var(--white);
  border-radius: var(--radius);
  font-weight: var(--fw-bold);
  transition: all var(--transition-base);
  box-shadow: var(--shadow);
  border: 2px solid transparent;
  cursor: pointer;
  text-align: center;
}

.btn:hover {
  background: var(--purple-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

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

/* Button Sizes */
.btn-sm {
  padding: var(--space-xs) var(--space-sm);
  font-size: var(--fs-xs);
}

.btn-lg {
  padding: var(--space-md) var(--space-lg);
  font-size: var(--fs-md);
}

/* Button Variants */
.btn-secondary {
  background: var(--purple-light);
}

.btn-secondary:hover {
  background: var(--purple);
}

.btn-outline {
  background: transparent;
  color: var(--purple);
  border-color: var(--purple);
}

.btn-outline:hover {
  background: var(--purple);
  color: var(--white);
}

.btn-success {
  background: var(--success);
}

.btn-warning {
  background: var(--warning);
}

.btn-error {
  background: var(--error);
}

.btn-ghost {
  background: transparent;
  box-shadow: none;
  color: var(--purple);
}

.btn-ghost:hover {
  background: var(--lavender-light);
}

.btn-block {
  width: 100%;
}

/* ==============================
       FORMS
    ============================== */
.form-group {
  margin-bottom: var(--space-md);
}

.form-label {
  display: block;
  font-weight: var(--fw-semibold);
  margin-bottom: var(--space-xs);
  color: var(--dark);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: var(--space-sm);
  border: 2px solid var(--gray-light);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  transition: all var(--transition-base);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(78, 68, 169, 0.1);
}

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

.form-error {
  color: var(--error);
  font-size: var(--fs-xs);
  margin-top: var(--space-xs);
}

.form-help {
  color: var(--gray);
  font-size: var(--fs-xs);
  margin-top: var(--space-xs);
}

/* Checkbox and Radio */
.form-check {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  margin-bottom: var(--space-sm);
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
  width: auto;
  cursor: pointer;
}

/* ==============================
       BADGES
    ============================== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  background: var(--purple);
  color: var(--white);
}

.badge-success { background: var(--success); }
.badge-warning { background: var(--warning); }
.badge-error { background: var(--error); }
.badge-info { background: var(--info); }
.badge-outline {
  background: transparent;
  border: 2px solid var(--purple);
  color: var(--purple);
}

/* ==============================
       ALERTS
    ============================== */
.alert {
  padding: var(--space-md);
  border-radius: var(--radius);
  margin-bottom: var(--space-md);
  border-left: 4px solid;
}

.alert-success {
  background: #e8f5e9;
  border-color: var(--success);
  color: #2e7d32;
}

.alert-warning {
  background: #fff3e0;
  border-color: var(--warning);
  color: #e65100;
}

.alert-error {
  background: #ffebee;
  border-color: var(--error);
  color: #c62828;
}

.alert-info {
  background: #e3f2fd;
  border-color: var(--info);
  color: #1565c0;
}

/* ==============================
       MODAL
    ============================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  padding: var(--space-md);
}

.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
}

.modal-header {
  padding: var(--space-md);
  border-bottom: 2px solid var(--gray-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  color: var(--purple);
}

.modal-close {
  font-size: var(--fs-lg);
  color: var(--gray);
  cursor: pointer;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.modal-close:hover {
  background: var(--gray-light);
}

.modal-body {
  padding: var(--space-md);
}

.modal-footer {
  padding: var(--space-md);
  border-top: 2px solid var(--gray-light);
  display: flex;
  gap: var(--space-sm);
  justify-content: flex-end;
}

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

.dropdown-toggle {
  cursor: pointer;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: var(--space-xs);
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  z-index: var(--z-dropdown);
  overflow: hidden;
}

.dropdown-item {
  display: block;
  padding: var(--space-sm) var(--space-md);
  color: var(--dark);
  transition: all var(--transition-base);
}

.dropdown-item:hover {
  background: var(--lavender-light);
  color: var(--purple);
}

.dropdown-divider {
  height: 1px;
  background: var(--gray-light);
  margin: var(--space-xs) 0;
}

/* ==============================
       TABS
    ============================== */
.tabs {
  display: flex;
  gap: var(--space-sm);
  border-bottom: 2px solid var(--gray-light);
  margin-bottom: var(--space-md);
}

.tab {
  padding: var(--space-sm) var(--space-md);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all var(--transition-base);
  font-weight: var(--fw-semibold);
  color: var(--gray);
}

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

.tab.active {
  color: var(--purple);
  border-bottom-color: var(--purple);
}

.tab-content {
  padding: var(--space-md);
}

/* ==============================
       BREADCRUMB
    ============================== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--fs-sm);
  color: var(--gray);
  margin-bottom: var(--space-md);
}

.breadcrumb a {
  color: var(--purple);
}

.breadcrumb-separator {
  color: var(--gray);
}

/* ==============================
       PAGINATION
    ============================== */
.pagination {
  display: flex;
  gap: var(--space-xs);
  align-items: center;
  justify-content: center;
}

.pagination-item {
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  background: var(--white);
  border: 2px solid var(--gray-light);
  cursor: pointer;
  transition: all var(--transition-base);
}

.pagination-item:hover {
  border-color: var(--purple);
  color: var(--purple);
}

.pagination-item.active {
  background: var(--purple);
  color: var(--white);
  border-color: var(--purple);
}

/* ==============================
       PROGRESS BAR
    ============================== */
.progress {
  width: 100%;
  height: 1rem;
  background: var(--gray-light);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--purple);
  transition: width var(--transition-slow);
}

.progress-bar-success { background: var(--success); }
.progress-bar-warning { background: var(--warning); }
.progress-bar-error { background: var(--error); }

/* ==============================
       SPINNER / LOADER
    ============================== */
.spinner {
  width: 3rem;
  height: 3rem;
  border: 4px solid var(--gray-light);
  border-top-color: var(--purple);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner-sm {
  width: 1.5rem;
  height: 1.5rem;
  border-width: 2px;
}

.spinner-lg {
  width: 4rem;
  height: 4rem;
  border-width: 6px;
}

/* ==============================
       TOOLTIP
    ============================== */
.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip-text {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--dark);
  color: var(--white);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  font-size: var(--fs-xs);
  white-space: nowrap;
  z-index: var(--z-tooltip);
  transition: all var(--transition-base);
}

.tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* ==============================
       TABLE
    ============================== */
.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.table th,
.table td {
  padding: var(--space-sm);
  text-align: left;
  border-bottom: 1px solid var(--gray-light);
}

.table th {
  background: var(--purple);
  color: var(--white);
  font-weight: var(--fw-bold);
}

.table tr:hover {
  background: var(--lavender-light);
}

.table tr:last-child td {
  border-bottom: none;
}

/* ==============================
       LIST
    ============================== */
.list {
  list-style: none;
}

.list-item {
  padding: var(--space-sm);
  border-bottom: 1px solid var(--gray-light);
  transition: all var(--transition-base);
}

.list-item:hover {
  background: var(--lavender-light);
}

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

/* ==============================
       AVATAR
    ============================== */
.avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--white);
  box-shadow: var(--shadow-sm);
}

.avatar-sm { width: 2rem; height: 2rem; }
.avatar-lg { width: 4rem; height: 4rem; }
.avatar-xl { width: 6rem; height: 6rem; }

/* ==============================
       DIVIDER
    ============================== */
.divider {
  height: 1px;
  background: var(--gray-light);
  margin: var(--space-md) 0;
}

.divider-vertical {
  width: 1px;
  height: 100%;
  background: var(--gray-light);
}

/* ==============================
       CODE BLOCK
    ============================== */
.code {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  background: var(--lavender-light);
  color: var(--purple);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
}

.code-block {
  display: block;
  padding: var(--space-md);
  background: var(--dark);
  color: var(--white);
  border-radius: var(--radius);
  overflow-x: auto;
  font-family: var(--font-mono);
  line-height: 1.5;
}

/* ==============================
       UTILITIES
    ============================== */
/* Text Alignment */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* Font Weights */
.fw-light { font-weight: var(--fw-light); }
.fw-normal { font-weight: var(--fw-normal); }
.fw-semibold { font-weight: var(--fw-semibold); }
.fw-bold { font-weight: var(--fw-bold); }

/* Text Sizes */
.text-xs { font-size: var(--fs-xs); }
.text-sm { font-size: var(--fs-sm); }
.text-md { font-size: var(--fs-md); }
.text-lg { font-size: var(--fs-lg); }
.text-xl { font-size: var(--fs-xl); }

/* Colors */
.text-purple { color: var(--purple); }
.text-gray { color: var(--gray); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-error { color: var(--error); }

/* Background Colors */
.bg-purple { background: var(--purple); }
.bg-white { background: var(--white); }
.bg-gray { background: var(--gray-light); }

/* Spacing */
.m-0 { margin: 0; }
.mt-sm { margin-top: var(--space-sm); }
.mb-sm { margin-bottom: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mb-md { margin-bottom: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mb-lg { margin-bottom: var(--space-lg); }

.p-0 { padding: 0; }
.p-sm { padding: var(--space-sm); }
.p-md { padding: var(--space-md); }
.p-lg { padding: var(--space-lg); }

/* Display */
.d-none { display: none; }
.d-block { display: block; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }

/* Visibility */
.hidden { visibility: hidden; }
.visible { visibility: visible; }

/* Width & Height */
.w-full { width: 100%; }
.h-full { height: 100%; }

/* ==============================
       FOOTER
    ============================== */
.footer {
  text-align: center;
  background: var(--purple-light);
  color: var(--white);
  padding: var(--space-md);
  margin-top: var(--space-xl);
  font-size: var(--fs-sm);
  letter-spacing: 0.3px;
}

.footer a {
  color: var(--white);
  font-weight: var(--fw-semibold);
  text-decoration: underline;
  transition: opacity var(--transition-base);
}

.footer a:hover {
  opacity: 0.8;
}

/* ==============================
   MOBILE RESPONSIVE
============================== */

/* Tablets and smaller laptops */
@media (max-width: 1024px) {
  .header {
    flex-direction: column;
    padding: var(--space-md) var(--space-sm);
  }

  .header-logo {
    width: 5rem;
    height: 5rem;
    margin-bottom: var(--space-md);
  }

  .header.scrolled {
    flex-direction: row;
  }

  .header.scrolled .header-logo {
    margin-bottom: 0;
  }

  .header-title {
    font-size: var(--fs-lg);
  }

  .container {
    padding: var(--space-md) var(--space-sm);
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* Tablets */
@media (max-width: 768px) {
  .header {
    padding: var(--space-md) var(--space-sm);
  }

  .header.scrolled {
    padding: var(--space-xs) var(--space-sm);
    justify-content: center;
  }

  .header-logo {
    width: 4.5rem;
    height: 4.5rem;
  }

  .header.scrolled .header-logo {
    width: 2rem;
    height: 2rem;
    margin-right: var(--space-xs);
  }

  .header-title {
    font-size: var(--fs-lg);
  }

  .header.scrolled .header-title {
    font-size: var(--fs-sm);
  }

  .header-subtitle {
    font-size: var(--fs-sm);
  }

  .header-desc {
    font-size: var(--fs-xs);
  }

  /* Navigation adjustments */
  .nav {
    padding: var(--space-xs) var(--space-sm);
    gap: var(--space-xs);
  }

  .header.scrolled ~ .nav {
    top: 3.5rem;
  }

  .nav a {
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--fs-xs);
  }

  .header.scrolled ~ .nav a {
    padding: 0.375rem var(--space-xs);
    font-size: 0.75rem;
  }

  /* Layout adjustments */
  .wrapper {
    padding: var(--space-md);
  }

  .btn {
    width: 100%;
  }

  .card-meta {
    flex-direction: column;
    gap: var(--space-xs);
  }

  .container {
    padding: var(--space-md) var(--space-sm);
  }

  /* Modal adjustments */
  .modal {
    max-width: 95%;
  }

  /* Table responsive */
  .table {
    display: block;
    overflow-x: auto;
  }

  /* Pagination */
  .pagination {
    flex-wrap: wrap;
  }
}

/* Mobile phones */
@media (max-width: 480px) {
  .header {
    padding: var(--space-sm) var(--space-xs);
  }

  .header.scrolled {
    padding: 0.5rem var(--space-xs);
  }

  .header-logo {
    width: 4rem;
    height: 4rem;
    margin-bottom: var(--space-xs);
  }

  .header.scrolled .header-logo {
    width: 1.75rem;
    height: 1.75rem;
    margin-right: 0.375rem;
  }

  .header-title {
    font-size: var(--fs-md);
  }

  .header.scrolled .header-title {
    font-size: 0.875rem;
  }

  .header-subtitle {
    font-size: var(--fs-sm);
    margin: 0.25rem 0;
  }

  .header-desc {
    font-size: 0.75rem;
    max-height: 60px;
  }

  /* Compact navigation for mobile */
  .nav {
    padding: 0.5rem var(--space-xs);
    gap: 0.25rem;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .header.scrolled ~ .nav {
    top: 3rem;
    padding: 0.375rem var(--space-xs);
  }

  .nav a {
    padding: 0.375rem 0.625rem;
    font-size: 0.75rem;
    flex-shrink: 0;
  }

  .header.scrolled ~ .nav a {
    padding: 0.25rem 0.5rem;
    font-size: 0.688rem;
  }

  .nav a:hover {
    transform: none;
  }

  .container {
    padding: var(--space-md) var(--space-xs);
  }

  .wrapper {
    padding: var(--space-sm);
  }

  .section-title {
    font-size: var(--fs-md);
  }

  .card {
    padding: var(--space-sm);
  }

  .btn:not(.btn-block) {
    width: 100%;
  }

  .modal {
    max-width: 100%;
    border-radius: 0;
  }

  .tabs {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .tabs::-webkit-scrollbar {
    display: none;
  }
}

/* Extra small phones */
@media (max-width: 360px) {
  .header-logo {
    width: 3.5rem;
    height: 3.5rem;
  }

  .header.scrolled .header-logo {
    width: 1.5rem;
    height: 1.5rem;
  }

  .header-title {
    font-size: 1.25rem;
  }

  .header.scrolled .header-title {
    font-size: 0.875rem;
  }

  .nav a {
    padding: 0.3rem 0.5rem;
    font-size: 0.7rem;
  }

  .header.scrolled ~ .nav a {
    padding: 0.25rem 0.4rem;
    font-size: 0.65rem;
  }

  .container {
    padding: var(--space-sm) 0.5rem;
  }
}