/* ========================================
   PLATFORMA DE ADMITERE
   Auth, formulare, dashboard candidat & comisie
   Extinde variabilele din admitere.css
   ======================================== */

/* Etichetă vizibilă doar pentru cititoarele de ecran */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Utilizator autentificat în navbar --- */
.nav-user {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.3rem 0.85rem 0.3rem 0.35rem;
  background: var(--bg-alt);
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.2s ease;
}

a.nav-user:hover {
  background: var(--border);
}

.user-avatar {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
}

.user-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.user-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.user-role {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* --- Pagini de autentificare --- */
.auth-page {
  background: var(--bg);
  min-height: calc(100vh - 76px);
  display: flex;
  align-items: center;
  padding: 3rem 1.5rem 4rem;
}

.auth-shell {
  width: 100%;
  max-width: 440px;
  margin-inline: auto;
}

.auth-shell-wide {
  max-width: 560px;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow);
}

.auth-card-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.auth-card-header h1 {
  font-size: 1.75rem;
  line-height: 1.3;
  margin: 0 0 0.35rem;
  color: var(--primary);
}

.auth-card-header p {
  margin: 0;
  color: var(--text-light);
  font-size: 0.95rem;
}

.auth-card-footer {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-light);
  text-align: center;
  font-size: 0.925rem;
  color: var(--text-light);
}

.auth-card-footer a {
  font-weight: 600;
  color: var(--primary);
}

/* --- Formulare (partajate) --- */
.form-field {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.15rem;
}

.form-field label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 0.4rem;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  /* controalele de formular nu moștenesc automat fontul paginii */
  font-family: inherit;
  font-size: 0.975rem;
  line-height: 1.4;
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-field textarea {
  min-height: 120px;
  resize: vertical;
}

.form-field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #5C554E 50%),
                    linear-gradient(135deg, #5C554E 50%, transparent 50%);
  background-position: right 1.1rem center, right 0.85rem center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 2.4rem;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(113, 105, 184, 0.14);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.form-hint {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Coloane egale, aliniate pe aceeași linie de bază */
.form-grid {
  display: grid;
  gap: 0 1rem;
  align-items: start;
}

.form-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.25rem 0 1.5rem;
  font-size: 0.9rem;
}

.form-inline-start {
  justify-content: flex-start;
}

.form-inline-link {
  flex: 0 0 auto;
  color: var(--primary);
  font-weight: 500;
  white-space: nowrap;
}

/* Checkbox aliniat cu prima linie de text, nu centrat pe tot blocul */
.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  cursor: pointer;
  color: var(--text-light);
  line-height: 1.5;
}

.checkbox input[type="checkbox"] {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin: 0;
  margin-top: 0.15em;
  accent-color: var(--primary);
  cursor: pointer;
}

.btn-block {
  display: flex;
  width: 100%;
  padding: 0.9rem 1.5rem;
  font-size: 1rem;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
}

.form-actions-split {
  justify-content: space-between;
}

.fieldset {
  border: none;
  margin: 0 0 1.75rem;
  padding: 0;
}

.fieldset-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1.15rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--primary);
}

.fieldset-title .step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 0.7rem;
}

/* --- Alegerea calificării --- */
.optiuni {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.optiune {
  position: relative;
  display: block;
  cursor: pointer;
}

.optiune input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
}

.optiune-body {
  display: block;
  height: 100%;
  padding: 1.15rem 1.25rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.optiune input:checked + .optiune-body {
  border-color: var(--accent);
  background: var(--surface-warm);
  box-shadow: var(--shadow-sm);
}

.optiune input:focus-visible + .optiune-body {
  box-shadow: 0 0 0 3px rgba(113, 105, 184, 0.2);
}

.optiune-domeniu {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.optiune-titlu {
  display: block;
  margin: 0.35rem 0 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
}

.optiune-meta {
  display: block;
  font-size: 0.825rem;
  color: var(--text-muted);
}

/* --- Alerte --- */
.alert {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 0.925rem;
  line-height: 1.55;
}

.alert-success {
  background: #E9F1EB;
  border-color: #B2CDB9;
  color: #2E4B38;
}

.alert-danger {
  background: #F9EAEA;
  border-color: #E0BABA;
  color: #7A2E2E;
}

.alert-warning {
  background: #FBF2E2;
  border-color: #E6D2A8;
  color: #7A5A22;
}

.alert-info {
  background: var(--bg-alt);
  border-color: var(--border);
  color: var(--primary-dark);
}

.alert-list {
  margin: 0.4rem 0 0;
  padding-left: 1.15rem;
}

.alert-close {
  flex: 0 0 auto;
  background: none;
  border: none;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  color: inherit;
  opacity: 0.55;
  padding: 0;
}

.alert-close:hover {
  opacity: 1;
}

/* --- Layout dashboard --- */
.dash {
  padding: 2.5rem 0 4rem;
  background: var(--bg);
  min-height: calc(100vh - 76px);
}

.dash-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.dash-header h1 {
  margin: 0 0 0.25rem;
  font-size: 1.85rem;
  color: var(--primary);
}

.dash-header p {
  margin: 0;
  color: var(--text-light);
}

.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.panel + .panel {
  margin-top: 1.5rem;
}

.panel-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
}

.panel-header h2,
.panel-header h3 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--text);
}

