:root {
  --ink: #14213d;
  --muted: #5c677d;
  --accent: #2d5ea8;
  --accent-deep: #214b87;
  --surface: rgba(255, 255, 255, 0.84);
  --line: rgba(20, 33, 61, 0.08);
  --page: linear-gradient(180deg, #f6f9ff 0%, #f1f6fb 52%, #eaf0f7 100%);
}

html {
  font-size: 15px;
  position: relative;
  min-height: 100%;
}

body {
  margin: 0;
  margin-bottom: 60px;
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background: var(--page);
}

a {
  color: var(--ink);
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus,
.form-select:focus {
  box-shadow: 0 0 0 0.2rem rgba(45, 94, 168, 0.22);
  border-color: rgba(45, 94, 168, 0.45);
}

.app-nav {
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 40px rgba(20, 33, 61, 0.08);
}

.navbar-brand {
  font-weight: 800;
  letter-spacing: 0.02em;
}

.nav-link {
  color: var(--muted);
  font-weight: 600;
}

.nav-link:hover {
  color: var(--ink);
}

.nav-auth-panel,
.nav-auth-guest {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-left: auto;
}

.nav-auth-user {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.1;
}

.nav-auth-user-name {
  font-size: 0.92rem;
  font-weight: 800;
}

.nav-auth-user-role,
.nav-auth-guest-copy {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-auth-form {
  margin: 0;
}

.nav-auth-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  padding: 0.65rem 1rem;
  border: 1px solid var(--accent);
  border-radius: 14px;
  background: linear-gradient(180deg, #3d6fbe, var(--accent));
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 18px rgba(45, 94, 168, 0.14);
}

.nav-auth-button:hover {
  color: #fff;
  border-color: var(--accent-deep);
  background: linear-gradient(180deg, #2f61ab, var(--accent-deep));
}

.nav-auth-button-ghost {
  min-width: 6.5rem;
}

.page-hero {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(239, 244, 255, 0.92));
  box-shadow: 0 18px 42px rgba(20, 33, 61, 0.07);
}

.page-back-strip {
  margin: 0.25rem 0 1rem;
}

.page-back-link {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  padding: 0.95rem 1.15rem;
  border: 1px solid rgba(20, 33, 61, 0.1);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 248, 240, 0.92));
  box-shadow: 0 12px 28px rgba(20, 33, 61, 0.06);
  text-decoration: none;
  color: var(--ink);
}

.page-back-link:hover {
  color: var(--ink);
  border-color: rgba(45, 94, 168, 0.25);
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(20, 33, 61, 0.08);
}

.page-back-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  background: rgba(45, 94, 168, 0.14);
  color: var(--accent-deep);
  font-size: 1.1rem;
  font-weight: 800;
  flex: 0 0 auto;
}

.page-back-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.page-back-label {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.page-back-hint {
  color: var(--muted);
  font-size: 0.84rem;
  margin-top: 0.2rem;
}

.hero-grid {
  align-items: center;
}

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(18rem, 0.9fr);
  gap: 1.25rem;
  padding: 2rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 246, 238, 0.94));
  box-shadow: 0 18px 42px rgba(20, 33, 61, 0.07);
}

.dashboard-home .dashboard-hero {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(239, 244, 255, 0.95));
}

.dashboard-home .eyebrow {
  color: #2d5ea8;
}

.dashboard-hero-copy h1 {
  margin-bottom: 0.7rem;
}

