/* ============================================================
   SumFace — Design System
   Professional · Trustworthy · Enterprise SaaS
   ============================================================ */

/* ---------- Reset & Base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    /* Brand colors */
    --brand-blue: #2563EB;
    --brand-blue-dark: #1D4ED8;
    --brand-blue-light: #DBEAFE;
    --brand-navy: #0F172A;
    --brand-navy-2: #1E293B;
    --brand-navy-3: #334155;

    /* Family warmth accent */
    --brand-pink: #EC4899;
    --brand-purple: #7C3AED;

    /* Status colors */
    --success: #10B981;
    --success-bg: #D1FAE5;
    --warning: #F59E0B;
    --warning-bg: #FEF3C7;
    --danger: #EF4444;
    --danger-bg: #FEE2E2;
    --info: #3B82F6;
    --info-bg: #DBEAFE;

    /* Neutrals */
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;

    /* Semantic */
    --bg: #FFFFFF;
    --bg-subtle: #F9FAFB;
    --bg-muted: #F3F4F6;
    --text: #111827;
    --text-muted: #6B7280;
    --text-light: #9CA3AF;
    --border: #E5E7EB;
    --border-strong: #D1D5DB;

    /* Elevation */
    --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.05);
    --shadow: 0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px -1px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);

    /* Radius */
    --radius-sm: 6px;
    --radius: 8px;
    --radius-md: 10px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
    --radius-full: 9999px;

    /* Typography */
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: ui-monospace, 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
}

html { font-size: 16px; }

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--brand-blue); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--brand-blue-dark); }

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

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.25;
    color: var(--text);
    letter-spacing: -0.02em;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.375rem; }
h4 { font-size: 1.125rem; }

p { margin: 0; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    border: 1px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
    background: var(--brand-blue);
    color: white;
    box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
    background: var(--brand-blue-dark);
    color: white;
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: white;
    color: var(--text);
    border-color: var(--border-strong);
}
.btn-secondary:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
    color: var(--text);
}

.btn-ghost {
    background: transparent;
    color: var(--text);
}
.btn-ghost:hover {
    background: var(--gray-100);
    color: var(--text);
}

.btn-danger {
    background: var(--danger);
    color: white;
}
.btn-danger:hover { background: #DC2626; color: white; }

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
    border-radius: var(--radius-md);
}
.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

/* ---------- Top Navigation ---------- */
.topnav {
    background: white;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    height: 64px;
}
.topnav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.topnav .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    color: var(--brand-navy);
}
.topnav .brand-logo {
    width: 32px;
    height: 32px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-purple));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 14px;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}
.nav-links a {
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-600);
    border-radius: var(--radius);
    transition: all 0.15s;
}
.nav-links a:hover {
    background: var(--gray-100);
    color: var(--text);
}
.nav-links a.active {
    color: var(--brand-blue);
    background: var(--brand-blue-light);
}
.nav-links a.logout {
    color: var(--gray-500);
}

/* ---------- Container ---------- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
}
.container-narrow {
    max-width: 720px;
    margin: 0 auto;
    padding: 32px 24px;
}

/* ---------- Cards & Panels ---------- */
.card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}
.card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text);
}
.panel {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

/* ---------- Hero Section ---------- */
.hero {
    padding: 32px 0 40px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 40px;
}
.hero h1 {
    font-size: 2.25rem;
    margin-bottom: 8px;
}
.hero .subtitle {
    font-size: 1rem;
    color: var(--text-muted);
}

/* ---------- Stats ---------- */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}
.stat {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}
.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.03em;
}
.stat-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 6px;
}

/* ---------- Child/Device Cards ---------- */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}
.child-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.child-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--brand-blue);
    transform: translateY(-2px);
}
.child-header {
    display: flex;
    align-items: center;
    gap: 12px;
}
.child-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: var(--brand-blue-light);
    color: var(--brand-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
}
.child-name {
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
}
.child-status {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}
.child-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
    color: var(--text-muted);
}
.child-info .row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.child-info .row strong {
    color: var(--text);
    font-weight: 500;
}
.child-actions {
    margin-top: auto;
    padding-top: 8px;
}

/* ---------- Status Dots ---------- */
.dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    flex-shrink: 0;
}
.dot-online { background: var(--success); box-shadow: 0 0 0 3px var(--success-bg); }
.dot-offline { background: var(--gray-400); }
.dot-warning { background: var(--warning); }
.dot-danger { background: var(--danger); }

/* ---------- Badges ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--radius-full);
    background: var(--gray-100);
    color: var(--gray-600);
}
.badge-success { background: var(--success-bg); color: #047857; }
.badge-warning { background: var(--warning-bg); color: #B45309; }
.badge-danger { background: var(--danger-bg); color: #B91C1C; }
.badge-info { background: var(--info-bg); color: #1D4ED8; }

/* ---------- Tables ---------- */
.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.table thead th {
    background: var(--gray-50);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}
.table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    color: var(--text);
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: var(--gray-50); }

/* ---------- Forms ---------- */
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 6px;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    font-family: inherit;
    font-size: 15px;
    color: var(--text);
    background: white;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    transition: all 0.15s;
    outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.form-group input::placeholder { color: var(--text-light); }
.form-hint {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}
.form-error {
    background: var(--danger-bg);
    color: var(--danger);
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    margin-bottom: 20px;
    border-left: 3px solid var(--danger);
}
.form-success {
    background: var(--success-bg);
    color: #047857;
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    margin-bottom: 20px;
    border-left: 3px solid var(--success);
}

/* ---------- Alerts ---------- */
.alert-item {
    display: flex;
    gap: 14px;
    padding: 16px;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 10px;
    transition: box-shadow 0.15s;
}
.alert-item:hover { box-shadow: var(--shadow-sm); }
.alert-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.alert-icon-warning { background: var(--warning-bg); color: var(--warning); }
.alert-icon-danger { background: var(--danger-bg); color: var(--danger); }
.alert-icon-info { background: var(--info-bg); color: var(--info); }
.alert-body { flex: 1; }
.alert-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}
.alert-detail {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.alert-time {
    font-size: 12px;
    color: var(--text-light);
}

/* ---------- Media Grid ---------- */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}
.media-tile {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.15s;
}
.media-tile:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--brand-blue);
}
.media-thumb {
    width: 100%;
    height: 140px;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--gray-400);
    overflow: hidden;
}
.media-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.media-meta {
    padding: 12px;
    font-size: 13px;
}
.media-name {
    font-weight: 500;
    color: var(--text);
    word-break: break-all;
    margin-bottom: 4px;
}
.media-detail { color: var(--text-muted); font-size: 12px; }

/* ---------- Quick Actions Grid ---------- */
.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}
.action-tile {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s;
    color: var(--text);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.action-tile:hover {
    border-color: var(--brand-blue);
    box-shadow: var(--shadow);
    color: var(--text);
    text-decoration: none;
}
.action-tile-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    background: var(--brand-blue-light);
    color: var(--brand-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}
.action-tile-label {
    font-size: 14px;
    font-weight: 500;
}

/* ---------- Empty State ---------- */
.empty-state {
    padding: 60px 24px;
    text-align: center;
    color: var(--text-muted);
    background: var(--bg-subtle);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-lg);
}
.empty-state h3 {
    color: var(--text);
    font-size: 17px;
    margin-bottom: 8px;
}
.empty-state p {
    font-size: 14px;
    margin-bottom: 20px;
}

/* ---------- Landing Page ---------- */
.landing-hero {
    padding: 80px 24px;
    text-align: center;
    background: linear-gradient(180deg, var(--bg) 0%, var(--bg-subtle) 100%);
}
.landing-hero h1 {
    font-size: 3.25rem;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}
