/* ============================================================
   STEUER-PORTAL & ADMIN CRM — Simplified portal styles
   ============================================================ */

/* ─── Base ─── */
.portal-container {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg);
}

.portal-loading {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 60vh; gap: var(--space-md); color: var(--gray-400); font-size: 0.875rem;
}
.portal-loading__spinner {
  width: 32px; height: 32px; border: 2.5px solid var(--gray-200);
  border-top-color: var(--blue-600); border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeUp { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }

.portal-error { color: #dc2626; font-size: 0.875rem; padding: var(--space-lg); text-align: center; }

.portal-toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(100px);
  background: var(--blue-900); color: var(--white); padding: 0.65rem 1.3rem;
  font-size: 0.8125rem; font-weight: 600; box-shadow: var(--shadow-lg);
  z-index: 9999; opacity: 0; transition: transform 0.3s, opacity 0.3s; pointer-events: none;
}
.portal-toast--show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ════════════════════════════════════════════════════════════
   LOGIN
   ════════════════════════════════════════════════════════════ */

.portal-login { display:flex; align-items:center; justify-content:center; min-height:70vh; animation:fadeUp .45s ease both; }

.portal-login__card {
  width: 100%; max-width: 440px; background: var(--white);
  border: 1px solid var(--border); padding: 2.5rem 2.25rem 2rem; text-align: center;
}
.portal-login__icon {
  width: 56px; height: 56px; margin: 0 auto var(--space-lg);
  display: flex; align-items: center; justify-content: center;
  background: var(--blue-50); border: 1px solid var(--blue-100); color: var(--blue-600);
}
.portal-login__label { font-size:.625rem; font-weight:600; letter-spacing:.14em; text-transform:uppercase; color:var(--blue-600); margin-bottom:.4rem; }
.portal-login__title { font-size:1.6rem; font-weight:700; color:var(--gray-900); letter-spacing:-.03em; margin-bottom:.5rem; }
.portal-login__sub { font-size:.8125rem; color:var(--gray-500); line-height:1.55; margin-bottom:var(--space-xl); }
.portal-login__form { text-align: left; }
.portal-login__btn { width: 100%; justify-content: center; margin-top: var(--space-sm); }
.portal-login__success { padding: var(--space-lg) 0; }
.portal-login__success-icon { font-size: 2.5rem; margin-bottom: var(--space-md); }
.portal-login__success h3 { font-size: 1.2rem; margin-bottom: .5rem; color: var(--gray-900); }
.portal-login__success p { font-size: .875rem; color: var(--gray-500); margin-bottom: var(--space-lg); }
.portal-login__error { color: #dc2626; font-size: .8125rem; margin-top: var(--space-md); text-align: center; }
.portal-login__footer {
  display:flex; align-items:center; justify-content:center; gap:.4rem;
  margin-top:var(--space-xl); padding-top:var(--space-md); border-top:1px solid var(--border);
  font-size:.6875rem; color:var(--gray-400);
}

/* ════════════════════════════════════════════════════════════
   SIMPLIFIED PORTAL (sp__ namespace)
   ════════════════════════════════════════════════════════════ */

.sp { animation: fadeUp 0.4s ease both; }

/* Header */
.sp__header {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-lg); padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--border); margin-bottom: var(--space-xl);
}
.sp__title { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.03em; }
.sp__subtitle { font-size: 0.8125rem; color: var(--gray-400); margin-top: 0.15rem; }
.sp__header-right { display: flex; align-items: center; gap: var(--space-md); flex-shrink: 0; }
.sp__logout { font-size: 0.75rem !important; color: var(--gray-400) !important; }

.sp__status {
  font-size: 0.625rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.3;
}
.sp__status--neu { background: #edf3f9; color: #1a4f8b; }
.sp__status--in_bearbeitung { background: #fef3c7; color: #92400e; }
.sp__status--erledigt { background: #d1fae5; color: #065f46; }
.sp__status--abgelehnt { background: #fee2e2; color: #991b1b; }

/* Compact status for year-card grid */
.sp__year-card .sp__status {
  font-size: 0.55rem;
  padding: 0.15rem 0.4rem;
  letter-spacing: 0.04em;
}

/* Overview Section */
.sp__overview { margin-bottom: var(--space-xl); }
.sp__overview-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--space-md);
}
.sp__overview-title { font-size: 0.9375rem; font-weight: 700; color: var(--gray-800); margin: 0; }
.sp__new-year { font-size: 0.75rem !important; color: var(--blue-600) !important; }

.sp__year-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--space-sm); }