.dashboard-hero-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.dashboard-hero-chip {
  display: grid;
  gap: 0.35rem;
  padding: 1rem;
  border: 1px solid rgba(20, 33, 61, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 24px rgba(20, 33, 61, 0.05);
}

.dashboard-hero-chip-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-home .dashboard-hero-chip-label {
  color: var(--accent);
}

.dashboard-hero-chip strong {
  font-size: 1.8rem;
  line-height: 1;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.dashboard-grid-secondary {
  align-items: start;
}

.dashboard-chart-card {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 16px 34px rgba(20, 33, 61, 0.06);
}

.chart-layout {
  display: grid;
  grid-template-columns: minmax(14rem, 16rem) 1fr;
  gap: 1.25rem;
  align-items: center;
}

.dashboard-ring {
  --chart-fill: 0;
  position: relative;
  width: min(100%, 16rem);
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 50%;
  padding: 1rem;
  background: conic-gradient(var(--accent) 0 calc(var(--chart-fill) * 1%), rgba(20, 33, 61, 0.08) calc(var(--chart-fill) * 1%) 100%);
  box-shadow: inset 0 0 0 1px rgba(20, 33, 61, 0.05);
}

.dashboard-ring::before {
  content: "";
  position: absolute;
  inset: 1.2rem;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: inset 0 0 0 1px rgba(20, 33, 61, 0.05);
}

.dashboard-ring-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
}

.dashboard-ring-inner strong {
  font-size: 2.4rem;
  line-height: 1;
}

.dashboard-ring-inner span {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-ring-pending {
  background: conic-gradient(#ef8354 0 calc(var(--chart-fill) * 1%), rgba(20, 33, 61, 0.08) calc(var(--chart-fill) * 1%) 100%);
}

.dashboard-ring-completed {
  background: conic-gradient(#6abf69 0 calc(var(--chart-fill) * 1%), rgba(20, 33, 61, 0.08) calc(var(--chart-fill) * 1%) 100%);
}

.dashboard-chart-copy {
  display: grid;
  gap: 0.85rem;
}

.dashboard-chart-copy p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.dashboard-chart-stat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  background: rgba(20, 33, 61, 0.04);
}

.dashboard-chart-stat span {
  color: var(--muted);
  font-size: 0.9rem;
}

.dashboard-chart-stat strong {
  font-size: 1.35rem;
}

.dashboard-progress {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 0.88rem;
}

.dashboard-progress-bar {
  height: 0.95rem;
  border-radius: 999px;
  background: rgba(239, 131, 84, 0.14);
  overflow: hidden;
}

.dashboard-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ef8354, #f5a06e);
}

.dashboard-progress-bar-success {
  background: rgba(106, 191, 105, 0.16);
}

.dashboard-progress-bar-success span {
  background: linear-gradient(90deg, #6abf69, #95d98d);
}

.dashboard-quick-card {
  height: 100%;
}

.dashboard-home .dashboard-cta {
  border-color: var(--accent);
  background: linear-gradient(180deg, #3d6fbe, var(--accent));
  box-shadow: 0 12px 24px rgba(45, 94, 168, 0.22);
}

.dashboard-home .dashboard-cta:hover,
.dashboard-home .dashboard-cta:focus {
  border-color: #234b88;
  background: linear-gradient(180deg, #2f61ab, #234b88);
}

.auth-shell {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 16rem);
  padding: 1rem 0 2rem;
}

.auth-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(22rem, 28rem);
  gap: 1.25rem;
  width: min(100%, 72rem);
}

.auth-copy {
  display: grid;
  align-content: center;
  gap: 1rem;
  min-height: 100%;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(239, 244, 255, 0.94));
}

.auth-copy h1 {
  margin-bottom: 0;
  font-size: clamp(2.2rem, 4vw, 3.5rem);
}

.auth-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.auth-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.85rem;
  border: 1px solid rgba(45, 94, 168, 0.15);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--accent-deep);
  font-size: 0.86rem;
  font-weight: 700;
}

.auth-card {
  display: grid;
  gap: 1rem;
  padding: 2rem;
  align-content: start;
}

.auth-card-head {
  display: grid;
  gap: 0.4rem;
}

.auth-card-head h2 {
  margin-bottom: 0;
}

.auth-note {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.auth-summary {
  margin-bottom: 0;
}

.auth-form {
  display: grid;
  gap: 0.2rem;
}

.auth-check .form-check-input {
  margin-top: 0.28rem;
}

.auth-submit {
  min-width: 9.5rem;
  align-self: start;
}

.dashboard-home .dashboard-template-menu .nav-link.active {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 12px 24px rgba(45, 94, 168, 0.18);
}

.dashboard-home .quick-link-card-accent {
  background: linear-gradient(180deg, rgba(45, 94, 168, 0.16), rgba(255, 255, 255, 0.96));
}

.dashboard-home .quick-link-card:hover,
.dashboard-home .quick-link-card:focus {
  border-color: rgba(45, 94, 168, 0.25);
}

.quick-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.9rem;
}

