/* ============================================
   TONY'S BAKERY — Design System
   main.css
   ============================================ */

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

/* === CSS CUSTOM PROPERTIES === */
:root {
  /* Palette 1: Warm Vintage & Warm Cream */
  --primary: #D32F2F;
  /* Logo Red CTA Accent (#E53935 / #D32F2F) */
  --primary-hover: #B71C1C;
  --primary-light: #FFEBEE;
  --primary-dark: #B71C1C;

  --amber: #F59E0B;
  --amber-light: #FDE68A;

  --success: #10B981;
  --success-light: #D1FAE5;
  --danger: #EF4444;
  --danger-light: #FEE2E2;
  --warning: #F59E0B;
  --warning-light: #FEF3C7;
  --info: #3B82F6;
  --info-light: #DBEAFE;
  --purple: #7C3AED;
  --purple-light: #EDE9FE;

  /* Neutrals */
  --gray-50: #FDFBF7;
  --gray-100: #F9F6EE;
  --gray-200: #EFEBE4;
  --gray-300: #E2DDD5;
  --gray-400: #A8A29E;
  --gray-500: #78716C;
  --gray-600: #57534E;
  --gray-700: #2C2523;
  --gray-800: #1A1A1A;
  --gray-900: #111111;

  /* Bakery Brand - Palette 1 */
  --cream: #FDFBF7;
  /* Warm Cream / Be Ngà background */
  --cream-dark: #F9F6EE;
  --brown-dark: #1A1A1A;
  /* Nâu đen mờ / Đen than */
  --brown-mid: #2C2523;
  --brown-light: #D32F2F;
  --tan: #EFEBE4;
  --brown-light: rgb(135, 61, 18);
  --tan: #E8D5B0;

  /* Layout */
  --sidebar-width: 260px;
  --topbar-height: 64px;
  --border-radius: 12px;
  --border-radius-sm: 8px;
  --border-radius-lg: 16px;
  --border-radius-xl: 20px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.10);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.12);
  --shadow-primary: 0 8px 20px rgba(217, 119, 6, 0.30);

  /* Transitions */
  --transition: all 0.2s ease;
  --transition-slow: all 0.35s ease;

  /* Typography */
  --font-sans: 'Inter', -apple-system, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
}

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

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

body {
  font-family: var(--font-sans);
  background: var(--cream);
  color: var(--gray-800);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

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

button {
  cursor: pointer;
  font-family: inherit;
}

input,
textarea,
select {
  font-family: inherit;
}

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

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.5rem;
}

h3 {
  font-size: 1.25rem;
}

h4 {
  font-size: 1.1rem;
}

h5 {
  font-size: 1rem;
}

h6 {
  font-size: 0.875rem;
}

p {
  color: var(--gray-600);
}

.text-xs {
  font-size: 0.75rem;
}

.text-sm {
  font-size: 0.875rem;
}

.text-base {
  font-size: 1rem;
}

.text-lg {
  font-size: 1.125rem;
}

.text-xl {
  font-size: 1.25rem;
}

.text-2xl {
  font-size: 1.5rem;
}

.text-3xl {
  font-size: 1.875rem;
}

.fw-400 {
  font-weight: 400;
}

.fw-500 {
  font-weight: 500;
}

.fw-600 {
  font-weight: 600;
}

.fw-700 {
  font-weight: 700;
}

.fw-800 {
  font-weight: 800;
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--border-radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  border: 2px solid transparent;
  transition: var(--transition);
  line-height: 1;
  white-space: nowrap;
  user-select: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, #E85D22 0%, var(--primary) 100%);
  color: #fff;
  border: none;
  box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary-dark) 100%);
  box-shadow: 0 8px 22px rgba(211, 47, 47, 0.4);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #fff;
  color: var(--gray-700);
  border-color: var(--gray-200);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

.btn-danger:hover {
  background: #DC2626;
  transform: translateY(-1px);
}

.btn-success {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}

.btn-success:hover {
  background: #059669;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--primary);
  border-color: transparent;
}

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

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

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

