:root {
    --font-main: 'Inter', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --bg: #f0f4f8;
    --bg2: #ffffff;
    --card: #ffffff;
    --text: #1a2332;
    --text2: #5a6a7e;
    --text-muted: #8fa0b8;
    --border: rgba(0, 50, 120, 0.08);
    --accent: #0078ff;
    --accent-glow: rgba(0, 120, 255, 0.15);
    --accent2: #00c896;
    --red: #ef4444;
    --orange: #f59e0b;
    --purple: #8b5cf6;
    --shadow-sm: 0 1px 3px rgba(0, 30, 80, 0.06), 0 1px 2px rgba(0, 30, 80, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 30, 80, 0.08);
    --shadow-lg: 0 8px 30px rgba(0, 30, 80, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

/* ===== LOGIN PAGE ===== */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, #e8f0fe 0%, #f0f4f8 50%, #eef2ff 100%);
}

.login-container {
    width: 100%;
    max-width: 380px;
    text-align: center;
}

.login-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px 28px;
    box-shadow: var(--shadow-lg);
}

.login-header {
    margin-bottom: 28px;
}

.login-logo {
    width: 64px;
    height: 64px;
    margin: 0 auto 12px;
    background: linear-gradient(135deg, var(--accent), var(--purple));
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 4px 16px rgba(0, 120, 255, 0.25);
}

.login-header h1 {
    font-size: 22px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-header p {
    font-size: 13px;
    color: var(--text2);
    margin-top: 4px;
}

/* ===== FORMS ===== */
.form-group {
    margin-bottom: 16px;
    text-align: left;
}

.form-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--text2);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: var(--font-main);
    font-size: 14px;
    color: var(--text);
    outline: none;
    transition: 0.2s;
}

.form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

textarea.form-input {
    resize: vertical;
    min-height: 80px;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 20px;
    border: none;
    border-radius: 12px;
    font-family: var(--font-main);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #005fcc);
    color: #fff;
    box-shadow: 0 2px 12px rgba(0, 120, 255, 0.25);
}

.btn-primary:hover {
    box-shadow: 0 4px 20px rgba(0, 120, 255, 0.35);
    transform: translateY(-1px);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-full {
    width: 100%;
}

.btn-danger {
    background: linear-gradient(135deg, var(--red), #dc2626);
    color: #fff;
}

.btn-outline {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--border);
    color: var(--text2);
    font-weight: 600;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 12px;
    border-radius: 8px;
}

.error-msg {
    color: var(--red);
    font-size: 12px;
    min-height: 18px;
    margin-bottom: 8px;
}

.footer-text {
    margin-top: 20px;
    font-size: 11px;
    color: var(--text-muted);
}

/* ===== APP PAGE ===== */
.app-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.app-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-topbar h1 {
    font-size: 16px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.app-content {
    flex: 1;
    padding: 16px;
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
}

/* ===== CAMERA SECTION ===== */
.camera-section {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow-md);
    margin-bottom: 16px;
}

.section-title {
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.camera-controls {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.camera-toggle {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    font-family: var(--font-main);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    color: var(--text2);
}

.camera-toggle.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.camera-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
}

.camera-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.camera-preview canvas {
    display: none;
}

.btn-capture {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 4px solid #fff;
    background: linear-gradient(135deg, var(--accent), var(--purple));
    box-shadow: 0 4px 16px rgba(0, 120, 255, 0.3);
    cursor: pointer;
    transition: 0.2s;
    display: block;
    margin: 0 auto;
}

.btn-capture:hover {
    transform: scale(1.1);
}

.btn-capture:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

.photo-count {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
}

/* ===== PHOTO THUMBNAILS ===== */
.photo-grid {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.photo-thumb {
    position: relative;
    width: 90px;
    height: 90px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid var(--border);
    box-shadow: var(--shadow-sm);
    animation: fadeIn 0.3s;
}

.photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-thumb .remove-photo {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    background: rgba(239, 68, 68, 0.9);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===== REPORT FORM ===== */
.report-section {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow-md);
    margin-bottom: 16px;
}

/* ===== GPS INFO ===== */
.gps-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(0, 200, 150, 0.06);
    border: 1px solid rgba(0, 200, 150, 0.15);
    border-radius: 10px;
    font-size: 11px;
    color: var(--accent2);
    font-weight: 600;
    margin-bottom: 16px;
}

.gps-info.error {
    background: rgba(239, 68, 68, 0.06);
    border-color: rgba(239, 68, 68, 0.15);
    color: var(--red);
}

/* ===== TOAST ===== */
.toast-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
}

.toast {
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    margin-top: 8px;
    animation: slideUp 0.3s;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.toast.success {
    background: var(--accent2);
}

.toast.error {
    background: var(--red);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== HISTORY ===== */
.history-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 10px;
    box-shadow: var(--shadow-sm);
}

.history-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.history-card-header .time {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
}

.history-card-header .status {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
}

.status-synced {
    background: rgba(0, 200, 150, 0.1);
    color: var(--accent2);
}

.status-pending {
    background: rgba(245, 158, 11, 0.1);
    color: var(--orange);
}

.history-photos {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}

.history-photos img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.history-ket {
    font-size: 12px;
    color: var(--text2);
    line-height: 1.5;
}

/* ===== TABS + DUAL PANEL ===== */
.app-topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.app-user-chip {
    font-size: 12px;
    color: var(--text2);
    font-weight: 600;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-tab-bar {
    display: flex;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.75);
    position: sticky;
    top: 52px;
    z-index: 99;
}

.app-tab {
    flex: 1;
    padding: 14px 8px;
    border: none;
    background: transparent;
    font-family: var(--font-main);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.app-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    background: rgba(0, 120, 255, 0.04);
}

.app-panel[hidden] {
    display: none !important;
}

.app-panel.active:not([hidden]) {
    display: block;
}

.report-hint {
    text-align: center;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 8px;
}

.report-history-block {
    margin-top: 8px;
}

.account-hint {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 14px;
}

.section-title-inline {
    padding: 0 4px;
}

/* ===== TRACK PANEL (from tracker) ===== */
.track-user-strip {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
}

.track-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), var(--purple));
    color: #fff;
    font-weight: 800;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.track-display-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.track-callsign {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.track-strip-right {
    margin-left: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.dot-online {
    color: var(--accent2);
}

.text-cyan {
    color: var(--accent) !important;
}

.text-orange {
    color: var(--orange) !important;
}

.text-green {
    color: var(--accent2) !important;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 12px;
}

.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 8px;
    text-align: center;
}

.stat-value {
    font-size: 20px;
    font-weight: 800;
    font-family: var(--font-mono);
    line-height: 1.1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.tracking-section {
    margin-bottom: 12px;
}

.tracking-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--shadow-sm);
}

