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

:root {
  --primary: #4F46E5;
  --primary-hover: #4338CA;
  --secondary: #10B981;
  --danger: #EF4444;
  --warning: #F59E0B;
  --info: #3B82F6;
  
  --bg-color: #F3F4F6;
  --surface: #FFFFFF;
  --text-main: #111827;
  --text-muted: #6B7280;
  
  --border: #E5E7EB;
  --radius: 12px;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

ul {
  list-style: none;
}

/* Premium Layout Utilities */
.top-identity {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary);
}

.top-identity img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.top-nav {
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.nav-wrapper {
  height: 70px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-logo img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  gap: 0.5rem;
}

.nav-links a {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: all 0.2s;
}

.nav-links a:hover, .nav-links a.active {
  background-color: #EEF2FF;
  color: var(--primary);
}

.main-content {
  padding: 2.5rem 0;
}

.page-header {
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.page-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-main);
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

/* Cards & Surfaces */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Forms & Inputs */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  background-color: #F9FAFB;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
  background-color: var(--surface);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

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

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

.btn-secondary {
  background-color: var(--surface);
  color: var(--text-main);
  border: 1px solid var(--border);
}

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

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

/* Tables */
.table-container {
  overflow-x: auto;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th {
  background-color: #F9FAFB;
  padding: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
}

td {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-main);
  font-size: 0.95rem;
}

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

tr:hover td {
  background-color: #F9FAFB;
}

/* Badges */
.badge {
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-block;
}

.badge-warning { background-color: #FEF3C7; color: #92400E; }
.badge-info { background-color: #DBEAFE; color: #1E40AF; }
.badge-success { background-color: #D1FAE5; color: #065F46; }
.badge-primary { background-color: #EEF2FF; color: #3730A3; }
.badge-danger { background-color: #FEE2E2; color: #991B1B; }

/* Grids */
.grid {
  display: grid;
  gap: 1.5rem;
}

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

/* Responsive Adjustments */
@media (max-width: 768px) {
  .top-nav {
    height: auto;
  }
  
  .nav-wrapper {
    height: auto;
    flex-direction: column;
    padding: 1rem;
    gap: 1rem;
  }
  
  .nav-links {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
  }
  
  .nav-links a {
    white-space: nowrap;
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
  }

  .grid-cols-2, .grid-cols-3, .grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
  }
  
  .page-title {
    font-size: 1.25rem;
  }

  .page-subtitle {
    font-size: 0.8rem;
  }
  
  .card {
    padding: 0.75rem;
  }

  .card div[style*="font-size: 2rem"], 
  .card div[style*="font-size: 1.6rem"] {
    font-size: 1.1rem !important;
  }

  .card div[style*="font-size: 5rem"] {
    font-size: 2.5rem !important;
  }
  
  .table-container table {
    font-size: 0.8rem;
  }

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

  .quick-actions-grid a {
    padding: 0.75rem !important;
    flex-direction: column;
    text-align: center;
    gap: 0.5rem !important;
  }

  .quick-actions-grid a div:last-child {
    text-align: center;
  }

  .quick-actions-grid a div:last-child div:last-child {
    display: none; /* Sembunyikan deskripsi kecil di HP agar tidak penuh */
  }
}
