:root {
    color-scheme: light;
    --bg: #f4f7fb;
    --panel: #ffffff;
    --line: #dfe7f2;
    --text: #1f2937;
    --muted: #6b7280;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --success: #16a34a;
    --warning: #f59e0b;
    --danger: #dc2626;
    --shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: linear-gradient(180deg, #eef4ff 0%, var(--bg) 240px);
    color: var(--text);
    font: 15px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body.login-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at top, rgba(37, 99, 235, 0.12), transparent 38%),
        linear-gradient(180deg, #edf3ff 0%, #f6f8fc 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0 48px;
}

.login-shell {
    width: min(460px, calc(100% - 32px));
    min-height: 100vh;
    margin: 0 auto;
    padding: 40px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-brand {
    text-align: center;
    margin-bottom: 22px;
}

.login-brand h1 {
    margin: 0;
    font-size: clamp(30px, 5vw, 42px);
    line-height: 1.12;
}

.login-brand .eyebrow {
    margin-bottom: 10px;
}

.login-brand .subtitle {
    margin-top: 10px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 24px;
}

.page-header-main {
    min-width: 0;
}

.page-header-compact {
    align-items: center;
    margin-bottom: 18px;
    padding: 18px 20px;
    border: 1px solid rgba(223, 231, 242, 0.85);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.page-header-compact .eyebrow {
    margin-bottom: 6px;
}

.page-header-compact h1 {
    font-size: clamp(30px, 4vw, 42px);
}

.page-header-compact .subtitle {
    margin-top: 6px;
}

.header-side,
.header-actions {
    display: grid;
    gap: 12px;
    justify-items: end;
}

.header-actions {
    color: var(--muted);
}

.header-actions-compact {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.page-header h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.15;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--primary);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 12px;
}

.subtitle {
    margin: 10px 0 0;
    color: var(--muted);
}

.header-card {
    min-width: 130px;
    padding: 18px 20px;
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow);
    text-align: center;
}

.header-card strong {
    display: block;
    font-size: 30px;
    color: var(--primary);
}

.header-card span {
    color: var(--muted);
}

.store-panel {
    margin-bottom: 4px;
}

.grid,
.detail-grid {
    display: grid;
    gap: 24px;
}

.grid {
    grid-template-columns: minmax(340px, 440px) 1fr;
}

.detail-grid {
    grid-template-columns: 1.15fr 0.85fr;
    margin-bottom: 24px;
}

.panel {
    background: var(--panel);
    border: 1px solid rgba(223, 231, 242, 0.8);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
}

.login-card {
    padding: 28px;
    border-radius: 28px;
    box-shadow: 0 28px 56px rgba(15, 23, 42, 0.12);
}

.login-card-title {
    text-align: center;
    margin-bottom: 24px;
}

.login-form {
    gap: 18px;
}

.login-form .button {
    width: 100%;
    min-height: 52px;
    margin-top: 4px;
}

.panel-title {
    margin-bottom: 20px;
}

.panel-title h2 {
    margin: 0;
    font-size: 21px;
}

.panel-title p {
    margin: 6px 0 0;
    color: var(--muted);
}

.form {
    display: grid;
    gap: 16px;
}

.field {
    display: grid;
    gap: 8px;
}

.field span {
    font-weight: 600;
}

.field small {
    color: var(--muted);
}

.helper-text {
    margin: -6px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.field-row {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px 14px;
    font: inherit;
    background: #fbfdff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: rgba(37, 99, 235, 0.65);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

textarea {
    resize: vertical;
    min-height: 112px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border: 0;
    border-radius: 14px;
    padding: 0 18px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.button-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.button-secondary {
    color: #fff;
    background: linear-gradient(135deg, #0f766e 0%, #0f9a82 100%);
}

.button-ghost {
    color: var(--text);
    background: #eef2ff;
}

.store-toolbar {
    display: flex;
    gap: 18px;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 18px;
}

.store-switch-form {
    flex: 1 1 auto;
}

.store-switch-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.store-summary-card,
.store-inline-note {
    display: grid;
    gap: 4px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #f8fbff;
}

.store-summary-card {
    min-width: 160px;
}

.store-summary-card strong {
    font-size: 24px;
    color: var(--primary);
}

.store-summary-card span,
.store-summary-card small,
.store-inline-note {
    color: var(--muted);
}

.store-backoffice-link {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    padding-top: 8px;
}

.alert {
    margin-bottom: 20px;
    border-radius: 14px;
    padding: 14px 16px;
    font-weight: 600;
}

.alert-success {
    color: #166534;
    background: rgba(34, 197, 94, 0.12);
}

.alert-error {
    color: #991b1b;
    background: rgba(239, 68, 68, 0.12);
}

.app-toast-stack {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 1200;
    display: grid;
    gap: 12px;
    width: min(380px, calc(100vw - 24px));
    pointer-events: none;
}

.app-toast {
    display: grid;
    grid-template-columns: 48px 1fr 36px;
    gap: 12px;
    align-items: start;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(16px);
    transform: translateY(-10px) scale(0.98);
    opacity: 0;
    transition: opacity 0.22s ease, transform 0.22s ease;
    pointer-events: auto;
}

.app-toast.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.app-toast-success {
    border-color: rgba(22, 163, 74, 0.18);
    background: linear-gradient(135deg, rgba(240, 253, 244, 0.96) 0%, rgba(236, 253, 245, 0.92) 100%);
}

.app-toast-error {
    border-color: rgba(220, 38, 38, 0.18);
    background: linear-gradient(135deg, rgba(254, 242, 242, 0.96) 0%, rgba(255, 241, 242, 0.92) 100%);
}

.app-toast-info {
    border-color: rgba(37, 99, 235, 0.16);
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.96) 0%, rgba(238, 242, 255, 0.92) 100%);
}

.app-toast-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    font-size: 22px;
    font-weight: 800;
}

.app-toast-success .app-toast-icon {
    color: #166534;
    background: rgba(34, 197, 94, 0.14);
}

.app-toast-error .app-toast-icon {
    color: #b91c1c;
    background: rgba(239, 68, 68, 0.14);
}

.app-toast-info .app-toast-icon {
    color: var(--primary);
    background: rgba(37, 99, 235, 0.12);
}

.app-toast-content {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.app-toast-content strong {
    font-size: 15px;
}

.app-toast-content span {
    color: var(--muted);
    line-height: 1.5;
    word-break: break-word;
}

.app-toast-close,
.app-modal-close {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.06);
    color: var(--muted);
    font: inherit;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.app-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.34);
    backdrop-filter: blur(8px);
}

body.has-app-modal {
    overflow: hidden;
}

.app-modal {
    width: min(460px, 100%);
    display: grid;
    gap: 18px;
    padding: 22px;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 24px 54px rgba(15, 23, 42, 0.22);
}

.app-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.app-modal-header h3 {
    margin: 0;
    font-size: 22px;
}

.app-modal-message {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.7;
}

.app-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.app-gallery-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(8px);
}

