:root {
    --green-900: #14532d;
    --green-700: #15803d;
    --green-500: #22c55e;
    --green-100: #dcfce7;
    --text: #0f172a;
    --muted: #64748b;
    --bg: #f8fafc;
    --card: #ffffff;
    --border: #e2e8f0;
    --danger: #ef4444;
    --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] {
    --text: #f1f5f9;
    --muted: #94a3b8;
    --bg: #0f172a;
    --card: #1e293b;
    --border: #334155;
}

*, *::before, *::after { box-sizing: border-box; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--text);
    background: var(--bg);
    min-height: 100dvh;
    overflow-x: hidden;
}

.auth-split {
    display: flex;
    min-height: 100dvh;
}

.auth-panel-left {
    flex: 1;
    background: linear-gradient(145deg, var(--green-900), var(--green-500));
    color: #fff;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-panel-left h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin: 0 0 1rem;
    font-weight: 700;
}

.auth-panel-left p {
    opacity: 0.9;
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 28rem;
}

.auth-panel-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--bg);
}

.auth-form-wrap {
    width: 100%;
    max-width: 420px;
}

.auth-form-wrap h2 {
    margin: 0 0 0.5rem;
    font-size: 1.75rem;
}

.auth-form-wrap .subtitle {
    color: var(--muted);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-group input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 1rem;
    background: var(--card);
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--green-500);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, opacity 0.15s;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--green-700), var(--green-500));
    color: #fff;
}

.btn-danger {
    background: #dc2626;
    color: #fff;
    border: none;
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-ghost {
    background: transparent;
    color: var(--green-700);
    border: 1px solid var(--green-500);
}

.alert-error {
    background: #fef2f2;
    color: var(--danger);
    padding: 0.75rem 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.alert-success {
    background: #f0fdf4;
    color: #166534;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.field-error {
    display: block;
    color: var(--danger);
    font-size: 0.8rem;
    margin-top: 0.35rem;
}

.auth-links {
    margin-top: 1.5rem;
    text-align: center;
    color: var(--muted);
}

.auth-links a {
    color: var(--green-700);
    font-weight: 600;
    text-decoration: none;
}

.pin-input {
    letter-spacing: 0.5em;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
}

@media (max-width: 768px) {
    .auth-panel-left { display: none; }
    .auth-panel-right { flex: 1; padding: 1.5rem; }
}

.owner-app {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    height: 100dvh;
    overflow: hidden;
    height: 100vh;
    overflow: hidden;
    min-height: 0;
}

.owner-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    z-index: 10;
}

.owner-header .brand {
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--green-700);
}

.owner-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.owner-header .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--green-500);
}

.notif-wrap {
    position: relative;
}

.notif-btn {
    position: relative;
    border: none;
    background: var(--green-100);
    color: var(--green-700);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notif-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notif-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(320px, 90vw);
    max-height: 360px;
    overflow-y: auto;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    z-index: 200;
}

.notif-dropdown-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--card);
}

.notif-dropdown-head button {
    border: none;
    background: none;
    color: var(--green-700);
    font-size: 0.75rem;
    cursor: pointer;
    font-weight: 600;
}

.notif-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
}

.notif-item.unread {
    background: rgba(34, 197, 94, 0.08);
}

.notif-item p {
    margin: 0.25rem 0;
    font-size: 0.875rem;
    color: var(--muted);
}

.notif-item small {
    color: var(--muted);
    font-size: 0.75rem;
}

.notif-empty {
    padding: 1rem;
    text-align: center;
    color: var(--muted);
    margin: 0;
}

.owner-body {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    position: relative;
    padding-bottom: calc(4.5rem + env(safe-area-inset-bottom));
}

