:root { --sigce-blue:#2563eb; --sigce-ink:#172033; --sigce-soft:#f3f6fb; }
body { color: var(--sigce-ink); }
.content-wrapper { background: var(--sigce-soft); }
.card { border: 0; border-radius: 8px; box-shadow: 0 8px 24px rgba(23,32,51,.06); }
.btn { border-radius: 6px; }
.sigce-auth { background: linear-gradient(135deg,#eef4ff,#f8fafc); }
.wide-auth { width: min(920px, 94vw); }
.sigce-stat { border-radius: 8px; color: var(--sigce-ink) !important; border-left: 4px solid var(--sigce-blue); }
.sigce-stat .icon { color: rgba(37,99,235,.2); }
.template-canvas { position: relative; width: min(100%, 860px); aspect-ratio: 1.586; background: #fff; border: 1px solid #d7deea; border-radius: 8px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255,255,255,.7); }
.template-item { position: absolute; min-width: 84px; min-height: 28px; padding: 6px 8px; border: 1px dashed #2563eb; background: rgba(37,99,235,.06); cursor: move; user-select: none; border-radius: 4px; }
.template-item.photo { width: 120px; height: 140px; display: grid; place-items: center; background: #eef4ff; }
.validation-card { max-width: 560px; border-top: 5px solid var(--sigce-blue); }
.public-validation { background: #f8fafc; }
.table td, .table th { vertical-align: middle; }
.sigce-table thead th { position: sticky; top: 0; z-index: 5; background: #fff; box-shadow: inset 0 -1px 0 #dee2e6; }
.sigce-table { border-collapse: separate; border-spacing: 0; }
.sigce-wide-list .card-body { padding-left: 10px; padding-right: 10px; }
.sigce-personal-table-wrap { width: 100%; overflow-x: auto; }
.sigce-personal-table { width: 100% !important; min-width: 1320px; }
.sigce-personal-table th, .sigce-personal-table td { vertical-align: middle; }
.sigce-personal-table th:first-child, .sigce-personal-table td:first-child,
.sigce-student-table th:first-child, .sigce-student-table td:first-child { min-width: 48px; text-align: center; }
.sigce-personal-table .form-check-input, .sigce-student-table .form-check-input { position: static; float: none; margin: 0; width: 18px; height: 18px; vertical-align: middle; cursor: pointer; }
.sigce-student-table thead th:first-child, .sigce-student-table tbody td:first-child { width: 48px; min-width: 48px; padding-left: 8px; padding-right: 8px; }
.sigce-student-table thead th:first-child::before, .sigce-student-table thead th:first-child::after { display: none !important; }
.sigce-photo-thumb { width: 72px; height: 96px; object-fit: cover; border-radius: 6px; border: 1px solid #d7deea; margin: 6px 0; background: #f8fafc; }
.photo-cropper-overlay { position: fixed; inset: 0; z-index: 5000; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(15,23,42,.72); }
.photo-cropper-overlay.is-open { display: flex; }
.photo-cropper-dialog { width: min(96vw, 860px); max-height: 94vh; overflow: auto; background: #fff; border-radius: 8px; box-shadow: 0 24px 70px rgba(15,23,42,.35); }
.photo-cropper-head, .photo-cropper-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid #e5e7eb; }
.photo-cropper-actions { border-top: 1px solid #e5e7eb; border-bottom: 0; justify-content: flex-end; }
.photo-cropper-body { display: grid; grid-template-columns: minmax(240px, 380px) minmax(220px, 1fr); gap: 18px; padding: 16px; align-items: center; }
.photo-cropper-stage { display: grid; place-items: center; padding: 10px; border-radius: 8px; background: #e5e7eb; }
.photo-cropper-canvas { width: min(100%, 360px); aspect-ratio: 3 / 4; border-radius: 8px; border: 1px solid #d7deea; background: #f8fafc; cursor: grab; touch-action: none; }
.photo-cropper-canvas:active { cursor: grabbing; }
.photo-cropper-tools { min-width: 180px; }
.photo-cropper-tools label { display: block; font-weight: 600; margin-top: 8px; }
.photo-cropper-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.photo-editor-inline-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.sigce-page-actions, .sigce-action-bar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
@media (max-width: 700px) { .photo-cropper-body { grid-template-columns: 1fr; } .photo-cropper-head, .photo-cropper-actions { align-items: stretch; flex-direction: column; } .photo-cropper-actions .btn, .photo-cropper-head .btn { width: 100%; } .photo-cropper-toolbar .btn { flex: 1 1 auto; } }

@media (max-width: 767.98px) {
  body { font-size: 15px; }
  .content-wrapper > .content { padding-top: 8px !important; }
  .container-fluid { padding-left: 10px; padding-right: 10px; }
  .main-header .nav-link { min-width: 42px; text-align: center; }
  .brand-link { min-height: 52px; }
  h1.h3 { font-size: 1.35rem; line-height: 1.2; }
  h2.h5 { font-size: 1.05rem; }
  .card { border-radius: 8px; box-shadow: 0 4px 14px rgba(23,32,51,.07); }
  .card-body { padding: 14px; }
  .d-flex.justify-content-between.align-items-center { align-items: stretch !important; flex-direction: column; gap: 10px; }
  .d-flex.justify-content-between.align-items-center > div,
  .d-flex.justify-content-between.align-items-center > a,
  .d-flex.justify-content-between.align-items-center > .btn { width: 100%; }
  .d-flex.justify-content-between.align-items-center .btn { margin-bottom: 6px; }
  .btn { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: normal; }
  .btn-sm { min-height: 36px; }
  .sigce-page-actions, .sigce-action-bar { justify-content: stretch; width: 100%; }
  .sigce-page-actions .btn, .sigce-action-bar .btn { flex: 1 1 100%; width: 100%; }
  .form-control, .form-select { min-height: 44px; font-size: 16px; }
  label { font-weight: 600; margin-bottom: 4px; }
  .row.g-3, .row.g-2 { --bs-gutter-y: .75rem; }
  .dataTables_wrapper .row { gap: 8px; }
  .dataTables_wrapper .dataTables_length,
  .dataTables_wrapper .dataTables_filter,
  .dataTables_wrapper .dataTables_info,
  .dataTables_wrapper .dataTables_paginate { text-align: left !important; width: 100%; }
  .dataTables_wrapper .dataTables_filter input { width: 100% !important; margin-left: 0; margin-top: 6px; }
  .dataTables_wrapper .pagination { flex-wrap: wrap; justify-content: flex-start; gap: 4px; }
  .sigce-table { width: 100% !important; border-collapse: separate !important; border-spacing: 0 10px !important; }
  .sigce-table thead { display: none; }
  .sigce-table tbody, .sigce-table tr, .sigce-table td { display: block; width: 100%; }
  .sigce-table tr { background: #fff; border: 1px solid #dbe3ef; border-radius: 8px; box-shadow: 0 3px 10px rgba(23,32,51,.05); overflow: hidden; }
  .sigce-table tr.table-warning { background: #fff8e1; border-color: #f4d982; }
  .sigce-table td { border: 0; border-bottom: 1px solid #edf1f7; padding: 9px 12px; min-height: 40px; }
  .sigce-table td:last-child { border-bottom: 0; }
  .sigce-table td::before { content: attr(data-label); display: block; color: #64748b; font-size: .75rem; font-weight: 700; text-transform: uppercase; margin-bottom: 2px; }
  .sigce-table td:first-child::before, .sigce-table td[data-label=""]::before { display: none; }
  .sigce-table td .btn { margin: 2px 4px 2px 0; }
  .sigce-table .badge { white-space: normal; text-align: left; }
  .photo-cropper-overlay { align-items: flex-start; padding: 8px; overflow-y: auto; }
  .photo-cropper-dialog { width: 100%; max-height: none; }
  .photo-cropper-body { padding: 12px; gap: 12px; }
  .photo-cropper-stage { padding: 6px; }
  .photo-cropper-canvas { width: min(100%, 300px); }
  .photo-cropper-actions { position: sticky; bottom: 0; background: #fff; }
  .photo-editor-inline-actions { align-items: stretch; flex-direction: column; }
  .photo-editor-inline-actions .btn { width: 100%; }
  .template-canvas { min-width: 640px; }
  #canvas { touch-action: none; }
}