.landing-hero p.lead {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 640px;
    margin: 0 auto 32px;
    line-height: 1.6;
}
.landing-hero .cta-group {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.landing-hero .trust-line {
    font-size: 14px;
    color: var(--text-muted);
}
.landing-screenshot {
    max-width: 1000px;
    margin: 60px auto 0;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    border: 1px solid var(--border);
}

/* ---------- Section Headers ---------- */
.section {
    padding: 80px 24px;
}
.section-alt {
    background: var(--bg-subtle);
}
.section-inner {
    max-width: 1100px;
    margin: 0 auto;
}
.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}
.section-sub {
    text-align: center;
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 60px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ---------- Features Grid ---------- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
}
.feature {
    text-align: left;
}
.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--brand-blue-light);
    color: var(--brand-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 16px;
}
.feature h3 {
    font-size: 1.125rem;
    margin-bottom: 8px;
}
.feature p {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ---------- Pricing ---------- */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: 800px;
    margin: 0 auto;
}
.pricing-card {
    background: white;
    border: 2px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 32px;
    text-align: center;
    transition: all 0.2s;
    position: relative;
}
.pricing-card:hover {
    border-color: var(--brand-blue);
    box-shadow: var(--shadow-lg);
}
.pricing-card.featured {
    border-color: var(--brand-blue);
    box-shadow: var(--shadow-lg);
}
.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--brand-blue);
    color: white;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.pricing-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}
.pricing-amount {
    font-size: 48px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.03em;
    line-height: 1;
}
.pricing-period {
    font-size: 15px;
    color: var(--text-muted);
    margin-top: 8px;
    margin-bottom: 24px;
}
.pricing-features {
    list-style: none;
    text-align: left;
    margin-bottom: 24px;
    padding: 0;
}
.pricing-features li {
    padding: 8px 0;
    font-size: 14px;
    color: var(--text-muted);
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.pricing-features li::before {
    content: "✓";
    color: var(--success);
    font-weight: 700;
    flex-shrink: 0;
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--brand-navy);
    color: var(--gray-400);
    padding: 60px 24px 32px;
}
.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}
.footer-brand {
    color: white;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
}
.footer-tagline {
    font-size: 14px;
    color: var(--gray-500);
    line-height: 1.6;
}
.footer-col h4 {
    color: white;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
}
.footer-col a {
    display: block;
    color: var(--gray-400);
    font-size: 14px;
    margin-bottom: 10px;
}
.footer-col a:hover { color: white; }
.footer-bottom {
    max-width: 1100px;
    margin: 0 auto;
    padding-top: 24px;
    border-top: 1px solid var(--brand-navy-3);
    font-size: 13px;
    color: var(--gray-500);
    text-align: center;
}

/* ---------- Login / Signup ---------- */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    background: linear-gradient(180deg, var(--bg-subtle) 0%, var(--bg) 100%);
}
.auth-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
}
.auth-logo {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-purple));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 18px;
    margin: 0 auto 20px;
}
.auth-card h1 {
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 6px;
}
.auth-card .subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 28px;
}
.auth-card form { margin-top: 8px; }
.auth-card .submit-btn {
    width: 100%;
    padding: 12px;
    font-size: 15px;
    margin-top: 8px;
}
.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-muted);
}
.auth-footer a { font-weight: 500; }

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-small { font-size: 13px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.mt-6 { margin-top: 40px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }
.mb-6 { margin-bottom: 40px; }
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 16px; }
.gap-4 { gap: 24px; }

/* ---------- Toast / Notification ---------- */
.toast {
    position: fixed;
    top: 80px;
    right: 24px;
    background: white;
    border: 1px solid var(--border);
    padding: 14px 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    font-size: 14px;
    z-index: 200;
    animation: slideIn 0.3s ease;
}
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .container, .container-narrow { padding: 20px 16px; }
    .topnav-inner { padding: 0 16px; }
    .nav-links { display: none; }
    .hero h1, .landing-hero h1 { font-size: 1.75rem; }
    .landing-hero { padding: 60px 20px; }
    .section { padding: 60px 20px; }
    .section-title { font-size: 1.5rem; }
    .footer-inner { grid-template-columns: 1fr; gap: 24px; }
    .pricing-amount { font-size: 36px; }
    .stats { grid-template-columns: 1fr; }
    .auth-card { padding: 28px 20px; }
    .card, .panel { padding: 20px; }
}

/* Command Center buttons */
.cmd-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}
.cmd-btn {
    width: 100%;
    padding: 14px 16px;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    color: #111827;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
}
.cmd-btn:hover {
    background: #2563EB;
    border-color: #2563EB;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}
.cmd-btn:active {
    transform: translateY(0);
}

/* ============================================================
   SUMFACE DASHBOARD REDESIGN
   Scoped to dashboard pages with .topnav
   ============================================================ */

body:has(.topnav) {
    --brand-blue: #4678ff;
    --brand-blue-dark: #315fe0;
    --brand-blue-light: #eaf0ff;
    --bg: #f3f6fb;
    --bg-subtle: #f8faff;
    --text: #17223b;
    --text-muted: #68758d;
    --border: #e4e9f2;
    --radius: 12px;
    --radius-lg: 18px;
    --radius-xl: 22px;
    background: #f3f6fb;
    color: #17223b;
    min-height: 100vh;
}

/* Desktop navigation */
body:has(.topnav) .topnav {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 50;
    width: 248px;
    height: 100vh;
    background: #101a32;
    border: 0;
    box-shadow: 8px 0 30px rgba(17, 31, 61, .08);
}

body:has(.topnav) .topnav-inner {
    width: 100%;
    max-width: none;
    height: 100%;
    padding: 28px 14px 18px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 26px;
}

body:has(.topnav) .topnav .brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 12px;
    color: #fff;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -.035em;
    white-space: nowrap;
}

body:has(.topnav) .topnav .brand-logo {
    display: grid;
    place-items: center;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, #6b92ff, #3768ef);
    box-shadow: 0 8px 20px rgba(65, 111, 255, .28);
    font-size: 13px;
    font-weight: 800;
}

body:has(.topnav) .nav-links {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
    width: 100%;
}

body:has(.topnav) .nav-links a {
    display: flex;
    align-items: center;
    min-height: 43px;
    padding: 10px 14px;
    border-radius: 11px;
    color: #aebbd4;
    font-size: 14px;
    font-weight: 600;
    transition: background .18s, color .18s, transform .18s;
}

body:has(.topnav) .nav-links a:hover {
    color: #fff;
    background: rgba(255, 255, 255, .09);
    transform: translateX(2px);
}

body:has(.topnav) .nav-links a.active {
    color: #fff;
    background: #315de0;
    box-shadow: 0 7px 18px rgba(30, 70, 185, .25);
}

body:has(.topnav) .nav-links:last-child {
    margin-top: auto;
    padding: 16px 10px 0;
    border-top: 1px solid rgba(255, 255, 255, .11);
}

body:has(.topnav) .nav-links:last-child > span {
    padding: 0 4px 8px;
    color: #d8e2f6 !important;
    font-weight: 600;
    overflow-wrap: anywhere;
}

body:has(.topnav) .nav-links a.logout {
    color: #b6c4df;
}

/* Main workspace */
body:has(.topnav) > main.container {
    margin-left: 248px;
    width: calc(100% - 248px);
    max-width: none;
    padding: 34px clamp(20px, 3vw, 52px) 70px;
}

