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

:root {
  --primary-color: #00C853; /* Hijau Terang ala Nutacloud */
  --primary-hover: #00E676;
  --sidebar-bg: #2C3E50; /* Biru Dongker Gelap */
  --sidebar-hover: #34495E;
  --sidebar-text: #ECF0F1;
  --body-bg: #F4F6F9;
  --card-bg: #FFFFFF;
  --text-main: #333333;
  --text-muted: #7F8C8D;
  --border-color: #E0E6ED;
  --danger-color: #E74C3C;
}

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

body {
  background-color: var(--body-bg);
  color: var(--text-main);
  display: flex;
  min-height: 100vh;
}

/* --- LAYOUT: SIDEBAR & MAIN --- */
.sidebar {
  width: 250px;
  background-color: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 100;
}

.sidebar-header {
  padding: 20px;
  font-size: 1.2rem;
  font-weight: 700;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-menu {
  list-style: none;
  padding: 15px 0;
  flex: 1;
}

.sidebar-menu li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: var(--sidebar-text);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

.sidebar-menu li a:hover, .sidebar-menu li.active a {
  background-color: var(--sidebar-hover);
  border-left: 4px solid var(--primary-color);
}

.main-content {
  flex: 1;
  margin-left: 250px;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 60px;
  background-color: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.page-wrapper {
  padding: 24px;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text-main);
}

/* --- CARDS & WIDGETS --- */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--card-bg);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
  display: flex;
  align-items: center;
  gap: 20px;
  border: 1px solid var(--border-color);
  transition: transform 0.2s;
}

.stat-card:hover {
  transform: translateY(-2px);
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.stat-icon.blue { background: rgba(52, 152, 219, 0.1); color: #3498DB; }
.stat-icon.yellow { background: rgba(241, 196, 15, 0.1); color: #F1C40F; }
.stat-icon.green { background: rgba(46, 204, 113, 0.1); color: #2ECC71; }
.stat-icon.red { background: rgba(231, 76, 60, 0.1); color: #E74C3C; }

.stat-info h4 {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  font-weight: 500;
}

.stat-info h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
}

/* --- CHARTS AREA --- */
.chart-container {
  background: var(--card-bg);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
  border: 1px solid var(--border-color);
  margin-bottom: 24px;
}

/* --- TABLES --- */
.card-table {
  background: var(--card-bg);
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 12px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

th {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.9rem;
  background: #F8F9FA;
}

td {
  font-size: 0.95rem;
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: background 0.2s;
  text-decoration: none;
}

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

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

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

/* --- FORMS --- */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
}

/* --- LOGIN PAGE --- */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  background-color: var(--body-bg);
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--card-bg);
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  text-align: center;
}

.login-card h2 {
  margin-bottom: 8px;
}

.login-card p {
  color: var(--text-muted);
  margin-bottom: 24px;
  font-size: 0.9rem;
}

.login-card .btn {
  width: 100%;
  justify-content: center;
  padding: 12px;
  font-size: 1rem;
}

/* --- WIDGET MENU GRID (Nutacloud Style) --- */
.widget-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.widget-card {
  background: var(--card-bg);
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  border: 1px solid var(--border-color);
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  text-decoration: none;
  color: var(--text-main);
  position: relative;
}

.widget-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.widget-icon {
  font-size: 3.5rem;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.widget-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-main);
  margin-bottom: 8px;
}

.widget-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 0 15px;
}

.badge-new {
  position: absolute;
  top: 15px;
  right: 15px;
  background-color: #00BCD4;
  color: white;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: bold;
}

/* --- MODALS --- */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: #fff;
  border-radius: 6px;
  width: 100%;
  max-width: 600px;
  box-shadow: 0 5px 25px rgba(0,0,0,0.2);
}

.modal-header {
  padding: 15px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.modal-header h4 {
  margin: 0;
  font-weight: 600;
  color: var(--text-main);
}

.modal-close {
  position: absolute;
  right: 20px;
  background: none;
  border: none;
  font-size: 1.2rem;
  color: #aaa;
  cursor: pointer;
}

.modal-body {
  padding: 30px 40px;
}

.modal-footer {
  padding: 15px 20px;
  background: #F9FAFB;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-start;
  gap: 15px;
  border-bottom-left-radius: 6px;
  border-bottom-right-radius: 6px;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-outline:hover {
  background: rgba(0,200,83,0.1);
}
