/* === Admin Login === */
.admin-login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #273A5E 0%, #657DA9 100%);
  font-family: 'Open Sans', sans-serif;
}

.admin-login-form {
  background: #fff;
  border-radius: 12px;
  padding: 40px 36px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-login-title {
  margin: 0 0 8px 0;
  font-size: 22px;
  font-weight: 700;
  color: #273A5E;
  text-align: center;
}

.admin-input {
  padding: 12px 16px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  font-size: 15px;
  font-family: 'Open Sans', sans-serif;
  outline: none;
  transition: border-color 0.2s;
}

.admin-input:focus {
  border-color: #657DA9;
}

.admin-error {
  color: #e74c3c;
  font-size: 14px;
  margin: 0;
  text-align: center;
}

.admin-btn {
  padding: 12px 24px;
  background: #273A5E;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  font-family: 'Open Sans', sans-serif;
  cursor: pointer;
  transition: background 0.2s;
}

.admin-btn:hover {
  background: #1a2a45;
}

.admin-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* === Admin Panel === */
.admin-page {
  min-height: 100vh;
  background: #f4f6f9;
  padding: 24px 32px;
  font-family: 'Open Sans', sans-serif;
  color: #273A5E;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.admin-title {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
}

.admin-header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.admin-total {
  font-size: 15px;
  color: #657DA9;
  font-weight: 600;
}

.admin-btn-logout {
  background: #e74c3c;
}

.admin-btn-logout:hover {
  background: #c0392b;
}

.admin-loading,
.admin-empty {
  text-align: center;
  font-size: 16px;
  color: #888;
  margin-top: 60px;
}

/* === Table === */
.admin-table-wrap {
  overflow-x: auto;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 14px;
}

.admin-table th {
  background: #273A5E;
  color: #fff;
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}

.admin-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #eef0f4;
}

.admin-table tbody tr:hover {
  background: #f0f3f8;
}

.admin-row-unread {
  background: #eef4ff;
}

.admin-row-unread:hover {
  background: #dfe9f8 !important;
}

/* === Badges === */
.admin-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.admin-badge-new {
  background: #fff3cd;
  color: #856404;
}

.admin-badge-read {
  background: #d4edda;
  color: #155724;
}

/* === Buttons === */
.admin-btn-sm {
  padding: 6px 14px;
  font-size: 13px;
  border-radius: 6px;
}

.admin-btn-danger {
  background: #e74c3c;
}

.admin-btn-danger:hover {
  background: #c0392b;
}

.admin-actions {
  display: flex;
  gap: 8px;
  white-space: nowrap;
}

/* === Pagination === */
.admin-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
}

.admin-page-info {
  font-size: 14px;
  font-weight: 600;
  color: #657DA9;
}

/* === Responsive === */
@media (max-width: 768px) {
  .admin-page {
    padding: 16px;
  }

  .admin-header {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .admin-table {
    font-size: 13px;
  }

  .admin-table th,
  .admin-table td {
    padding: 10px 10px;
  }

  .admin-login-form {
    margin: 16px;
  }
}

/* === Captcha Modal === */
.captcha-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.captcha-modal {
  background: #fff;
  border-radius: 16px;
  padding: 32px 36px;
  width: 100%;
  max-width: 360px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.captcha-modal-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #273A5E;
  text-align: center;
  font-family: 'Open Sans', sans-serif;
}

.captcha-modal-desc {
  margin: 0;
  font-size: 15px;
  color: #657DA9;
  font-family: 'Open Sans', sans-serif;
}

.captcha-modal-image {
  display: flex;
  align-items: center;
  gap: 10px;
}

.captcha-modal-image svg {
  display: block;
  border-radius: 8px;
}

.captcha-placeholder {
  width: 220px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eef0f4;
  border-radius: 8px;
  color: #888;
  font-size: 14px;
  font-family: 'Open Sans', sans-serif;
}

.captcha-refresh {
  width: 40px;
  height: 40px;
  border: none;
  background: #6EA6EA;
  color: white;
  font-size: 22px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  flex-shrink: 0;
}

.captcha-refresh:hover {
  background: #5a94d4;
}

.captcha-modal-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  font-size: 20px;
  font-family: 'Open Sans', sans-serif;
  text-align: center;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.captcha-modal-input:focus {
  border-color: #6EA6EA;
}

.captcha-modal-error {
  margin: 0;
  color: #e74c3c;
  font-size: 14px;
  font-family: 'Open Sans', sans-serif;
  text-align: center;
}

.captcha-modal-btn {
  width: 100%;
  padding: 14px;
  background: #273A5E;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  font-family: 'Open Sans', sans-serif;
  cursor: pointer;
  transition: background 0.2s;
}

.captcha-modal-btn:hover {
  background: #1a2a45;
}

.captcha-modal-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

@media (max-width: 768px) {
  .captcha-modal {
    margin: 16px;
    padding: 24px 20px;
  }
}