.sp__year-card {
  padding: var(--space-md); background: var(--white); border: 1px solid var(--gray-100);
  cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.sp__year-card:hover { border-color: var(--blue-200); background: var(--blue-50); }
.sp__year-card--active {
  border-color: var(--blue-600); background: var(--blue-50);
  box-shadow: 0 0 0 3px rgba(26,79,139,0.08);
}
.sp__year-card-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 0.4rem; gap: 0.5rem;
}
.sp__year-card-year {
  font-size: 1rem; font-weight: 700; color: var(--gray-800);
  line-height: 1.2;
  flex-shrink: 0;
}
.sp__year-card-badges {
  display: flex; flex-direction: column; align-items: flex-end; gap: 0.25rem;
  min-width: 0;
}
.sp__year-badge {
  font-size: 0.5rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--blue-600); color: var(--white); padding: 0.1rem 0.35rem;
  line-height: 1.3;
}
.sp__year-card-bottom { display: flex; align-items: center; justify-content: space-between; font-size: 0.6875rem; color: var(--gray-400); }
.sp__year-card-docs { display: flex; align-items: center; gap: 0.25rem; }

/* Active Year Content */
.sp__active-year { animation: fadeUp 0.3s ease both; }
.sp__active-year-header {
  display: flex; align-items: center; gap: var(--space-md);
  margin-bottom: var(--space-lg); padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--gray-100);
}
.sp__year-title { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.02em; margin: 0; }

/* Welcome */
.sp__welcome {
  background: var(--blue-50); border: 1px solid var(--blue-100);
  padding: var(--space-md) var(--space-lg); margin-bottom: var(--space-xl);
  font-size: 0.875rem; color: var(--gray-700); line-height: 1.6;
}
.sp__welcome strong { color: var(--blue-600); }