/* Scrollable owner pages (profile, history) */
.owner-body .profile-page,
.owner-body .prof-page,
.owner-body .history-list,
.owner-body .history-detail,
.owner-body .hist-page {
    position: absolute;
    inset: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.owner-body .dash-home {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.owner-body:has(.dash-home) {
    padding-bottom: 0;
    overflow: hidden;
}

/* Full-height live camera / mic */
.owner-body .live-studio,
.owner-body .media-page,
.owner-body .pro-page {
    position: absolute;
    inset: 0;
}

.owner-body .media-empty,
.owner-body .pro-empty {
    position: absolute;
    inset: 0;
}

.owner-body:has(.pro-page),
.owner-body:has(.pro-empty),
.owner-body:has(.media-hub) {
    padding-bottom: 0;
    overflow: hidden;
}

.owner-body > .stream-view {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

#map {
    width: 100%;
    height: 100%;
}

/* Hide Google Maps default controls (map type, fullscreen, Street View pegman, zoom) */
#map .gmnoprint,
#map .gm-style-mtc,
#map .gm-fullscreen-control,
#map .gm-svpc,
#map .gm-bundled-control,
#map .gm-style-cc {
    display: none !important;
}

.map-user-strip {
    position: absolute;
    top: 0.75rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    padding: 0.35rem 0.5rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 999px;
    box-shadow: var(--shadow);
    z-index: 20;
    max-width: calc(100% - 2rem);
    overflow-x: auto;
}

.map-user-chip {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--green-500);
    padding: 0;
    overflow: hidden;
    cursor: pointer;
    background: var(--green-100);
    flex-shrink: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.map-user-chip.is-active {
    border-color: #fff;
    box-shadow: 0 0 0 3px var(--green-500), 0 8px 20px rgba(34, 197, 94, 0.45);
    transform: scale(1.08);
}

.map-user-chip img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.map-user-chip span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-weight: 700;
    color: var(--green-700);
}

.user-info-panel {
    position: absolute;
    bottom: calc(5.5rem + env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    width: min(340px, calc(100% - 2rem));
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1rem;
    box-shadow: var(--shadow);
    z-index: 25;
}

.map-panel-close {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    border: none;
    background: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--muted);
}

.map-info-card {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.map-info-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--green-500);
    flex-shrink: 0;
}

.map-info-avatar--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--green-700);
    color: #fff;
    font-size: 1.75rem;
    font-weight: 700;
}

.map-info-body {
    font-size: 0.9rem;
    line-height: 1.5;
}

.map-info-body strong {
    display: block;
    font-size: 1.05rem;
    margin-bottom: 0.25rem;
}

.owner-bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-shrink: 0;
    padding: 0.4rem 0 calc(0.4rem + env(safe-area-inset-bottom));
    background: var(--card);
    border-top: 1px solid var(--border);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}

.owner-bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    text-decoration: none;
    color: var(--muted);
    font-size: 0.7rem;
    padding: 0.35rem 0.5rem;
    border-radius: 10px;
    min-width: 56px;
}

.owner-bottom-nav a.active,
.owner-bottom-nav a:hover {
    color: var(--green-700);
}

.owner-bottom-nav svg {
    width: 22px;
    height: 22px;
}

.stream-view {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    display: block;
}

.stream-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--muted);
    text-align: center;
    padding: 2rem;
}

/* Mic page styles live in public/css/mic-player.css */

.mic-status {
    text-align: center;
    font-weight: 600;
    color: var(--text);
    max-width: 360px;
    line-height: 1.5;
}

.mic-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    max-width: 320px;
    width: 100%;
}

.mic-actions .btn-primary {
    width: 100%;
}

.mic-hint {
    font-size: 0.8rem;
    color: var(--muted);
    text-align: center;
    line-height: 1.4;
}

.mic-player {
    width: 100%;
    max-width: 400px;
}

.profile-page {
    padding-bottom: calc(6.5rem + env(safe-area-inset-bottom));
    box-sizing: border-box;
}

.profile-hero {
    text-align: center;
    padding: 2rem 1rem;
}

.profile-avatar-wrap {
    position: relative;
    display: inline-block;
}

.profile-hero img,
.profile-avatar-wrap img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--green-500);
    display: block;
}

.profile-avatar-edit {
    position: absolute;
    right: 2px;
    bottom: 2px;
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--card);
    border-radius: 50%;
    background: var(--green-600);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: background 0.2s, transform 0.15s;
}

.profile-avatar-edit:hover {
    background: var(--green-700);
    transform: scale(1.05);
}

.profile-avatar-edit:active {
    transform: scale(0.98);
}

.profile-section {
    padding: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.code-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 0.5rem;
}

.code-item > div {
    flex: 1;
    min-width: 0;
}

.code-item code {
    display: block;
    font-size: 0.8rem;
    word-break: break-all;
}