.btn-sm {
  padding: 0.4rem 0.875rem;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 0.8rem 1.75rem;
  font-size: 1rem;
}

.btn-xl {
  padding: 1rem 2rem;
  font-size: 1.05rem;
}

.btn-icon {
  padding: 0.5rem;
  min-width: 36px;
  height: 36px;
}

.btn-block {
  width: 100%;
}

.btn-icon-sm {
  padding: 0.35rem;
  min-width: 30px;
  height: 30px;
}

/* === BADGE === */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  line-height: 1.4;
}

.badge-primary {
  background: #FEF3C7;
  color: var(--amber);
}

.badge-success {
  background: var(--success-light);
  color: #065F46;
}

.badge-danger {
  background: var(--danger-light);
  color: #991B1B;
}

.badge-warning {
  background: var(--warning-light);
  color: var(--primary-dark);
}

.badge-info {
  background: var(--info-light);
  color: #1D4ED8;
}

.badge-purple {
  background: var(--purple-light);
  color: #5B21B6;
}

.badge-gray {
  background: var(--gray-100);
  color: var(--gray-600);
}

.badge-dark {
  background: var(--brown-dark);
  color: #FFF;
}

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

.card-body {
  padding: 1.25rem;
}

.card-header {
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--gray-200);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--gray-800);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-footer {
  padding: 0.875rem 1.25rem;
  border-top: 1px solid var(--gray-200);
  background: var(--gray-50);
}

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

/* === FORM ELEMENTS === */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.4rem;
  letter-spacing: 0.2px;
}

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

.form-control {
  display: block;
  width: 100%;
  padding: 0.65rem 0.875rem;
  font-size: 0.875rem;
  color: var(--gray-800);
  background: #fff;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--border-radius-sm);
  transition: var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
}

.form-control::placeholder {
  color: var(--gray-400);
}

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

.form-control-sm {
  padding: 0.45rem 0.75rem;
  font-size: 0.8rem;
}

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='%236b7280' 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 0.6rem center;
  background-size: 1.25rem;
  padding-right: 2.25rem;
}

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

.input-group {
  display: flex;
  align-items: stretch;
}

.input-group .form-control {
  flex: 1;
  border-radius: var(--border-radius-sm) 0 0 var(--border-radius-sm);
}

.input-group .input-addon {
  display: flex;
  align-items: center;
  padding: 0 0.875rem;
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-left: none;
  border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
  font-size: 0.875rem;
  color: var(--gray-500);
  white-space: nowrap;
}

.input-group .btn {
  border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
}

.form-check {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  cursor: pointer;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}

.form-check-label {
  font-size: 0.875rem;
  color: var(--gray-600);
  cursor: pointer;
}

.form-hint {
  font-size: 0.75rem;
  color: var(--gray-400);
  margin-top: 0.3rem;
}

.form-error {
  font-size: 0.75rem;
  color: var(--danger);
  margin-top: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* === TABLE === */
.table-wrapper {
  overflow-x: auto;
}

table.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.table th {
  padding: 0.7rem 1rem;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--gray-500);
  border-bottom: 1px solid var(--gray-200);
  background: var(--gray-50);
  white-space: nowrap;
}

.table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700);
  vertical-align: middle;
}

.table tbody tr {
  transition: background-color 0.15s ease;
}

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

.table tbody tr:hover,
.table tbody tr:hover>td {
  background-color: var(--gray-100) !important;
}

.table td.actions {
  display: table-cell !important;
  white-space: nowrap;
}

.table div.actions,
.table td.actions>* {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  justify-content: flex-end;
}

/* === AVATAR === */
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber), var(--primary));
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.avatar-sm {
  width: 28px;
  height: 28px;
  font-size: 0.7rem;
}

.avatar-lg {
  width: 48px;
  height: 48px;
  font-size: 1rem;
}

.avatar-xl {
  width: 64px;
  height: 64px;
  font-size: 1.3rem;
}

