﻿/* ==========================================================
   CSS DASHBOARD BACKEND ADMIN - TEMA HIJAU LUMUT ELEGAN
   ========================================================== */

:root {
  --admin-sidebar-w: 260px;
  --primary-moss-dark: #14281f;
  --primary-moss: #224232;
  --primary-moss-light: #345c48;
  --moss-sage: #527a64;
  --moss-soft: #eaf1ed;
  --moss-surface: #f4f8f5;
  --moss-border: #cad8ce;
  --gold-accent: #c69c43;
  --gold-light: #fef8eb;
  --text-primary: #192720;
  --text-secondary: #4a5c53;
  --text-muted: #758a7e;
  --white: #ffffff;
  --danger: #b93838;
  --danger-light: #fde8e8;
  --success: #28774c;
  --success-light: #dcfce7;
  --shadow-sm: 0 2px 6px rgba(20, 40, 31, 0.05);
  --shadow-md: 0 6px 18px rgba(20, 40, 31, 0.08);
  --shadow-lg: 0 12px 30px rgba(20, 40, 31, 0.12);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--moss-soft);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
}

/* Layout Wrapper */
.admin-layout {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
  width: var(--admin-sidebar-w);
  background: linear-gradient(180deg, var(--primary-moss-dark) 0%, var(--primary-moss) 100%);
  color: var(--white);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  transition: var(--transition);
}

.sidebar-brand {
  padding: 1.8rem 1.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-icon-box {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.12);
  border: 1.5px solid var(--gold-accent);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-accent);
}

.brand-text h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.02em;
}

.brand-text span {
  font-size: 0.72rem;
  color: #b5d5c4;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.sidebar-nav {
  padding: 1.2rem 0.8rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  color: #c7ded2;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: var(--transition);
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.nav-link.active {
  background: var(--gold-accent);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(198, 156, 67, 0.35);
}

.nav-link svg {
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 1.2rem 1.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.15);
}

.btn-back-public {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.65rem 0.9rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
  transition: var(--transition);
}

.btn-back-public:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: #ffffff;
}

/* Main Content Area */
.admin-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  height: 100vh;
}

/* Topbar */
.admin-topbar {
  background: var(--white);
  border-bottom: 1px solid var(--moss-border);
  padding: 0.9rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.topbar-left h1 {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
  color: var(--primary-moss-dark);
}

.topbar-left p {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.content-body {
  padding: 1.8rem 2rem;
  overflow-y: auto;
  flex: 1;
}

/* Tab Panes */
.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Cards & Sections */
.card-box {
  background: var(--white);
  border: 1px solid var(--moss-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  margin-bottom: 1.8rem;
}

.card-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.4rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--moss-soft);
}

.card-title-group h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  color: var(--primary-moss-dark);
}

.card-title-group p {
  font-size: 0.84rem;
  color: var(--text-secondary);
  margin-top: 0.15rem;
}

/* Excel Action Group */
.excel-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.btn-excel-export {
  background: #107c41; /* Microsoft Excel Green */
  color: #ffffff;
  border: 1px solid #0b582e;
}

.btn-excel-export:hover {
  background: #0d6334;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(16, 124, 65, 0.3);
}

.btn-excel-import {
  background: var(--moss-soft);
  color: var(--primary-moss-dark);
  border: 1.5px dashed var(--primary-moss);
}

.btn-excel-import:hover {
  background: #d6e8dd;
  border-color: var(--primary-moss-dark);
}

/* Drag and Drop Zone */
.dropzone-box {
  border: 2px dashed var(--moss-sage);
  border-radius: var(--radius-lg);
  background: var(--moss-surface);
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 1.5rem;
}

.dropzone-box:hover, .dropzone-box.dragover {
  border-color: var(--primary-moss);
  background: #e8f4ed;
}

.dropzone-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #e1ede6;
  color: #107c41;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 0.8rem;
}

.dropzone-box h4 {
  font-size: 1.05rem;
  color: var(--primary-moss-dark);
  margin-bottom: 0.35rem;
}

.dropzone-box p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Table in Admin */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.admin-table th {
  background: var(--moss-surface);
  color: var(--text-secondary);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  padding: 0.85rem 1rem;
  border-bottom: 2px solid var(--moss-border);
  text-align: left;
}

.admin-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--moss-soft);
  color: var(--text-primary);
  vertical-align: middle;
}

.admin-table tbody tr:hover {
  background-color: #f7faf8;
}

.progress-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.progress-bar-bg {
  width: 75px;
  height: 6px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--primary-moss);
  border-radius: 999px;
}

/* Responsive */
@media (max-width: 960px) {
  .admin-layout {
    flex-direction: column;
  }
  .admin-sidebar {
    width: 100%;
  }
  .content-body {
    padding: 1rem;
  }
}