.quick-link-card {
  display: grid;
  gap: 0.35rem;
  padding: 1rem 1.05rem;
  border: 1px solid rgba(20, 33, 61, 0.08);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.92));
  text-decoration: none;
  color: var(--ink);
  box-shadow: 0 10px 22px rgba(20, 33, 61, 0.04);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.quick-link-card strong {
  font-size: 1.05rem;
}

.quick-link-card span:last-child {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.quick-link-card:hover {
  color: var(--ink);
  border-color: rgba(45, 94, 168, 0.22);
  transform: translateY(-2px);
  box-shadow: 0 14px 26px rgba(20, 33, 61, 0.07);
}

.quick-link-card-accent {
  background: linear-gradient(180deg, rgba(45, 94, 168, 0.14), rgba(255, 255, 255, 0.95));
}

.recent-template-list {
  display: grid;
  gap: 0.85rem;
}

.recent-template-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0.95rem;
  border: 1px solid rgba(20, 33, 61, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.8);
}

.recent-template-row span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}

.eyebrow {
  margin-bottom: 0.6rem;
  color: var(--accent-deep);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.lede {
  max-width: 60rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.hero-actions,
.action-bar {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.workflow-actions {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.card-surface {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 16px 34px rgba(20, 33, 61, 0.06);
}

.section-card {
  height: 100%;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.emphasis-card {
  min-width: 18rem;
}

.content-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 1.5rem;
}

.section-head,
.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.list-row {
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}

.list-row:first-of-type {
  border-top: 0;
  padding-top: 0.25rem;
}

.list-row span,
.field-meta,
.field-list span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}

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

.legend-swatch {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  margin-right: 0.5rem;
  border-radius: 0.3rem;
  vertical-align: middle;
  border: 1px solid rgba(20, 33, 61, 0.15);
}

.legend-green {
  background: #7ed957;
}

.legend-yellow {
    background: #ffd54f;
}

.legend-orange {
    background: #f4b183;
}

.legend-blue {
    background: #2a4d9b;
}

.legend-white {
  background: #ffffff;
}

.assignment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.9rem;
}

.assignment-card {
  display: grid;
  gap: 0.2rem;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(20, 33, 61, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 8px 20px rgba(20, 33, 61, 0.04);
  cursor: pointer;
}

.assignment-card input {
  justify-self: start;
  margin-bottom: 0.35rem;
}

.assignment-card-title {
  font-weight: 800;
  color: var(--ink);
}

.assignment-card-copy {
  color: var(--muted);
  font-size: 0.88rem;
}

.section-chip,
.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(20, 33, 61, 0.08);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
}

.status-pill {
  border: 1px solid transparent;
}

.photo-status-pending,
.photo-status-neutral {
  background: rgba(20, 33, 61, 0.08);
  color: var(--ink);
}

.photo-status-received {
  background: rgba(42, 77, 155, 0.14);
  color: #244689;
}

.photo-status-ready {
  background: rgba(45, 94, 168, 0.12);
  color: var(--accent-deep);
}

.photo-status-working,
.photo-status-waiting {
  background: rgba(239, 131, 84, 0.16);
  color: #b45b2d;
}

.photo-status-success {
  background: rgba(106, 191, 105, 0.16);
  color: #2f6f2d;
}

.photo-status-error {
  background: rgba(220, 53, 69, 0.12);
  color: #9d1f2c;
}

.photo-panel-hero {
  align-items: stretch;
}

.photo-panel-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  width: min(100%, 28rem);
  flex: 0 0 min(100%, 28rem);
}

.photo-panel-summary-chip {
  display: grid;
  gap: 0.35rem;
  padding: 1rem;
  border: 1px solid rgba(20, 33, 61, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 10px 22px rgba(20, 33, 61, 0.05);
}

.photo-panel-summary-chip span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.photo-panel-summary-chip strong {
  font-size: 1.45rem;
  line-height: 1.1;
}

.photo-batch-list {
  display: grid;
  gap: 0.9rem;
}

.photo-batch-item {
  overflow: hidden;
  border: 1px solid rgba(20, 33, 61, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 10px 22px rgba(20, 33, 61, 0.04);
}

.photo-batch-item[open] {
  box-shadow: 0 14px 30px rgba(20, 33, 61, 0.07);
}

.photo-batch-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  cursor: pointer;
  list-style: none;
}

.photo-batch-summary::-webkit-details-marker {
  display: none;
}

.photo-batch-summary-main {
  min-width: 0;
}

.photo-batch-summary-head h2 {
  margin-bottom: 0;
  font-size: 1.2rem;
}

.photo-batch-summary-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
  margin-top: 0.65rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.photo-batch-summary-meta span strong {
  color: var(--ink);
}

.photo-batch-summary-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.45rem;
  flex: 0 0 auto;
}

.photo-batch-chevron,
.photo-folder-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 999px;
  background: rgba(45, 94, 168, 0.12);
  color: var(--accent-deep);
  font-size: 0.95rem;
  font-weight: 800;
  transition: transform 0.18s ease;
}