/* Success banner (submitted state) */
.sp__success-banner {
  display: flex; align-items: flex-start; gap: var(--space-md);
  padding: var(--space-lg); background: #f0fdf4; border: 1px solid #bbf7d0;
  margin-bottom: var(--space-xl);
}
.sp__success-icon { font-size: 1.5rem; flex-shrink: 0; }
.sp__success-banner strong { display: block; color: #065f46; margin-bottom: 0.2rem; }
.sp__success-banner p { font-size: 0.8125rem; color: #059669; margin: 0; }

/* ─── BIG UPLOAD ZONE ─── */
.sp__upload-section { margin-bottom: var(--space-xl); }

.sp__dropzone {
  border: 2px dashed var(--gray-200); padding: var(--space-3xl) var(--space-lg);
  text-align: center; cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.sp__dropzone:hover {
  border-color: var(--blue-300); background: var(--blue-50);
}
.sp__dropzone--active {
  border-color: var(--blue-600); background: var(--blue-50);
  border-style: solid; box-shadow: 0 0 0 4px rgba(26,79,139,0.08);
}

.sp__dropzone-content { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.sp__dropzone-icon { color: var(--gray-300); margin-bottom: var(--space-sm); }
.sp__dropzone-title { font-size: 1rem; font-weight: 600; color: var(--gray-700); margin: 0; }
.sp__dropzone-sub { font-size: 0.8125rem; color: var(--gray-400); margin: 0; }
.sp__dropzone-buttons { display: flex; gap: var(--space-sm); margin-top: var(--space-md); }
.sp__dropzone-hint { font-size: 0.6875rem; color: var(--gray-400); margin-top: var(--space-sm); }

.sp__upload-btn { cursor: pointer; }

/* Progress */
.sp__progress { display: flex; align-items: center; gap: var(--space-md); padding: var(--space-md) 0; }
.sp__progress-bar { flex: 1; height: 6px; background: var(--gray-100); overflow: hidden; border-radius: 3px; }
.sp__progress-fill {
  height: 100%; background: var(--blue-600); border-radius: 3px;
  transition: width 0.3s ease;
}
.sp__progress-text { font-size: 0.75rem; color: var(--gray-500); white-space: nowrap; }

/* ─── Sections ─── */
.sp__section { margin-bottom: var(--space-xl); }
.sp__section-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: var(--space-md); }
.sp__section-title { font-size: 1rem; font-weight: 700; color: var(--gray-800); margin: 0; }
.sp__section-hint { font-size: 0.6875rem; color: var(--gray-400); }

/* ─── File list ─── */
.sp__files { display: flex; flex-direction: column; gap: 0.35rem; }
.sp__no-files { font-size: 0.8125rem; color: var(--gray-400); }

.sp__file {
  display: flex; align-items: center; gap: var(--space-sm);
  padding: 0.55rem 0.75rem; background: var(--gray-50); border: 1px solid var(--gray-100);
  transition: background 0.15s;
}
.sp__file:hover { background: var(--white); }
.sp__file-icon { font-size: 1rem; flex-shrink: 0; }
.sp__file-info { flex: 1; min-width: 0; }
.sp__file-name {
  display: block; font-size: 0.8125rem; font-weight: 600; color: var(--gray-800);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sp__file-meta { font-size: 0.6875rem; color: var(--gray-400); }
.sp__file-delete {
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: var(--gray-400); cursor: pointer; background: none; border: none; flex-shrink: 0;
  transition: color 0.15s, background 0.15s;
}
.sp__file-delete:hover { color: #dc2626; background: #fee2e2; }

/* ─── Checklist ─── */
.sp__checklist-section { background: var(--gray-50); border: 1px solid var(--gray-100); padding: var(--space-lg); }
.sp__checklist-section .sp__section-header { margin-bottom: var(--space-sm); }

.sp__checklist-group { margin-top: var(--space-md); }
.sp__checklist-group:first-of-type { margin-top: 0; }

.sp__checklist-group-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--blue-700);
  margin: 0 0 var(--space-sm);
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--gray-200);
}

.sp__checklist { display: flex; flex-direction: column; gap: 0.2rem; }

.sp__check-item {
  display: flex; align-items: flex-start; gap: 0.5rem; cursor: pointer;
  font-size: 0.8125rem; color: var(--gray-700); padding: 0.4rem 0;
  line-height: 1.5;
}
.sp__check-item:hover { color: var(--gray-900); }

.sp__check-nr {
  flex-shrink: 0;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--gray-500);
  min-width: 1.5rem;
}

.sp__check-label { flex: 1; }

.sp__checkbox {
  accent-color: var(--blue-600);
  width: 16px; height: 16px;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.sp__check-item:has(:checked) .sp__check-label,
.sp__check-item:has(:checked) .sp__check-nr {
  color: var(--gray-400);
  text-decoration: line-through;
}

.sp__check-item:has(:checked) .sp__check-badge {
  opacity: 0.3;
  text-decoration: line-through;
}

.sp__check-item--important {
  background: linear-gradient(90deg, rgba(220, 38, 38, 0.05), transparent 60%);
  border-left: 3px solid #dc2626;
  padding-left: 0.6rem !important;
  margin-left: -0.6rem;
}

.sp__check-item--important .sp__check-nr { color: #dc2626; }
.sp__check-item--important .sp__check-label { color: var(--gray-900); font-weight: 500; }

.sp__check-badge {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.1rem 0.45rem;
  background: #dc2626;
  color: #fff;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  vertical-align: 1px;
}

/* ─── Personal info form grid ─── */
.sp__form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); }
.sp__form-group--full { grid-column: 1 / -1; }

/* ─── DSGVO Notice ─── */
.sp__dsgvo-notice {
  display: flex; align-items: center; gap: 0.5rem;
  padding: var(--space-md) var(--space-lg); margin-top: var(--space-lg);
  background: var(--gray-50); border: 1px solid var(--gray-100);
  font-size: 0.6875rem; color: var(--gray-400); line-height: 1.5;
}

/* ════════════════════════════════════════════════════════════
   ADMIN CRM — Premium Dashboard
   ════════════════════════════════════════════════════════════ */

/* Login */
.admin-login {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; background: var(--blue-950); padding: var(--space-lg);
}
.admin-login__card {
  width: 100%; max-width: 420px; background: var(--white);
  padding: 2.5rem 2.25rem 2rem; text-align: center;
  animation: fadeUp .45s ease both;
}

/* Layout */
.admin-dash {
  display: grid; grid-template-columns: 380px 1fr;
  min-height: 100vh; background: var(--gray-50);
}

/* ── Sidebar ── */
.admin-dash__sidebar {
  background: var(--white); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; overflow: hidden;
}
.admin-dash__sidebar-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem var(--space-lg);
  background: var(--blue-950); color: var(--white);
}
.admin-dash__brand strong {
  font-size: 1rem; display: block; color: var(--white);
}
.admin-dash__user {
  font-size: 0.6875rem; color: rgba(255,255,255,0.45);
  font-weight: 500; margin-top: 0.1rem;
}
.admin-dash__sidebar-head .btn--ghost {
  color: rgba(255,255,255,0.5); font-size: 0.6875rem;
}
.admin-dash__sidebar-head .btn--ghost:hover { color: var(--white); }
.admin-dash__sidebar-head .btn--ghost::after { color: rgba(255,255,255,0.3); }