body:has(.topnav) .hero {
    padding: 0;
    margin-bottom: 26px;
    background: transparent;
    border: 0;
    box-shadow: none;
}

body:has(.topnav) .hero h1 {
    color: #17223b;
    font-size: clamp(28px, 3vw, 38px);
    font-weight: 800;
    letter-spacing: -.045em;
    line-height: 1.15;
}

body:has(.topnav) .hero .subtitle {
    margin-top: 8px;
    color: #748097;
    font-size: 15px;
}

body:has(.topnav) h2,
body:has(.topnav) h3 {
    color: #17223b;
    letter-spacing: -.025em;
}

body:has(.topnav) .breadcrumb {
    margin-bottom: 18px;
    color: #8793a7;
    font-size: 13px;
}

body:has(.topnav) a {
    color: #315fe0;
}

/* Surfaces */
body:has(.topnav) .card,
body:has(.topnav) .panel,
body:has(.topnav) .child-card,
body:has(.topnav) .stat,
body:has(.topnav) .empty-state {
    background: #fff;
    border: 1px solid #e5eaf3;
    border-radius: 20px;
    box-shadow: 0 7px 28px rgba(27, 44, 80, .045);
}

body:has(.topnav) .card,
body:has(.topnav) .panel {
    padding: clamp(18px, 2.3vw, 28px);
}

body:has(.topnav) .stats {
    gap: 16px;
    margin-bottom: 28px;
}

body:has(.topnav) .stat {
    padding: 22px;
    min-height: 120px;
}

body:has(.topnav) .stat-value {
    color: #17223b;
    font-size: clamp(27px, 2.8vw, 37px);
    font-weight: 800;
    letter-spacing: -.045em;
}

body:has(.topnav) .stat-label {
    color: #78859c;
    font-size: 13px;
    font-weight: 600;
}

body:has(.topnav) .child-card {
    padding: 22px;
    transition: transform .2s, box-shadow .2s;
}

body:has(.topnav) .child-card:hover,
body:has(.topnav) .action-tile:hover,
body:has(.topnav) .media-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 36px rgba(27, 44, 80, .10);
}

body:has(.topnav) .child-avatar {
    border-radius: 15px;
    box-shadow: 0 8px 18px rgba(30, 52, 100, .12);
}

body:has(.topnav) .child-name {
    color: #17223b;
    font-weight: 750;
}

body:has(.topnav) .child-status,
body:has(.topnav) .child-info {
    color: #78859c;
}

body:has(.topnav) .action-tile,
body:has(.topnav) .media-tile {
    border: 1px solid #e5eaf3;
    border-radius: 17px;
    background: #fff;
    transition: transform .2s, box-shadow .2s;
}

/* Buttons and fields */
body:has(.topnav) .btn {
    min-height: 40px;
    border-radius: 11px;
    font-weight: 700;
    box-shadow: none;
}

body:has(.topnav) .btn-primary {
    color: #fff;
    background: #315fe0;
    border-color: #315fe0;
    box-shadow: 0 7px 16px rgba(49, 93, 224, .18);
}

body:has(.topnav) .btn-primary:hover {
    color: #fff;
    background: #244fc8;
    border-color: #244fc8;
}

body:has(.topnav) .form-group input,
body:has(.topnav) .form-group select,
body:has(.topnav) .form-group textarea {
    border: 1px solid #dce4f0;
    border-radius: 11px;
    background: #fbfcff;
    color: #17223b;
}

body:has(.topnav) .form-group input:focus,
body:has(.topnav) .form-group select:focus,
body:has(.topnav) .form-group textarea:focus {
    border-color: #6187f2;
    outline: 3px solid rgba(78, 121, 245, .12);
}

/* Tables */
body:has(.topnav) .table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

body:has(.topnav) .table thead th {
    background: #f6f8fc;
    color: #68758d;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
    border-bottom: 1px solid #e5eaf3;
}

body:has(.topnav) .table tbody td {
    color: #34415a;
    border-bottom: 1px solid #edf0f6;
}

body:has(.topnav) .table tbody tr:hover td {
    background: #f9fbff;
}

/* Status */
body:has(.topnav) .badge {
    border-radius: 999px;
    font-weight: 700;
}

body:has(.topnav) .dot-online {
    background: #18b980;
    box-shadow: 0 0 0 4px rgba(24, 185, 128, .12);
}

body:has(.topnav) .empty-state {
    padding: 48px 24px;
    color: #78859c;
}

/* Narrow screens */
@media (max-width: 900px) {
    body:has(.topnav) .topnav {
        position: relative;
        inset: auto;
        width: 100%;
        height: auto;
        box-shadow: none;
    }

    body:has(.topnav) .topnav-inner {
        height: auto;
        padding: 14px 16px;
        gap: 14px;
    }

    body:has(.topnav) .topnav .brand {
        padding: 0;
    }

    body:has(.topnav) .nav-links {
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: thin;
        padding-bottom: 3px;
    }

    body:has(.topnav) .nav-links a {
        flex: 0 0 auto;
        min-height: 37px;
        padding: 8px 12px;
        white-space: nowrap;
    }

    body:has(.topnav) .nav-links a:hover {
        transform: none;
    }

    body:has(.topnav) .nav-links:last-child {
        margin-top: 0;
        padding: 8px 0 0;
        border-top: 1px solid rgba(255, 255, 255, .11);
    }

    body:has(.topnav) .nav-links:last-child > span {
        align-self: center;
        padding: 0;
    }

    body:has(.topnav) > main.container {
        width: 100%;
        margin-left: 0;
        padding: 24px 16px 50px;
    }
}

@media (max-width: 560px) {
    body:has(.topnav) .hero h1 {
        font-size: 28px;
    }

    body:has(.topnav) .hero .flex-between {
        align-items: flex-start;
        gap: 14px;
    }

    body:has(.topnav) .stats,
    body:has(.topnav) .grid-2 {
        gap: 12px;
    }

    body:has(.topnav) .card,
    body:has(.topnav) .panel,
    body:has(.topnav) .child-card {
        padding: 17px;
    }

    body:has(.topnav) .table {
        display: block;
        overflow-x: auto;
    }
}

/* ============================================================
   DEVICE PAGE — COMMAND CENTER REDESIGN
   ============================================================ */

body:has(.topnav) .devices {
    margin-bottom: 30px;
}

body:has(.topnav) .devices > .card {
    border-left: 4px solid #18b980;
    padding: 24px 28px;
}

body:has(.topnav) .commands-section {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
}

body:has(.topnav) .commands-section > h2,
body:has(.topnav) .commands-section > .form-hint {
    grid-column: 1 / -1;
}

body:has(.topnav) .commands-section > h2 {
    margin: 0;
    color: #17223b;
    font-size: 27px;
    font-weight: 800;
    letter-spacing: -.04em;
}

body:has(.topnav) .commands-section > .form-hint {
    margin: -9px 0 8px;
    color: #78859c;
    font-size: 14px;
}

/* Each heading and following command grid forms a visual panel. */
body:has(.topnav) .commands-section > h3 {
    grid-column: auto;
    align-self: end;
    min-height: 66px;
    margin: 0 !important;
    padding: 22px 22px 12px;
    background: #fff;
    border: 1px solid #e5eaf3;
    border-bottom: 0;
    border-radius: 20px 20px 0 0;
    color: #17223b !important;
    font-size: 17px !important;
    font-weight: 800;
    letter-spacing: -.025em;
}

body:has(.topnav) .commands-section > h3::before {
    display: inline-grid;
    place-items: center;
    width: 33px;
    height: 33px;
    margin-right: 10px;
    border-radius: 10px;
    font-size: 18px;
    vertical-align: middle;
}