.tracking-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    gap: 10px;
}

.track-live-badge {
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 5px 10px;
    border-radius: 20px;
    background: rgba(0, 120, 255, 0.12);
    color: var(--accent);
    border: 1px solid rgba(0, 120, 255, 0.25);
}

.track-live-hint {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.45;
    margin-bottom: 12px;
}

.tracking-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text2);
}

.coord-display {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.coord-item {
    background: var(--bg);
    border-radius: 10px;
    padding: 8px 10px;
}

.coord-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.coord-value {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--accent);
    font-weight: 700;
}

.sync-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--bg);
    border-radius: 10px;
    font-size: 11px;
}

.sync-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: var(--text2);
}

.sync-count {
    font-family: var(--font-mono);
    color: var(--orange);
    font-weight: 700;
}

.track-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 0 2px;
}

.section-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.log-list {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    max-height: 220px;
    overflow-y: auto;
    padding: 8px;
}

.log-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
    font-size: 12px;
}

.log-item:last-child {
    border-bottom: none;
}

.log-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.log-dot.online {
    background: var(--accent2);
}

.log-dot.offline {
    background: var(--orange);
}

.log-time {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    min-width: 72px;
}

.log-coord {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text2);
}

.sos-section {
    padding: 8px 0 24px;
}

.sos-btn {
    width: 100%;
    padding: 22px 16px;
    background: linear-gradient(135deg, #ff1a1a, #cc0000);
    border: 2px solid rgba(255, 51, 102, 0.35);
    border-radius: 16px;
    color: #fff;
    font-family: var(--font-main);
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 1px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(255, 26, 26, 0.25);
    animation: sos-pulse 3s ease-in-out infinite;
}

.sos-btn:active {
    transform: scale(0.98);
}

.sos-sub {
    display: block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
    opacity: 0.85;
    margin-top: 6px;
    text-transform: none;
}

@keyframes sos-pulse {

    0%,
    100% {
        box-shadow: 0 4px 24px rgba(255, 26, 26, 0.25);
    }

    50% {
        box-shadow: 0 6px 32px rgba(255, 26, 26, 0.45);
    }
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.status-online {
    background: rgba(0, 200, 150, 0.12);
    color: var(--accent2);
    border: 1px solid rgba(0, 200, 150, 0.25);
}

.status-offline {
    background: rgba(245, 158, 11, 0.12);
    color: var(--orange);
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    animation: blink-dot 2s ease-in-out infinite;
}

.status-online .status-dot {
    background: var(--accent2);
}

.status-offline .status-dot {
    background: var(--orange);
}

@keyframes blink-dot {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.35;
    }
}

.battery-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--text2);
}

.battery-icon {
    width: 28px;
    height: 14px;
    border: 2px solid var(--text-muted);
    border-radius: 3px;
    padding: 1px;
    position: relative;
}

.battery-icon::after {
    content: '';
    position: absolute;
    right: -4px;
    top: 3px;
    width: 2px;
    height: 6px;
    background: var(--text-muted);
    border-radius: 0 1px 1px 0;
}

.battery-fill {
    height: 100%;
    border-radius: 1px;
    background: var(--accent2);
    max-width: 100%;
}

.battery-icon.battery-mid .battery-fill {
    background: var(--orange);
}

.battery-icon.battery-low .battery-fill {
    background: var(--red);
}

.guard-connection-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 6px 16px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    z-index: 10001;
    transform: translateY(-100%);
    transition: transform 0.25s ease;
}

