/*!********************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[11].oneOf[12].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[11].oneOf[12].use[3]!./src/styles/globals.css ***!
  \********************************************************************************************************************************************************************************************************************************************************************/
:root {
  /* Apple-like color palette */
  --color-primary: #007AFF;
  --color-primary-hover: #0056CC;
  --color-secondary: #5856D6;
  --color-success: #34C759;
  --color-warning: #FF9500;
  --color-danger: #FF3B30;

  /* Neutral colors */
  --color-bg: #F5F5F7;
  --color-bg-secondary: #FFFFFF;
  --color-bg-tertiary: #E5E5EA;
  --color-text-primary: #1D1D1F;
  --color-text-secondary: #86868B;
  --color-text-tertiary: #AEAEB2;
  --color-border: #D2D2D7;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  /* Border radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text',
    'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-mono: 'SF Mono', SFMono-Regular, ui-monospace, Menlo, Monaco,
    'Cascadia Mono', 'Segoe UI Mono', 'Roboto Mono', monospace;
}

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

html,
body {
  max-width: 100vw;
  overflow-x: hidden;
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
}

h1 {
  font-size: 2.5rem;
  line-height: 1.2;
}

h2 {
  font-size: 2rem;
  line-height: 1.25;
}

h3 {
  font-size: 1.5rem;
  line-height: 1.3;
}

h4 {
  font-size: 1.25rem;
  line-height: 1.4;
}

p {
  line-height: 1.6;
  color: var(--color-text-secondary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-sans);
}

.btn-primary {
  background-color: var(--color-primary);
  color: white;
}

.btn-primary:hover {
  background-color: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: var(--color-bg-tertiary);
  color: var(--color-text-primary);
}

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

.btn-danger {
  background-color: var(--color-danger);
  color: white;
}

.btn-danger:hover {
  background-color: #E0342C;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Cards */
.card {
  background-color: var(--color-bg-secondary);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-normal);
}

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

/* Forms */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-primary);
}

.form-input {
  padding: 12px 16px;
  font-size: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background-color: var(--color-bg-secondary);
  color: var(--color-text-primary);
  transition: all var(--transition-fast);
  font-family: var(--font-sans);
}

.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
}

.form-input::placeholder {
  color: var(--color-text-tertiary);
}

.form-error {
  font-size: 0.875rem;
  color: var(--color-danger);
}

/* Tables */
.table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--color-bg-secondary);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.table th,
.table td {
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.table th {
  font-weight: 600;
  color: var(--color-text-primary);
  background-color: var(--color-bg);
}

.table td {
  color: var(--color-text-secondary);
}

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

.table tr:hover td {
  background-color: var(--color-bg);
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 100px;
}

.badge-success {
  background-color: rgba(52, 199, 89, 0.15);
  color: var(--color-success);
}

.badge-warning {
  background-color: rgba(255, 149, 0, 0.15);
  color: var(--color-warning);
}

.badge-danger {
  background-color: rgba(255, 59, 48, 0.15);
  color: var(--color-danger);
}

.badge-info {
  background-color: rgba(0, 122, 255, 0.15);
  color: var(--color-primary);
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.page {
  min-height: 100vh;
  padding: 24px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 600;
}

/* Sidebar Layout */
.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  background: #ffffff;
  border-right: 1px solid #e5e7eb;
  padding: 24px 16px;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.04);
}

.sidebar-logo {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #007AFF 0%, #0051D5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  padding: 0 12px 28px;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 28px;
  letter-spacing: -0.5px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1;
}

.sidebar-category {
  font-size: 0.7rem;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 16px 18px 8px;
  margin-top: 8px;
}

.sidebar-category:first-child {
  margin-top: 0;
  padding-top: 0;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 12px;
  color: #4b5563;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  text-decoration: none;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  width: 100%;
  text-align: left;
}

.sidebar-link:hover {
  background: #f3f4f6;
  color: #1f2937;
  border-color: #e5e7eb;
  transform: translateX(4px);
}

.sidebar-link.active {
  background: linear-gradient(135deg, #007AFF 0%, #0051D5 100%);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(0, 122, 255, 0.25);
  border-color: transparent;
}

.sidebar-link.active:hover {
  transform: translateX(0);
  color: #ffffff;
}

.sidebar-user {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
}

.sidebar-user-info {
  padding: 0 12px;
  margin-bottom: 16px;
}

.sidebar-user-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 4px;
}