body.has-app-gallery {
    overflow: hidden;
}

.app-gallery {
    position: relative;
    width: calc(100vw - 24px);
    max-width: 1680px;
    display: grid;
    grid-template-columns: 60px minmax(0, 1fr) 60px;
    align-items: center;
    gap: 8px;
}

.app-gallery-stage {
    position: relative;
    min-width: 0;
    display: flex;
    justify-items: center;
    justify-content: center;
    align-items: center;
}

.app-gallery-image {
    width: auto;
    max-width: min(100%, calc(100vw - 160px));
    max-height: calc(100vh - 24px);
    border-radius: 22px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.28);
    object-fit: contain;
    background: rgba(255, 255, 255, 0.08);
}

.app-gallery-meta {
    position: absolute;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    min-width: min(560px, calc(100% - 32px));
    display: grid;
    gap: 4px;
    text-align: center;
    color: #fff;
    padding: 14px 18px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.18) 0%, rgba(15, 23, 42, 0.66) 100%);
    backdrop-filter: blur(10px);
}

.app-gallery-meta strong {
    font-size: 16px;
}

.app-gallery-meta span {
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
}

.app-gallery-close,
.app-gallery-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.app-gallery-close {
    position: absolute;
    top: -8px;
    right: -8px;
    z-index: 1;
    font-size: 30px;
    line-height: 1;
}

.app-gallery-nav {
    font-size: 34px;
    line-height: 1;
}

.app-gallery-nav:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.customer-list,
.photo-grid {
    display: grid;
    gap: 14px;
}

.search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}

.search-box {
    position: relative;
    flex: 1 1 240px;
}

.search-form input {
    width: 100%;
}

.search-summary {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 14px;
}

.search-suggestions {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 20;
    display: grid;
    gap: 6px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 18px 30px rgba(15, 23, 42, 0.12);
}

.search-suggestion-item,
.search-suggestion-footer {
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    border-radius: 12px;
}

.search-suggestion-item:hover,
.search-suggestion-footer:hover {
    background: #f4f8ff;
}

.search-suggestion-item strong {
    font-size: 14px;
}