body:has(.topnav) .commands-section > h3:nth-of-type(1)::before {
    content: "📷";
    background: #eaf0ff;
}

body:has(.topnav) .commands-section > h3:nth-of-type(2)::before {
    content: "🎙";
    background: #fff0f2;
}

body:has(.topnav) .commands-section > h3:nth-of-type(3)::before {
    content: "◉";
    color: #8055d9;
    background: #f2eaff;
}

body:has(.topnav) .commands-section > h3:nth-of-type(4)::before {
    content: "▣";
    color: #148e91;
    background: #e6f8f7;
}

body:has(.topnav) .commands-section > .cmd-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    align-self: start;
    margin: -18px 0 0;
    padding: 16px 20px 22px;
    background: #fff;
    border: 1px solid #e5eaf3;
    border-top: 0;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 8px 28px rgba(27, 44, 80, .045);
}

body:has(.topnav) .commands-section > .cmd-grid:nth-of-type(2) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

body:has(.topnav) .commands-section .cmd-grid form {
    min-width: 0;
}

body:has(.topnav) .commands-section .cmd-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    min-height: 62px;
    padding: 12px 14px;
    background: #f8faff;
    border: 1px solid #e7ecf5;
    border-radius: 13px;
    color: #263652;
    font-size: 13px;
    font-weight: 700;
    text-align: left;
    box-shadow: none;
    transition: transform .18s, background .18s,
                border-color .18s, box-shadow .18s;
}

body:has(.topnav) .commands-section .cmd-btn::before {
    display: grid;
    place-items: center;
    flex: 0 0 33px;
    width: 33px;
    height: 33px;
    border-radius: 10px;
    background: #e8efff;
    color: #315fe0;
    font-size: 17px;
    font-weight: 800;
}

body:has(.topnav) .commands-section .cmd-btn:hover {
    transform: translateY(-2px);
    background: #eef3ff;
    border-color: #a7bbfa;
    color: #183b9e;
    box-shadow: 0 8px 18px rgba(49, 93, 224, .10);
}

body:has(.topnav) .commands-section .cmd-btn:focus-visible {
    outline: 3px solid rgba(49, 93, 224, .35);
    outline-offset: 2px;
}

/* Camera */
body:has(.topnav) .commands-section > .cmd-grid:nth-of-type(1)
form:nth-child(1) .cmd-btn::before { content: "◉"; }

body:has(.topnav) .commands-section > .cmd-grid:nth-of-type(1)
form:nth-child(2) .cmd-btn::before { content: "◎"; }

/* Recording durations */
body:has(.topnav) .commands-section > .cmd-grid:nth-of-type(2)
.cmd-btn::before {
    content: "●";
    background: #fff0f2;
    color: #e85068;
    font-size: 14px;
}

/* Live audio */
body:has(.topnav) .commands-section > .cmd-grid:nth-of-type(3)
form:first-child .cmd-btn::before {
    content: "▶";
    background: #e7f8f1;
    color: #12a36e;
}

body:has(.topnav) .commands-section > .cmd-grid:nth-of-type(3)
form:last-child .cmd-btn::before {
    content: "■";
    background: #fff0f2;
    color: #dd5267;
}

body:has(.topnav) .commands-section > .cmd-grid:nth-of-type(3)
form:last-child .cmd-btn:hover {
    background: #fff4f5;
    border-color: #f4bdc7;
    color: #a93448;
}

/* Screen, files, location */
body:has(.topnav) .commands-section > .cmd-grid:nth-of-type(4)
form:nth-child(1) .cmd-btn::before {
    content: "▣";
    background: #e6f8f7;
    color: #148e91;
}

body:has(.topnav) .commands-section > .cmd-grid:nth-of-type(4)
form:nth-child(2) .cmd-btn::before {
    content: "▤";
    background: #fff4df;
    color: #b47a15;
}

body:has(.topnav) .commands-section > .cmd-grid:nth-of-type(4)
form:nth-child(3) .cmd-btn::before {
    content: "⌖";
    background: #ecf5ff;
    color: #317bbf;
    font-size: 23px;
}

/* Live Player instruction */
body:has(.topnav) .commands-section > p:not(.form-hint) {
    grid-column: 1 / -1;
    margin: -8px 0 0 !important;
    padding: 12px 16px;
    border: 1px solid #e5eaf3;
    border-radius: 12px;
    background: #fff;
    color: #78859c !important;
}

/* Keep category order intact on desktop and mobile. */
body:has(.topnav) .commands-section > h3,
body:has(.topnav) .commands-section > .cmd-grid {
    grid-column: 1 / -1;
}

@media (min-width: 1250px) {
    body:has(.topnav) .commands-section {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body:has(.topnav) .commands-section > h3:nth-of-type(1),
    body:has(.topnav) .commands-section > .cmd-grid:nth-of-type(1) {
        grid-column: 1;
    }

    body:has(.topnav) .commands-section > h3:nth-of-type(2),
    body:has(.topnav) .commands-section > .cmd-grid:nth-of-type(2) {
        grid-column: 2;
    }
}

@media (max-width: 650px) {
    body:has(.topnav) .commands-section {
        display: block;
    }

    body:has(.topnav) .commands-section > h3 {
        margin-top: 18px !important;
    }

    body:has(.topnav) .commands-section > .cmd-grid,
    body:has(.topnav) .commands-section > .cmd-grid:nth-of-type(2) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-top: 0;
    }

    body:has(.topnav) .commands-section .cmd-btn {
        min-height: 58px;
        padding: 9px;
        font-size: 12px;
    }
}

/* Media gallery and latest-location map */
body:has(.topnav) .sf-media-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
    gap: 18px;
}

body:has(.topnav) .sf-media-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid #e5eaf3;
    border-radius: 18px;
    box-shadow: 0 8px 26px rgba(27, 44, 80, .05);
}

body:has(.topnav) .sf-media-image,
body:has(.topnav) .sf-media-player,
body:has(.topnav) .sf-media-file {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 190px;
    overflow: hidden;
    background: #eef3fb;
}

body:has(.topnav) .sf-media-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .2s;
}

body:has(.topnav) .sf-media-image:hover img {
    transform: scale(1.04);
}