.guard-connection-bar.show {
    transform: translateY(0);
}

.guard-connection-bar.offline {
    background: linear-gradient(135deg, #c2410c, #ea580c);
    color: #fff;
}

.guard-connection-bar.syncing {
    background: linear-gradient(135deg, #0369a1, var(--accent));
    color: #fff;
}

.empty-state {
    text-align: center;
    padding: 24px 12px;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 28px;
    margin-bottom: 8px;
    opacity: 0.45;
}

.empty-state-text {
    font-size: 12px;
}

.toast.info {
    background: #64748b;
}
/* ===================================================================
   INSTALL GATE (pwa-guard/index.html)
   =================================================================== */
.install-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, #e8f0fe 0%, #f0f4f8 50%, #eef2ff 100%);
}

.install-wrap {
    width: 100%;
    max-width: 420px;
    text-align: center;
}

.install-card {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 32px 26px 28px;
    box-shadow: var(--shadow-lg);
}

.install-logo {
    width: 76px;
    height: 76px;
    margin: 0 auto 14px;
    background: linear-gradient(135deg, var(--accent), var(--purple));
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    box-shadow: 0 8px 24px rgba(0, 120, 255, 0.3);
}

.install-title {
    font-size: 22px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
}

.install-sub {
    color: var(--text2);
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 20px;
}

.install-bullets {
    list-style: none;
    text-align: left;
    background: rgba(0, 120, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 22px;
}

.install-bullets li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    font-size: 13px;
    color: var(--text);
    font-weight: 500;
}

.install-bullet-ico {
    font-size: 18px;
    width: 28px;
    text-align: center;
}

.install-state {
    margin-top: 4px;
}

.btn-install {
    padding: 16px 20px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    letter-spacing: 0.3px;
    box-shadow: 0 8px 24px rgba(0, 120, 255, 0.35) !important;
}

.install-hint {
    margin-top: 10px;
    color: var(--text2);
    font-size: 12px;
}

.install-hint-small {
    color: var(--text-muted);
    font-size: 11px;
    margin-top: 8px;
}

.install-ok {
    color: var(--accent2);
    font-weight: 700;
    font-size: 14px;
    padding: 14px;
    background: rgba(0, 200, 150, 0.08);
    border-radius: 12px;
}

.install-ios-steps,
.install-manual {
    text-align: left;
    background: rgba(0, 120, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 16px;
}

.install-ios-title,
.install-manual-title {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 8px;
    color: var(--accent);
}

.install-ios-steps ol {
    padding-left: 20px;
    font-size: 13px;
    line-height: 1.7;
    color: var(--text);
}

.install-ios-steps li {
    margin-bottom: 4px;
}

.ios-share {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 0 6px;
    border-radius: 4px;
    font-family: var(--font-mono);
}

.install-manual p {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text);
    margin-bottom: 6px;
}

.install-error {
    margin-top: 14px;
    padding: 10px 12px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 10px;
    color: var(--red);
    font-size: 12px;
    text-align: left;
}

/* ===================================================================
   PERMISSIONS ORCHESTRATOR (pwa-guard/permissions.html)
   =================================================================== */
.perm-page {
    min-height: 100vh;
    padding: 18px;
    background: linear-gradient(135deg, #e8f0fe 0%, #f0f4f8 50%, #eef2ff 100%);
}

.perm-wrap {
    max-width: 520px;
    margin: 0 auto;
}

.perm-header {
    text-align: center;
    margin-bottom: 18px;
    padding-top: 10px;
}

.perm-header h1 {
    font-size: 20px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
}

.perm-header p {
    color: var(--text2);
    font-size: 13px;
    line-height: 1.5;
    padding: 0 10px;
}

.perm-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
}

.perm-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
}

.perm-ico {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), var(--purple));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 10px rgba(0, 120, 255, 0.22);
}

.perm-body {
    flex: 1;
    min-width: 0;
}

.perm-title {
    font-weight: 700;
    font-size: 13.5px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.perm-required {
    font-size: 9px;
    background: rgba(239, 68, 68, 0.1);
    color: var(--red);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.perm-desc {
    font-size: 11.5px;
    color: var(--text2);
    margin-top: 3px;
    line-height: 1.4;
}

.perm-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    min-width: 86px;
}

.perm-pill {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.perm-pill.pending { background: #eef2ff; color: #6366f1; }
.perm-pill.granted { background: rgba(0, 200, 150, 0.12); color: var(--accent2); }
.perm-pill.denied { background: rgba(239, 68, 68, 0.12); color: var(--red); }
.perm-pill.unsupported { background: #f1f5f9; color: var(--text-muted); }

.perm-btn {
    font-size: 11px;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--accent);
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

.perm-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.perm-footer {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.perm-footer .btn {
    flex: 1;
}

.perm-hint {
    text-align: center;
    color: var(--text-muted);
    font-size: 11px;
    margin-top: 10px;
    line-height: 1.5;
}

/* ===================================================================
   TAMPER-PROOF PHOTO WATERMARK (client) — helper classes are inline on canvas
   =================================================================== */

/* Dashboard: guard offline ghost marker style applied inline via divIcon */