/* === PAGINATION === */
.pagination {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.page-item {
  min-width: 34px;
  height: 34px;
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1.5px solid var(--gray-200);
  background: #fff;
  cursor: pointer;
  transition: var(--transition);
  color: var(--gray-600);
}

.page-item:hover {
  border-color: var(--brown-mid);
  color: var(--brown-dark);
}

.page-item.active {
  background: var(--brown-dark);
  border-color: var(--brown-dark);
  color: #fff;
}

.page-item.disabled {
  opacity: 0.4;
  cursor: default;
}

/* === MODAL === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

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

.modal {
  background: #fff;
  border-radius: var(--border-radius-xl);
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.25s ease, opacity 0.2s;
  opacity: 0;
  max-height: 90vh;
  overflow-y: auto;
}

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

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

.modal-sm {
  max-width: 380px;
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 1rem;
  font-weight: 700;
}

.modal-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--gray-100);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  color: var(--gray-500);
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--gray-200);
  color: var(--gray-800);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--gray-200);
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* === TOAST === */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  background: #fff;
  border-radius: var(--border-radius);
  padding: 0.875rem 1.25rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 280px;
  max-width: 360px;
  pointer-events: all;
  border-left: 4px solid var(--primary);
  animation: toastSlideIn 0.3s ease;
  font-size: 0.875rem;
}

.toast.success {
  border-left-color: var(--success);
}

.toast.error {
  border-left-color: var(--danger);
}

.toast.warning {
  border-left-color: var(--warning);
}

.toast .toast-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.toast .toast-msg {
  flex: 1;
  font-weight: 500;
  color: var(--gray-800);
}

.toast .toast-close {
  cursor: pointer;
  color: var(--gray-400);
  font-size: 1.1rem;
  transition: var(--transition);
}

.toast .toast-close:hover {
  color: var(--gray-700);
}

@keyframes toastSlideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes toastSlideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }

  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

.toast.removing {
  animation: toastSlideOut 0.25s ease forwards;
}

/* === LOADING === */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

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

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

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

.loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: inherit;
  z-index: 10;
}

/* === EMPTY STATE === */
.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--gray-400);
}

.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
  opacity: 0.5;
}

.empty-state h4 {
  color: var(--gray-500);
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.empty-state p {
  font-size: 0.875rem;
}

/* === ALERTS === */
.alert {
  padding: 0.875rem 1.25rem;
  border-radius: var(--border-radius-sm);
  font-size: 0.875rem;
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  border: 1px solid transparent;
}

.alert-success {
  background: var(--success-light);
  border-color: #6EE7B7;
  color: #065F46;
}

.alert-danger {
  background: var(--danger-light);
  border-color: #FCA5A5;
  color: #991B1B;
}

.alert-warning {
  background: var(--warning-light);
  border-color: var(--amber-light);
  color: var(--primary-dark);
}

.alert-info {
  background: var(--info-light);
  border-color: #93C5FD;
  color: #1D4ED8;
}

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

.tab-item {
  padding: 0.65rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-500);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

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

.tab-item.active {
  color: #E85D22;
  border-bottom-color: #E85D22;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

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

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  min-width: 160px;
  z-index: 1000;
  display: none;
  overflow: hidden;
}

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

.dropdown-item {
  padding: 0.65rem 1rem;
  font-size: 0.875rem;
  color: var(--gray-700);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.dropdown-item:hover {
  background: var(--cream);
  color: var(--primary);
}

.dropdown-item.danger {
  color: var(--danger);
}

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

.dropdown-divider {
  height: 1px;
  background: var(--gray-200);
  margin: 0.25rem 0;
}

/* === BREADCRUMB === */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--gray-400);
}

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

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

.breadcrumb .crumb-sep {
  color: var(--gray-300);
}

.breadcrumb .crumb-current {
  color: var(--gray-700);
  font-weight: 500;
}

/* === PROGRESS === */
.progress {
  width: 100%;
  height: 8px;
  background: var(--gray-200);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--amber), var(--primary));
  transition: width 0.6s ease;
}