.photo-batch-item[open] > .photo-batch-summary .photo-batch-chevron,
.photo-folder-group[open] > .photo-folder-head .photo-folder-chevron {
  transform: rotate(180deg);
}

.photo-batch-body {
  display: grid;
  gap: 1rem;
  padding: 0 1.1rem 1.1rem;
  border-top: 1px solid rgba(20, 33, 61, 0.08);
  background: rgba(255, 255, 255, 0.66);
}

.photo-batch-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.photo-batch-stat {
  display: grid;
  gap: 0.25rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(20, 33, 61, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
}

.photo-batch-stat span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.photo-batch-stat strong {
  font-size: 1.1rem;
}

.photo-batch-error {
  display: grid;
  gap: 0.45rem;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(220, 53, 69, 0.14);
  border-radius: 18px;
  background: rgba(220, 53, 69, 0.06);
}

.photo-batch-error-label {
  color: #9d1f2c;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.photo-batch-error div {
  color: #7f1822;
  white-space: pre-wrap;
  line-height: 1.55;
}

.photo-folder-list {
  display: grid;
  gap: 0.75rem;
}

.photo-folder-group {
  overflow: hidden;
  border: 1px solid rgba(20, 33, 61, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.photo-folder-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  cursor: pointer;
  list-style: none;
}

.photo-folder-head::-webkit-details-marker {
  display: none;
}

.photo-folder-head-copy {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.photo-folder-head h3 {
  margin-bottom: 0;
  font-size: 1rem;
}

.photo-folder-head-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  flex: 0 0 auto;
}

.photo-folder-body {
  padding: 0 1rem 1rem;
  border-top: 1px solid rgba(20, 33, 61, 0.06);
}

.photo-file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12rem, 12rem));
  gap: 0.7rem;
  justify-content: start;
  padding-top: 0.95rem;
}

.photo-file-card {
  display: grid;
  gap: 0.55rem;
  padding: 0.65rem;
  border: 1px solid rgba(20, 33, 61, 0.08);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.95));
  box-shadow: 0 8px 18px rgba(20, 33, 61, 0.04);
}

.photo-file-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
  background: #edf3fb;
  border: 1px solid rgba(20, 33, 61, 0.08);
}

.photo-file-thumb a,
.photo-file-thumb img,
.photo-file-thumb video {
  display: block;
  width: 100%;
  height: 100%;
}

.photo-file-thumb img,
.photo-file-thumb video {
  object-fit: cover;
}

.photo-file-thumb video {
  background: #000;
}

.photo-file-index-chip {
  position: absolute;
  top: 0.45rem;
  left: 0.45rem;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.24rem 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--accent-deep);
  font-size: 0.72rem;
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(20, 33, 61, 0.12);
}

.photo-file-thumb-empty {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.photo-file-meta {
  display: grid;
  gap: 0.45rem;
}

.photo-file-caption {
  display: grid;
  margin-bottom: 0;
  color: var(--ink);
  font-size: 0.82rem;
  line-height: 1.45;
  font-weight: 600;
  word-break: break-word;
}

.photo-file-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.photo-file-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.24rem 0.45rem;
  border-radius: 999px;
  background: rgba(45, 94, 168, 0.1);
  color: var(--accent-deep);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.2;
}

.photo-file-coordinates {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.35;
  font-size: 0.76rem;
  word-break: break-word;
}

.photo-file-watermark {
  margin-bottom: 0;
  color: var(--accent-deep);
  font-size: 0.76rem;
  line-height: 1.45;
}

.field-list {
  padding-left: 1rem;
  margin-bottom: 0;
}

.field-list li + li {
  margin-top: 0.85rem;
}

.excel-accordion .accordion-item {
  margin-bottom: 1rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.88);
}

