:root {
  --bg: #0f1419;
  --surface: #1a2332;
  --surface-2: #243044;
  --border: #2d3a4f;
  --text: #e8edf4;
  --text-muted: #94a3b8;
  --primary: #6366f1;
  --primary-hover: #818cf8;
  --secondary: #64748b;
  --danger: #ef4444;
  --success: #22c55e;
  --warning: #f59e0b;
  --radius: 10px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 20, 25, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  gap: 1rem;
}

.logo {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

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

.main-nav {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.main-nav a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  font-size: 0.875rem;
  transition: background 0.15s, color 0.15s;
}

.main-nav a:hover {
  background: var(--surface-2);
  color: var(--text);
}

.nav-toggle {
  display: none;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.4rem 0.65rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.1rem;
}

/* Hero */
.hero {
  padding: 2.5rem 0 1.5rem;
  text-align: center;
}

.hero-logo {
  display: block;
  margin: 0 auto 1.5rem;
  height: auto;
  width: min(14rem, 75vw);
  max-width: 100%;
}

.hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin: 0 0 0.75rem;
  background: linear-gradient(135deg, #e8edf4, #a5b4fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 1.25rem;
  font-size: 1.05rem;
}

.hero-stats {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.stat-badge {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Sections */
.practice-section {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}

.practice-section h2 {
  margin: 0 0 0.35rem;
  font-size: 1.5rem;
}

.section-desc {
  color: var(--text-muted);
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.full-width {
  grid-column: 1 / -1;
}

/* Forms */
.form-group {
  margin-bottom: 0.25rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
}

fieldset.form-group {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin: 0;
}

fieldset legend {
  padding: 0 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="search"],
input[type="tel"],
input[type="color"],
textarea,
select {
  width: 100%;
  padding: 0.6rem 0.85rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

input:disabled,
input[readonly] {
  opacity: 0.6;
  cursor: not-allowed;
}

textarea {
  resize: vertical;
  min-height: 90px;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 3rem;
}

.password-toggle {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 0.15s, background-color 0.15s;
}

.password-toggle:hover {
  color: var(--text);
  background: var(--surface-2);
}

.password-toggle:focus {
  outline: none;
}

.password-toggle:focus-visible {
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.45);
}

.password-toggle-icon {
  width: 1.125rem;
  height: 1.125rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.password-toggle[aria-pressed="true"] {
  color: var(--primary-hover);
}

.phone-input-unified {
  display: flex;
  align-items: stretch;
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: visible;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.phone-input-unified:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.phone-code-picker {
  position: relative;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  z-index: 2;
}

.phone-code-btn {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  height: 100%;
  min-height: 2.65rem;
  padding: 0 0.7rem;
  margin: 0;
  border: none;
  background: var(--surface-2);
  border-radius: 8px 0 0 8px;
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  transition: background-color 0.15s;
}

.phone-code-btn:hover {
  background: var(--border);
}

.phone-code-btn:focus {
  outline: none;
}

.phone-code-btn:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(99, 102, 241, 0.5);
}

.phone-code-btn[aria-expanded="true"] .phone-chevron {
  transform: rotate(180deg);
}

.phone-dial-display {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1;
  user-select: none;
}

.phone-chevron {
  width: 0.8rem;
  height: 0.8rem;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 0.15s;
}

.phone-country-list {
  position: absolute;
  left: 0;
  min-width: 15rem;
  max-height: 14rem;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  z-index: 100;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.phone-country-list.open-down {
  top: calc(100% + 0.35rem);
  bottom: auto;
}

.phone-country-list.open-up {
  bottom: calc(100% + 0.35rem);
  top: auto;
}

.phone-country-list::-webkit-scrollbar {
  width: 6px;
}

.phone-country-list::-webkit-scrollbar-track {
  background: transparent;
}

.phone-country-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 999px;
}

.phone-country-list::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

.phone-country-option {
  padding: 0.5rem 0.65rem;
  border-radius: 6px;
  font-size: 0.875rem;
  color: var(--text);
  cursor: pointer;
  transition: background-color 0.12s, color 0.12s;
}

.phone-country-option:hover,
.phone-country-option:focus {
  background: var(--surface-2);
  outline: none;
}

.phone-country-option.is-selected {
  background: rgba(99, 102, 241, 0.18);
  color: var(--primary-hover);
  font-weight: 500;
}

.phone-number-input {
  flex: 1;
  min-width: 0;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  border-radius: 0 !important;
  padding: 0.65rem 0.85rem;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
}

.phone-number-input:focus {
  outline: none;
  border: none !important;
  box-shadow: none !important;
}

.phone-number-input::placeholder {
  color: var(--text-muted);
  opacity: 0.75;
}

.phone-input-unified.is-invalid {
  border-color: var(--danger);
}

.phone-input-unified.is-invalid:focus-within {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25);
}

.phone-input-unified.is-valid {
  border-color: var(--success);
}

.phone-feedback {
  margin: 0.4rem 0 0;
  font-size: 0.8rem;
}

.phone-feedback.hint {
  color: var(--text-muted);
}

.phone-feedback.valid {
  color: var(--success);
}

.phone-feedback.invalid {
  color: var(--danger);
}

.radio-group,
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.radio-group label,
.checkbox-group label,
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  color: var(--text);
  font-size: 0.95rem;
}

.checkbox-row {
  margin-bottom: 0.75rem;
}

.selection-output,
.action-output {
  margin-top: 0.6rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg);
  border-radius: 6px;
  font-size: 0.875rem;
  color: var(--primary-hover);
  border: 1px dashed var(--border);
  display: block;
}

.inline-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.inline-row input {
  flex: 1;
  min-width: 160px;
}

.inline-row output {
  font-weight: 600;
  color: var(--primary-hover);
}

.input-output-result {
  display: block;
  margin-top: 0.5rem;
  width: 100%;
  box-sizing: border-box;
}

.autocomplete-field {
  position: relative;
}

.autocomplete-input-wrap {
  position: relative;
}

.autocomplete-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.35rem);
  z-index: 50;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  max-height: 10rem;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.autocomplete-suggestions li {
  padding: 0.5rem 0.65rem;
  border-radius: 6px;
  font-size: 0.875rem;
  color: var(--text);
  cursor: pointer;
  transition: background 0.12s;
}

.autocomplete-suggestions li:hover,
.autocomplete-suggestions li:focus {
  background: var(--surface-2);
  outline: none;
}

.autocomplete-field .selection-output {
  margin-top: 0.5rem;
}

/* Toggle switch */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0.85rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.toggle-row-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
}