.code-item-actions {
    display: flex;
    flex-shrink: 0;
    flex-direction: column;
    gap: 0.35rem;
    align-items: stretch;
}

.code-item-actions .btn {
    white-space: nowrap;
    font-size: 0.8rem;
    padding: 0.4rem 0.65rem;
}

.profile-section h3 {
    margin-top: 0;
}

.theme-switch-row {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.theme-switch-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-weight: 600;
}

.theme-switch-label input {
    display: none;
}

.theme-switch-slider {
    width: 48px;
    height: 26px;
    background: var(--border);
    border-radius: 999px;
    position: relative;
    transition: background 0.2s;
}

.theme-switch-slider::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    background: #fff;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.theme-switch-label input:checked + .theme-switch-slider {
    background: var(--green-500);
}

.theme-switch-label input:checked + .theme-switch-slider::after {
    transform: translateX(22px);
}

.profile-logout-section {
    margin-top: 0.5rem;
}

.profile-logout-section h3 {
    margin-top: 0;
}

.profile-logout-desc {
    color: var(--muted);
    font-size: 0.875rem;
    margin: 0 0 1rem;
    line-height: 1.5;
}

.profile-logout-form {
    margin: 0;
}

.profile-logout-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    max-width: 280px;
    padding: 0.85rem 1.25rem;
}

.history-list {
    padding: 1rem;
    padding-bottom: calc(6.5rem + env(safe-area-inset-bottom));
    box-sizing: border-box;
}

.history-list__head {
    margin-bottom: 1.25rem;
}

.history-list__head h2 {
    margin: 0 0 0.25rem;
    font-size: 1.25rem;
}

.history-list__head p {
    margin: 0;
    color: var(--muted);
    font-size: 0.85rem;
}

.history-item {
    border-bottom: 1px solid var(--border);
}

.history-item--open {
    background: color-mix(in srgb, var(--green-100) 30%, transparent);
}

.history-item__toggle {
    display: block;
    width: 100%;
    padding: 1rem;
    border: none;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
    font: inherit;
}

.history-item__toggle:hover {
    background: color-mix(in srgb, var(--card) 80%, transparent);
}

.history-item__row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.history-item__chevron {
    margin-left: auto;
    font-size: 0.7rem;
    color: var(--muted);
    transition: transform 0.2s;
}

.history-item--open .history-item__chevron {
    transform: rotate(180deg);
}

.history-item__meta {
    color: var(--muted);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.history-item__recordings {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.history-rec-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid var(--border);
    color: var(--muted);
    background: transparent;
}

.history-rec-badge.has-data {
    color: var(--green-700);
    border-color: color-mix(in srgb, var(--green-500) 40%, var(--border));
    background: color-mix(in srgb, var(--green-100) 50%, transparent);
}

.history-item__body {
    padding: 0 1rem 1rem;
    border-top: 1px dashed var(--border);
}

.history-item__selfie {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
    margin: 0.75rem 0;
    border: 1px solid var(--border);
}

.history-rec-section {
    margin-top: 1rem;
}

.history-rec-section__title {
    margin: 0 0 0.5rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
    padding-bottom: 0.35rem;
    border-bottom: 1px solid var(--border);
}

.history-rec-block {
    padding: 0.75rem 0;
    border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
}

.history-rec-block:last-child {
    border-bottom: none;
}

.history-rec-block__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    font-size: 0.75rem;
    color: var(--muted);
    margin-bottom: 0.5rem;
}

.history-rec-block__type {
    font-weight: 700;
    color: var(--text);
}

