:root {
  --primary-color: #4361ee;
  --primary-hover: #3a56d4;
  --secondary-color: #3f37c9;
  --success-color: #4cc9f0;
  --danger-color: #f72585;
  --warning-color: #f8961e;
  --info-color: #4895ef;
  --dark-color: #1a1a2e;
  --light-color: #f8f9fa;
  --gray-light: #e9ecef;
  --gray: #6c757d;
  --gray-dark: #343a40;
  --border-radius: 8px;
  --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

/* Global Styles */
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: #f8fafc;
  color: #1e293b;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  color: #0f172a;
  font-weight: 600;
  margin-top: 0;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-hover);
  text-decoration: none;
}

.btn {
  font-weight: 500;
  border-radius: var(--border-radius);
  padding: 0.5rem 1rem;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn i {
  font-size: 1rem;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(67, 97, 238, 0.2);
}

.btn-danger {
  background-color: var(--danger-color);
  color: white;
}

.btn-danger:hover {
  background-color: #e5177b;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(247, 37, 133, 0.2);
}

.btn-success {
  background-color: #10b981;
  color: white;
}

.btn-warning {
  background-color: var(--warning-color);
  color: white;
}

.card {
  border: none;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  background: white;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.card-header {
  background: white;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  font-weight: 600;
  padding: 1rem 1.25rem;
  color: var(--dark-color);
}

.card-body {
  padding: 1.25rem;
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: white;
  border-radius: var(--border-radius);
  overflow: hidden;
}

.table thead th {
  background-color: #f8fafc;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e2e8f0;
}

.table tbody tr {
  transition: var(--transition);
}

.table tbody tr:hover {
  background-color: #f8fafc;
}

.table td {
  padding: 1rem;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.badge {
  font-weight: 500;
  padding: 0.35em 0.65em;
  border-radius: 50rem;
  font-size: 0.75em;
}

.badge-success {
  background-color: #10b9811a;
  color: #10b981;
}

.badge-warning {
  background-color: #f59e0b1a;
  color: #f59e0b;
}

.badge-danger {
  background-color: #ef44441a;
  color: #ef4444;
}

.badge-info {
  background-color: #3b82f61a;
  color: #3b82f6;
}

/* Page Header */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e2e8f0;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.page-description {
  color: #64748b;
  margin-bottom: 0;
}

.page-actions .btn {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s ease;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stats-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-left: 4px solid transparent;
}

.stats-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.stats-card.success {
  border-left-color: #10b981;
}

.stats-card.danger {
  border-left-color: #ef4444;
}

.stats-card.warning {
  border-left-color: #f59e0b;
}

.stats-card.primary {
  border-left-color: #3b82f6;
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.5rem;
  color: white;
}

.stats-card.success .card-icon {
  background-color: #10b98133;
  color: #10b981;
}

.stats-card.danger .card-icon {
  background-color: #ef444433;
  color: #ef4444;
}

.stats-card.warning .card-icon {
  background-color: #f59e0b33;
  color: #f59e0b;
}

.stats-card.primary .card-icon {
  background-color: #3b82f633;
  color: #3b82f6;
}

.card-header {
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.card-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}

.card-trend {
  display: flex;
  align-items: center;
  margin-top: 0.5rem;
  font-size: 0.8125rem;
}

.trend-icon {
  margin-right: 0.25rem;
  font-size: 0.75rem;
}

.trend-up {
  color: #10b981;
}

.trend-down {
  color: #ef4444;
}

/* Table Styles */
.table-card {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.05);
}

.table-card .card-header {
  background: white;
  border-bottom: 1px solid #f1f5f9;
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.table-card .card-header h5 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
  color: #0f172a;
}

.table-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.table-action-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  transition: all 0.2s ease;
  background: transparent;
  border: 1px solid #e2e8f0;
}

.table-action-btn:hover {
  background-color: #f8fafc;
  color: #3b82f6;
  transform: translateY(-1px);
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35em 0.65em;
  border-radius: 50rem;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
}

.status-success {
  background-color: #10b9811a;
  color: #10b981;
}

.status-danger {
  background-color: #ef44441a;
  color: #ef4444;
}

.status-pending {
  background-color: #f59e0b1a;
  color: #f59e0b;
}

/* Comment Preview */
.comment-preview {
  max-width: 300px;
}

.comment-preview .badge {
  font-size: 0.6875rem;
  font-weight: 500;
  padding: 0.25em 0.5em;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .page-header {
    flex-direction: column;
    gap: 1rem;
  }
  
  .page-actions {
    width: 100%;
  }
  
  .page-actions .btn {
    width: 100%;
    justify-content: center;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .table-card .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .table-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

/* Header Styles */
:root {
  --header-height: 70px;
  --sidebar-width: 250px;
  --primary-color: #4361ee;
  --primary-hover: #3a56d4;
  --text-color: #2d3748;
  --text-muted: #718096;
  --border-color: #e2e8f0;
  --bg-light: #f8fafc;
  --danger-color: #ef4444;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --transition: all 0.3s ease;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
}

/* Main Header */
.main-header {
  background: #fff;
  height: var(--header-height);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
  border-bottom: 1px solid var(--border-color);
}

.header-container {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 1.5rem;
  margin-left: var(--sidebar-width);
  transition: var(--transition);
}

/* Sidebar Toggle Button */
.sidebar-toggle {
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 1.25rem;
  padding: 0.5rem;
  margin-right: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  transition: var(--transition);
}

.sidebar-toggle:hover {
  background-color: var(--bg-light);
  color: var(--primary-color);
}

/* Logo and App Name */
.header-left {
  display: flex;
  align-items: center;
  flex: 1;
}

.logo-container {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.company-logo {
  height: 40px;
  width: auto;
  margin-right: 1rem;
  border-radius: var(--radius-sm);
}

.app-name {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-color);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Notification Dropdown */
.notification-dropdown {
  position: relative;
}

.btn-icon {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  padding: 0.5rem;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: var(--transition);
}

.btn-icon:hover {
  background-color: var(--bg-light);
  color: var(--primary-color);
}

.notification-badge {
  position: absolute;
  top: 5px;
  right: 5px;
  font-size: 0.6rem;
  padding: 0.25rem 0.4rem;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
}

.dropdown-notifications {
  width: 320px;
  padding: 0;
  border: none;
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.dropdown-header {
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bg-light);
  border-bottom: 1px solid var(--border-color);
}

.dropdown-header h6 {
  margin: 0;
  font-weight: 600;
  color: var(--text-color);
}

.notification-item {
  padding: 1rem;
  display: flex;
  align-items: flex-start;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.notification-item:hover {
  background-color: var(--bg-light);
}

.notification-item.unread {
  background-color: rgba(67, 97, 238, 0.05);
}

.notification-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  margin-right: 1rem;
  flex-shrink: 0;
}

.notification-content {
  flex: 1;
}

.notification-content p {
  margin: 0 0 0.25rem;
  color: var(--text-color);
  font-size: 0.9rem;
}

.notification-content small {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* User Dropdown */
.user-dropdown {
  position: relative;
}

.btn-user {
  display: flex;
  align-items: center;
  background: none;
  border: none;
  padding: 0.25rem 0.5rem;
  border-radius: 50px;
  transition: var(--transition);
  cursor: pointer;
}

.btn-user:hover {
  background-color: var(--bg-light);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  margin-right: 0.5rem;
  font-size: 0.9rem;
}

.user-info {
  text-align: left;
  margin-right: 0.75rem;
}

.user-name {
  font-weight: 500;
  color: var(--text-color);
  font-size: 0.9rem;
  line-height: 1.2;
}

.user-role {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.2;
}

.dropdown-arrow {
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: var(--transition);
}

/* Dropdown Menu */
.dropdown-menu {
  border: none;
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-md);
  padding: 0.5rem 0;
  margin-top: 0.5rem;
  min-width: 240px;
  border: 1px solid var(--border-color);
}

.dropdown-item {
  padding: 0.5rem 1.25rem;
  font-size: 0.9rem;
  color: var(--text-color);
  display: flex;
  align-items: center;
  transition: var(--transition);
}

.dropdown-item i {
  width: 20px;
  text-align: center;
  margin-right: 0.75rem;
  color: var(--text-muted);
}

.dropdown-item:hover, 
.dropdown-item:focus {
  background-color: var(--bg-light);
  color: var(--primary-color);
}

.dropdown-item.text-danger {
  color: var(--danger-color);
}

.dropdown-item.text-danger:hover {
  background-color: #fee2e2;
  color: #b91c1c;
}

.dropdown-divider {
  border-color: var(--border-color);
  margin: 0.5rem 0;
}

/* Responsive Styles */
@media (max-width: 992px) {
  .header-container {
    margin-left: 0;
    padding-left: 0.5rem;
  }
  
  .app-name {
    display: none;
  }
  
  .user-info {
    display: none;
  }
  
  .dropdown-arrow {
    display: none;
  }
  
  .btn-user {
    padding: 0.25rem;
  }
}

/* Animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.dropdown-menu {
  animation: fadeIn 0.2s ease-out;
}

/* Body class when sidebar is open on mobile */
body.sidebar-open {
  overflow: hidden;
}

body.sidebar-open::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

@media (max-width: 992px) {
  body.sidebar-open::after {
    opacity: 1;
    pointer-events: auto;
  }
  
  .main-header {
    padding-left: 1.5rem;
  }
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  min-width: 0;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.company-logo {
  height: 40px;
  width: auto;
  border-radius: 4px;
  flex-shrink: 0;
}

.app-name {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--dark-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-right {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.user-menu {
  display: flex;
  align-items: center;
  position: relative;
}

.user-info {
  display: flex;
  display: flex;
  flex-direction: column;
}

.user-fullname {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--dark-color);
  margin: 0;
  line-height: 1.3;
}

.user-role {
  font-size: 0.75rem;
  color: var(--gray);
  text-transform: capitalize;
}

.header-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  font-weight: 500;
  font-size: 0.875rem;
  transition: var(--transition);
  text-decoration: none;
  border: none;
  cursor: pointer;
  background: var(--primary-color);
  color: white;
}

.header-btn i {
  font-size: 1rem;
}

.header-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  color: white;
  box-shadow: 0 4px 12px rgba(67, 97, 238, 0.2);
}

.header-btn.logout {
  background: #f1f5f9;
  color: var(--danger-color);
}

.header-btn.logout:hover {
  background: #f8fafc;
  color: var(--danger-color);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.1);
}

/* Sidebar Styles */
.sidebar {
  width: 250px;
  background: white;
  height: calc(100vh - 70px);
  padding: 1.5rem 0;
  position: fixed;
  top: 70px;
  left: 0;
  border-right: 1px solid #e2e8f0;
  z-index: 900;
  overflow-y: auto;
  transition: var(--transition);
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f1f5f9;
}

.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: #f1f5f9;
}

.sidebar::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
  border-radius: 3px;
}

.sidebar-header {
  padding: 0 1.5rem 1rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid #f1f5f9;
}

.sidebar-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-item {
  margin: 0.25rem 0.75rem;
}

.sidebar-item a {
  display: flex;
  align-items: center;
  color: #475569;
  padding: 0.75rem 1rem;
  text-decoration: none;
  border-radius: var(--border-radius);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: var(--transition);
  white-space: nowrap;
  overflow: hidden;
}

.link-text {
  margin-left: 0.75rem;
  transition: var(--transition);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-item i {
  min-width: 24px;
  text-align: center;
  font-size: 1.1rem;
  color: #94a3b8;
  transition: var(--transition);
  flex-shrink: 0;
}

.sidebar-item.active a,
.sidebar-item a:hover {
  background: #f1f5ff;
  color: var(--primary-color);
}

.sidebar-item.active i,
.sidebar-item a:hover i {
  color: var(--primary-color);
}

.sidebar-item.active a {
  font-weight: 600;
}

.sidebar-divider {
  height: 1px;
  background: #e2e8f0;
  margin: 1rem 1.5rem;
}

/* Responsive Sidebar Toggle */
.sidebar-toggle {
  display: none;
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 1000;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1001;
}

/* Main Content Area */
.main-content {
  margin-left: 250px;
  margin-top: 70px;
  min-height: calc(100vh - 70px);
  padding: 2rem;
  background: #f8fafc;
  width: calc(100% - 250px);
  box-sizing: border-box;
  transition: var(--transition);
}

/* Mobile Styles */
@media (max-width: 992px) {
  .sidebar {
    transform: translateX(-100%);
    z-index: 1000;
  }
  
  .sidebar.active {
    transform: translateX(0);
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
  }
  
  .main-content {
    margin-left: 0;
    width: 100%;
    padding: 1rem;
  }
  
  .main-footer {
    margin-left: 0;
    width: 100%;
  }
  
  .sidebar-toggle {
    display: flex;
  }
  
  .page-actions {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .page-actions .btn {
    width: 100%;
  }
  
  /* Compact sidebar items on mobile */
  .sidebar-item a {
    padding: 0.6rem 1rem;
  }
  
  .sidebar-item i {
    font-size: 1.2rem;
    min-width: 28px;
  }
  
  .link-text {
    font-size: 0.9rem;
  }
}

/* Small mobile devices */
@media (max-width: 576px) {
  .sidebar {
    width: 240px;
  }
  
  .sidebar-item a {
    padding: 0.5rem 0.75rem;
  }
  
  .sidebar-item i {
    font-size: 1.1rem;
    min-width: 26px;
  }
  
  .link-text {
    font-size: 0.85rem;
  }
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e2e8f0;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.page-description {
  color: #64748b;
  margin: 0.5rem 0 0;
  font-size: 1rem;
}

.page-actions {
  display: flex;
  gap: 0.75rem;
}

/* Footer Styles */
.main-footer {
  background: white;
  color: #64748b;
  text-align: center;
  padding: 1.25rem 2rem;
  font-size: 0.875rem;
  border-top: 1px solid #e2e8f0;
  margin-left: 250px;
  width: calc(100% - 250px);
  box-sizing: border-box;
  transition: var(--transition);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: #64748b;
  text-decoration: none;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--primary-color);
}

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stats-card {
  background: white;
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  border-left: 4px solid var(--primary-color);
  position: relative;
  overflow: hidden;
}

.stats-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.stats-card .card-icon {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 2.5rem;
  opacity: 0.1;
  color: var(--primary-color);
}

.stats-card .card-header {
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stats-card .card-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: #0f172a;
}

.stats-card .card-trend {
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  font-weight: 500;
}

.stats-card .trend-up {
  color: #10b981;
}

.stats-card .trend-down {
  color: #ef4444;
}

.stats-card .trend-icon {
  margin-right: 0.25rem;
  font-size: 1rem;
}

/* Card Variations */
.stats-card.primary {
  border-left-color: var(--primary-color);
}

.stats-card.primary .card-icon,
.stats-card.primary .card-title {
  color: var(--primary-color);
}

.stats-card.success {
  border-left-color: #10b981;
}

.stats-card.success .card-icon,
.stats-card.success .card-title {
  color: #10b981;
}

.stats-card.danger {
  border-left-color: #ef4444;
}

.stats-card.danger .card-icon,
.stats-card.danger .card-title {
  color: #ef4444;
}

.stats-card.warning {
  border-left-color: #f59e0b;
}

.stats-card.warning .card-icon,
.stats-card.warning .card-title {
  color: #f59e0b;
}

/* Tables */
.table-container {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  margin-bottom: 2rem;
  overflow: hidden;
  transition: var(--transition);
}

.table-container:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 640px;
}

thead {
  background-color: #f8fafc;
}

th {
  padding: 1rem 1.25rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  white-space: nowrap;
  border-bottom: 1px solid #e2e8f0;
}

td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  color: #334155;
  font-size: 0.9375rem;
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover {
  background-color: #f8fafc;
}

/* Table Actions */
.table-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.table-action-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  background: transparent;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  transition: var(--transition);
}

.table-action-btn:hover {
  background: #f8fafc;
  color: var(--primary-color);
  border-color: #e2e8f0;
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.35rem 0.75rem;
  border-radius: 50rem;
}

.status-badge i {
  font-size: 0.5rem;
}

.status-active,
.status-approved,
.status-completed,
.status-success {
  background-color: #ecfdf5;
  color: #10b981;
}

.status-pending,
.status-warning {
  background-color: #fffbeb;
  color: #f59e0b;
}

.status-inactive,
.status-rejected,
.status-failed,
.status-danger {
  background-color: #fef2f2;
  color: #ef4444;
}

.status-draft,
.status-info {
  background-color: #eff6ff;
  color: #3b82f6;
}

/* Forms */
.form-container {
  background: #fff;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.95rem;
}

/* Responsive Design */
@media (max-width: 900px) {
    .sidebar {
        width: 60px;
    }
    
    .sidebar-item a {
        padding: 0.8rem;
        text-align: center;
    }
    
    .sidebar-item a span {
        display: none;
    }
    
    .main-content {
        margin-left: 60px;
        width: calc(100% - 60px);
    }
}

@media (max-width: 768px) {
    .main-header {
        height: 80px;
        padding: 0.5rem 1rem;
    }
    
    .company-logo {
        height: 36px;
    }
    
    .app-name {
        font-size: 1.1rem;
    }
    
    .user-fullname {
        display: none;
    }
    
    .header-btn {
        padding: 0.3rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .main-content {
        margin-top: 80px;
        padding: 1rem;
    }
    
    .sidebar {
        top: 80px;
    }
}

/* Login Page Styles */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f4f6f9;
}

/* Login Page */
.login-box {
  width: 100%;
  max-width: 420px;
  padding: 0 1.5rem;
}

.login-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: var(--transition);
}