.excel-accordion .accordion-button {
  font-weight: 700;
  background: #fff;
}

.excel-accordion .accordion-button:not(.collapsed) {
  color: var(--ink);
  background: rgba(45, 94, 168, 0.09);
  box-shadow: none;
}

.form-control,
.form-select {
  min-height: 3rem;
  border-radius: 14px;
  border-color: rgba(20, 33, 61, 0.12);
}

.action-bar {
  margin-top: 1.25rem;
}

.template-menu {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.template-menu .nav-item {
  margin: 0;
}

.template-menu .nav-link {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-weight: 700;
  padding: 0.9rem 1.2rem;
}

.template-menu .nav-link.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 12px 24px rgba(45, 94, 168, 0.18);
}

.capture-photo-card {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1rem;
  border: 1px solid rgba(20, 33, 61, 0.1);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: 0 10px 22px rgba(20, 33, 61, 0.05);
}

.capture-photo-preview {
  min-height: 220px;
  border: 1px dashed rgba(20, 33, 61, 0.2);
  border-radius: 16px;
  background: #eef5fb;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.capture-photo-preview.is-empty {
  padding: 1rem;
}

.capture-photo-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.capture-photo-empty {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  color: rgba(20, 33, 61, 0.68);
}

.capture-photo-empty strong {
  color: #10213f;
  font-size: 1rem;
}

.capture-photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.capture-photo-trigger {
  border-radius: 999px;
}

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

.btn-primary:hover,
.btn-primary:focus {
  border-color: var(--accent-deep);
  background-color: var(--accent-deep);
}

.excel-preview-shell {
  padding: 1rem;
}

.preview-page-shell {
  width: calc(100vw - 4rem);
  max-width: none;
  margin-left: calc(50% - 50vw + 2rem);
  margin-right: calc(50% - 50vw + 2rem);
}

.excel-preview-wrap {
  overflow: auto;
  padding: 0.75rem;
  border-radius: 18px;
  background: #f7f9fc;
}

.excel-canvas {
  position: relative;
}

.excel-canvas-image {
  display: block;
  width: 100%;
  height: 100%;
  box-shadow: 0 12px 30px rgba(20, 33, 61, 0.08);
}

.excel-field-overlay {
  position: absolute;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
}

.excel-overlay-select,
.excel-overlay-input,
.excel-overlay-image-button {
  width: 100%;
  height: 100%;
  min-height: 1.75rem;
  padding: 0.1rem 0.35rem;
  border: 0;
  background: transparent;
  color: inherit;
  font: 400 12px/1.2 Calibri, "Segoe UI", sans-serif;
  text-align: center;
  outline: none;
}

.excel-overlay-select {
  cursor: pointer;
}

.excel-overlay-input {
  cursor: default;
}

.excel-overlay-image-button {
  border: 1px dashed rgba(20, 33, 61, 0.35);
  background: rgba(255, 255, 255, 0.18);
  color: rgba(20, 33, 61, 0.82);
  font-weight: 600;
  text-transform: uppercase;
}

.footer {
  padding: 1rem 0 2rem;
}

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

  .dashboard-hero,
  .dashboard-grid,
  .chart-layout,
  .auth-panel {
    grid-template-columns: 1fr;
  }

  .dashboard-hero-meta {
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  }

  .photo-panel-summary,
  .photo-batch-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  html {
    font-size: 14px;
  }

  .page-hero,
  .section-head,
  .list-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .preview-page-shell {
    width: auto;
    margin-left: 0;
    margin-right: 0;
  }

  .dashboard-hero,
  .dashboard-chart-card,
  .dashboard-quick-card {
    padding: 1.1rem;
  }

  .auth-copy,
  .auth-card {
    padding: 1.25rem;
  }

  .photo-panel-summary,
  .photo-batch-stats {
    grid-template-columns: 1fr;
  }

  .photo-panel-summary {
    width: 100%;
    flex-basis: auto;
  }

  .photo-batch-status-stack {
    align-items: flex-start;
  }

  .photo-batch-summary,
  .photo-folder-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .photo-batch-summary-side,
  .photo-folder-head-side {
    align-items: flex-start;
  }

  .photo-file-grid {
    grid-template-columns: 1fr;
  }

  .recent-template-row,
  .dashboard-chart-stat {
    flex-direction: column;
    align-items: flex-start;
  }
}
