/* Modern Green-Black Cyberpunk Dashboard Layout */

:root {
  --sidebar-bg: #090e0b;
  --main-bg: #050706;
  --card-bg: rgba(14, 22, 17, 0.7);
  --border-green: rgba(0, 255, 102, 0.1);
  --border-green-hover: rgba(0, 255, 102, 0.25);
  --accent-green: #00ff66;
  --emerald-green: #10b981;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--main-bg);
  min-height: 100vh;
  display: block;
}

/* Master Layout */
.admin-dashboard-layout {
  display: flex;
  min-height: 100vh;
  width: 100vw;
  background-color: var(--main-bg);
  font-family: var(--font-th), var(--font-en);
  overflow-x: hidden;
}

/* 1. Left Sidebar */
.sidebar {
  width: 260px;
  background-color: var(--sidebar-bg);
  border-right: 1px solid var(--border-green);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex-shrink: 0;
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.3);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 5px;
  border-bottom: 1px solid rgba(0, 255, 102, 0.1);
  margin-bottom: 10px;
}

.sidebar-logo .logo-icon {
  font-size: 24px;
}

.sidebar-logo .logo-text {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
}

.sidebar-logo .logo-ver {
  font-size: 11px;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

/* Sidebar Profile Info */
.sidebar-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(0, 255, 102, 0.03);
  border: 1px solid rgba(0, 255, 102, 0.05);
  border-radius: 12px;
  margin-bottom: 15px;
}

.sidebar-avatar-wrapper {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--accent-green);
  padding: 2px;
  overflow: hidden;
}

.sidebar-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.profile-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.profile-name {
  font-weight: 700;
  font-size: 13.5px;
  color: #fff;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.profile-role {
  font-size: 11px;
  color: var(--text-muted);
}

.sidebar-group-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 1.5px;
  margin-top: 10px;
  padding-left: 10px;
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.menu-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  box-shadow: none;
}

.menu-btn svg {
  flex-shrink: 0;
  stroke: var(--text-muted);
  transition: stroke 0.2s ease;
}

.menu-btn:hover {
  background: rgba(0, 255, 102, 0.05);
  color: #fff;
  transform: none;
}

.menu-btn:hover svg {
  stroke: #fff;
}

.menu-btn.active {
  background: rgba(0, 255, 102, 0.1);
  color: var(--accent-green);
  border: 1px solid rgba(0, 255, 102, 0.15);
  box-shadow: 0 4px 15px rgba(0, 255, 102, 0.05);
}

.menu-btn.active svg {
  stroke: var(--accent-green);
}

.menu-btn .badge {
  margin-left: auto;
  background: #ff007f;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
}

.logout-btn {
  margin-top: 20px;
  border: 1px solid rgba(255, 0, 127, 0.1) !important;
  color: #ff3366 !important;
}

.logout-btn svg {
  stroke: #ff3366 !important;
}

.logout-btn:hover {
  background: rgba(255, 0, 127, 0.08) !important;
}

/* 2. Main Content Area */
.main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  background-color: var(--main-bg);
  height: 100vh;
  overflow-y: auto;
}

/* Main Top Navigation Header */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 30px;
  background-color: var(--sidebar-bg);
  border-bottom: 1px solid var(--border-green);
  flex-shrink: 0;
}

.welcome-section h2 {
  font-size: 20px;
  margin: 0;
  color: #fff;
  font-weight: 700;
}

.welcome-section p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 4px 0 0 0;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 15px;
}

.owner-btn {
  background: var(--primary-gradient);
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  color: #050806;
  font-size: 12.5px;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(0, 255, 102, 0.25);
  transition: all 0.2s ease;
}

.owner-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 255, 102, 0.35);
}

.online-status {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 255, 102, 0.03);
  border: 1px solid rgba(0, 255, 102, 0.08);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12.5px;
  color: #fff;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-green);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.8; box-shadow: 0 0 0 0 rgba(0, 255, 102, 0.5); }
  70% { transform: scale(1.1); opacity: 1; box-shadow: 0 0 0 8px rgba(0, 255, 102, 0); }
  100% { transform: scale(0.9); opacity: 0.8; box-shadow: 0 0 0 0 rgba(0, 255, 102, 0); }
}

.main-content-body {
  padding: 30px;
  flex-grow: 1;
}

.tab-content {
  display: none;
  animation: tabFadeIn 0.35s ease forwards;
}

.tab-content.active {
  display: block;
}

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

/* 3. Dashboard Layout Split */
.dashboard-layout-wrapper {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 25px;
  align-items: start;
}

@media (max-width: 1200px) {
  .dashboard-layout-wrapper {
    grid-template-columns: 1fr;
  }
}

.dashboard-main-col {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.dashboard-side-col {
  width: 100%;
  position: sticky;
  top: 25px;
}

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  width: 100%;
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border-green);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
  transition: all 0.3s ease;
}

.stat-card:hover {
  border-color: var(--border-green-hover);
  box-shadow: 0 10px 30px rgba(0, 255, 102, 0.05);
  transform: translateY(-2px);
}

