@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");

:root {
  --primary: #1e3a8a;
  --primary-light: #eff6ff;
  --accent: #facc15;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --bg-body: #f1f5f9;
  --bg-surface: #ffffff;
  --border: #e2e8f0;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Poppins", sans-serif;
  background: var(--bg-body);
  color: var(--text-main);
}

.admin-login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  background: var(--bg-body);
}

.login-wrapper {
  display: flex;
  width: 1000px;
  height: 600px;
  background: var(--bg-surface);
  border-radius: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.login-left {
  flex: 1;
  background: linear-gradient(135deg, var(--primary), #2563eb);
  color: white;
  padding: 50px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.login-branding h1 {
  font-size: 2.5rem;
  margin: 10px 0 5px;
}
.login-branding i {
  font-size: 3rem;
  color: var(--accent);
}
.login-branding p {
  opacity: 0.8;
}

.login-right {
  flex: 1;
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-form-container h2 {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 5px;
}
.subtitle {
  color: var(--text-muted);
  margin-bottom: 30px;
}

.input-group {
  margin-bottom: 20px;
}
.input-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.input-box {
  position: relative;
}
.input-box .icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
}
.input-box input {
  width: 100%;
  padding: 12px 40px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  transition: 0.3s;
}
.input-box input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 4px var(--primary-light);
}

.toggle-password {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #94a3b8;
}

.form-options {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  margin-bottom: 25px;
}
.form-options a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.btn-login {
  width: 100%;
  padding: 14px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s;
  display: flex;
  justify-content: center;
  align-items: center;
}
.btn-login:hover {
  background: #1e40af;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(30, 58, 138, 0.2);
}
.btn-login.loading {
  background: #94a3b8;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.error-message {
  background: #fee2e2;
  color: var(--danger);
  padding: 10px;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-top: 15px;
  text-align: center;
  display: none;
}
.back-to-web {
  text-align: center;
  margin-top: 30px;
}
.back-to-web a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: 0.3s;
}
.back-to-web a:hover {
  color: var(--primary);
}

.dashboard-body {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

.sidebar {
  width: 260px;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.02);
}

.sidebar-header {
  padding: 30px 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  color: var(--primary);
}

.sidebar-header i {
  font-size: 1.8rem;
  color: var(--accent);
}
.sidebar-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

.nav-links {
  list-style: none;
  flex: 1;
  padding: 10px 15px;
}

.nav-links li {
  margin-bottom: 8px;
}

.nav-links li a {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 20px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  border-radius: 8px;
  transition: 0.3s;
}

.nav-links li.active a,
.nav-links li a:hover {
  background: var(--primary);
  color: white;
}

.sidebar-footer {
  padding: 20px;
  border-top: 1px solid var(--border);
}
.logout-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--danger);
  text-decoration: none;
  font-weight: 600;
  padding: 10px;
  border-radius: 8px;
  transition: 0.3s;
}
.logout-btn:hover {
  background: #fee2e2;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.topbar {
  background: var(--bg-surface);
  padding: 15px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-body);
  padding: 10px 20px;
  border-radius: 50px;
  width: 350px;
  border: 1px solid var(--border);
}
.search-box input {
  border: none;
  background: transparent;
  outline: none;
  margin-left: 10px;
  width: 100%;
  font-family: inherit;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 30px;
}
.notification {
  position: relative;
  font-size: 1.2rem;
  color: var(--text-muted);
  cursor: pointer;
}
.badge {
  position: absolute;
  top: -5px;
  right: -8px;
  background: var(--danger);
  color: white;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 50px;
  font-weight: 700;
}

.admin-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.admin-profile img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--primary-light);
}
.admin-info {
  display: flex;
  flex-direction: column;
}
.admin-info .name {
  font-weight: 600;
  font-size: 0.95rem;
}
.admin-info .role {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.dashboard-content {
  padding: 40px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}
.page-header h1 {
  color: var(--text-main);
  font-size: 1.8rem;
}

.btn-primary {
  background: var(--primary);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  display: flex;
  gap: 8px;
  align-items: center;
  transition: 0.3s;
}
.btn-primary:hover {
  background: #152c66;
  transform: translateY(-2px);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
}
.stat-card {
  background: var(--bg-surface);
  padding: 25px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  border: 1px solid var(--border);
  transition: 0.3s;
}
.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.stat-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.8rem;
}
.stat-icon.blue {
  background: var(--primary-light);
  color: var(--primary);
}
.stat-icon.green {
  background: #dcfce7;
  color: var(--success);
}
.stat-icon.yellow {
  background: #fef3c7;
  color: var(--warning);
}
.stat-icon.red {
  background: #fee2e2;
  color: var(--danger);
}

.stat-details h3 {
  font-size: 1.8rem;
  margin: 0 0 5px;
}
.stat-details p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.table-container {
  background: var(--bg-surface);
  padding: 25px;
  border-radius: 16px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  border: 1px solid var(--border);
}
.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.table-header a {
  color: var(--primary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.admin-table th {
  padding: 15px;
  border-bottom: 2px solid var(--border);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.admin-table td {
  padding: 15px;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}
.admin-table tbody tr:hover {
  background: var(--bg-body);
}

.status {
  padding: 5px 12px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
}
.status.active {
  background: #dcfce7;
  color: #166534;
}
.status.warning {
  background: #fef9c3;
  color: #854d0e;
}
.status.danger {
  background: #fee2e2;
  color: #991b1b;
}
.status.success {
  background: #dcfce7;
  color: #166534;
}

.form-card {
  background: var(--bg-surface);
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  border: 1px solid var(--border);
  max-width: 900px;
}

.form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}
.form-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
}

.form-group label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 8px;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text-main);
  outline: none;
  transition: 0.3s;
  background-color: #fafafa;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  background-color: white;
  box-shadow: 0 0 0 3px var(--primary-light);
}

.form-group textarea {
  resize: vertical;
}

.upload-area {
  border: 2px dashed #cbd5e1;
  padding: 40px 20px;
  text-align: center;
  border-radius: 12px;
  cursor: pointer;
  transition: 0.3s;
  background: #f8fafc;
  position: relative;
  overflow: hidden;
}

.upload-area:hover {
  border-color: var(--primary);
  background: #eff6ff;
}
.upload-area i {
  font-size: 3rem;
  color: #94a3b8;
  margin-bottom: 10px;
}
.upload-area h3 {
  font-size: 1.1rem;
  color: var(--text-main);
  margin-bottom: 5px;
}
.upload-area p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

#imagePreview {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background-color: #f1f5f9;
  display: none;
  border-radius: 10px;
}

.btn-submit {
  background: var(--primary);
  color: white;
  border: none;
  padding: 14px 25px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: 0.3s;
  margin-top: 10px;
  justify-content: center;
}

.btn-submit:hover {
  background: #152c66;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(30, 58, 138, 0.3);
}
