:root {
  --primary-color: #1e3a8a;
  --primary-hover: #1e40af;
  --bg-color: #f8fafc;
  --card-bg: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --border-color: #e2e8f0;
  
  --status-pending: #d97706;
  --status-progress: #2563eb;
  --status-success: #16a34a;
  --status-rejected: #dc2626;
  
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.5;
}

.layout-wrapper {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  background-color: #0f172a;
  color: #fff;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
}

.sidebar-brand {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: #60a5fa;
  letter-spacing: 0.05em;
}

.nav-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-link {
  color: #94a3b8;
  text-decoration: none;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  display: block;
}

.nav-link:hover, .nav-link.active {
  background-color: #1e293b;
  color: #ffffff;
}

.main-content {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
  text-transform: capitalize;
}

.badge-pending { background-color: #fef3c7; color: var(--status-pending); }
.badge-progress { background-color: #dbeafe; color: var(--status-progress); }
.badge-success { background-color: #dcfce7; color: var(--status-success); }
.badge-rejected { background-color: #fee2e2; color: var(--status-rejected); }

.card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.data-table {
  width: 100%;
  min-width: 650px;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.data-table th, .data-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.data-table th {
  background-color: #f1f5f9;
  font-weight: 600;
}

.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary { background-color: var(--primary-color); color: #fff; }
.btn-primary:hover { background-color: var(--primary-hover); }

.timeline {
  border-left: 2px solid var(--border-color);
  padding-left: 1.5rem;
  margin-left: 0.5rem;
}

.timeline-item {
  position: relative;
  margin-bottom: 1.5rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.85rem;
  top: 0.2rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--primary-color);
}

.mobile-topbar {
  display: none;
}

@media (max-width: 768px) {
  .layout-wrapper {
    flex-direction: column;
    position: relative;
  }

  .mobile-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #0f172a;
    color: #fff;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #1e293b;
    position: sticky;
    top: 0;
    z-index: 1000;
  }

  .mobile-brand {
    font-size: 1.1rem;
    font-weight: 700;
    color: #60a5fa;
  }

  .hamburger-btn {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.2rem 0.5rem;
    line-height: 1;
  }

  .sidebar {
    width: 100%;
    display: none;
    padding: 1rem;
    position: fixed;
    top: 50px;
    left: 0;
    right: 0;
    z-index: 999;
    background-color: #0f172a;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
  }

  .sidebar.active {
    display: flex;
    flex-direction: column;
  }

  .sidebar-brand {
    display: none;
  }

  .main-content {
    padding: 1rem;
  }

  div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }

  .header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .data-table {
    width: 100%;
    min-width: 650px;
    border-collapse: collapse;
  }

  .data-table th,
  .data-table td {
    white-space: nowrap;
  }

  #editModal .card {
    width: 92% !important;
    max-width: 100% !important;
    padding: 1.25rem !important;
  }
}