/* ── Filters ── */
.admin-filters {
  display: flex; gap: 0; padding: 0;
  border-bottom: 1px solid var(--border); background: var(--gray-50);
}
.admin-filter {
  flex: 1; padding: 0.65rem 0.25rem; font-size: 0.5625rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--gray-400); text-align: center;
  background: none; border: none; border-bottom: 2px solid transparent;
  cursor: pointer; font-family: var(--font);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.admin-filter:hover { color: var(--gray-700); background: var(--white); }
.admin-filter--active {
  color: var(--blue-600); background: var(--white);
  border-bottom-color: var(--blue-600);
}

/* ── List ── */
.admin-list { flex: 1; overflow-y: auto; }
.admin-list__item {
  padding: 0.85rem var(--space-lg); border-bottom: 1px solid var(--gray-100);
  cursor: pointer; transition: background 0.15s; border-left: 3px solid transparent;
}
.admin-list__item:hover { background: var(--blue-50); }
.admin-list__item--active {
  background: var(--blue-50); border-left-color: var(--blue-600);
}
.admin-list__item-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.35rem;
}
.admin-list__name { font-size: 0.875rem; font-weight: 600; color: var(--gray-800); }
.admin-list__status {
  font-size: 0.5625rem; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; padding: 0.15rem 0.45rem;
}
.admin-list__item-bottom {
  display: flex; gap: var(--space-md); font-size: 0.6875rem; color: var(--gray-400);
}
.admin-list__empty {
  text-align: center; padding: var(--space-xl); font-size: 0.85rem; color: var(--gray-400);
}

/* ── Stats bar ── */
.admin-dash__stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border); background: var(--white);
}
.admin-stat {
  text-align: center; padding: 0.75rem 0.35rem;
  border-right: 1px solid var(--gray-100);
}
.admin-stat:last-child { border-right: none; }
.admin-stat__val {
  display: block; font-size: 1.4rem; font-weight: 700;
  color: var(--gray-800); line-height: 1;
}
.admin-stat__label {
  font-size: 0.5625rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--gray-400); margin-top: 0.25rem;
  display: block;
}

/* ── Detail panel ── */
.admin-dash__detail {
  overflow-y: auto; padding: var(--space-xl) 2.25rem;
  background: var(--gray-50);
}
.admin-detail__empty {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; min-height: 60vh; gap: var(--space-md);
  color: var(--gray-300); font-size: 0.875rem;
}