.search-suggestion-item span,
.search-suggestion-empty,
.search-suggestion-footer {
    color: var(--muted);
    font-size: 13px;
}

.search-suggestion-empty {
    padding: 10px 12px;
}

.customer-card,
.photo-card {
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.customer-card {
    display: grid;
    gap: 12px;
    padding: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
}

.customer-card:hover,
.photo-card:hover {
    transform: translateY(-2px);
    border-color: rgba(37, 99, 235, 0.25);
    box-shadow: 0 14px 24px rgba(37, 99, 235, 0.08);
}

.customer-card-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.customer-card-head strong {
    font-size: 18px;
}

.customer-card-head span,
.summary {
    color: var(--muted);
}

.meta-grid {
    display: grid;
    gap: 8px 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    color: var(--text);
    font-size: 14px;
}

.summary {
    margin: 0;
}

.empty-state {
    padding: 28px 18px;
    border: 1px dashed var(--line);
    border-radius: 16px;
    text-align: center;
    color: var(--muted);
    background: #fbfdff;
}

.photo-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.photo-card {
    background: #fff;
}

.photo-card > a {
    display: block;
}

.photo-card img {
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background: #e5e7eb;
}

.photo-meta {
    display: grid;
    gap: 4px;
    padding: 14px;
}

.photo-meta strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.photo-meta span {
    color: var(--muted);
    font-size: 13px;
}

.photo-card-footer {
    display: flex;
    justify-content: flex-end;
    padding: 0 14px 14px;
}

.photo-delete-button {
    border: 0;
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(220, 38, 38, 0.12);
    color: var(--danger);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.camera-entry {
    display: grid;
    gap: 16px;
    align-content: start;
}

.camera-entry-text {
    margin: 0;
    color: var(--muted);
}

.action-stack,
.visit-list {
    display: grid;
    gap: 18px;
}

.camera-main {
    display: grid;
    gap: 24px;
}

body.camera-screen-body {
    margin: 0;
    background: #000;
    overflow: hidden;
}

.camera-screen {
    width: 100%;
    min-height: 100svh;
    background: #000;
}

.camera-fullscreen {
    position: relative;
    width: 100%;
    height: 100svh;
    overflow: hidden;
    background: #000;
}

.camera-fullscreen video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

.camera-overlay {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 3;
}

.camera-overlay-top {
    top: 0;
    display: grid;
    gap: 12px;
    padding: calc(env(safe-area-inset-top, 0px) + 18px) 18px 0;
}

.camera-overlay-bottom {
    bottom: 0;
    display: grid;
    gap: 14px;
    padding: 24px 16px calc(env(safe-area-inset-bottom, 0px) + 24px);
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.24) 18%, rgba(0, 0, 0, 0.82) 100%);
}

.camera-pill-group {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding-right: 64px;
}

.camera-pill,
.camera-alert,
.camera-float-button,
.camera-close-button,
.camera-thumbs-shell {
    pointer-events: auto;
}

