/* ─── BASE ─────────────────────────────────────────────────────────────────── */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #f8f9fc;
  color: #1a1d23;
}

/* ─── NAVBAR ────────────────────────────────────────────────────────────────── */
.navbar {
  background: linear-gradient(135deg, #1877f2 0%, #0d5dbf 100%);
  padding: 12px 0;
  box-shadow: 0 2px 12px rgba(24,119,242,.25);
}

/* ─── LOGIN ─────────────────────────────────────────────────────────────────── */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e8f0fe 0%, #f8f9fc 60%, #fff3e0 100%);
  padding: 20px;
}

.login-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 8px 40px rgba(24,119,242,.12);
  padding: 40px;
  width: 100%;
  max-width: 420px;
}

.login-logo {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #1877f2, #0d5dbf);
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #fff;
}

/* ─── MAIN CONTENT ───────────────────────────────────────────────────────────── */
.main-content {
  min-height: calc(100vh - 60px);
}

.page-header {
  padding: 4px 0;
}

/* ─── CARDS ─────────────────────────────────────────────────────────────────── */
.card {
  border: 1px solid #e8ecf4;
  border-radius: 16px;
}

.card-header {
  border-bottom: 1px solid #e8ecf4;
  border-radius: 16px 16px 0 0 !important;
}

/* ─── FORM ──────────────────────────────────────────────────────────────────── */
.form-control, .form-select {
  border-radius: 10px;
  border-color: #d8dde8;
  font-size: 14px;
  padding: 10px 14px;
  transition: border-color .2s, box-shadow .2s;
}

.form-control:focus, .form-select:focus {
  border-color: #1877f2;
  box-shadow: 0 0 0 3px rgba(24,119,242,.12);
}

.input-group-text {
  border-radius: 10px 0 0 10px;
  border-color: #d8dde8;
  color: #6c757d;
}

.form-label {
  font-size: 14px;
  margin-bottom: 6px;
}

/* ─── BUTTONS ────────────────────────────────────────────────────────────────── */
.btn-primary {
  background: linear-gradient(135deg, #1877f2, #0d5dbf);
  border: none;
  border-radius: 10px;
  font-size: 15px;
  transition: transform .15s, box-shadow .15s;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(24,119,242,.35);
}

.btn-primary:disabled {
  transform: none;
  box-shadow: none;
}

.btn-outline-secondary, .btn-outline-primary, .btn-outline-info,
.btn-outline-warning, .btn-outline-danger, .btn-outline-success, .btn-outline-light {
  border-radius: 8px;
}

/* Extra small button */
.btn-xs {
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 6px;
  line-height: 1.4;
}

/* ─── EMPTY STATE ────────────────────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  color: #adb5bd;
  text-align: center;
}

.empty-icon {
  width: 72px;
  height: 72px;
  background: #f0f4ff;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #1877f2;
  opacity: .5;
}

/* ─── LOADING ────────────────────────────────────────────────────────────────── */
.loading-spinner {
  display: inline-block;
}

.spinner-ring {
  width: 48px;
  height: 48px;
  border: 4px solid #e8ecf4;
  border-top-color: #1877f2;
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ─── RESULT ─────────────────────────────────────────────────────────────────── */
.result-text {
  font-size: 14px;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
  color: #2d3142;
}

/* ─── ADMIN ──────────────────────────────────────────────────────────────────── */
.user-avatar {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #1877f2, #0d5dbf);
  color: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.table th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #6c757d;
  font-weight: 600;
}

.table td {
  font-size: 14px;
  border-color: #f0f2f7;
}

/* ─── BADGES ─────────────────────────────────────────────────────────────────── */
.bg-success-subtle { background: #d1fae5 !important; }
.bg-secondary-subtle { background: #f1f3f5 !important; }

/* ─── RESPONSIVE ─────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .login-card { padding: 28px 20px; }
  .container { padding-left: 16px; padding-right: 16px; }
}