.stat-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-card-content {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.stat-val {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  margin-top: 4px;
}

.stat-label {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Recent Donations Card */
.recent-donations-card {
  padding: 24px !important;
  border-color: var(--border-green);
  min-height: 400px;
}

.card-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(0, 255, 102, 0.1);
  padding-bottom: 12px;
  margin-bottom: 8px;
}

.card-header-flex h3 {
  margin: 0;
  font-size: 16px;
  color: #fff;
}

.live-pulse {
  font-size: 11px;
  font-weight: bold;
  color: var(--accent-green);
  background: rgba(0, 255, 102, 0.08);
  border: 1px solid rgba(0, 255, 102, 0.15);
  padding: 3px 8px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.recent-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 450px;
  overflow-y: auto;
  padding-right: 5px;
}

/* Custom Scrollbar for Recent List */
.recent-list::-webkit-scrollbar {
  width: 4px;
}
.recent-list::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.1);
}
.recent-list::-webkit-scrollbar-thumb {
  background: rgba(0, 255, 102, 0.2);
  border-radius: 2px;
}

.recent-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255,255,255,0.03);
  border-radius: 10px;
  font-size: 13.5px;
  animation: tabFadeIn 0.3s ease;
  transition: all 0.2s ease;
}

.recent-item:hover {
  background: rgba(0, 255, 102, 0.03);
  border-color: rgba(0, 255, 102, 0.08);
}

.recent-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 65%;
}

.recent-donor {
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.recent-msg {
  color: var(--text-muted);
  font-size: 12px;
  word-break: break-word;
  line-height: 1.4;
}

.recent-amount {
  font-weight: 700;
  color: var(--accent-green);
  text-align: right;
  white-space: nowrap;
}

.recent-time {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

.recent-item-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 10px;
  font-size: 13px;
}

/* Sub-grid and elements styles */
.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 768px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }
}

.admin-card {
  width: 100%;
}

/* Preset buttons */
.quick-buttons {
  display: flex;
  gap: 10px;
}

.preset-btn {
  flex: 1;
  padding: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  box-shadow: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.preset-btn:hover {
  background: rgba(0, 255, 102, 0.08);
  border-color: var(--accent-green);
}

/* Tables styling */
.table-container {
  overflow-x: auto;
}

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

.donation-table th {
  background: rgba(0, 255, 102, 0.02);
  color: var(--text-muted);
  font-size: 12.5px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 14px 16px;
  border-bottom: 2px solid rgba(0, 255, 102, 0.08);
}

.donation-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 14px;
}

.donation-table tbody tr:hover {
  background: rgba(0, 255, 102, 0.02);
}

/* Status Labels */
.status-paid {
  color: var(--accent-green);
  background: rgba(0, 255, 102, 0.08);
  border: 1px solid rgba(0, 255, 102, 0.15);
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.status-pending {
  color: #ffb300;
  background: rgba(255, 179, 0, 0.08);
  border: 1px solid rgba(255, 179, 0, 0.15);
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.status-approval {
  color: #00e5ff;
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.15);
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.status-rejected {
  color: #ff3366;
  background: rgba(255, 51, 102, 0.08);
  border: 1px solid rgba(255, 51, 102, 0.15);
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

/* Mod Action Buttons */
.action-buttons {
  display: flex;
  gap: 6px;
}

.approve-btn {
  background: var(--primary-gradient) !important;
  color: #050806 !important;
  padding: 5px 12px !important;
  font-size: 12px !important;
  font-weight: bold;
  border-radius: 6px !important;
  box-shadow: 0 2px 10px rgba(0, 255, 102, 0.2) !important;
  width: auto !important;
}

.reject-btn {
  background: rgba(255, 51, 102, 0.1) !important;
  border: 1px solid rgba(255, 51, 102, 0.2) !important;
  color: #ff3366 !important;
  padding: 5px 12px !important;
  font-size: 12px !important;
  border-radius: 6px !important;
  width: auto !important;
  box-shadow: none !important;
}

.reject-btn:hover {
  background: rgba(255, 51, 102, 0.2) !important;
}

/* Custom form styles */
.form-group label {
  color: var(--accent-green);
  font-size: 13.5px;
}

input, textarea, select {
  border-color: rgba(0, 255, 102, 0.1);
  background-color: rgba(0, 0, 0, 0.2);
}

input:focus, textarea:focus, select:focus {
  border-color: var(--accent-green);
  box-shadow: 0 0 10px rgba(0, 255, 102, 0.1);
}

/* Slider Controls */
.range-container {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 8px;
}

.range-container input[type=range] {
  flex-grow: 1;
  padding: 0;
  background: rgba(255, 255, 255, 0.08);
  height: 6px;
  border-radius: 3px;
  border: none;
  cursor: pointer;
}

.range-val {
  min-width: 45px;
  font-weight: 700;
  color: var(--accent-green);
  text-align: right;
  font-size: 14px;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .admin-dashboard-layout {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-green);
    padding: 15px;
  }
  .main-content {
    height: auto;
    overflow-y: visible;
  }
}