.sidebar-user-role {
  font-size: 0.75rem;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sidebar-link.logout {
  color: #ef4444;
}

.sidebar-link.logout:hover {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}

.main-content {
  flex: 1 1;
  margin-left: 260px;
  padding: 32px;
  background-color: #f9fafb;
  min-height: 100vh;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  -webkit-backdrop-filter: blur(4px);
          backdrop-filter: blur(4px);
}

.modal {
  background-color: var(--color-bg-secondary);
  border-radius: var(--radius-xl);
  padding: 32px;
  max-width: 480px;
  width: 90%;
  box-shadow: var(--shadow-xl);
  animation: modalIn 0.2s ease-out;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }

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

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 600;
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: none;
  background-color: var(--color-bg-tertiary);
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.modal-close:hover {
  background-color: var(--color-border);
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}

/* Utilities */
.text-center {
  text-align: center;
}

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

.mt-4 {
  margin-top: 16px;
}

.mb-4 {
  margin-bottom: 16px;
}

.flex {
  display: flex;
}

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

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

.gap-2 {
  gap: 8px;
}

.gap-4 {
  gap: 16px;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

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

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

.animate-fadeIn {
  animation: fadeIn 0.3s ease-out;
}

.animate-slideUp {
  animation: slideUp 0.4s ease-out;
}

/* Loading */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.loading-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

/* ==================== RESPONSIVE STYLES ==================== */

/* Mobile menu toggle */
.mobile-menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: none;
  background: var(--color-bg-tertiary);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 1.25rem;
}

.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--color-bg-secondary);
  border-bottom: 1px solid var(--color-border);
  padding: 0 16px;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
}

.mobile-header-logo {
  font-size: 1rem;
  font-weight: 700;
}

/* Tablet: 768px - 1024px */
@media (max-width: 1024px) {
  .sidebar {
    width: 220px;
  }

  .main-content {
    margin-left: 220px;
    padding: 24px;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .table th,
  .table td {
    padding: 12px;
    font-size: 0.875rem;
  }

  h1,
  .page-title {
    font-size: 1.5rem;
  }

  .card {
    padding: 20px;
  }
}

/* Mobile: < 768px */
@media (max-width: 768px) {

  /* Show mobile header */
  .mobile-header {
    display: flex;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  /* Hide desktop sidebar by default */
  .sidebar {
    position: fixed;
    left: -280px;
    width: 280px;
    z-index: 200;
    transition: left var(--transition-normal);
    padding-top: 80px;
  }

  .sidebar.open {
    left: 0;
  }

  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 150;
  }

  .sidebar-overlay.open {
    display: block;
  }

  /* Adjust main content */
  .main-content {
    margin-left: 0;
    padding: 76px 16px 16px;
  }

  .layout {
    flex-direction: column;
  }

  /* Typography */
  h1,
  .page-title {
    font-size: 1.25rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  h3 {
    font-size: 1.1rem;
  }

  /* Page header */
  .page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 20px;
  }

  .page-header .btn {
    width: 100%;
  }

  /* Cards */
  .card {
    padding: 16px;
    border-radius: var(--radius-md);
  }

  /* Buttons */
  .btn {
    padding: 10px 16px;
    font-size: 0.875rem;
  }

  /* Forms */
  .form-input {
    padding: 10px 14px;
    font-size: 0.875rem;
  }

  /* Tables - make them scrollable */
  .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table {
    min-width: 600px;
  }

  .table th,
  .table td {
    padding: 10px 8px;
    font-size: 0.8rem;
    white-space: nowrap;
  }

  /* Hide some table columns on mobile */
  .table .hide-mobile {
    display: none;
  }

  /* Modals */
  .modal {
    width: 95%;
    max-width: none;
    padding: 20px;
    margin: 16px;
    max-height: 90vh;
    overflow-y: auto;
  }

  .modal-actions {
    flex-direction: column;
  }

  .modal-actions .btn {
    width: 100%;
  }

  /* Badges */
  .badge {
    padding: 3px 8px;
    font-size: 0.7rem;
  }

  /* Flex utilities */
  .flex-col-mobile {
    flex-direction: column;
  }

  .gap-2-mobile {
    gap: 8px;
  }

  /* Container */
  .container {
    padding: 0 16px;
  }

  .page {
    padding: 16px;
  }
}

/* Small mobile: < 480px */
@media (max-width: 480px) {

  h1,
  .page-title {
    font-size: 1.1rem;
  }

  .sidebar-logo {
    font-size: 1rem;
  }

  .btn {
    padding: 8px 12px;
    font-size: 0.8rem;
  }

  .modal {
    padding: 16px;
    border-radius: var(--radius-md);
  }

  .form-group {
    margin-bottom: 16px;
  }

  .card {
    padding: 12px;
  }
}

/* Landscape mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .modal {
    max-height: 85vh;
  }

  .main-content {
    padding-top: 70px;
  }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
  .btn {
    min-height: 44px;
  }

  .form-input {
    min-height: 44px;
  }

  .sidebar-link {
    min-height: 44px;
  }

  .table tr {
    cursor: default;
  }
}

/* Print styles */
@media print {

  .sidebar,
  .mobile-header,
  .btn,
  .modal-overlay {
    display: none !important;
  }

  .main-content {
    margin-left: 0;
    padding: 0;
  }
}