.toggle-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.toggle-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  pointer-events: none;
}

.toggle-track {
  display: block;
  width: 46px;
  height: 26px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  position: relative;
  transition: background 0.2s, border-color 0.2s;
}

.toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease;
}

.toggle-input:checked + .toggle-track {
  background: var(--primary);
  border-color: var(--primary);
}

.toggle-input:checked + .toggle-track .toggle-thumb {
  transform: translateX(20px);
}

.toggle-input:focus-visible + .toggle-track {
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.35);
}

.toggle-control:hover .toggle-track {
  border-color: var(--text-muted);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

a.btn {
  text-decoration: none;
}

.btn:active:not(:disabled) {
  transform: scale(0.98);
}

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

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

.btn-secondary {
  background: var(--secondary);
  color: white;
}

.btn-secondary:hover:not(:disabled) {
  background: #475569;
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover:not(:disabled) {
  background: #dc2626;
}

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

.btn-outline:hover:not(:disabled) {
  background: var(--surface-2);
  border-color: var(--text-muted);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.info-demo-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.info-box {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  min-width: 200px;
}

.info-box-label {
  font-size: 0.9rem;
  color: var(--text);
}

.info-btn {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  border: 1px solid var(--primary);
  background: transparent;
  color: var(--primary-light);
  font-size: 0.8rem;
  font-weight: 700;
  font-style: italic;
  font-family: Georgia, "Times New Roman", serif;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
}

.info-btn:hover,
.info-btn:focus-visible {
  background: rgba(99, 102, 241, 0.15);
  outline: none;
}

.info-popup {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  z-index: 50;
  min-width: 220px;
  max-width: 280px;
  padding: 0.75rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.info-popup[hidden] {
  display: none;
}

.info-popup strong {
  color: var(--primary-light);
}

.sub-page {
  padding: 3rem 0 2rem;
}

.sub-page-card {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

.sub-page-badge {
  display: inline-block;
  margin: 0 0 0.75rem;
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--success);
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  border-radius: 999px;
}

.sub-page-card h1 {
  margin: 0 0 0.75rem;
  font-size: 1.75rem;
}

.sub-page-text {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.sub-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.link-row a {
  color: var(--primary-hover);
  font-size: 0.9rem;
}

.link-row a:hover {
  text-decoration: underline;
}

.form-message {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
}

.form-message.success {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.form-message.error {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.login-preview {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border: 1px dashed var(--border);
  border-radius: 8px;
  font-size: 0.875rem;
}

.login-preview p {
  margin: 0.25rem 0;
  color: var(--text-muted);
}

.login-preview span {
  color: var(--primary-hover);
  font-weight: 500;
}

.form-actions {
  margin-top: 0.25rem;
}

.form-actions .btn {
  flex: 0 0 auto;
}

/* Tables */
.table-controls {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.table-controls input {
  flex: 1;
  min-width: 180px;
  padding: 0.5rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
}

.table-wrapper {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 360px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.table-wrapper thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--bg);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th,
td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--bg);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

tbody tr:hover {
  background: rgba(99, 102, 241, 0.06);
}

.pagination {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

/* Dynamic */
.hidden-box {
  margin-top: 0.75rem;
  padding: 1rem;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid var(--primary);
  border-radius: 8px;
  color: var(--primary-hover);
}

.dynamic-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
}

.dynamic-list li {
  padding: 0.5rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 0.4rem;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0.75rem 0;
}

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

.loaded-data {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.practice-iframe {
  width: 100%;
  height: 360px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  margin-top: 0.5rem;
  display: block;
}

.hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0.35rem 0 0;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.25rem;
}

.tab-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  border-radius: 6px 6px 0 0;
  transition: color 0.15s, background 0.15s;
}

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

.tab-btn.active {
  color: var(--primary-hover);
  background: rgba(99, 102, 241, 0.12);
  font-weight: 600;
}

.tab-panel {
  padding: 0.75rem;
  background: var(--bg);
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 0.9rem;
}
/* Drop zone */
.file-upload-clear {
  margin-top: 0.5rem;
}

.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  color: var(--text-muted);
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.08);
}

.drop-zone p {
  margin: 0;
  pointer-events: none;
}

progress {
  width: 100%;
  height: 12px;
  border-radius: 6px;
  accent-color: var(--primary);
}

.progress-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
  width: 100%;
}

.progress-controls output {
  font-weight: 600;
  color: var(--primary-hover);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1rem;
}

.modal-overlay:not([hidden]) {
  display: flex;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  max-width: 420px;
  width: 100%;
  position: relative;
  box-shadow: var(--shadow);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-wide {
  max-width: 640px;
}

.modal-desc {
  color: var(--text-muted);
  margin: 0 0 1rem;
  font-size: 0.9rem;
}

#role-entries-container {
  margin-bottom: 0.75rem;
}

.role-entry {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 0.75rem;
}

.role-entry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.role-entry-header strong {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.role-entry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}

.role-entry-grid .form-group {
  margin: 0;
}

.role-entry-grid label {
  font-size: 0.75rem;
  margin-bottom: 0.3rem;
}

.role-entry-grid input,
.role-entry-grid select {
  width: 100%;
  padding: 0.5rem 0.65rem;
  font-size: 0.875rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  box-sizing: border-box;
}

#add-role-entry-btn {
  margin-bottom: 1rem;
}

.modal h3 {
  margin: 0 0 0.75rem;
}

.modal p {
  color: var(--text-muted);
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
}

.modal-actions {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem;
}

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

/* Toast */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
  font-size: 0.9rem;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Footer */
.site-footer {
  margin-top: 2rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-brand {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  opacity: 0.85;
}

.footer-brand strong {
  color: var(--primary-light);
}

/* Responsive */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 0.75rem;
  }

  .main-nav.open {
    display: flex;
  }

  .site-header .container {
    position: relative;
  }
}
