/* admin.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --primary: #7C3AED; /* Purple */
  --primary-hover: #6D28D9;
  --bg-color: #F8FAFC;
  --sidebar-bg: #FFFFFF;
  --text-main: #1E293B;
  --text-muted: #64748B;
  --border-color: #E2E8F0;
  --white: #FFFFFF;
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --info: #3B82F6;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 250px;
  background-color: var(--sidebar-bg);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  left: 0;
  top: 0;
  z-index: 10;
}

.sidebar-header {
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-color);
}

.brand-icon {
  width: 36px;
  height: 36px;
  background-color: var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.sidebar-logo {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-logo i {
  color: var(--primary);
}

.sidebar-menu {
  padding: 20px 16px;
  flex: 1;
  overflow-y: auto;
}

.menu-group {
  margin-bottom: 24px;
}

.menu-label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 8px;
  padding: 0 12px;
  letter-spacing: 0.5px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
  transition: all 0.2s;
}

.menu-item:hover {
  background-color: #F1F5F9;
  color: var(--text-main);
}

.menu-item.active {
  background-color: #F1F5F9;
  color: var(--text-main);
  font-weight: 600;
}

.menu-item i {
  width: 18px;
  height: 18px;
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: 250px;
  display: flex;
  flex-direction: column;
  width: calc(100% - 250px);
}

.topbar {
  height: 70px;
  background-color: var(--bg-color);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.page-title {
  font-size: 20px;
  font-weight: 700;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.notif-btn {
  background: none;
  border: none;
  position: relative;
  cursor: pointer;
  color: var(--text-muted);
}

.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background-color: var(--danger);
  color: white;
  font-size: 10px;
  font-weight: bold;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Notification Dropdown */
.notif-container {
  position: relative;
  display: flex;
  align-items: center;
}

.notif-dropdown {
  position: absolute;
  top: 40px;
  right: -20px;
  width: 320px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  border: 1px solid var(--border-color);
  z-index: 1000;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.notif-dropdown.show {
  display: flex;
}

.notif-header {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
  font-size: 14px;
}

.notif-list {
  max-height: 300px;
  overflow-y: auto;
}

.notif-item {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  position: relative;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.notif-item:last-child {
  border-bottom: none;
}

.notif-item.swiping {
  transform: translateX(100%);
  opacity: 0;
}

.notif-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #E0F2FE;
  color: #0284C7;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notif-content {
  flex: 1;
}

.notif-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 4px;
}

.notif-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.notif-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
}

.notif-dismiss {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}
.notif-dismiss:hover {
  color: var(--danger);
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
}

.content-area {
  padding: 0 32px 32px;
  flex: 1;
}

/* Utilities */
.btn-primary {
  background-color: var(--primary);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.2s;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
}

.card {
  background-color: var(--white);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  border: 1px solid var(--border-color);
}

/* Table */
.table-wrapper {
  overflow-x: auto;
  background: var(--white);
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  text-align: left;
  padding: 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

td {
  padding: 16px;
  font-size: 14px;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-color);
}

tr:last-child td {
  border-bottom: none;
}

.badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}
.badge.konfirmasi { background: #FEF3C7; color: #D97706; }
.badge.disetujui { background: #D1FAE5; color: #059669; }
.badge.diproses { background: #DBEAFE; color: #2563EB; }
.badge.dibatalkan { background: #FEE2E2; color: #DC2626; }
.badge.dikirim { background: #EDE9FE; color: #7C3AED; }

/* Dashboard Cards */
.dash-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 14px;
  margin-bottom: 32px;
}

.dash-card {
  padding: 24px;
  border-radius: 12px;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}
.dash-card h3 { font-size: 36px; font-weight: 700; margin-bottom: 8px; }
.dash-card p { font-size: 14px; font-weight: 500; opacity: 0.9; }

.c-orange { background: linear-gradient(135deg, #F59E0B, #D97706); }
.c-green { background: linear-gradient(135deg, #34D399, #059669); }
.c-blue { background: linear-gradient(135deg, #60A5FA, #2563EB); }
.c-red { background: linear-gradient(135deg, #F87171, #DC2626); }
.c-purple { background: linear-gradient(135deg, #A78BFA, #7C3AED); }

/* Form */
.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  background-color: #F8FAFC;
}
.form-control:focus {
  border-color: var(--primary);
  background-color: var(--white);
}

/* Tabs */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 24px;
}
.tab-item {
  padding: 12px 24px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
}
.tab-item.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* Sidebar Dropdown */
.has-dropdown {
  cursor: pointer;
  position: relative;
}
.dropdown-icon {
  margin-left: auto;
  transition: transform 0.2s;
}
.has-dropdown.open .dropdown-icon {
  transform: rotate(180deg);
}
.submenu {
  display: none;
  flex-direction: column;
  padding-left: 30px;
  margin-bottom: 8px;
}
.submenu.open {
  display: flex;
}
.submenu-item {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s;
  display: flex;
  align-items: center;
}
.submenu-item:hover {
  background-color: #F1F5F9;
  color: var(--text-main);
}
.submenu-item.active {
  color: var(--primary);
  font-weight: 600;
}