/* Detail header */
.admin-detail__header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--space-lg); padding: var(--space-lg) 1.5rem;
  background: var(--white); border: 1px solid var(--border);
  margin-bottom: var(--space-lg);
}
.admin-detail__name {
  font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; margin: 0;
}
.admin-detail__email {
  font-size: 0.8125rem; color: var(--gray-400); margin-top: 0.15rem;
}
.admin-detail__status-group {
  display: flex; gap: var(--space-sm); align-items: center; flex-shrink: 0;
}
.admin-status-select {
  min-width: 160px; font-size: 0.8125rem; padding: 0.45rem 0.6rem;
  border: 1px solid var(--border); background: var(--white);
  font-family: var(--font); color: var(--gray-800);
}
.btn--sm { padding: 0.45rem 0.85rem; font-size: 0.75rem; }

/* Detail sections */
.admin-detail__grid {
  display: grid; grid-template-columns: 1fr; gap: var(--space-lg);
}
.admin-detail__section {
  background: var(--white); border: 1px solid var(--border);
  padding: var(--space-lg) 1.5rem;
}
.admin-detail__section-title {
  font-size: 0.625rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--blue-600);
  margin-bottom: var(--space-md); padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--gray-100);
}
.admin-detail__fields { display: flex; flex-direction: column; gap: 0; }
.admin-field {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.55rem 0; border-bottom: 1px solid var(--gray-100);
  font-size: 0.8125rem;
}
.admin-field:last-child { border-bottom: none; }
.admin-field__label { color: var(--gray-400); font-weight: 500; }
.admin-field__value { color: var(--gray-800); font-weight: 600; text-align: right; }

/* Notes */
.admin-detail__notes {
  font-size: 0.875rem; color: var(--gray-700); line-height: 1.6;
  background: var(--gray-50); padding: var(--space-md);
  border: 1px solid var(--gray-100); white-space: pre-wrap;
}

/* Documents */
.admin-doc-list { display: flex; flex-direction: column; gap: 0.4rem; }
.admin-doc {
  display: flex; align-items: center; gap: var(--space-sm);
  padding: 0.65rem 0.85rem; background: var(--gray-50);
  border: 1px solid var(--gray-100); transition: all 0.15s;
}
.admin-doc:hover {
  background: var(--blue-50); border-color: var(--blue-200);
  transform: translateX(2px);
}
.admin-doc__icon { font-size: 1.1rem; flex-shrink: 0; }
.admin-doc__info { flex: 1; min-width: 0; }
.admin-doc__name {
  display: block; font-size: 0.8125rem; font-weight: 600;
  color: var(--gray-800); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.admin-doc__meta { font-size: 0.6875rem; color: var(--gray-400); }
.admin-download-btn { flex-shrink: 0; }

/* Footer */
.admin-detail__footer {
  margin-top: var(--space-lg); padding: var(--space-md) 1.5rem;
  background: var(--white); border: 1px solid var(--border);
  display: flex; gap: var(--space-lg); flex-wrap: wrap;
}
.admin-detail__timestamp { font-size: 0.6875rem; color: var(--gray-400); }

/* ════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
  .admin-dash { grid-template-columns: 1fr; }
  .admin-dash__sidebar { max-height: 50vh; }
}

@media (max-width: 640px) {
  .portal-container { padding: var(--space-lg) var(--space-md); }
  .sp__header { flex-direction: column; align-items: flex-start; }
  .sp__header-right { width: 100%; justify-content: space-between; }
  .sp__form-grid { grid-template-columns: 1fr; }
  .sp__checklist { grid-template-columns: 1fr; }
  .sp__dropzone { padding: var(--space-xl) var(--space-md); }
  .sp__dropzone-buttons { flex-direction: column; width: 100%; }
  .sp__dropzone-buttons .btn { width: 100%; justify-content: center; }
  .admin-detail__header { flex-direction: column; }
  .admin-detail__status-group { width: 100%; }
  .admin-status-select { flex: 1; }
  .admin-dash__detail { padding: var(--space-lg) var(--space-md); }
}

@media (min-width: 641px) {
  .sp__camera-btn { display: none !important; }
}

/* ═════════════════════════════════════════════════════════
   PERSONAL INFO — LOCKED / EDITING STATES
   ═════════════════════════════════════════════════════════ */

.sp__info {
  margin-bottom: var(--space-xl);
  padding: var(--space-lg);
  border: 1px solid var(--gray-200);
  background: var(--white);
  transition: background var(--dur-fast), border-color var(--dur-fast);
}

.sp__info--locked {
  background: var(--gray-50);
  border-color: var(--gray-200);
}

.sp__info--collapsed {
  padding: 0;
  background: var(--gray-50);
}

.sp__info--collapsed .sp__info-toggle {
  padding: 1rem 1.25rem;
  min-height: 58px;
}

/* Toggle header — acts as a button spanning the whole section width */
.sp__info-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: 0 0 var(--space-sm);
  background: transparent;
  border: 0;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  color: var(--gray-800);
  transition: color var(--dur-fast);
}