.login-card:hover {
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
}

.login-card-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  padding: 2.5rem 2rem;
  text-align: center;
}

.login-card-logo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.login-card-logo img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.login-card-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0.5rem 0 0;
  color: white;
}

.login-card-subtitle {
  font-size: 0.9375rem;
  opacity: 0.9;
  margin: 0.5rem 0 0;
  font-weight: 400;
}

.login-card-body {
  padding: 2.5rem 2rem;
}

.login-message {
  margin-bottom: 1.5rem;
  padding: 0.75rem 1rem;
  border-radius: var(--border-radius);
  font-size: 0.9375rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.login-message i {
  font-size: 1.25rem;
}

.login-message.error {
  background: #fef2f2;
  color: #ef4444;
  border-left: 3px solid #ef4444;
}

.login-message.success {
  background: #ecfdf5;
  color: #10b981;
  border-left: 3px solid #10b981;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #334155;
  margin-bottom: 0.5rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: #334155;
  background-color: white;
  background-clip: padding-box;
  border: 1px solid #e2e8f0;
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
  outline: none;
}

.input-group {
  position: relative;
  display: flex;
  width: 100%;
}

.input-group-text {
  display: flex;
  align-items: center;
  padding: 0 1rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: #64748b;
  text-align: center;
  white-space: nowrap;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-right: none;
  border-radius: var(--border-radius) 0 0 var(--border-radius);
}

.input-group .form-control {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  position: relative;
  flex: 1 1 auto;
  width: 1%;
  min-width: 0;
  margin-bottom: 0;
}

.btn-login {
  width: 100%;
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--border-radius);
  background: var(--primary-color);
  color: white;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 0.5rem;
}

.btn-login:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(67, 97, 238, 0.2);
}

.login-footer {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #f1f5f9;
  font-size: 0.875rem;
  color: #64748b;
}

.login-footer a {
  color: var(--primary-color);
  font-weight: 500;
  text-decoration: none;
}

.login-footer a:hover {
  text-decoration: underline;
}

.login-logo {
    background: #1a237e;
    padding: 2rem;
    text-align: center;
}

.login-logo img {
    height: 60px;
    margin-bottom: 1rem;
}

.login-logo h1 {
    color: #fff;
    font-size: 1.5rem;
    margin: 0;
}

.login-body {
    padding: 2rem;
}

/* Utility Classes */
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
