@import './root.css';
@import './landing.css';
@import './auth.css';
@import './dashboard.css';
@import './forms.css';
@import './tables.css';
@import './exam.css';
@import './pwa.css';
@import './responsive.css';
@import 'bootstrap-icons/font/bootstrap-icons.css';

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--color-bg-soft);
  color: var(--color-text);
  font-family: var(--font-family);
}

a {
  color: inherit;
  text-decoration: none;
}

.btn {
  align-items: center;
  border: 0;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 800;
  gap: 0.5rem;
  justify-content: center;
  min-height: 44px;
  padding: 0.75rem 1.1rem;
  transition: 160ms ease;
}

.btn-primary {
  background: var(--color-primary);
  box-shadow: var(--shadow-card);
  color: white;
}

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

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

.btn-ghost {
  background: white;
  border: 1px solid var(--color-border);
  color: var(--color-text);
}

.btn-danger-ghost {
  background: white;
  border: 1px solid #fecaca;
  color: var(--color-danger);
}

.btn-danger-ghost:hover {
  background: #fef2f2;
  border-color: var(--color-danger);
}

.btn-sm {
  min-height: 32px;
  padding: 0.25rem 0.6rem;
  font-size: 0.85rem;
}

.action-row--compact {
  align-items: center;
  display: flex;
  gap: 0.35rem;
}

.row-editing {
  background: var(--color-primary-soft-2) !important;
}

.full {
  width: 100%;
}

.badge {
  border-radius: var(--radius-sm);
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
}

.badge-success {
  background: #dcfce7;
  color: var(--color-success);
}

.badge-warning {
  background: #fef3c7;
  color: #92400e;
}

.badge-danger {
  background: #fee2e2;
  color: var(--color-danger);
}

.badge-muted {
  background: var(--color-surface-muted);
  color: var(--color-text-muted);
}

.tab-bar {
  display: flex;
  gap: 0.25rem;
  border-bottom: 2px solid var(--color-border);
  padding-bottom: 0;
}

.tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.95rem;
  margin-bottom: -2px;
  padding: 0.5rem 1rem;
  transition: color 0.15s, border-color 0.15s;
}

.tab-btn:hover {
  color: var(--color-text);
}

.tab-btn.active {
  border-bottom-color: var(--color-primary);
  color: var(--color-primary);
  font-weight: 600;
}

/* ─── Flash Toast ─── */
.toast-stack {
  bottom: auto;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  left: auto;
  padding: 1rem;
  position: fixed;
  right: 1.25rem;
  top: 1.25rem;
  z-index: 9999;
}

.toast-item {
  align-items: flex-start;
  animation: toast-in 0.22s cubic-bezier(0.21, 1.02, 0.73, 1) both;
  background: white;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.14);
  display: flex;
  font-size: 0.95rem;
  gap: 0.65rem;
  max-width: 380px;
  min-width: 260px;
  padding: 0.9rem 1rem;
}

.toast-success {
  border-right: 4px solid var(--color-primary);
}

.toast-error {
  border-right: 4px solid var(--color-danger);
}

.toast-success i:first-child {
  color: var(--color-primary);
  flex-shrink: 0;
  font-size: 1.1rem;
  margin-top: 0.05rem;
}

.toast-error i:first-child {
  color: var(--color-danger);
  flex-shrink: 0;
  font-size: 1.1rem;
  margin-top: 0.05rem;
}

.toast-item span {
  flex: 1;
  line-height: 1.5;
}

.toast-close {
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  flex-shrink: 0;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0;
}

.toast-close:hover {
  color: var(--color-text);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(-1rem); }
  to   { opacity: 1; transform: translateX(0); }
}
