:root {
  color-scheme: light;
  --paper: #F3F8FC;
  --card: #FFFFFF;
  --ink: #02265F;
  --muted: #02265F;
  --line: #E3F8F0;
  --green: #02265F;
  --green-dark: #02265F;
  --green-soft: #E3F8F0;
  --warm: #C4D8E9;
  --danger: #02265F;
  --shadow: 0 12px 35px rgba(2,38,95, 0.07);
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 85% 0%, rgba(81,234,181, 0.8), transparent 31rem),
    var(--paper);
}

button, input, select { font: inherit; }
button { cursor: pointer; }

.app-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 50px 0 120px;
}

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 0 2px 28px;
}
.hero-actions { display: flex; align-items: flex-end; flex-direction: column; gap: 10px; }
.account-buttons { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.account-button { min-height: 38px; border-color: #C4D8E9; color: var(--green); background: rgba(255,255,255,.72); }
.account-button span { margin: 0; }
.account-button #profile-initial { display: inline-grid; width: 21px; height: 21px; margin-right: 6px; place-items: center; border-radius: 50%; color: white; background: var(--green); font-size: .62rem; }
.subscribe-button { min-height: 38px; border-color: var(--green); color: white; background: var(--green); letter-spacing: .02em; }

.eyebrow {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 9px; font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.05; letter-spacing: -0.045em; }
h2 { margin-bottom: 5px; font-size: 1.06rem; letter-spacing: -0.015em; }
.subtitle { margin-bottom: 0; color: var(--muted); font-size: 1rem; }

.privacy-badge {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border: 1px solid #C4D8E9;
  border-radius: 999px;
  color: var(--green);
  background: rgba(255,255,255, 0.55);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}
.privacy-badge span { font-size: 0.65rem; }

.steps { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.card-heading { display: flex; align-items: flex-start; gap: 13px; }
.card-heading p, .files-toolbar p { margin-bottom: 0; color: var(--muted); font-size: 0.84rem; }
.step-number {
  display: inline-grid;
  flex: 0 0 auto;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 9px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 0.78rem;
  font-weight: 800;
}

.button-row { display: flex; gap: 10px; margin-top: 27px; }
.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: .9rem;
  font-weight: 750;
  line-height: 1.18;
  text-align: center;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; opacity: 0.42; }
.button.primary { color: white; background: var(--green); }
.button.primary:hover { background: var(--green-dark); }
.button.secondary { border-color: var(--line); color: var(--ink); background: #FFFFFF; }
.selection-summary { margin: 13px 0 0; color: var(--muted); font-size: 0.78rem; }

.destination-picker {
  display: grid;
  grid-template-columns: auto 1fr auto;
  width: 100%;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
  padding: 13px;
  border: 1px dashed #C4D8E9;
  border-radius: 12px;
  text-align: left;
  color: var(--ink);
  background: #F3F8FC;
}
.destination-picker:hover { border-color: var(--green); background: #F3F8FC; }
.folder-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 10px; color: var(--green); background: var(--green-soft); font-size: 1.5rem; }
.destination-picker strong, .destination-picker small { display: block; }
.destination-picker small { margin-top: 2px; color: var(--muted); }
.arrow { color: var(--green); font-weight: 800; }

.rules-card, .photography-card, .visualization-card, .history-search-card, .files-card { margin-top: 16px; }
.rules-heading { align-items: center; }
.rules-heading .text-button { margin-left: auto; }
.rule-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 13px; margin-top: 24px; }
.field { min-width: 0; grid-column: span 2; }
.field > span { display: block; margin-bottom: 7px; color: #02265F; font-size: 0.75rem; font-weight: 700; }
.field input, .field select {
  min-width: 0;
  max-width: 100%;
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  color: var(--ink);
  background: #FFFFFF;
}
.date-field { min-width: 0; max-width: 100%; overflow: hidden; }
.date-field input[type="date"] {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  inline-size: 100%;
  min-inline-size: 0;
  max-inline-size: 100%;
  -webkit-appearance: none;
  appearance: none;
}
.date-field input[type="date"]::-webkit-date-and-time-value { display: block; width: 100%; min-width: 0; text-align: left; }
.date-field input[type="date"]::-webkit-datetime-edit { min-width: 0; padding: 0; }
.field input:focus, .field select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(2,38,95, 0.1); }
.switch-row {
  display: flex !important;
  min-height: 42px;
  align-items: center;
  gap: 9px;
  margin: 0 !important;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink) !important;
  background: #FFFFFF;
  cursor: pointer;
  font-size: 0.8rem !important;
  font-weight: 650 !important;
}
.switch-row input { width: 17px; height: 17px; padding: 0; }
.session-help { margin: 14px 0 0 42px; color: var(--muted); font-size: 0.76rem; line-height: 1.5; }
.session-toggle-field.inactive { opacity: .5; }
.session-toggle-field.inactive .switch-row { cursor: not-allowed; }
.inline-plus-badge { display: inline-flex; margin-left: 5px; padding: 2px 5px; border: 1px solid #C4D8E9; border-radius: 5px; color: var(--green); background: #F3F8FC; font-size: .52rem; font-weight: 850; letter-spacing: .06em; vertical-align: middle; }

.photography-card {
  position: relative;
  overflow: hidden;
  border-color: #C4D8E9;
  background: linear-gradient(145deg, #FFFFFF 0%, #F3F8FC 100%);
}
.photography-card::before {
  position: absolute;
  top: -90px;
  right: -70px;
  width: 240px;
  height: 240px;
  border: 38px solid rgba(2,38,95, 0.045);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}
.photography-card.plus-is-locked { min-height: 150px; }
.photography-card.plus-is-locked .photography-heading { opacity: .42; filter: grayscale(.35); }
.plus-lock {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  margin-top: 19px;
  padding: 15px;
  border: 1px solid #C4D8E9;
  border-radius: 13px;
  background: rgba(255,255,255,.88);
  box-shadow: 0 10px 28px rgba(2,38,95,.08);
}
.plus-lock-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; color: white; background: var(--green); font-size: 1.35rem; }
.plus-lock p { margin: 3px 0 0; color: var(--muted); font-size: .78rem; }
.photography-heading { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.photography-title-row { display: flex; align-items: center; gap: 14px; }
.photography-title-row p { margin: 5px 0 0; color: var(--muted); font-size: 0.82rem; }
.photography-icon {
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid #C4D8E9;
  border-radius: 50%;
  color: white;
  background: var(--green);
  box-shadow: inset 0 0 0 7px #E3F8F0;
  font-size: 0.72rem;
}
.title-with-badge { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.title-with-badge h2 { margin: 0; }
.plus-badge {
  display: inline-flex;
  padding: 4px 7px;
  border: 1px solid #C4D8E9;
  border-radius: 6px;
  color: var(--green);
  background: #F3F8FC;
  font-size: 0.58rem;
  font-weight: 850;
  letter-spacing: 0.08em;
}
.photography-toggle {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 9px;
  padding: 10px 13px;
  border: 1px solid #C4D8E9;
  border-radius: 10px;
  color: var(--green);
  background: rgba(255,255,255,.7);
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 800;
}

.visualization-card { overflow: hidden; }
.visualization-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.visualization-heading .eyebrow { margin-bottom: 7px; }
.visualization-heading p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: .82rem; }
.selected-layout-label { flex: 0 0 auto; padding: 7px 10px; border-radius: 999px; color: var(--green); background: var(--green-soft); font-size: .7rem; font-weight: 800; }
.layout-options { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; margin-top: 20px; }
.layout-option { min-width: 0; padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: #FFFFFF; cursor: pointer; outline: none; transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease; }
.layout-option:hover, .layout-option:focus-visible { border-color: #C4D8E9; transform: translateY(-1px); }
.layout-option.selected { border-color: var(--green); background: #F3F8FC; box-shadow: 0 0 0 3px rgba(2,38,95,.08); }
.layout-option-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.layout-check { display: grid; width: 23px; height: 23px; place-items: center; border: 1px solid #C4D8E9; border-radius: 50%; color: transparent; background: white; font-size: .75rem; }
.layout-option.selected .layout-check { border-color: var(--green); color: white; background: var(--green); }
.layout-description { display: block; margin: 5px 0 15px; color: var(--muted); font-size: .74rem; line-height: 1.45; }
.folder-tree { display: block; min-height: 210px; padding: 13px; border: 1px solid #E3F8F0; border-radius: 11px; text-align: left; background: #FFFFFF; cursor: default; }
.tree-empty { display: grid; min-height: 180px; place-items: center; color: #02265F; font-size: .75rem; text-align: center; }
.tree-root, .tree-folder { display: block; }
.tree-row { display: flex; min-width: 0; align-items: center; gap: 7px; padding: 5px 7px; border-radius: 7px; color: #02265F; font-size: .74rem; }
.tree-row.root-row { color: var(--green-dark); background: var(--green-soft); font-weight: 800; }
.tree-icon { display: inline-grid; flex: 0 0 auto; width: 22px; height: 20px; place-items: center; border-radius: 5px; color: var(--green); background: #F3F8FC; font-size: .72rem; }
.tree-row.root-row .tree-icon { color: white; background: var(--green); }
.tree-row-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-count { margin-left: auto; color: #02265F; font-size: .65rem; }
.tree-children { position: relative; display: block; margin-left: 17px; padding-left: 15px; border-left: 1px solid #C4D8E9; }
.tree-children > .tree-folder, .tree-children > .tree-file { position: relative; display: block; }
.tree-children > .tree-folder::before, .tree-children > .tree-file::before { position: absolute; top: 15px; left: -15px; width: 11px; border-top: 1px solid #C4D8E9; content: ""; }
.tree-file .tree-row { color: #02265F; }
.file-type-icon { border: 1px solid #E3F8F0; color: #02265F; background: white; font-size: .55rem; font-weight: 850; text-transform: uppercase; }
.tree-more { margin: 5px 0 2px 7px; padding: 4px 7px; border: 0; border-radius: 6px; color: var(--green); background: #F3F8FC; font-size: .67rem; font-weight: 800; cursor: pointer; }
.photography-toggle input { width: 17px; height: 17px; margin: 0; }
.photography-controls { position: relative; margin-top: 22px; padding-top: 20px; border-top: 1px solid #E3F8F0; }
.analysis-overview { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 19px; }
.analysis-overview > div { padding: 13px 15px; border: 1px solid #E3F8F0; border-radius: 11px; background: rgba(255,255,255,.68); }
.analysis-overview strong, .analysis-overview span { display: block; }
.analysis-overview strong { color: var(--green); font-size: 1.15rem; }
.analysis-overview span { margin-top: 3px; color: var(--muted); font-size: 0.67rem; font-weight: 700; }
.criteria-panel { margin-bottom: 19px; padding: 14px; border: 1px solid #E3F8F0; border-radius: 12px; background: rgba(255,255,255,.62); }
.criteria-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-bottom: 11px; }
.criteria-heading strong { color: var(--green); font-size: .77rem; }
.criteria-heading span { color: var(--muted); font-size: .67rem; }
.criteria-switches { display: flex; flex-wrap: wrap; gap: 8px; }
.criteria-switches label { display: inline-flex; align-items: center; gap: 6px; padding: 7px 9px; border: 1px solid #E3F8F0; border-radius: 8px; color: var(--muted); background: #FFFFFF; cursor: pointer; font-size: .68rem; font-weight: 750; transition: 140ms ease; }
.criteria-switches label:has(input:checked) { border-color: #C4D8E9; color: var(--green); background: #E3F8F0; }
.criteria-switches input { width: 15px; height: 15px; margin: 0; }
.photography-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 13px; }
.photography-grid .field { grid-column: span 2; }
.photography-grid .field.inactive { opacity: .46; }
.photography-grid .field.inactive input, .photography-grid .field.inactive select { cursor: not-allowed; }
.photography-route { display: flex; align-items: center; gap: 10px; margin-top: 15px; padding: 11px 13px; border: 1px solid #C4D8E9; border-radius: 10px; color: #02265F; background: rgba(81,234,181, .7); font-size: .7rem; }
.photography-route strong { flex: 0 0 auto; color: var(--green); }
.photography-route span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.photography-help { margin: 15px 0 0; color: var(--muted); font-size: 0.72rem; line-height: 1.55; }

.text-button { padding: 4px 2px; border: 0; color: var(--green); background: transparent; font-size: 0.78rem; font-weight: 750; }
.text-button:hover { text-decoration: underline; text-underline-offset: 3px; }

.files-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.toolbar-actions { display: flex; gap: 17px; }
.duplicate-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding: 13px 15px;
  border: 1px solid #dfc9aa;
  border-radius: 12px;
  color: #02265F;
  background: #F3F8FC;
}
.duplicate-summary strong { font-size: 0.84rem; }
.duplicate-summary p { margin: 3px 0 0; color: #02265F; font-size: 0.76rem; }
.duplicate-icon { display: grid; flex: 0 0 auto; width: 34px; height: 34px; place-items: center; border-radius: 9px; color: #02265F; background: #f2dfbd; font-size: 1.25rem; font-weight: 800; }
.empty-state { display: grid; min-height: 190px; place-items: center; align-content: center; margin-top: 20px; border: 1px dashed var(--line); border-radius: 13px; color: var(--muted); text-align: center; }
.empty-state > span { display: grid; width: 42px; height: 42px; margin-bottom: 11px; place-items: center; border-radius: 50%; background: var(--green-soft); color: var(--green); font-size: 1.4rem; }
.empty-state strong { color: var(--ink); }
.empty-state p { margin: 5px 0 0; font-size: 0.82rem; }

.table-wrap { max-height: 370px; overflow: auto; margin-top: 18px; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
th { position: sticky; top: 0; z-index: 1; padding: 11px 13px; color: var(--muted); background: #F3F8FC; text-align: left; font-size: 0.7rem; letter-spacing: 0.03em; text-transform: uppercase; }
td { padding: 12px 13px; border-top: 1px solid #E3F8F0; vertical-align: middle; }
tr.filtered-out { opacity: 0.42; }
.check-cell { width: 42px; text-align: center; }
.file-name { max-width: 310px; overflow: hidden; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.file-path { display: block; margin-top: 3px; color: var(--muted); font-size: 0.7rem; font-weight: 400; }
.file-metadata { display: block; max-width: 340px; margin-top: 5px; overflow: hidden; color: #02265F; font-size: 0.66rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.duplicate-badge { display: inline-block; margin-left: 7px; padding: 2px 6px; border-radius: 5px; color: #02265F; background: #f2dfbd; font-size: 0.62rem; font-weight: 800; vertical-align: 1px; }
.target-pill { display: inline-flex; max-width: 230px; padding: 5px 8px; overflow: hidden; border-radius: 7px; color: var(--green); background: var(--green-soft); font-size: 0.73rem; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.analysis-cell { min-width: 175px; }
.analysis-score-row { display: flex; align-items: center; gap: 7px; }
.quality-score { display: inline-grid; min-width: 34px; height: 27px; place-items: center; border-radius: 8px; font-size: 0.7rem; font-weight: 850; }
.quality-score.high { color: #02265F; background: #E3F8F0; }
.quality-score.medium { color: #02265F; background: #C4D8E9; }
.quality-score.low { color: #02265F; background: #E3F8F0; }
.quality-score.unknown { color: var(--muted); background: #F3F8FC; }
.analysis-label { color: #02265F; font-size: 0.7rem; font-weight: 750; }
.analysis-subline { display: block; margin-top: 4px; color: var(--muted); font-size: 0.64rem; }
.details-button { margin-top: 5px; padding: 0; border: 0; color: var(--green); background: transparent; font-size: 0.66rem; font-weight: 800; cursor: pointer; }
.details-button:hover { text-decoration: underline; text-underline-offset: 2px; }
.analysis-locked-cell { color: var(--green); font-size: .69rem; font-weight: 800; white-space: nowrap; }

.metadata-dialog {
  width: min(760px, calc(100% - 28px));
  max-height: min(760px, calc(100vh - 40px));
  padding: 0;
  overflow: hidden;
  border: 1px solid #C4D8E9;
  border-radius: 18px;
  color: var(--ink);
  background: var(--card);
  box-shadow: 0 28px 80px rgba(2,38,95, .28);
}
.metadata-dialog::backdrop { background: rgba(2,38,95, .48); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.metadata-dialog[open] { animation: dialog-in 160ms ease-out; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
.metadata-dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 21px 23px 17px; border-bottom: 1px solid var(--line); background: #F3F8FC; }
.metadata-dialog-header h2 { margin: 8px 0 0; font-size: 1.15rem; }
.dialog-close { display: grid; width: 35px; height: 35px; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: white; font-size: 1.35rem; line-height: 1; cursor: pointer; }
.metadata-content { max-height: calc(100vh - 155px); padding: 21px 23px 26px; overflow: auto; }
.metadata-scoreboard { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin-bottom: 20px; }
.metadata-scoreboard > div { padding: 11px; border-radius: 10px; background: #F3F8FC; }
.metadata-scoreboard strong, .metadata-scoreboard span { display: block; }
.metadata-scoreboard strong { color: var(--green); font-size: 1rem; }
.metadata-scoreboard span { margin-top: 3px; color: var(--muted); font-size: .62rem; font-weight: 700; }
.metadata-recommendations { margin: -6px 0 20px; padding: 14px 16px; border: 1px solid #C4D8E9; border-radius: 12px; background: #F3F8FC; }
.metadata-recommendations h3 { margin: 0 0 8px; color: var(--green-dark); font-size: .78rem; }
.metadata-recommendations ul { display: grid; gap: 6px; margin: 0; padding-left: 18px; color: #02265F; font-size: .68rem; line-height: 1.5; }
.metadata-recommendations li::marker { color: var(--green); }
.metadata-section + .metadata-section { margin-top: 21px; }
.metadata-section h3 { margin: 0 0 10px; color: var(--green); font-size: .76rem; letter-spacing: .04em; text-transform: uppercase; }
.metadata-list { display: grid; grid-template-columns: minmax(150px, .75fr) 1.5fr; margin: 0; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.metadata-list dt, .metadata-list dd { margin: 0; padding: 9px 11px; border-bottom: 1px solid #E3F8F0; font-size: .72rem; overflow-wrap: anywhere; }
.metadata-list dt { color: var(--muted); background: #F3F8FC; font-weight: 700; }
.metadata-list dd { color: var(--ink); background: white; }
.metadata-list dt:last-of-type, .metadata-list dd:last-of-type { border-bottom: 0; }
.metadata-empty { margin: 0; padding: 15px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); font-size: .76rem; text-align: center; }

.action-bar {
  position: sticky;
  bottom: 16px;
  z-index: 5;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 25px;
  margin-top: 16px;
  padding: 15px 16px 15px 22px;
  border: 1px solid rgba(2,38,95, 0.25);
  border-radius: 16px;
  background: rgba(255,255,255, 0.92);
  box-shadow: 0 16px 45px rgba(2,38,95, 0.16);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.quota-status { min-width: 160px; padding-left: 18px; border-left: 1px solid var(--line); }
.quota-status strong, .quota-status span { display: block; }
.quota-status strong { font-size: .75rem; }
.quota-status span { margin-top: 2px; color: var(--muted); font-size: .68rem; }
.quota-status.limit-reached strong { color: var(--danger); }
.quota-warning { margin: 10px 0 0; padding: 11px 15px; border: 1px solid #C4D8E9; border-radius: 10px; color: #02265F; background: #F3F8FC; font-size: .78rem; }
.operation-switch { display: flex; gap: 20px; font-size: 0.83rem; font-weight: 700; }
.operation-switch label { display: flex; align-items: center; gap: 7px; cursor: pointer; }
.operation-switch label.disabled { cursor: not-allowed; opacity: 0.45; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--green); }
.action-summary { text-align: right; }
.action-summary strong, .action-summary span { display: block; }
.action-summary span { margin-top: 2px; color: var(--muted); font-size: 0.76rem; }
.start-button { min-width: 150px; color: white; background: var(--green); }
.start-button span { margin-left: 0; }
.start-button span:last-child { margin-left: 12px; }

.progress-panel { margin-top: 16px; padding: 18px 22px; border-radius: 14px; color: white; background: var(--green); box-shadow: var(--shadow); }
.progress-copy { display: flex; justify-content: space-between; }
.progress-track { height: 7px; margin-top: 13px; overflow: hidden; border-radius: 10px; background: rgba(255,255,255,.24); }
.progress-bar { width: 0; height: 100%; border-radius: inherit; background: white; transition: width 180ms ease; }
.progress-panel p { margin: 9px 0 0; overflow: hidden; color: rgba(255,255,255,.76); font-size: 0.75rem; text-overflow: ellipsis; white-space: nowrap; }

.browser-warning { margin: 17px 0 0; padding: 13px 16px; border: 1px solid #dac8a8; border-radius: 10px; color: #02265F; background: #E3F8F0; font-size: 0.82rem; }
.account-dialog { width: min(570px, calc(100% - 28px)); max-height: calc(100dvh - 32px); padding: 0; overflow: auto; border: 1px solid var(--line); border-radius: 18px; color: var(--ink); background: var(--card); box-shadow: 0 24px 80px rgba(2,38,95,.28); }
.profile-dialog { width: min(850px, calc(100% - 28px)); }
.account-dialog::backdrop, .metadata-dialog::backdrop { background: rgba(2,38,95,.46); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.account-dialog-inner { padding: 24px; }
.dialog-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.dialog-title-row h2 { margin: 7px 0 0; font-size: 1.35rem; }
.dialog-lead { margin: 12px 0 18px; color: var(--muted); font-size: .83rem; line-height: 1.55; }
.auth-channel { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 15px; }
.auth-channel-email-only { grid-template-columns: 1fr; }
.auth-channel label { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #FFFFFF; font-size: .8rem; font-weight: 750; cursor: pointer; }
.auth-identifier-field { display: block; }
.phone-input-row { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 8px; }
.country-select-wrap { position: relative; min-width: 0; }
.country-flag { position: absolute; top: 50%; left: 11px; z-index: 1; width: 24px; height: 18px; border-radius: 3px; object-fit: cover; box-shadow: 0 0 0 1px rgba(2,38,95,.12); transform: translateY(-50%); pointer-events: none; }
.phone-input-row select, .phone-input-row input { width: 100%; min-width: 0; height: 42px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; outline: none; color: var(--ink); background: #FFFFFF; }
.phone-input-row select { padding-left: 43px; }
.phone-input-row select:focus, .phone-input-row input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(2,38,95,.1); }
.wide-button { width: 100%; margin-top: 7px; }
.form-status { min-height: 20px; margin: 11px 0 2px; color: var(--muted); font-size: .77rem; }
.form-status.error { color: var(--danger); }
.demo-code { margin: 11px 0 0; padding: 10px; border: 1px dashed #C4D8E9; border-radius: 9px; color: var(--green-dark); background: #F3F8FC; font-size: .78rem; font-weight: 750; text-align: center; }
.auth-captcha { display: flex; min-height: 65px; margin-top: 13px; align-items: center; justify-content: center; overflow: hidden; }
.auth-divider { display: flex; align-items: center; gap: 10px; margin: 15px 0 11px; color: #02265F; font-size: .65rem; font-weight: 750; }
.auth-divider::before, .auth-divider::after { height: 1px; flex: 1; background: var(--line); content: ""; }
.social-auth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.social-auth-button { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; min-height: 42px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: #FFFFFF; font: inherit; font-size: .72rem; font-weight: 750; cursor: pointer; }
.social-auth-button:hover { border-color: #C4D8E9; background: #F3F8FC; }
.social-auth-button small { padding: 2px 5px; border-radius: 20px; color: var(--green); background: #E3F8F0; font-size: .5rem; font-weight: 850; letter-spacing: .03em; }
.social-auth-mark { display: inline-grid; width: 24px; height: 24px; place-items: center; border: 1px solid #E3F8F0; border-radius: 50%; background: white; font-size: .75rem; font-weight: 900; }
.google-mark { color: #02265F; }
.apple-mark { color: #02265F; }
.privacy-note { margin: 14px 0 0; color: #02265F; font-size: .68rem; line-height: 1.5; }
.profile-summary { display: grid; grid-template-columns: 2fr 1fr 1.25fr; gap: 10px; margin-top: 20px; }
.profile-summary > div { min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: #FFFFFF; }
.profile-summary span, .profile-summary strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-summary span { margin-bottom: 5px; color: var(--muted); font-size: .66rem; }
.profile-summary strong { font-size: .82rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.history-search-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, .9fr); align-items: center; gap: 20px 28px; padding-top: 19px; padding-bottom: 19px; }
.history-search-copy .eyebrow { margin-bottom: 5px; font-size: .6rem; }
.history-search-copy h2 { margin-bottom: 3px; }
.history-search-copy > p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: .74rem; }
.history-search-controls { display: grid; grid-template-columns: minmax(0, 1fr) 43px; align-items: center; gap: 9px; }
.history-search-field { display: block; min-width: 0; }
.history-search-field input { width: 100%; height: 43px; padding: 0 13px; border: 1px solid var(--line); border-radius: 11px; outline: none; color: var(--ink); background: #FFFFFF; }
.history-search-field input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(2,38,95,.1); }
.history-clock-button { display: inline-grid; width: 43px; height: 43px; place-items: center; padding: 0; border: 1px solid #C4D8E9; border-radius: 11px; color: var(--green); background: #F3F8FC; cursor: pointer; transition: 140ms ease; }
.history-clock-button:hover, .history-clock-button.active { color: white; background: var(--green); border-color: var(--green); }
.history-clock-button svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.history-panel { grid-column: 1 / -1; padding-top: 17px; border-top: 1px solid var(--line); }
.history-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.history-panel-heading strong { color: var(--green-dark); font-size: .84rem; }
.history-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-top: 24px; }
.history-heading h3 { margin: 0 0 4px; font-size: 1rem; }
.history-heading p { margin: 0; color: var(--muted); font-size: .73rem; }
.history-heading input { width: min(280px, 100%); height: 39px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; outline: none; background: #FFFFFF; }
.history-warning { margin: 13px 0; padding: 11px 13px; border: 1px solid #dac8a8; border-radius: 9px; color: #02265F; background: #F3F8FC; font-size: .72rem; line-height: 1.5; }
.history-list { display: grid; gap: 9px; max-height: 42vh; overflow: auto; padding-right: 3px; }
.history-empty { margin: 0; padding: 30px 15px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); text-align: center; font-size: .78rem; }
.history-item { padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: #FFFFFF; }
.history-item-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.history-item-head strong, .history-item-head span { display: block; }
.history-item-head span { margin-top: 3px; color: var(--muted); font-size: .68rem; }
.history-path { flex: 0 0 auto; color: var(--green); font-size: .7rem; font-weight: 750; }
.history-files { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.history-files span { max-width: 100%; padding: 5px 7px; overflow: hidden; border-radius: 6px; color: #02265F; background: #F3F8FC; font-size: .65rem; text-overflow: ellipsis; white-space: nowrap; }
.profile-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.billing-dialog { width: min(650px, calc(100% - 28px)); }
.billing-dialog .account-dialog-inner { max-height: min(86vh, 820px); overflow-x: hidden; overflow-y: auto; }
.billing-base-card, .billing-total { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 14px; border: 1px solid #C4D8E9; border-radius: 13px; background: #F3F8FC; }
.billing-base-card small, .addon-card small { display: block; margin-top: 3px; color: var(--muted); font-size: .62rem; line-height: 1.4; }
.package-check { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; color: white; background: var(--green); font-size: .72rem; font-weight: 900; }
.package-heading { display: flex; justify-content: space-between; gap: 10px; margin: 17px 1px 8px; }
.package-heading span { color: var(--muted); font-size: .64rem; }
.addon-grid { display: grid; gap: 8px; }
.addon-card { display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #FFFFFF; cursor: pointer; transition: 150ms ease; }
.addon-card:hover, .addon-card.is-selected { border-color: var(--green); background: #F3F8FC; box-shadow: 0 0 0 3px rgba(2,38,95,.07); }
.addon-card input { margin: 0; accent-color: var(--green); }
.addon-card > span { min-width: 0; }
.addon-card small { overflow-wrap: anywhere; }
.addon-card b { color: var(--green-dark); font-size: .72rem; white-space: nowrap; }
.addon-card.is-coming { grid-template-columns: auto 1fr auto; opacity: .58; cursor: default; }
.addon-icon { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 8px; color: var(--green); background: #E3F8F0; font-size: .72rem; font-weight: 900; }
.billing-total { grid-template-columns: 1fr auto; margin-top: 11px; background: #02265F; color: white; border-color: #02265F; }
.billing-total small, .billing-total strong { display: block; }
.billing-total small { color: #E3F8F0; font-size: .59rem; }
.billing-total strong { margin-top: 2px; font-size: .72rem; }
.billing-total > b { font-size: 1.24rem; }
.billing-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.billing-plan { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px; min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: #FFFFFF; cursor: pointer; transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease; }
.billing-plan:hover, .billing-plan.is-selected { border-color: var(--green); background: #F3F8FC; box-shadow: 0 0 0 3px rgba(2,38,95,.08); }
.billing-plan-best::before { content: "საუკეთესო ფასი"; position: absolute; top: -9px; right: 10px; padding: 3px 7px; border-radius: 20px; color: white; background: var(--green); font-size: .54rem; font-weight: 800; letter-spacing: .04em; }
.billing-plan-copy, .billing-price { min-width: 0; }
.billing-plan-copy strong, .billing-plan-copy small, .billing-price strong, .billing-price small { display: block; }
.billing-plan-copy strong { font-size: .84rem; }
.billing-plan-copy small { margin-top: 3px; color: var(--muted); font-size: .64rem; }
.billing-price { text-align: right; }
.billing-price strong { color: var(--green-dark); font-size: 1.12rem; }
.billing-price small { margin-top: 2px; color: var(--muted); font-size: .6rem; }
.billing-features { display: grid; gap: 8px; margin: 18px 0; padding: 15px 17px 15px 34px; border: 1px solid var(--line); border-radius: 12px; color: #02265F; background: #FFFFFF; font-size: .74rem; line-height: 1.45; }
.billing-features li::marker { color: var(--green); }
.billing-promo-row { display: flex; justify-content: center; margin: -5px 0 12px; }
.billing-referral-button { display: inline-flex; min-height: 31px; align-items: center; justify-content: center; gap: 5px; padding: 5px 10px; border: 1px dashed #C4D8E9; border-radius: 8px; color: var(--green); background: #F3F8FC; font: inherit; font-size: .66rem; font-weight: 800; cursor: pointer; }
.billing-referral-button:hover { border-style: solid; background: #F3F8FC; }
.billing-referral-button small { margin-left: 2px; padding: 2px 5px; border-radius: 20px; color: #02265F; background: #E3F8F0; font-size: .48rem; letter-spacing: .03em; }
.referral-code-panel { margin: -3px 0 13px; padding: 13px; border: 1px solid #C4D8E9; border-radius: 11px; background: #F3F8FC; }
.referral-code-panel > label { display: block; margin-bottom: 7px; color: var(--green-dark); font-size: .7rem; font-weight: 800; }
.referral-code-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.referral-code-row input { width: 100%; min-width: 0; height: 39px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; outline: none; color: var(--ink); background: #FFFFFF; font: inherit; font-size: .76rem; text-transform: uppercase; }
.referral-code-row input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(2,38,95,.1); }
.referral-code-row .button { min-height: 39px; }
.referral-code-status { min-height: 17px; margin: 8px 0 0; color: var(--muted); font-size: .67rem; }
.referral-code-status.error { color: var(--danger); }
.referral-code-status.success { color: var(--green); font-weight: 750; }
.billing-status { min-height: 20px; margin: 0 0 4px; color: var(--muted); font-size: .72rem; text-align: center; }
.billing-status.error { color: var(--danger); }
.billing-status.success { color: var(--green); font-weight: 700; }
.billing-currency-note { margin: 12px 0 0; padding: 10px 12px; border: 1px solid #E3F8F0; border-radius: 10px; color: #02265F; background: #F3F8FC; font-size: .65rem; line-height: 1.55; text-align: center; }
.billing-currency-note strong { color: var(--green-dark); }
.billing-disclosure { margin: 12px 0 0; color: #02265F; font-size: .63rem; line-height: 1.5; text-align: center; }
.billing-disclosure a { color: var(--green); font-weight: 750; }
.site-footer { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-top: 28px; padding: 20px 4px 0; border-top: 1px solid #E3F8F0; color: var(--muted); font-size: .72rem; }
.site-footer strong, .site-footer span { display: block; }
.site-footer strong { margin-bottom: 4px; color: var(--ink); }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px 14px; }
.site-footer a { color: var(--green); font-weight: 750; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 20; max-width: min(390px, calc(100% - 48px)); padding: 13px 16px; border-radius: 11px; color: white; background: #02265F; box-shadow: 0 12px 30px rgba(2,38,95,.2); opacity: 0; pointer-events: none; transform: translateY(10px); transition: 180ms ease; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: var(--danger); }
.hidden { display: none !important; }

@media (max-width: 1400px) {
  .rule-grid, .photography-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field, .photography-grid .field { grid-column: span 1; }
}

@media (max-width: 800px) {
  .app-shell { width: min(100% - 22px, 720px); padding-top: 28px; }
  .hero { align-items: flex-start; flex-direction: column; }
  .hero-actions { width: 100%; align-items: flex-start; }
  .layout-options { grid-template-columns: 1fr; }
  .action-bar { grid-template-columns: 1fr auto; }
  .quota-status { grid-column: 1 / -1; padding: 8px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .profile-summary { grid-template-columns: 1fr 1fr; }
  .profile-summary > div:first-child { grid-column: 1 / -1; }
  .history-search-card { grid-template-columns: 1fr; }
  .history-panel { grid-column: 1; }
  .steps { grid-template-columns: 1fr; }
  .rule-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .photography-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .photography-grid .field { grid-column: span 1; }
  .analysis-overview, .metadata-scoreboard { grid-template-columns: repeat(2, 1fr); }
  .field { grid-column: span 1; }
  .action-bar { grid-template-columns: 1fr auto; }
  .operation-switch { grid-column: 1 / -1; }
  .table-wrap { overflow-x: auto; }
  table { min-width: 980px; }
}

@media (max-width: 520px) {
  .card { padding: 19px; }
  .button-row, .files-toolbar, .toolbar-actions { align-items: stretch; flex-direction: column; }
  .account-buttons { width: 100%; align-items: stretch; flex-direction: column; }
  .privacy-badge { white-space: normal; }
  .visualization-heading, .history-heading { align-items: stretch; flex-direction: column; }
  .history-search-card { gap: 15px; }
  .selected-layout-label { align-self: flex-start; }
  .history-heading input { width: 100%; }
  .plus-lock { grid-template-columns: auto 1fr; }
  .plus-lock .button { grid-column: 1 / -1; }
  .profile-summary { grid-template-columns: 1fr; }
  .profile-summary > div:first-child { grid-column: auto; }
  .phone-input-row { grid-template-columns: 1fr; }
  .social-auth-grid { grid-template-columns: 1fr; }
  .billing-plans { grid-template-columns: 1fr; }
  .site-footer { flex-direction: column; }
  .site-footer nav { justify-content: flex-start; }
  .addon-card { grid-template-columns: auto auto 1fr; }
  .addon-card b { grid-column: 3; }
  .addon-card.is-coming { grid-template-columns: auto 1fr; }
  .addon-card.is-coming b { grid-column: 2; }
  .package-heading { align-items: flex-start; flex-direction: column; }
  .referral-code-row { grid-template-columns: 1fr; }
  .rules-heading { align-items: flex-start; }
  .rules-heading .text-button { margin-left: 0; }
  .rule-grid { grid-template-columns: 1fr; }
  .photography-heading { align-items: stretch; flex-direction: column; }
  .photography-toggle { justify-content: center; }
  .criteria-heading { align-items: flex-start; flex-direction: column; }
  .photography-route { align-items: flex-start; flex-direction: column; }
  .photography-route span { white-space: normal; }
  .photography-grid { grid-template-columns: 1fr; }
  .analysis-overview { grid-template-columns: repeat(2, 1fr); }
  .metadata-scoreboard { grid-template-columns: repeat(2, 1fr); }
  .metadata-list { grid-template-columns: 1fr; }
  .metadata-list dt { padding-bottom: 3px; border-bottom: 0; }
  .metadata-list dd { padding-top: 3px; }
  .action-bar { bottom: 8px; gap: 12px; }
  .action-summary { display: none; }
  .start-button { min-width: 130px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
