/* Admin */
#admin-panel {
  position: relative;
  z-index: 1;
  max-width: 1000px;
  margin: 0 auto;
  padding: 32px 20px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-header-left { display: flex; align-items: center; gap: 16px; }
.admin-header-left h1 { font-family: 'Georgia', serif; font-size: 28px; color: #2c3e50; }
.admin-header-right { display: flex; align-items: center; gap: 12px; }

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 36px;
}

.stat-card {
  background: rgba(255,255,255,0.9);
  padding: 24px 20px;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  font-size: 14px;
  color: #7f8c8d;
}

.stat-value {
  display: block;
  font-size: 36px;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 4px;
}

.admin-section {
  background: rgba(255,255,255,0.9);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 28px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.admin-section h2 {
  font-size: 20px;
  color: #2c3e50;
  margin-bottom: 18px;
}

.admin-filters {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.admin-filters select {
  padding: 10px 14px;
  border: 2px solid #e8e3da;
  border-radius: 10px;
  background: #fff;
  font-size: 13px;
  color: #2c3e50;
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s;
}
.admin-filters select:focus { border-color: #3498db; }

.table-wrapper { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th, td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid #e8e3da;
}

th {
  font-weight: 700;
  color: #7f8c8d;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

tr:hover td { background: rgba(0,0,0,0.02); }

.admin-actions { display: flex; gap: 6px; }
.admin-btn-sm {
  padding: 5px 10px; border: none; border-radius: 6px;
  font-size: 11px; font-weight: 600; cursor: pointer; transition: all 0.12s;
  text-decoration: none; display: inline-flex; align-items: center; gap: 4px;
}
.admin-btn-edit { background: #eaf2f8; color: #2980b9; }
.admin-btn-edit:hover { background: #d6eaf8; }
.admin-btn-delete { background: #fdf2f2; color: #e74c3c; }
.admin-btn-delete:hover { background: #fce4e4; }
.admin-btn-add {
  padding: 8px 16px; border: none; border-radius: 8px;
  background: #27ae60; color: #fff; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background 0.15s; margin-bottom: 12px;
}
.admin-btn-add:hover { background: #219a52; }

.modal-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4);
  z-index: 1000; align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #fff; border-radius: 16px; padding: 28px; width: 90%; max-width: 420px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.3); max-height: 90vh; overflow-y: auto;
}
.modal h3 { font-size: 18px; color: #2c3e50; margin-bottom: 20px; }
.modal-form { display: flex; flex-direction: column; gap: 12px; }
.modal-form label { font-size: 13px; font-weight: 600; color: #5a6a7a; }
.modal-form input, .modal-form select {
  padding: 10px 14px; border: 2px solid #e8e3da; border-radius: 8px;
  font-size: 14px; outline: none; transition: border-color 0.15s;
}
.modal-form input:focus, .modal-form select:focus { border-color: #3498db; }
.modal-form .checkbox-row { display: flex; align-items: center; gap: 8px; }
.modal-form .checkbox-row input { width: auto; }
.modal-btns { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }
.modal-btns button { padding: 10px 20px; border: none; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.15s; }
.modal-btns .btn-cancel { background: #f0ede8; color: #5a6a7a; }
.modal-btns .btn-cancel:hover { background: #e0dcd5; }
.modal-btns .btn-save { background: #3498db; color: #fff; }
.modal-btns .btn-save:hover { background: #2980b9; }
.modal-btns .btn-danger { background: #e74c3c; color: #fff; }
.modal-btns .btn-danger:hover { background: #c0392b; }

.check-modal { text-align: center; max-width: 320px; }
.check-modal-icon { font-size: 48px; margin-bottom: 8px; }
.check-modal-text { font-size: 18px; font-weight: 600; color: #2c3e50; }

.result-title {
  font-size: 20px;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 14px;
}
.result-card {
  background: #f7f5f0;
  border: 1px solid #ece7dd;
  border-radius: 12px;
  padding: 14px 16px;
}
.result-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
  font-size: 14px;
  font-weight: 500;
  color: #5a6a7a;
}
.result-label { text-align: left; }
.result-value {
  font-weight: 700;
  color: #27ae60;
  white-space: nowrap;
}
.result-value.negative {
  color: #e74c3c;
}
.result-divider {
  height: 1px;
  background: #e0dcd5;
  margin: 10px 0;
}
.result-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 700;
  color: #2c3e50;
}
.result-total > span:last-child {
  font-size: 18px;
  color: #2980b9;
  white-space: nowrap;
}
.result-record {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed #e0dcd5;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #e67e22;
  animation: recordBlink 0.9s steps(2, start) infinite;
}
@keyframes recordBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.1; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d4cfc7; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #c4bfb7; }
