/* ===== Dollog — Auth & Admin Styles ===== */

/* ── Login Page ── */
.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ffffff 0%, #FFFEF9 40%, #FDF8E8 100%);
  background-size: 400% 400%;
  animation: loginBg 12s ease infinite;
}

@keyframes loginBg {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.login-wrapper {
  width: 100%;
  max-width: 400px;
  padding: 20px;
}

.login-card {
  background: rgba(255, 255, 255, 0.97);
  border-radius: 24px;
  padding: 40px 32px 32px;
  box-shadow: 0 20px 60px rgba(196, 155, 44, 0.12);
  text-align: center;
}

.login-logo {
  margin-bottom: 8px;
}

.login-logo img {
  width: 108px;
  height: 108px;
  object-fit: contain;
  border-radius: 20px;
}

.login-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--accent, #C49B2C);
  margin-bottom: 4px;
}

.login-subtitle {
  color: var(--muted, #6B7280);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 28px;
}

.login-form {
  text-align: left;
}

.form-field {
  margin-bottom: 16px;
}

.form-field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted, #6B7280);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 6px;
}

.form-field input,
.form-field select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border, #E5E7EB);
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--txt, #1A1A1A);
  background: #FAFAFA;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-field input:focus,
.form-field select:focus {
  border-color: var(--accent, #C49B2C);
  box-shadow: 0 0 0 3px rgba(196, 155, 44, 0.15);
}

.form-field input::placeholder {
  color: #9CA3AF;
}

/* ── Captcha Row ── */
.captcha-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.captcha-row input {
  flex: 1;
  min-width: 0;
}

.captcha-row img {
  height: 40px;
  border-radius: 8px;
  border: 1.5px solid var(--border, #E5E7EB);
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity 0.2s;
}

.captcha-row img:hover {
  opacity: 0.8;
}

.captcha-refresh {
  font-size: 20px;
  color: var(--accent, #C49B2C);
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
  line-height: 1;
  transition: transform 0.3s, color 0.2s;
}

.captcha-refresh:hover {
  color: #a37f1f;
  transform: rotate(180deg);
}

.login-error {
  background: var(--bad-bg, #ffeaed);
  color: var(--bad, #f2566b);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
  border-left: 3px solid var(--bad, #f2566b);
}

.btn-login {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #C49B2C 0%, #D4A537 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-login:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(196, 155, 44, 0.35);
}

.btn-login:active {
  transform: translateY(0);
}

.btn-login:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.login-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 11px;
  color: #9CA3AF;
  font-weight: 600;
}

/* ── Google Login Button ── */
.login-divider {
  text-align: center;
  margin: 20px 0;
  color: #9CA3AF;
  font-size: 13px;
  font-weight: 600;
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  background: #fff;
  color: #3c4043;
  border: 1.5px solid #dadce0;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.btn-google:hover {
  background: #f7f8f8;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border-color: #c6c6c6;
}

.btn-google:active {
  background: #eeeeee;
}

.btn-google .google-icon {
  flex-shrink: 0;
}

/* ── Login details/toggle (secondary login method) ── */
.login-details {
  width: 100%;
}

.login-details summary {
  list-style: none;
}

.login-details summary::-webkit-details-marker {
  display: none;
}

.login-toggle {
  display: block;
  text-align: center;
  font-size: 13px;
  color: #9CA3AF;
  cursor: pointer;
  padding: 4px 0;
  font-weight: 600;
  user-select: none;
}

.login-toggle:hover {
  color: #6B7280;
}

.btn-login-secondary {
  background: linear-gradient(135deg, #9CA3AF 0%, #6B7280 100%);
}

.btn-login-secondary:hover {
  box-shadow: 0 6px 20px rgba(107, 114, 128, 0.3);
}

/* ── Admin: Readonly input & form hint ── */
.input-readonly {
  background: #f3f4f6 !important;
  color: #6B7280 !important;
  cursor: text;
  user-select: all;
}

.form-hint {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: #9CA3AF;
}

/* ── Admin Page ── */
.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.admin-msg {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
}

.admin-msg.success {
  background: var(--ok-bg, #e6faf1);
  color: var(--ok, #22c583);
  border-left: 3px solid var(--ok, #22c583);
}

.admin-msg.error {
  background: var(--bad-bg, #ffeaed);
  color: var(--bad, #f2566b);
  border-left: 3px solid var(--bad, #f2566b);
}

.btn-primary {
  padding: 10px 24px;
  background: linear-gradient(135deg, #C49B2C 0%, #D4A537 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(196, 155, 44, 0.3);
}

.btn-secondary {
  padding: 10px 24px;
  background: var(--accent-light, #FDF8E8);
  color: var(--accent, #C49B2C);
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-secondary:hover {
  background: #F5EDCF;
}

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

.admin-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  border-radius: var(--radius-sm, 10px);
  border: 1.5px solid var(--border, #E5E7EB);
  overflow: hidden;
}

.admin-table thead {
  background: var(--accent-light, #FDF8E8);
}

.admin-table th {
  color: var(--accent, #C49B2C);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1.5px solid var(--border, #E5E7EB);
}

.admin-table td {
  padding: 11px 10px;
  border-bottom: 1px solid #F3F4F6;
  vertical-align: middle;
}

.admin-table tbody tr:hover {
  background: #FFFEF9;
}

.admin-table tbody tr:last-child td {
  border-bottom: none;
}

/* Status badges */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

.badge-active {
  background: var(--ok-bg, #e6faf1);
  color: var(--ok, #22c583);
}

.badge-inactive {
  background: var(--bad-bg, #ffeaed);
  color: var(--bad, #f2566b);
}

.badge-admin {
  background: var(--accent-light, #FDF8E8);
  color: var(--accent, #C49B2C);
}

.badge-user {
  background: #f0f0f0;
  color: #666;
}

.badge-google {
  background: #e8f0fe;
  color: #1a73e8;
}

.badge-manual {
  background: #f0f0f0;
  color: #666;
}

/* Action buttons */
.action-btns {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.btn-sm {
  padding: 4px 10px;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.15s;
  white-space: nowrap;
}

.btn-sm:hover {
  opacity: 0.85;
}

.btn-toggle {
  background: var(--warn-bg, #fff6e6);
  color: var(--warn, #f5a623);
}

.btn-reset {
  background: var(--accent-light, #FDF8E8);
  color: var(--accent, #C49B2C);
}

.btn-role {
  background: #e8f0fe;
  color: #1a73e8;
}

.btn-plan {
  background: #eef9f1;
  color: #1f9d55;
}

.btn-more {
  background: #f3f4f6;
  color: #4b5563;
}

.btn-delete {
  background: var(--bad-bg, #ffeaed);
  color: var(--bad, #f2566b);
}

.admin-credit-cell {
  min-width: 110px;
}

.admin-credit-main {
  font-size: 12px;
  font-weight: 700;
  color: #1f2937;
}

.admin-credit-sub {
  margin-top: 2px;
  font-size: 11px;
  color: #6b7280;
  line-height: 1.35;
}

.admin-user-cell {
  min-width: 220px;
}

.admin-user-main {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
}

.admin-user-sub {
  margin-top: 3px;
  font-size: 11px;
  color: #6b7280;
  line-height: 1.4;
}

.admin-access-cell {
  min-width: 150px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-row-menu {
  position: relative;
}

.admin-row-menu-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 160px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
  padding: 6px;
  display: none;
  z-index: 20;
}

.admin-row-menu-dropdown.show {
  display: block;
}

.admin-row-menu-item {
  width: 100%;
  border: none;
  background: none;
  text-align: left;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
}

.admin-row-menu-item:hover {
  background: #f3f4f6;
}

.admin-row-menu-item.danger {
  color: #dc2626;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-box {
  background: #fff;
  border-radius: 20px;
  padding: 28px;
  width: 90%;
  max-width: 380px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.modal-box h3 {
  font-size: 17px;
  font-weight: 800;
  color: var(--accent, #C49B2C);
  margin-bottom: 8px;
}

.modal-box p {
  font-size: 13px;
  color: var(--muted, #6B7280);
  margin-bottom: 16px;
}

.modal-box input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border, #E5E7EB);
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
  margin-bottom: 16px;
  outline: none;
}

.modal-box input:focus {
  border-color: var(--accent, #C49B2C);
  box-shadow: 0 0 0 3px rgba(196, 155, 44, 0.15);
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .login-card {
    padding: 32px 24px 24px;
  }

  .admin-form-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Login Footer Links ── */
.login-footer-links {
  text-align: center;
  margin-top: 16px;
}

.login-footer-links a {
  font-size: 12px;
  color: var(--muted, #6B7280);
  text-decoration: none;
  transition: color 0.2s;
}

.login-footer-links a:hover {
  color: var(--accent, #C49B2C);
  text-decoration: underline;
}