.sp__info--collapsed .sp__info-toggle { padding-bottom: 0; }

.sp__info-toggle:hover { color: var(--blue-700); }

.sp__info-toggle:focus-visible {
  outline: 2px solid var(--blue-500);
  outline-offset: 2px;
}

.sp__info-toggle-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex: 1;
}

.sp__info-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--gray-900);
  letter-spacing: -0.01em;
  flex-shrink: 0;
}

.sp__info-preview {
  font-size: 0.8125rem;
  color: var(--gray-500);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-left: 0.75rem;
  margin-left: 0.25rem;
  border-left: 1px solid var(--gray-300);
}

.sp__info-toggle-right {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  color: var(--gray-500);
}

.sp__info-toggle-hint {
  font-size: 0.75rem;
  font-weight: 500;
}

.sp__info-body {
  padding-top: var(--space-md);
  border-top: 1px solid var(--gray-200);
  margin-top: var(--space-sm);
}

.sp__info--editing {
  background: var(--white);
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(26, 79, 139, 0.08);
}

.sp__info-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  background: #059669;
  color: #fff;
  font-size: 0.8rem;
  border-radius: 3px;
  flex-shrink: 0;
}

.sp__info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.sp__info-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.6rem 0.8rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
}

.sp__info-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray-500);
}

.sp__info-value {
  font-size: 0.9375rem;
  color: var(--gray-900);
  font-weight: 500;
  word-break: break-word;
}

.sp__info-value em {
  font-style: normal;
  color: var(--gray-400);
}

.sp__info-notes {
  margin-top: var(--space-md);
  padding: 0.7rem 0.9rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
}

.sp__info-notes p {
  margin: 0.3rem 0 0;
  font-size: 0.875rem;
  color: var(--gray-800);
  line-height: 1.55;
  white-space: pre-wrap;
}

.sp__info-actions {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

@media (max-width: 640px) {
  .sp__info-grid { grid-template-columns: 1fr; }
}

/* ═════════════════════════════════════════════════════════
   FILE PREVIEW MODAL
   ═════════════════════════════════════════════════════════ */

.sp__file {
  cursor: pointer;
  transition: background var(--dur-fast), border-color var(--dur-fast);
}

.sp__file:hover {
  background: var(--gray-50);
  border-color: var(--blue-500);
}

.sp__file:focus-visible {
  outline: 2px solid var(--blue-500);
  outline-offset: -2px;
}

.sp__preview {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
}

.sp__preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13, 31, 60, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.sp__preview-box {
  position: relative;
  background: var(--white);
  width: min(1100px, 100%);
  height: min(90vh, 900px);
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.sp__preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: 0.75rem 1rem;
  background: var(--blue-900);
  color: var(--white);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sp__preview-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--white);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sp__preview-actions {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}

.sp__preview-open,
.sp__preview-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--white);
  cursor: pointer;
  transition: background var(--dur-fast);
}

.sp__preview-open:hover,
.sp__preview-close:hover {
  background: rgba(255, 255, 255, 0.12);
}

.sp__preview-close {
  font-size: 1.3rem;
  line-height: 1;
  font-weight: 300;
}

.sp__preview-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-100);
  overflow: auto;
}

.sp__preview-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--white);
}

.sp__preview-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.sp__preview-error,
.sp__preview-fallback {
  padding: var(--space-lg);
  text-align: center;
  color: var(--gray-600);
  font-size: 0.875rem;
}

.sp__preview-fallback button { margin-top: var(--space-md); }