.panel-body {
  padding: 1.5rem;
}

.panel-body > :last-child {
  margin-bottom: 0;
}

/* --- Badge de status --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.32rem 0.75rem;
  border-radius: 999px;
  font-size: 0.775rem;
  font-weight: 700;
  white-space: nowrap;
  border: 1px solid transparent;
}

.badge.is-draft {
  background: var(--bg-alt);
  border-color: var(--border);
  color: var(--text-light);
}

.badge.is-pending {
  background: #EAEDF6;
  border-color: #BFC7DF;
  color: #3B4A73;
}

.badge.is-warning {
  background: #FBF2E2;
  border-color: #E6D2A8;
  color: #7A5A22;
}

.badge.is-success {
  background: #E9F1EB;
  border-color: #B2CDB9;
  color: #2E4B38;
}

.badge.is-danger {
  background: #F9EAEA;
  border-color: #E0BABA;
  color: #7A2E2E;
}

/* --- Pași / progres candidat --- */
.pasi {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pas {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 0.9rem 0;
  border-bottom: 1px dashed var(--border-light);
}

.pas:last-child {
  border-bottom: none;
}

.pas-marker {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  margin-top: 0.1rem;
}

.pas.done .pas-marker {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.pas.current .pas-marker {
  border-color: var(--accent);
  color: var(--accent);
}

.pas-title {
  font-weight: 600;
  color: var(--text);
}

.pas.done .pas-title {
  color: var(--text-light);
}

.pas-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* --- Listă documente --- */
.doc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.doc-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-light);
}

.doc-row:last-child {
  border-bottom: none;
}

.doc-info {
  flex: 1 1 260px;
  min-width: 0;
}

.doc-name {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.doc-required {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9B4A4A;
}

.doc-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.doc-file {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-light);
}

.doc-file a {
  font-weight: 600;
  word-break: break-all;
}

.doc-upload {
  flex: 1 1 320px;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  justify-content: flex-end;
}

.doc-upload input[type="file"] {
  flex: 1 1 auto;
  min-width: 0;
  font-family: inherit;
  font-size: 0.85rem;
  padding: 0.45rem;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text-light);
}

.doc-upload input[type="file"]::file-selector-button {
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  margin-right: 0.6rem;
  padding: 0.4rem 0.8rem;
  border: none;
  border-radius: 999px;
  background: var(--bg-alt);
  color: var(--primary);
  cursor: pointer;
}

.btn-ghost {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-ghost:hover {
  border-color: #C99999;
  color: #9B4A4A;
  background: #FBF3F3;
}

/* --- Tabel dosare (comisie) --- */
.table-wrap {
  overflow-x: auto;
}

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

.table th,
.table td {
  padding: 0.85rem 1rem;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}

.table th {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}

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

.table td.wrap {
  white-space: normal;
  min-width: 190px;
}

/* Paginare (șablonul implicit CodeIgniter emite un <ul>) */
.pagination,
.panel-body nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.panel-body nav li a,
.panel-body nav li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-light);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

.panel-body nav li a:hover {
  border-color: var(--accent);
  color: var(--primary);
}