.progress-bar.success {
  background: linear-gradient(90deg, var(--success), #059669);
}

.progress-bar.info {
  background: linear-gradient(90deg, var(--info), #2563EB);
}

/* === STAT CARD === */
.stat-card {
  background: #fff;
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
  border: 1px solid var(--gray-200);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

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

.stat-card .stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.3rem;
  color: var(--gray-900);
}

.stat-card .stat-label {
  font-size: 0.8rem;
  color: var(--gray-500);
  font-weight: 500;
}

.stat-card .stat-change {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
}

.stat-change.up {
  background: var(--success-light);
  color: #065F46;
}

.stat-change.down {
  background: var(--danger-light);
  color: #991B1B;
}

.stat-card .stat-bg {
  position: absolute;
  bottom: -10px;
  right: -10px;
  font-size: 5rem;
  opacity: 0.05;
}

/* === UTILITIES === */
.d-flex {
  display: flex;
}

.d-grid {
  display: grid;
}

.d-none {
  display: none;
}

.align-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

.justify-end {
  justify-content: flex-end;
}

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

.gap-1 {
  gap: 0.25rem;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-3 {
  gap: 0.75rem;
}

.gap-4 {
  gap: 1rem;
}

.gap-5 {
  gap: 1.25rem;
}

.gap-6 {
  gap: 1.5rem;
}

.flex-1 {
  flex: 1;
}

.mt-1 {
  margin-top: 0.25rem;
}

.mt-2 {
  margin-top: 0.5rem;
}

.mt-3 {
  margin-top: 0.75rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mt-6 {
  margin-top: 1.5rem;
}

.mb-1 {
  margin-bottom: 0.25rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-3 {
  margin-bottom: 0.75rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.p-0 {
  padding: 0;
}

.p-1 {
  padding: 0.25rem;
}

.p-2 {
  padding: 0.5rem;
}

.p-3 {
  padding: 0.75rem;
}

.p-4 {
  padding: 1rem;
}

.p-6 {
  padding: 1.5rem;
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-left {
  text-align: left;
}

.text-muted {
  color: var(--gray-400);
}

.text-primary {
  color: var(--primary);
}

.text-success {
  color: var(--success);
}

.text-danger {
  color: var(--danger);
}

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

.rounded-sm {
  border-radius: var(--border-radius-sm);
}

.rounded-lg {
  border-radius: var(--border-radius-lg);
}

.rounded-full {
  border-radius: 999px;
}

.overflow-hidden {
  overflow: hidden;
}

.w-100 {
  width: 100%;
}

.h-100 {
  height: 100%;
}

.position-relative {
  position: relative;
}

/* === GRID === */
.grid {
  display: grid;
  gap: 1rem;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.grid-5 {
  grid-template-columns: repeat(5, 1fr);
}

.grid-6 {
  grid-template-columns: repeat(6, 1fr);
}

.col-span-2 {
  grid-column: span 2;
}

.col-span-3 {
  grid-column: span 3;
}

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

/* === SCROLLBAR === */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-400);
}

/* === TRANSITIONS FOR ANIMATIONS === */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes popIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

@keyframes shimmer {
  from {
    background-position: -200% 0;
  }

  to {
    background-position: 200% 0;
  }
}

.fade-in {
  animation: fadeIn 0.3s ease;
}

.slide-up {
  animation: slideUp 0.4s ease;
}

.pop-in {
  animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* === SKELETON LOADING === */
.skeleton {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  border-radius: var(--border-radius-sm);
}

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

@media (max-width: 900px) {

  .grid-4,
  .grid-5,
  .grid-6 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .badge {
    border-radius: 15px;
  }
}

@media (max-width: 600px) {

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

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  .modal {
    max-width: 100%;
    margin: 0;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
  }

  .modal-overlay {
    align-items: flex-end;
  }

  .btn,
  .tab-item {
    white-space: wrap;
  }

  .page-item {
    min-width: 24px;
    height: 24px;
  }
}