.camera-pill {
    display: grid;
    gap: 2px;
    padding: 12px 14px;
    border-radius: 16px;
    color: #fff;
    background: rgba(15, 23, 42, 0.44);
    backdrop-filter: blur(14px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.camera-title-pill strong {
    font-size: 18px;
    line-height: 1.2;
}

.camera-title-pill span,
.camera-count-pill span {
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
}

.camera-count-pill {
    min-width: 88px;
    text-align: center;
}

.camera-count-pill strong {
    font-size: 28px;
    line-height: 1;
}

.camera-alert {
    width: min(520px, calc(100% - 24px));
    border-radius: 16px;
    padding: 12px 14px;
    font-weight: 700;
    backdrop-filter: blur(14px);
}

.camera-alert-success {
    color: #dcfce7;
    background: rgba(22, 163, 74, 0.32);
}

.camera-alert-error {
    color: #fee2e2;
    background: rgba(220, 38, 38, 0.34);
}

.camera-close-button {
    position: absolute;
    top: calc(env(safe-area-inset-top, 0px) + 18px);
    right: 18px;
    z-index: 4;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    font-size: 26px;
    line-height: 1;
    background: rgba(15, 23, 42, 0.44);
    backdrop-filter: blur(14px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.visit-card {
    display: grid;
    gap: 16px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.visit-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.visit-title {
    display: grid;
    gap: 4px;
}

.visit-title strong {
    font-size: 18px;
}

.visit-title span,
.visit-note {
    color: var(--muted);
}

.visit-note {
    margin: 0;
}

.visit-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
}

.pill {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    font-weight: 700;
}


.camera-stage {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: #0f172a;
    min-height: 560px;
}

.camera-stage video {
    width: 100%;
    min-height: 560px;
    max-height: 80vh;
    object-fit: contain;
    background: #020617;
}

.camera-placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    color: rgba(255, 255, 255, 0.88);
    text-align: center;
    background: rgba(2, 6, 23, 0.36);
    z-index: 2;
}

.camera-thumbs-shell {
    display: grid;
    gap: 8px;
}

.camera-thumbs-label {
    color: rgba(255, 255, 255, 0.86);
    font-size: 13px;
    font-weight: 700;
}

.camera-thumbs-track {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.camera-thumb {
    flex: 0 0 74px;
    width: 74px;
    height: 74px;
    overflow: hidden;
    border-radius: 16px;
    border: 2px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}

.camera-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.camera-thumbs-empty {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    padding: 0 14px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.84);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
}

.camera-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    pointer-events: auto;
}

.camera-float-button {
    width: 64px;
    height: 64px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    font: inherit;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(14px);
    box-shadow: 0 14px 26px rgba(0, 0, 0, 0.22);
    cursor: pointer;
}

.camera-shutter {
    width: 96px;
    height: 96px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 4px solid rgba(255, 255, 255, 0.92);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.32);
    cursor: pointer;
}

.camera-shutter span {
    width: 70px;
    height: 70px;
    display: block;
    border-radius: 999px;
    background: #fff;
}

.camera-shutter:disabled {
    opacity: 0.52;
    cursor: not-allowed;
}

.camera-shutter:not(:disabled):active span {
    transform: scale(0.94);
}

.camera-status {
    margin: 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.92);
    font-weight: 600;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.32);
}

.camera-shortcut-hint {
    margin: 8px 0 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.24);
}

.camera-status.success {
    color: #86efac;
}

.camera-status.error {
    color: #fca5a5;
}

.hidden {
    display: none !important;
}

.back-link {
    color: var(--primary);
}

@media (max-width: 900px) {
    .grid,
    .detail-grid,
    .field-row {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
    }

    .login-shell {
        width: min(100%, calc(100% - 24px));
        padding: 24px 0 32px;
    }

    .login-card {
        padding: 22px 18px;
        border-radius: 22px;
    }

    .page-header-compact {
        padding: 16px;
        gap: 14px;
        align-items: flex-start;
    }

    .header-actions-compact {
        width: 100%;
        justify-content: flex-start;
    }

    .header-card {
        width: 100%;
        text-align: left;
    }

    .camera-stage,
    .camera-stage video {
        min-height: 420px;
        max-height: 72vh;
    }

    .camera-pill-group {
        padding-right: 56px;
    }

    .camera-title-pill strong {
        font-size: 16px;
    }

    .camera-close-button {
        top: calc(env(safe-area-inset-top, 0px) + 14px);
        right: 14px;
        width: 44px;
        height: 44px;
        font-size: 24px;
    }

    .camera-float-button {
        width: 56px;
        height: 56px;
    }

    .camera-shutter {
        width: 88px;
        height: 88px;
    }

    .camera-shutter span {
        width: 64px;
        height: 64px;
    }

    .camera-thumb {
        flex-basis: 66px;
        width: 66px;
        height: 66px;
    }

    .app-toast-stack {
        top: 12px;
        right: 12px;
        left: 12px;
        width: auto;
    }

    .app-toast {
        grid-template-columns: 42px 1fr 32px;
        gap: 10px;
        padding: 12px;
    }

    .app-toast-icon {
        width: 42px;
        height: 42px;
        border-radius: 14px;
        font-size: 20px;
    }

    .app-modal {
        padding: 18px;
        border-radius: 18px;
    }

    .app-modal-actions {
        flex-direction: column-reverse;
    }

    .visit-header,
    .visit-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .app-gallery-backdrop {
        padding: 8px;
    }

    .app-gallery {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .app-gallery-prev,
    .app-gallery-next {
        position: fixed;
        top: 50%;
        transform: translateY(-50%);
    }

    .app-gallery-prev {
        left: 12px;
    }

    .app-gallery-next {
        right: 12px;
    }

    .app-gallery-close {
        position: fixed;
        top: 12px;
        right: 12px;
    }

    .app-gallery-image {
        max-width: calc(100vw - 16px);
        max-height: calc(100vh - 16px);
        border-radius: 14px;
    }

    .app-gallery-meta {
        bottom: 10px;
        min-width: calc(100% - 20px);
        padding: 12px 14px;
    }
}
