@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --surface: #ffffff;
  --surface-dim: #f8f9fa;
  --surface-hover: #f1f3f5;
  --border: #e2e5e9;
  --border-light: #eef0f2;
  --text: #1a1d21;
  --text-secondary: #5e6369;
  --text-muted: #8b9099;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #ca8a04;
  --info: #0891b2;
  --sidebar-bg: #111318;
  --sidebar-width: 240px;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --pomi-green: #16a34a;
  --pomi-blue: #2563eb;
  --pomi-yellow: #ca8a04;
  --pomi-red: #dc2626;
  --pomi-black: #1a1d21;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--surface-dim);
  min-height: 100vh;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* Login page */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-dim);
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow);
}

.login-card h1 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.login-card .subtitle {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 28px;
}

.login-card .brand-logo {
  display: block;
  width: 100%;
  max-width: 280px;
  margin: 0 auto 20px;
  border-radius: 10px;
}

.login-card .logo {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.login-card .form-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.login-card .form-control {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 0.9375rem;
  transition: border-color 0.15s;
}

.login-card .form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.login-card .btn-primary {
  background: var(--primary);
  border: none;
  border-radius: var(--radius);
  padding: 10px;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: background 0.15s;
}

.login-card .btn-primary:hover {
  background: var(--primary-hover);
}

/* Toast notifications */
.toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
}

.toast-container .toast {
  min-width: 280px;
  border-radius: var(--radius);
  font-size: 0.875rem;
}

/* Loading spinner */
.loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 2.5rem;
  margin-bottom: 12px;
  display: block;
  opacity: 0.5;
}

/* POMI badge colors */
.pomi-badge-green { background-color: var(--pomi-green) !important; color: white; }
.pomi-badge-blue { background-color: var(--pomi-blue) !important; color: white; }
.pomi-badge-yellow { background-color: var(--pomi-yellow) !important; color: #fff; }
.pomi-badge-red { background-color: var(--pomi-red) !important; color: white; }
.pomi-badge-black { background-color: var(--pomi-black) !important; color: white; }

/* Status badges */
.badge {
  font-weight: 500;
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 6px;
}

.status-setup { background-color: var(--surface-hover); color: var(--text-secondary); }
.status-active { background-color: #dcfce7; color: #15803d; }
.status-completed { background-color: #dbeafe; color: #1d4ed8; }
.status-scheduled { background-color: var(--surface-hover); color: var(--text-secondary); }
.status-in_progress { background-color: #fef3c7; color: #a16207; }
.status-cancelled { background-color: #fecaca; color: #b91c1c; }

/* Score display */
.score-display {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}

/* Card improvements */
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  background: var(--surface);
}

.card-header {
  border-bottom: 1px solid var(--border-light);
  padding: 14px 20px;
}

.card-header h5 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.card-body {
  padding: 20px;
}

.stat-card {
  border-left: 3px solid var(--primary);
  padding: 16px 20px !important;
}

.stat-card .stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.stat-card .stat-label {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

/* Activity feed */
.activity-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.875rem;
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Table improvements */
.table {
  font-size: 0.875rem;
}

.table th {
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-top: none;
  border-bottom: 1px solid var(--border-light) !important;
  padding: 10px 16px;
}

.table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

.table-hover tbody tr:hover {
  background: var(--surface-dim);
}

/* Confirmation modal */
.confirm-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

/* Developed-by credit footer (Wisdom Digi Cyber Solutions) */
.credit-footer {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 12px 8px;
  letter-spacing: 0.02em;
}
.credit-footer .wd-wisdom { color: var(--text-secondary); font-weight: 700; }
.credit-footer .wd-digi { color: #22c55e; font-weight: 700; }
.credit-footer .wd-name { color: var(--text-secondary); font-weight: 600; }
/* On the dark admin sidebar, lighten the muted text */
.sidebar .credit-footer, .admin-sidebar .credit-footer { color: rgba(255,255,255,0.45); }
.sidebar .credit-footer .wd-wisdom, .admin-sidebar .credit-footer .wd-wisdom,
.sidebar .credit-footer .wd-name, .admin-sidebar .credit-footer .wd-name { color: rgba(255,255,255,0.8); }

/* Confirmation dialog box (used app-wide by confirm() and by the observer score dialog) */
.confirm-score-dialog {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 380px;
  width: 90%;
  text-align: center;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.confirm-score-dialog .confirm-buttons {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}

.confirm-score-dialog .confirm-buttons .btn {
  flex: 1;
  padding: 12px;
  font-size: 1rem;
}

/* Live indicator */
.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  display: inline-block;
  margin-right: 4px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.3; }
  100% { opacity: 1; }
}

/* Form controls */
.form-select, .form-control {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  padding: 8px 12px;
  transition: border-color 0.15s;
}

.form-select:focus, .form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Buttons */
.btn {
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius);
  padding: 8px 16px;
  transition: all 0.15s;
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.btn-outline-secondary {
  border-color: var(--border);
  color: var(--text-secondary);
}

.btn-outline-secondary:hover {
  background: var(--surface-hover);
  border-color: var(--border);
  color: var(--text);
}

/* Modal */
.modal-content {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.modal-header {
  border-bottom: 1px solid var(--border-light);
  padding: 16px 20px;
}

.modal-footer {
  border-top: 1px solid var(--border-light);
  padding: 12px 20px;
}