body:has(.topnav) .sf-media-player {
    flex-direction: column;
    gap: 14px;
    padding: 16px;
    background: linear-gradient(135deg, #e9efff, #f5edff);
}

body:has(.topnav) .sf-media-player audio,
body:has(.topnav) .sf-media-player video {
    width: 100%;
    max-height: 145px;
}

body:has(.topnav) .sf-media-symbol {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background: #fff;
    color: #315fe0;
    font-size: 29px;
    box-shadow: 0 8px 22px rgba(49, 93, 224, .1);
}

body:has(.topnav) .sf-media-file {
    flex-direction: column;
    gap: 12px;
    color: #63718b;
    font-weight: 700;
}

body:has(.topnav) .sf-media-content {
    padding: 17px;
}

body:has(.topnav) .sf-media-kind {
    color: #315fe0;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .045em;
}

body:has(.topnav) .sf-media-name {
    margin: 8px 0;
    overflow: hidden;
    color: #17223b;
    font-size: 14px;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body:has(.topnav) .sf-media-detail {
    color: #78859c;
    font-size: 12px;
}

body:has(.topnav) .sf-media-actions {
    display: flex;
    gap: 8px;
    margin-top: 17px;
}

body:has(.topnav) .sf-media-actions a {
    flex: 1;
    padding: 9px;
    border: 1px solid #dce5f4;
    border-radius: 9px;
    background: #f8faff;
    color: #315fe0;
    font-size: 13px;
    font-weight: 750;
    text-align: center;
}

body:has(.topnav) .sf-media-actions a:hover {
    background: #eaf0ff;
}

body:has(.topnav) .sf-map-shell {
    overflow: hidden;
    height: min(60vh, 500px);
    min-height: 320px;
    border: 1px solid #e5eaf3;
    border-radius: 20px;
    background: #e7edf5;
}

body:has(.topnav) .sf-map-shell iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

body:has(.topnav) .sf-map-note {
    margin: 10px 0 28px;
    color: #78859c;
    font-size: 13px;
}

body:has(.topnav) .sf-location-heading {
    margin: 24px 0 14px;
}

body:has(.topnav) .sf-location-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}

body:has(.topnav) .sf-location-card {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 18px;
    border: 1px solid #e5eaf3;
    border-radius: 16px;
    background: #fff;
    color: #17223b;
}

body:has(.topnav) .sf-location-card span:nth-child(2) {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

body:has(.topnav) .sf-location-card small {
    color: #78859c;
}

body:has(.topnav) .sf-location-pin {
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    height: 42px;
    border-radius: 12px;
    background: #eaf0ff;
    color: #315fe0;
    font-size: 26px;
}

body:has(.topnav) .sf-location-arrow {
    margin-left: auto;
    color: #315fe0;
    font-size: 21px;
}

/* SumFace public homepage — 2026 redesign */
body.sf-public-home {
  display: block !important;
  margin: 0 !important;
  background: #f6f7f4;
  color: #142432;
}
body.sf-public-home .topnav {
  position: sticky !important;
  top: 0 !important;
  left: auto !important;
  bottom: auto !important;
  width: 100% !important;
  height: auto !important;
  min-height: 74px;
  z-index: 100;
  background: #0b1e29 !important;
  border: 0 !important;
  box-shadow: none !important;
}
body.sf-public-home .topnav-inner {
  max-width: 1320px !important;
  width: 100% !important;
  min-height: 74px;
  margin: 0 auto !important;
  padding: 0 32px !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 26px;
}
body.sf-public-home .topnav .brand {
  color: white !important;
  margin: 0 !important;
  font-weight: 800;
  letter-spacing: -.04em;
}
body.sf-public-home .topnav .brand-logo {
  background: #d6ef84 !important;
  color: #10242e !important;
  box-shadow: none !important;
}
body.sf-public-home .topnav .nav-links {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 25px !important;
  width: auto !important;
  margin: 0 !important;
}
body.sf-public-home .topnav .nav-links a {
  color: #c7d4d2 !important;
  font-size: 13px;
  font-weight: 600;
}
body.sf-public-home .topnav .nav-links a:hover { color: white !important; }
body.sf-public-home .topnav .nav-links .btn {
  background: #d6ef84 !important;
  color: #12272e !important;
  border: 0 !important;
  border-radius: 100px !important;
  padding: 11px 17px !important;
}
body.sf-public-home #sf-landing,
body.sf-public-home .site-footer {
  margin-left: 0 !important;
  width: 100% !important;
}
body.sf-public-home #sf-landing * { box-sizing: border-box; }
body.sf-public-home #sf-landing { overflow: hidden; }
body.sf-public-home #sf-landing a { text-decoration: none; }
body.sf-public-home .sfh-wrap { max-width: 1320px; margin: auto; padding: 0 32px; }
body.sf-public-home .sfh-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 700px;
  background: #0b1e29;
  color: #f7f8ef;
}
body.sf-public-home .sfh-orb { position: absolute; pointer-events: none; border-radius: 50%; z-index: -1; }
body.sf-public-home .sfh-orb-one {
  width: 650px; height: 650px; right: -210px; top: -160px;
  background: radial-gradient(circle, rgba(135,188,130,.22), transparent 68%);
}
body.sf-public-home .sfh-orb-two {
  width: 500px; height: 500px; left: -210px; bottom: -280px;
  background: radial-gradient(circle, rgba(78,142,155,.2), transparent 70%);
}
body.sf-public-home .sfh-hero-grid {
  display: grid; grid-template-columns: .95fr 1.05fr;
  align-items: center; gap: 7%; padding-top: 82px; padding-bottom: 82px;
}
body.sf-public-home .sfh-eyebrow,
body.sf-public-home .sfh-kicker {
  display: inline-block; font-size: 11px; font-weight: 800;
  letter-spacing: .18em; text-transform: uppercase;
}
body.sf-public-home .sfh-eyebrow { color: #d6ef84; margin-bottom: 28px; }
body.sf-public-home .sfh-eyebrow span {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: #d6ef84; margin-right: 9px; vertical-align: 2px;
}
body.sf-public-home .sfh-hero h1 {
  color: #f8f9f1; font-size: clamp(52px, 5.3vw, 86px);
  line-height: 1.02; letter-spacing: -.075em; font-weight: 750;
  margin: 0 0 28px;
}
body.sf-public-home .sfh-hero h1 em,
body.sf-public-home .sfh-final h2 em {
  color: #d6ef84; font-style: normal;
}
body.sf-public-home .sfh-hero-copy > p {
  max-width: 520px; color: #b7c8c8; font-size: 18px;
  line-height: 1.7; margin: 0 0 33px;
}
body.sf-public-home .sfh-actions { display: flex; flex-wrap: wrap; gap: 12px; }
body.sf-public-home .sfh-button {
  display: inline-flex; align-items: center; justify-content: space-between;
  gap: 32px; min-height: 52px; padding: 14px 20px;
  border-radius: 100px; font-size: 13px; font-weight: 800;
  transition: transform .2s ease, background .2s ease;
}
body.sf-public-home .sfh-button:hover { transform: translateY(-2px); }
body.sf-public-home .sfh-button-primary { background: #d6ef84; color: #10242e; }
body.sf-public-home .sfh-button-ghost { border: 1px solid #557078; color: #eef6ec; }
body.sf-public-home .sfh-hero-foot {
  margin-top: 70px; color: #8fa7ad; font-size: 12px; letter-spacing: .02em;
}
body.sf-public-home .sfh-foot-mark { color: #d6ef84; margin-right: 8px; }
body.sf-public-home .sfh-preview {
  overflow: hidden; border-radius: 18px; background: #f5f8f0;
  color: #1a3033; transform: rotate(2deg);
  box-shadow: 0 38px 90px rgba(0,0,0,.3), 0 0 0 1px rgba(255,255,255,.14);
}
body.sf-public-home .sfh-preview-top,
body.sf-public-home .sfh-preview-bottom {
  display: flex; align-items: center; gap: 14px;
  padding: 17px 25px; font-size: 10px; font-weight: 800; letter-spacing: .13em;
}
body.sf-public-home .sfh-preview-top { border-bottom: 1px solid #dce6dc; }
body.sf-public-home .sfh-preview-logo {
  width: 27px; height: 27px; border-radius: 8px; background: #0d3037;
  color: #d6ef84; display: grid; place-items: center; letter-spacing: -.09em;
}
body.sf-public-home .sfh-preview-top i {
  width: 8px; height: 8px; background: #96bb64; border-radius: 50%; margin-left: auto;
}
body.sf-public-home .sfh-preview-main { padding: 33px 37px 40px; }
body.sf-public-home .sfh-preview-label { color: #6b8985; font-size: 10px; letter-spacing: .18em; font-weight: 800; }
body.sf-public-home .sfh-preview-main h2 {
  font-size: clamp(27px, 2.7vw, 43px); letter-spacing: -.06em;
  color: #173037; margin: 15px 0 3px;
}
body.sf-public-home .sfh-preview-main h2 span { color: #8aaf4d; }
body.sf-public-home .sfh-preview-main > p { color: #69807e; margin: 0 0 28px; }
body.sf-public-home .sfh-preview-metrics { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-bottom: 18px; }
body.sf-public-home .sfh-preview-metrics > div {
  background: #e8f0e5; border: 1px solid #dbe8d8;
  border-radius: 11px; padding: 17px 13px;
}
body.sf-public-home .sfh-preview-metrics strong { display: block; font-size: 25px; line-height: 1; }
body.sf-public-home .sfh-preview-metrics small { display: block; color: #6b807a; font-size: 10px; margin-top: 8px; }
body.sf-public-home .sfh-device {
  display: flex; align-items: center; gap: 12px; background: white;
  border: 1px solid #e0e8de; border-radius: 11px; padding: 14px; margin-top: 9px;
}
body.sf-public-home .sfh-device-avatar {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: #d7eccc; color: #305447; font-weight: 800;
}
body.sf-public-home .sfh-device-avatar-alt { background: #e9e5d8; color: #665a45; }
body.sf-public-home .sfh-device strong,
body.sf-public-home .sfh-device small { display: block; }
body.sf-public-home .sfh-device strong { font-size: 12px; }
body.sf-public-home .sfh-device small { color: #758982; font-size: 10px; margin-top: 3px; }
body.sf-public-home .sfh-device small b { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #6eaa6e; }
body.sf-public-home .sfh-device > span { margin-left: auto; color: #8da39a; }
body.sf-public-home .sfh-preview-bottom { justify-content: space-between; border-top: 1px solid #dce6dc; color: #899f98; }
body.sf-public-home .sfh-hero-line {
  display: flex; justify-content: space-between; border-top: 1px solid #38515a;
  padding-top: 18px; padding-bottom: 18px; color: #819aa0;
  font-size: 10px; letter-spacing: .16em; font-weight: 800;
}
body.sf-public-home .sfh-intro { background: #e8eee8; padding: 112px 0; }
body.sf-public-home .sfh-intro-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 14%; align-items: end; }
body.sf-public-home .sfh-kicker { color: #688151; margin-bottom: 20px; }
body.sf-public-home .sfh-intro h2,
body.sf-public-home .sfh-section-head h2,
body.sf-public-home .sfh-final h2 {
  font-size: clamp(40px, 4.4vw, 70px); line-height: 1.06;
  letter-spacing: -.065em; margin: 0; color: #16313a;
}
body.sf-public-home .sfh-intro-grid p { color: #526b6a; line-height: 1.8; font-size: 17px; margin: 0 0 24px; }
body.sf-public-home .sfh-intro-grid a { color: #17463b; font-weight: 800; }
body.sf-public-home .sfh-intro-grid a span { margin-left: 16px; }
body.sf-public-home .sfh-features { background: #f6f7f4; padding: 115px 0 125px; }
body.sf-public-home .sfh-section-head {
  display: flex; justify-content: space-between; align-items: end;
  gap: 40px; margin-bottom: 42px;
}
body.sf-public-home .sfh-section-head h2 { font-size: clamp(38px, 4vw, 60px); }
body.sf-public-home .sfh-section-head > p { max-width: 270px; color: #637572; line-height: 1.6; margin: 0; }
body.sf-public-home .sfh-feature-grid { display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 15px; }
body.sf-public-home .sfh-feature {
  min-height: 370px; padding: 27px; border: 1px solid #dce5de;
  border-radius: 18px; background: #edf1ea; display: flex; flex-direction: column;
}
body.sf-public-home .sfh-feature-large { background: #d9e9d0; }
body.sf-public-home .sfh-feature-no { font-size: 10px; font-weight: 800; letter-spacing: .17em; color: #668173; }
body.sf-public-home .sfh-feature h3 { color: #173038; font-size: 24px; letter-spacing: -.04em; margin: 8px 0; }
body.sf-public-home .sfh-feature p { color: #5e7671; line-height: 1.65; font-size: 14px; margin: 0; }
body.sf-public-home .sfh-feature-symbol {
  width: 70px; height: 70px; display: grid; place-items: center;
  margin: auto 0; border-radius: 20px; background: #dbe7dd;
  color: #275a52; font-size: 34px;
}
body.sf-public-home .sfh-feature-art { height: 190px; display: grid; place-items: center; position: relative; margin: auto 0; }
body.sf-public-home .sfh-map-ring { width: 150px; height: 150px; border: 1px solid #7fa77f; border-radius: 50%; box-shadow: 0 0 0 26px rgba(95,151,101,.11), 0 0 0 53px rgba(95,151,101,.07); }
body.sf-public-home .sfh-map-pin { position: absolute; top: 59px; color: #24584b; font-size: 31px; }
body.sf-public-home .sfh-pricing { background: #e8eee8; padding: 115px 0; }
body.sf-public-home .sfh-plan-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 15px; }
body.sf-public-home .sfh-plan { border-radius: 18px; background: #f7f9f3; padding: 34px; }
body.sf-public-home .sfh-plan-accent { background: #183943; color: white; }
body.sf-public-home .sfh-plan > span { font-size: 11px; letter-spacing: .17em; font-weight: 800; }
body.sf-public-home .sfh-plan h3 { font-size: 48px; letter-spacing: -.07em; margin: 55px 0 8px; }
body.sf-public-home .sfh-plan h3 small { font-size: 15px; font-weight: 500; letter-spacing: 0; }
body.sf-public-home .sfh-plan p { color: #6d827e; margin: 0 0 28px; }
body.sf-public-home .sfh-plan-accent p { color: #a9c2bf; }
body.sf-public-home .sfh-plan a { display: flex; justify-content: space-between; border-top: 1px solid #b6c7c0; padding-top: 20px; color: inherit; font-weight: 800; }
body.sf-public-home .sfh-final { padding: 120px 0; background: #0b1e29; color: white; }
body.sf-public-home .sfh-final .sfh-kicker { color: #d6ef84; }
body.sf-public-home .sfh-final h2 { color: white; margin-bottom: 33px; }
body.sf-public-home .site-footer { background: #081822 !important; color: #b4c6c5 !important; }

@media (max-width: 900px) {
  body.sf-public-home .topnav-inner { padding: 0 20px !important; }
  body.sf-public-home .topnav .nav-links:first-of-type { display: none !important; }
  body.sf-public-home .sfh-hero-grid { grid-template-columns: 1fr; gap: 60px; }
  body.sf-public-home .sfh-preview { max-width: 650px; transform: rotate(0); }
  body.sf-public-home .sfh-intro-grid { grid-template-columns: 1fr; gap: 35px; }
  body.sf-public-home .sfh-feature-grid { grid-template-columns: 1fr 1fr; }
  body.sf-public-home .sfh-feature-large { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  body.sf-public-home .sfh-wrap { padding-left: 20px; padding-right: 20px; }
  body.sf-public-home .topnav .nav-links { display: flex !important; }
  body.sf-public-home .topnav .nav-links:first-of-type { display: none !important; }
  body.sf-public-home .topnav .nav-links:last-of-type > a:first-child { display: none; }
  body.sf-public-home .sfh-hero-grid { padding-top: 65px; padding-bottom: 55px; }
  body.sf-public-home .sfh-hero h1 { font-size: 52px; }
  body.sf-public-home .sfh-hero-foot { margin-top: 45px; }
  body.sf-public-home .sfh-preview-main { padding: 25px 18px; }
  body.sf-public-home .sfh-preview-metrics { gap: 5px; }
  body.sf-public-home .sfh-preview-metrics > div { padding: 12px 7px; }
  body.sf-public-home .sfh-preview-bottom { display: none; }
  body.sf-public-home .sfh-hero-line { display: none; }
  body.sf-public-home .sfh-intro,
  body.sf-public-home .sfh-features,
  body.sf-public-home .sfh-pricing,
  body.sf-public-home .sfh-final { padding-top: 75px; padding-bottom: 75px; }
  body.sf-public-home .sfh-section-head { display: block; }
  body.sf-public-home .sfh-section-head > p { margin-top: 16px; }
  body.sf-public-home .sfh-feature-grid,
  body.sf-public-home .sfh-plan-grid { grid-template-columns: 1fr; }
  body.sf-public-home .sfh-feature-large { grid-column: auto; }
  body.sf-public-home .sfh-feature { min-height: 300px; }
  body.sf-public-home .sfh-plan h3 { margin-top: 35px; }
}

/* Public homepage: closing section and footer refinement */
body.sf-public-home .sfh-final {
  position: relative;
  overflow: hidden;
  padding: 85px 0 90px !important;
  background: #0b1e29;
}
body.sf-public-home .sfh-final::after {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  right: -140px;
  top: -160px;
  border: 1px solid rgba(214,239,132,.2);
  border-radius: 50%;
  box-shadow: 0 0 0 75px rgba(214,239,132,.035),
              0 0 0 150px rgba(214,239,132,.025);
  pointer-events: none;
}
body.sf-public-home .sfh-final .sfh-wrap {
  position: relative;
  z-index: 1;
}
body.sf-public-home .sfh-final h2 {
  max-width: 800px;
  font-size: clamp(48px, 5vw, 76px);
  margin-bottom: 28px;
}
body.sf-public-home .site-footer {
  padding: 58px 32px 20px !important;
  background: #071720 !important;
  border-top: 1px solid #28404a !important;
}
body.sf-public-home .site-footer .footer-inner {
  max-width: 1256px;
  margin: 0 auto;
  padding: 0 0 45px;
  gap: 40px;
}
body.sf-public-home .site-footer .footer-brand {
  color: #f5f8f0 !important;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.05em;
}
body.sf-public-home .site-footer h4 {
  color: #f5f8f0 !important;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
body.sf-public-home .site-footer p,
body.sf-public-home .site-footer a {
  color: #a9bfc1 !important;
  font-size: 13px;
  line-height: 1.7;
}
body.sf-public-home .site-footer a:hover {
  color: #d6ef84 !important;
}
body.sf-public-home .site-footer .footer-bottom {
  max-width: 1256px;
  margin: 0 auto;
  padding: 20px 0 0;
  color: #829ba0 !important;
  border-top: 1px solid #28404a;
  font-size: 12px;
}
@media (max-width: 600px) {
  body.sf-public-home .sfh-final { padding: 70px 0 !important; }
  body.sf-public-home .site-footer { padding: 45px 20px 20px !important; }
  body.sf-public-home .site-footer .footer-inner { gap: 25px; }
}

/* Public homepage: distinctive pricing comparison */
body.sf-public-home .sfh-pricing {
  position: relative;
  overflow: hidden;
  padding: 105px 0 120px;
  background: #e7ede6;
}
body.sf-public-home .sfh-pricing::before {
  content: "SUMFACE / PLANS";
  position: absolute;
  right: -22px;
  top: 60px;
  color: rgba(23,49,58,.065);
  font-size: clamp(80px, 12vw, 210px);
  font-weight: 900;
  letter-spacing: -.09em;
  white-space: nowrap;
  pointer-events: none;
}
body.sf-public-home .sfh-pricing .sfh-wrap {
  position: relative;
  z-index: 1;
}
body.sf-public-home .sfh-pricing .sfh-section-head {
  align-items: end;
  margin-bottom: 44px;
}
body.sf-public-home .sfh-pricing .sfh-section-head h2 {
  font-size: clamp(46px, 5.4vw, 82px);
  line-height: .98;
}
body.sf-public-home .sfh-pricing .sfh-section-head > p {
  max-width: 310px;
  font-size: 16px;
}
body.sf-public-home .sfh-plan-grid {
  grid-template-columns: 1fr 1.12fr;
  align-items: stretch;
  gap: 18px;
}
body.sf-public-home .sfh-plan {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  padding: 34px 38px;
  border: 1px solid #cbd8ce;
  border-radius: 24px;
  background: #f8faf4;
  display: flex;
  flex-direction: column;
  box-shadow: 0 16px 38px rgba(21,55,47,.05);
}
body.sf-public-home .sfh-plan::after {
  content: "01";
  position: absolute;
  right: 23px;
  top: 5px;
  font-size: 118px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -.11em;
  color: rgba(33,81,68,.055);
  pointer-events: none;
}
body.sf-public-home .sfh-plan > span {
  position: relative;
  z-index: 1;
  width: fit-content;
  padding: 9px 12px;
  border: 1px solid #cbd8ce;
  border-radius: 100px;
  color: #3b6656;
  font-size: 10px;
  letter-spacing: .14em;
}
body.sf-public-home .sfh-plan h3 {
  position: relative;
  z-index: 1;
  margin: auto 0 8px;
  color: #17343b !important;
  font-size: clamp(55px, 5vw, 78px);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -.075em;
}
body.sf-public-home .sfh-plan h3 small {
  color: #627c75 !important;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
}
body.sf-public-home .sfh-plan p {
  position: relative;
  z-index: 1;
  margin: 0 0 30px;
  color: #5d7972 !important;
}
body.sf-public-home .sfh-plan a {
  position: relative;
  z-index: 1;
  align-items: center;
  padding: 19px 0 0;
  border-top: 1px solid #cbd8ce;
  color: #17343b !important;
  font-size: 14px;
}
body.sf-public-home .sfh-plan a b {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e2eddf;
  color: #17343b;
  font-size: 17px;
}
body.sf-public-home .sfh-plan-accent {
  border-color: #113239;
  background: #12343c;
  color: #f7fbf1;
  box-shadow: 0 27px 55px rgba(10,45,49,.18);
  transform: translateY(-12px);
}
body.sf-public-home .sfh-plan-accent::after {
  content: "03";
  right: 26px;
  top: -5px;
  color: rgba(214,239,132,.09);
}
body.sf-public-home .sfh-plan-accent > span {
  border-color: rgba(214,239,132,.5);
  color: #d6ef84;
}
body.sf-public-home .sfh-plan-accent h3 {
  color: #d6ef84 !important;
}
body.sf-public-home .sfh-plan-accent h3 small {
  color: #bfd0c9 !important;
}
body.sf-public-home .sfh-plan-accent p {
  color: #c2d3cb !important;
}
body.sf-public-home .sfh-plan-accent a {
  border-color: rgba(214,239,132,.35);
  color: #f7fbf1 !important;
}
body.sf-public-home .sfh-plan-accent a b {
  background: #d6ef84;
  color: #14323a;
}
body.sf-public-home .sfh-plan:hover {
  transform: translateY(-5px);
  transition: transform .2s ease;
}
body.sf-public-home .sfh-plan-accent:hover {
  transform: translateY(-17px);
}

@media (max-width: 750px) {
  body.sf-public-home .sfh-pricing { padding: 75px 0; }
  body.sf-public-home .sfh-pricing .sfh-section-head { display: block; }
  body.sf-public-home .sfh-pricing .sfh-section-head > p { margin-top: 20px; }
  body.sf-public-home .sfh-plan-grid { grid-template-columns: 1fr; }
  body.sf-public-home .sfh-plan,
  body.sf-public-home .sfh-plan-accent {
    min-height: 340px;
    padding: 28px;
    transform: none;
  }
  body.sf-public-home .sfh-plan:hover,
  body.sf-public-home .sfh-plan-accent:hover { transform: none; }
}

/* Public homepage: cleaner pricing heading */
body.sf-public-home .sfh-pricing::before {
    content: none;
}
body.sf-public-home .sfh-pricing .sfh-section-head {
    display: block;
}
body.sf-public-home .sfh-pricing-note {
    display: inline-block;
    margin-top: 22px;
    padding: 9px 15px;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 999px;
    color: #d7e8dd;
    font-size: 14px;
    font-weight: 600;
}

/* Signed-in dashboard responsive layout */
@media (max-width: 900px) {
    body:not(.sf-public-home):has(.topnav) .topnav {
        position: relative;
        width: 100%;
        height: auto;
    }

    body:not(.sf-public-home):has(.topnav) .topnav-inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 12px 10px;
        padding: 12px 16px 8px;
    }

    body:not(.sf-public-home):has(.topnav) .topnav .brand {
        grid-column: 1;
        min-width: 0;
    }

    body:not(.sf-public-home):has(.topnav) .nav-links:first-of-type {
        grid-column: 1 / -1;
        grid-row: 2;
        display: flex;
        gap: 6px;
        width: 100%;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        padding: 0 0 8px;
    }

    body:not(.sf-public-home):has(.topnav) .nav-links:first-of-type::-webkit-scrollbar {
        display: none;
    }

    body:not(.sf-public-home):has(.topnav) .nav-links:first-of-type a {
        flex: 0 0 auto;
        min-height: 42px;
        white-space: nowrap;
    }

    body:not(.sf-public-home):has(.topnav) .nav-links:last-child {
        grid-column: 2;
        grid-row: 1;
        width: auto;
        margin: 0;
        padding: 0;
        border: 0;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }

    body:not(.sf-public-home):has(.topnav) .nav-links:last-child > span {
        max-width: 115px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        padding: 0;
        font-size: 12px !important;
    }

    body:not(.sf-public-home):has(.topnav) .nav-links a.logout {
        min-height: 38px;
        padding: 8px 10px;
        white-space: nowrap;
    }

    body:not(.sf-public-home):has(.topnav) > main.container {
        width: 100%;
        min-width: 0;
        margin: 0;
        padding: 24px 20px 56px;
    }

    body:not(.sf-public-home):has(.topnav) .grid-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 650px) {
    body:not(.sf-public-home):has(.topnav) > main.container {
        padding: 22px 16px 48px;
    }

    body:not(.sf-public-home):has(.topnav) .topnav .brand {
        font-size: 17px;
    }

    body:not(.sf-public-home):has(.topnav) .nav-links:last-child > span {
        display: none;
    }

    body:not(.sf-public-home):has(.topnav) .hero h1 {
        font-size: clamp(26px, 7vw, 34px);
        overflow-wrap: anywhere;
    }

    body:not(.sf-public-home):has(.topnav) .stats {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    body:not(.sf-public-home):has(.topnav) .stats .stat:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    body:not(.sf-public-home):has(.topnav) .stat {
        min-width: 0;
        min-height: 100px;
        padding: 17px;
    }

    body:not(.sf-public-home):has(.topnav) .grid-2 {
        grid-template-columns: minmax(0, 1fr);
    }

    body:not(.sf-public-home):has(.topnav) .devices > .flex-between {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 12px;
    }

    body:not(.sf-public-home):has(.topnav) .child-card {
        min-width: 0;
    }

    body:not(.sf-public-home):has(.topnav) .child-card .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Interactive file browser */
.fs-row {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid #F3F4F6;
    cursor: pointer;
    transition: background 0.1s;
}
.fs-row:hover { background: #F9FAFB; }
.fs-icon { font-size: 20px; width: 36px; flex-shrink: 0; text-align: center; }
.fs-name { flex: 1; font-size: 14px; word-break: break-all; padding-right: 12px; }
.fs-size { font-size: 12px; color: #9CA3AF; padding-right: 12px; flex-shrink: 0; }
.fs-actions { display: flex; gap: 6px; flex-shrink: 0; }
.fs-btn {
    padding: 5px 12px; border: none; border-radius: 6px;
    font-size: 13px; cursor: pointer; background: #EFF6FF; color: #1D4ED8;
    font-family: inherit;
}
.fs-btn:hover { background: #DBEAFE; }

/* File browser date column */
.fs-date {
    font-size: 12px;
    color: #9CA3AF;
    padding-right: 12px;
    flex-shrink: 0;
    min-width: 70px;
    text-align: right;
    font-family: monospace;
}

/* Live screen capture */
#screen-live-img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
    background: #000;
    border-radius: 8px;
}

/* Calls page styles */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.data-table th {
    text-align: left;
    padding: 10px 12px;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6B7280;
    border-bottom: 2px solid #E5E7EB;
    background: transparent;
}
.data-table td {
    padding: 12px;
    border-bottom: 1px solid #F3F4F6;
    vertical-align: middle;
}
.data-table tbody tr:hover {
    background: #F9FAFB;
}
.data-table tbody tr:last-child td {
    border-bottom: none;
}
.pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1.4;
}
.select-filter {
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid #D1D5DB;
    background: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}
.select-filter:hover {
    border-color: #2563EB;
}

/* Child filter bar */
.child-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 22px 0;
  padding: 0;
}
.child-filter-chip {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: #F3F4F6;
  color: #374151;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid #E5E7EB;
  transition: background 120ms ease, color 120ms ease;
}
.child-filter-chip:hover {
  background: #E5E7EB;
  color: #111827;
}
.child-filter-chip.active {
  background: #2563EB;
  color: #FFFFFF;
  border-color: #2563EB;
}

/* Location history list */
.sf-history-list {
  list-style: none;
  margin: 12px 0 0 0;
  padding: 0;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 14px;
  overflow: hidden;
}
.sf-history-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid #F3F4F6;
  flex-wrap: wrap;
}
.sf-history-row:last-child {
  border-bottom: none;
}
.sf-history-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 160px;
}
.sf-history-child {
  font-weight: 600;
  color: #111827;
  font-size: 14px;
}
.sf-history-source {
  font-size: 12px;
  color: #6B7280;
  background: #F3F4F6;
  padding: 3px 8px;
  border-radius: 6px;
}
.sf-history-detail {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  flex-wrap: wrap;
}

/* ============================================================
   Messages page
   ============================================================ */
.sf-thread-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px 0;
  padding: 8px 10px;
  background: #F9FAFB;
  border: 1px solid #F0F1F3;
  border-radius: 14px;
}
.sf-thread-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 10px;
  background: #FFFFFF;
  color: #374151;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid #E5E7EB;
}
.sf-thread-chip:hover { background: #F3F4F6; }
.sf-thread-chip.active {
  background: #2563EB;
  color: #FFFFFF;
  border-color: #2563EB;
}
.sf-thread-chip.active span { color: #FFFFFF !important; }

.sf-msg-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sf-msg-row {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 14px 16px;
}
.sf-msg-sent { border-left: 4px solid #2563EB; }
.sf-msg-received { border-left: 4px solid #10B981; }
.sf-msg-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.sf-msg-addr { font-weight: 600; color: #111827; font-size: 14px; }
.sf-msg-meta { font-size: 12px; color: #6B7280; }
.sf-msg-body {
  font-size: 14px;
  color: #374151;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}