.panel-body nav li.active span,
.panel-body nav li[aria-current="page"] span {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.panel-body nav li.disabled span {
  opacity: 0.45;
}

.table .num {
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
}

/* --- Filtre comisie --- */
.filtre {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

.filtre input[type="search"],
.filtre select {
  padding: 0.6rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  background: var(--surface);
  color: var(--text);
}

.filtre input[type="search"]:focus,
.filtre select:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(113, 105, 184, 0.14);
}

/* --- Statistici comisie --- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.25rem;
}

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

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.2rem;
}

.stat.is-pending { border-left-color: #6B7BA8; }
.stat.is-warning { border-left-color: #C79A45; }
.stat.is-success { border-left-color: #5C8A6B; }
.stat.is-danger  { border-left-color: #B06A6A; }

/* --- Date afișate (dosar comisie) --- */
.date-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.15rem 1.5rem;
  margin: 0;
}

.date-item {
  min-width: 0;
}

.date-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.date-value {
  font-size: 0.95rem;
  color: var(--text);
  word-break: break-word;
}

/* --- Istoric --- */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline li {
  position: relative;
  padding: 0 0 1.15rem 1.5rem;
  border-left: 2px solid var(--border-light);
}

.timeline li:last-child {
  padding-bottom: 0;
  border-left-color: transparent;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-light);
  border: 2px solid var(--surface);
}

.timeline-action {
  font-weight: 600;
  font-size: 0.925rem;
  color: var(--text);
}

.timeline-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.timeline-msg {
  margin-top: 0.35rem;
  padding: 0.6rem 0.8rem;
  background: var(--bg);
  border-left: 3px solid var(--accent-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.875rem;
  color: var(--text-light);
}

/* --- Mesajul comisiei către candidat --- */
.mesaj-comisie {
  padding: 1.1rem 1.25rem;
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--accent);
  background: var(--bg-alt);
  font-size: 0.925rem;
  line-height: 1.6;
  color: var(--text-light);
}

.mesaj-comisie strong {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--text);
}

.empty {
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
}

/* --- Decizii comisie --- */
.decizii {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn-success {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.btn-success:hover {
  background: #33525F;
  border-color: #33525F;
  color: #fff;
  transform: translateY(-1px);
}

.btn-danger {
  background: #9B4A4A;
  border-color: #9B4A4A;
  color: #fff;
}

.btn-danger:hover {
  background: #843E3E;
  border-color: #843E3E;
  color: #fff;
  transform: translateY(-1px);
}

.btn-warning {
  background: #C79A45;
  border-color: #C79A45;
  color: #fff;
}

.btn-warning:hover {
  background: #B0873A;
  border-color: #B0873A;
  color: #fff;
  transform: translateY(-1px);
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .dash-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .auth-page {
    padding: 2rem 1rem 3rem;
  }

  .auth-card {
    padding: 1.75rem 1.35rem;
  }

  .form-grid-2,
  .form-grid-3,
  .optiuni {
    grid-template-columns: 1fr;
  }

  .form-inline {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .doc-upload {
    justify-content: flex-start;
  }

  .form-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .form-actions .btn {
    width: 100%;
  }

  .nav-user .user-meta {
    display: none;
  }
}

/* --- Fotografia candidatului (comisie) --- */
.foto-candidat {
  display: inline-block;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  cursor: zoom-in;
  overflow: hidden;
  line-height: 0;
}

.foto-candidat img {
  display: block;
  width: 100%;
  max-width: 220px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

/* --- Modal de vizualizare documente (comisie) --- */
.doc-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.doc-modal.open {
  display: flex;
}

.doc-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(44, 37, 34, 0.62);
  backdrop-filter: blur(2px);
}

.doc-modal-box {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.doc-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
}

.doc-modal-head h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-modal-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: 0 0 auto;
}

.doc-modal-close {
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0 0.25rem;
}

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

.doc-modal-body {
  flex: 1 1 auto;
  overflow: auto;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
}

.doc-modal-img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
}

.doc-modal-frame {
  width: 100%;
  height: 80vh;
  border: none;
  background: #fff;
}

/* --- Croppie: încadrarea fotografiei (candidat) --- */
.foto-upload {
  flex: 1 1 320px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  justify-content: flex-end;
}

.crop-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.crop-modal.open {
  display: flex;
}

.crop-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(44, 37, 34, 0.62);
}

.crop-modal-box {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 520px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 1.5rem;
}

.crop-modal-box h3 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  color: var(--primary);
}

.crop-area {
  height: 340px;
  margin-bottom: 1rem;
}

.crop-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.crop-rotate {
  display: flex;
  gap: 0.4rem;
}

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