.history-rec-delete {
    margin-left: auto;
    padding: 0.3rem 0.65rem;
    border: 1px solid color-mix(in srgb, var(--danger) 35%, var(--border));
    border-radius: 8px;
    background: color-mix(in srgb, var(--danger) 8%, transparent);
    color: var(--danger);
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.history-rec-delete:hover {
    background: color-mix(in srgb, var(--danger) 18%, transparent);
    border-color: var(--danger);
}

.history-rec-empty {
    font-size: 0.8rem;
    color: var(--muted);
    margin: 0.35rem 0;
    line-height: 1.5;
}

.history-detail {
    padding: 1rem;
    padding-bottom: calc(6.5rem + env(safe-area-inset-bottom));
}

.history-back {
    display: inline-block;
    margin-bottom: 1rem;
    color: var(--green-700);
    text-decoration: none;
    font-weight: 600;
}

.history-detail__head h2 {
    margin: 0 0 0.35rem;
    display: inline-block;
    margin-right: 0.5rem;
}

.history-detail__meta {
    color: var(--muted);
    font-size: 0.875rem;
    margin: 0.5rem 0 1rem;
}

.history-detail__selfie {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid var(--border);
}

.history-detail__section {
    margin: 1.5rem 0 0.75rem;
    font-size: 1rem;
}

.rec-playback {
    margin-top: 0.75rem;
}

.rec-playback__camera {
    max-height: 240px;
    border-radius: 8px;
}

.rec-playback__controls {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.rec-playback__status {
    font-size: 0.8rem;
    color: var(--muted);
    margin: 0.35rem 0 0;
}

.live-page {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.live-page--camera .stream-view {
    flex: 1;
    min-height: 200px;
}

.rec-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem 0;
    flex-shrink: 0;
}

.rec-bar--mic {
    padding-top: 0.25rem;
    justify-content: center;
}

.rec-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 999px;
    background: var(--green-600);
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}

.rec-btn:hover {
    background: var(--green-700);
}

.rec-btn--active {
    background: #dc2626;
    animation: rec-pulse 1.5s ease-in-out infinite;
}

.rec-btn--active:hover {
    background: #b91c1c;
}

@keyframes rec-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

.rec-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    background: #dc2626;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.rec-timer {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
}

.rec-status {
    text-align: center;
    font-size: 0.8rem;
    color: var(--muted);
    padding: 0.25rem 1rem 0.5rem;
    margin: 0;
    flex-shrink: 0;
}

/* Recording confirm dialog */
body.rec-confirm-open {
    overflow: hidden;
}

.rec-confirm {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.rec-confirm[hidden] {
    display: none !important;
}

.rec-confirm__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
}

.rec-confirm__panel {
    position: relative;
    width: 100%;
    max-width: 340px;
    padding: 1.5rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.rec-confirm__icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.rec-confirm__title {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
}

.rec-confirm__text {
    margin: 0 0 1.25rem;
    font-size: 0.875rem;
    color: var(--muted);
    line-height: 1.5;
}

.rec-confirm__actions {
    display: flex;
    gap: 0.5rem;
}

.rec-confirm__btn {
    flex: 1;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    background: transparent;
    color: var(--text);
}

.rec-confirm__btn--ok {
    background: var(--green-600);
    border-color: var(--green-600);
    color: #fff;
}

.rec-confirm__btn--ok:hover {
    background: var(--green-700);
}

.rec-confirm__btn--cancel:hover {
    background: color-mix(in srgb, var(--border) 50%, transparent);
}

.badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-active { background: #dcfce7; color: #166534; }
.badge-completed { background: #e0e7ff; color: #3730a3; }

.notification-dot {
    position: absolute;
    top: 2px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
}

.admin-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.25rem;
    text-align: center;
}

.stat-card strong {
    display: block;
    font-size: 2rem;
    color: var(--green-700);
}

/* Delete confirmation modal (must sit outside .owner-body scroll area) */
.lt-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: lt-modal-fade-in 0.2s ease-out;
}

.lt-modal-overlay[hidden] {
    display: none !important;
}

.lt-modal {
    width: 100%;
    max-width: 400px;
    background: var(--card);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.75rem 1.5rem 1.5rem;
    box-shadow: var(--shadow), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
    text-align: center;
    animation: lt-modal-slide-in 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.lt-modal-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: color-mix(in srgb, var(--danger) 12%, transparent);
    color: var(--danger);
}

.lt-modal-icon svg {
    width: 28px;
    height: 28px;
}

.lt-modal-title {
    margin: 0 0 0.5rem;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.lt-modal-text {
    margin: 0 0 1.5rem;
    font-size: 0.9375rem;
    line-height: 1.55;
    color: var(--muted);
}

.lt-modal-actions {
    display: flex;
    gap: 0.625rem;
    justify-content: center;
}

.lt-modal-actions .btn {
    flex: 1;
    min-width: 0;
    padding: 0.75rem 1rem;
}

@keyframes lt-modal-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes lt-modal-slide-in {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
