@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

/* ============================================================
   Tagoist — Design System v2
   ============================================================ */

/* ---- Design tokens --------------------------------------- */
:root {
    --font:            'Inter', system-ui, -apple-system, sans-serif;
    --font-mono:       'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;

    /* Surfaces */
    --bg:              #f8fafc;
    --surface:         #ffffff;
    --border:          #e2e8f0;
    --border-subtle:   #f1f5f9;

    /* Text */
    --text:            #0f172a;
    --text-2:          #64748b;
    --text-3:          #94a3b8;

    /* Brand accent — indigo-violet */
    --accent:          #5b21b6;
    --accent-hover:    #4c1d95;
    --accent-light:    #f5f3ff;
    --accent-border:   #ddd6fe;

    /* Brand darks */
    --brand-dark:      #0f172a;
    --brand-dark-2:    #1e1b4b;

    /* Semantic */
    --success:         #16a34a;
    --success-light:   #f0fdf4;
    --success-border:  #bbf7d0;
    --warning:         #d97706;
    --warning-light:   #fffbeb;
    --warning-border:  #fde68a;
    --danger:          #dc2626;
    --danger-light:    #fef2f2;
    --danger-border:   #fecaca;

    /* App */
    --photo-bg:        #0f172a;

    /* Radius */
    --radius-sm:       4px;
    --radius:          6px;
    --radius-lg:       8px;
    --radius-xl:       10px;
    --radius-card:     12px;
    --radius-pill:     999px;

    /* Shadows */
    --shadow-sm:       0 1px 2px rgba(0,0,0,0.05);
    --shadow:          0 1px 4px rgba(0,0,0,0.06);
    --shadow-card:     0 2px 8px rgba(0,0,0,0.07);
    --shadow-md:       0 4px 16px rgba(0,0,0,0.09);
    --shadow-lg:       0 8px 32px rgba(0,0,0,0.12);
    --shadow-violet:   0 8px 32px rgba(91,33,182,0.18);

    /* Layout */
    --header-height:   56px;
    --panel-width-left:  272px;
    --panel-width-right: 300px;

    /* Transition */
    --transition:      0.18s ease;

    /* Tag colors */
    --tag1:       #ef4444;
    --tag2:       #10b981;
    --tag3:       #3b82f6;
    --tag4:       #8b5cf6;
    --tag5:       #f59e0b;
    --tag-unknown:#94a3b8;
}

/* ---- Reset & Base ---------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; padding: 0; }
body {
    font-family: var(--font);
    font-size: 15px;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    padding-top: var(--header-height);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   HEADER
   ============================================================ */
.header-bar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--header-height);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 900;
    gap: 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: -0.02em;
    flex-shrink: 0;
}
.brand:hover { color: var(--accent); text-decoration: none; }
.brand img { height: 28px; border-radius: var(--radius); }
.brand-dot { color: var(--accent); }

/* Center nav */
.site-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}
.site-nav a {
    color: var(--text-2);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: var(--radius);
    transition: color var(--transition), background var(--transition);
    white-space: nowrap;
    position: relative;
}
.site-nav a:hover { color: var(--text); background: var(--border-subtle); }
.site-nav a.active { color: var(--accent); }

/* Right auth zone */
.header-end {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-left: auto;
}

/* User avatar menu */
.user-menu {
    position: relative;
}
.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--border-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 5px 12px 5px 8px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
    transition: background var(--transition);
}
.user-menu-btn:hover { background: var(--border); }
.user-avatar {
    width: 26px; height: 26px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    font-size: 11px;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}
.user-menu-chevron { font-size: 0.65rem; color: var(--text-3); transition: transform var(--transition); }
.user-menu.open .user-menu-chevron { transform: rotate(180deg); }

.user-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-md);
    min-width: 180px;
    padding: 6px;
    display: none;
    z-index: 950;
}
.user-menu.open .user-dropdown { display: block; }
.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: var(--radius);
    color: var(--text-2);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: background var(--transition), color var(--transition);
}
.user-dropdown a:hover { background: var(--border-subtle); color: var(--text); }
.user-dropdown a i { width: 14px; text-align: center; font-size: 0.8rem; }
.user-dropdown-sep { height: 1px; background: var(--border-subtle); margin: 4px 0; }
.user-dropdown a.logout { color: var(--danger); }
.user-dropdown a.logout:hover { background: var(--danger-light); color: var(--danger); }

/* Hamburger */
.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    color: var(--text-2);
    font-size: 1rem;
    margin-left: auto;
}
.nav-toggle:hover { background: var(--border-subtle); color: var(--text); }

/* Admin/view mode badge (lives in panel header now) */
.badge-admin-mode,
.badge-view-mode {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 0.78rem; font-weight: 500;
    padding: 4px 12px; border-radius: var(--radius-pill);
    text-decoration: none; white-space: nowrap;
}
.badge-admin-mode {
    background: var(--warning-light);
    color: #92400e;
    border: 1px solid var(--warning-border);
    transition: background var(--transition);
}
.badge-admin-mode:hover { background: #fef3c7; color: #78350f; text-decoration: none; }
.badge-view-mode {
    background: var(--accent-light);
    color: var(--accent-hover);
    border: 1px solid var(--accent-border);
    transition: background var(--transition);
}
.badge-view-mode:hover { background: #ede9fe; color: var(--accent-hover); text-decoration: none; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    border-radius: var(--radius-pill);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 8px 18px;
    box-shadow: none !important;
    transition: background var(--transition), border-color var(--transition), color var(--transition), transform 0.1s;
    line-height: 1.4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    text-decoration: none;
    border: 1.5px solid transparent;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-sm { padding: 5px 12px; font-size: 0.8rem; }
.btn-lg { padding: 12px 28px; font-size: 1rem; }

.btn-primary    { background: var(--accent);        border-color: var(--accent);        color: #fff; }
.btn-primary:hover  { background: var(--accent-hover);  border-color: var(--accent-hover);  color: #fff; }

.btn-secondary  { background: var(--border-subtle); border-color: var(--border);         color: #374151; }
.btn-secondary:hover { background: var(--border); border-color: var(--border); color: var(--text); }

.btn-success    { background: var(--success);       border-color: var(--success);        color: #fff; }
.btn-success:hover  { background: #15803d; border-color: #15803d; color: #fff; }

.btn-danger     { background: var(--danger);        border-color: var(--danger);         color: #fff; }
.btn-danger:hover   { background: #b91c1c; border-color: #b91c1c; color: #fff; }

.btn-light      { background: var(--surface);       border-color: var(--border);         color: var(--text-2); }
.btn-light:hover    { background: var(--border-subtle); color: var(--text); }

.btn-dark       { background: var(--brand-dark);    border-color: var(--brand-dark);     color: #fff; }
.btn-dark:hover     { background: #1e293b; border-color: #1e293b; color: #fff; }

.btn-ghost {
    background: transparent; border-color: transparent;
    color: var(--text-2);
}
.btn-ghost:hover { background: var(--border-subtle); color: var(--text); border-color: transparent; }

.btn-primary-gradient { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary-gradient:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }

.btn-outline-primary {
    background: transparent; border-color: var(--accent-border); color: var(--accent);
}
.btn-outline-primary:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

.btn-outline-danger {
    background: transparent; border-color: var(--danger-border); color: var(--danger);
}
.btn-outline-danger:hover { background: var(--danger); border-color: var(--danger); color: #fff; }

.btn-outline-warning {
    background: transparent; border-color: var(--warning-border); color: var(--warning);
}
.btn-outline-warning:hover { background: var(--warning-light); color: #92400e; }

.btn-outline-info {
    background: transparent; border-color: var(--accent-border); color: var(--accent);
}
.btn-outline-info:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

.btn-outline-secondary {
    background: transparent; border-color: var(--border); color: var(--text-2);
}
.btn-outline-secondary:hover { background: var(--border-subtle); color: var(--text); }

.btn-outline-light {
    background: transparent; border-color: rgba(255,255,255,0.5); color: #fff;
}
.btn-outline-light:hover { background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.8); color: #fff; }

/* ============================================================
   FORMS
   ============================================================ */
.form-control, .form-select {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    box-shadow: none;
    background: var(--surface);
    color: var(--text);
    padding: 8px 12px;
    transition: border-color var(--transition), box-shadow var(--transition);
    font-family: var(--font);
}
.form-control:focus, .form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(91,33,182,0.1);
    outline: none;
}
.form-control-sm { padding: 5px 9px; font-size: 0.8rem; }
.form-control-lg { padding: 11px 14px; font-size: 1rem; }
.form-label { font-size: 0.8rem; font-weight: 600; color: var(--text); margin-bottom: 5px; }
.form-check-input:checked { background-color: var(--accent); border-color: var(--accent); }
.form-text { font-size: 0.775rem; color: var(--text-3); }

/* Monospace ID input */
.id-input {
    font-family: var(--font-mono);
    font-size: 0.825rem;
    letter-spacing: 0.02em;
    background: #f8fafc;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg) 0 0 var(--radius-lg) !important;
    padding: 10px 14px;
}
.id-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(91,33,182,0.1);
    background: #fff;
}
.id-input-group .btn {
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0 !important;
}

/* ============================================================
   MODALS
   ============================================================ */
.modal-content {
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-lg);
}
.modal-header { border-bottom: 1px solid var(--border-subtle); padding: 18px 22px; }
.modal-footer { border-top: 1px solid var(--border-subtle); padding: 14px 22px; }
.modal-body { padding: 18px 22px; }
.modal-title { font-size: 0.95rem; font-weight: 700; color: var(--text); }

/* ============================================================
   BADGES, ALERTS, CARDS
   ============================================================ */
.badge {
    font-weight: 600;
    font-size: 0.7rem;
    border-radius: var(--radius-sm);
    padding: 3px 8px;
    letter-spacing: 0.01em;
}
.bg-primary   { background-color: var(--accent)   !important; }
.bg-success   { background-color: var(--success)  !important; }
.bg-danger    { background-color: var(--danger)   !important; }
.bg-warning   { background-color: #f59e0b !important; color: #fff !important; }
.bg-secondary { background-color: var(--text-3)   !important; }

.alert { border-radius: var(--radius-card); font-size: 0.875rem; border-width: 1.5px; }
.alert-info    { background: var(--accent-light);   border-color: var(--accent-border);  color: #3730a3; }
.alert-warning { background: var(--warning-light);  border-color: var(--warning-border); color: #92400e; }
.alert-success { background: var(--success-light);  border-color: var(--success-border); color: #14532d; }
.alert-danger  { background: var(--danger-light);   border-color: var(--danger-border);  color: #991b1b; }

.card {
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    box-shadow: none;
    background: var(--surface);
    transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover { box-shadow: var(--shadow-card); }

/* ============================================================
   APP LAYOUT (PHOTO VIEWER)
   ============================================================ */
.app-layout {
    display: flex;
    height: calc(100vh - var(--header-height));
    overflow: hidden;
}

/* ---- Left panel ---- */
#tag-list-panel {
    position: relative;
    flex-shrink: 0;
    width: var(--panel-width-left);
    background: var(--surface);
    border-right: 1px solid var(--border);
    transition: width var(--transition);
    overflow: hidden;
    display: flex;
    flex-direction: row;
}
#tag-list-panel.collapsed { width: 28px; }

.panel-inner {
    flex: 1; min-width: 0; overflow: hidden;
    display: flex; flex-direction: column;
}

.panel-tab {
    flex-shrink: 0; width: 28px; padding: 0;
    background: var(--bg); border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-3);
    transition: background var(--transition), color var(--transition);
}
.panel-tab:hover { background: var(--border-subtle); color: var(--text-2); }
.panel-tab i { transition: transform var(--transition); display: inline-block; }
#tag-list-panel .panel-tab { border-left: 1px solid var(--border); }
#tag-list-panel.collapsed .panel-tab i { transform: scaleX(-1); }

.panel-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
    gap: 6px;
}
.panel-header h2 {
    margin: 0;
    font-size: 0.7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--text-3);
    flex: 1;
}
.panel-header-actions {
    display: flex; align-items: center; gap: 4px;
}

.panel-hint {
    font-size: 0.73rem;
    color: var(--text-3);
    padding: 6px 14px 8px;
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
    line-height: 1.5;
}
.panel-hint i { margin-right: 3px; }

.btn-icon {
    background: none; border: none; cursor: pointer;
    color: var(--text-3); font-size: 0.85rem;
    padding: 4px 6px; border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
    display: flex; align-items: center; gap: 4px;
    font-size: 0.78rem; font-weight: 500;
}
.btn-icon:hover { color: var(--text); background: var(--border-subtle); }

#tag-list-content { overflow-y: auto; flex: 1; padding: 4px 0; }

.tag-list-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 14px; cursor: pointer;
    transition: background var(--transition);
}
.tag-list-item:hover { background: var(--bg); }
.tag-list-item.active { background: var(--accent-light); }
.tag-list-item.active .tag-name-text { color: var(--accent); font-weight: 500; }
.tag-list-item.pending .tag-name-text { color: var(--warning); }

.tag-number {
    width: 20px; height: 20px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 10px;
    flex-shrink: 0;
    border: 1.5px solid rgba(255,255,255,0.75);
}
.tag-name-text {
    font-size: 0.875rem; color: var(--text);
    flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tag-name-text.unknown { color: var(--text-3); font-style: italic; }

/* ---- Photo container ---- */
#photo-container {
    flex: 1; position: relative;
    display: flex; justify-content: center; align-items: center;
    overflow: visible;
    background: var(--photo-bg);
}
#photo-wrapper {
    position: relative; display: inline-block;
    transform-origin: center center; line-height: 0;
}
#group-photo {
    display: block; max-width: 100%;
    max-height: calc(100vh - var(--header-height));
    object-fit: contain; user-select: none; -webkit-user-drag: none;
}

/* ---- Floating zoom toolbar ---- */
.zoom-toolbar {
    position: absolute;
    bottom: 16px; left: 16px;
    display: flex;
    align-items: center;
    gap: 2px;
    background: rgba(15,23,42,0.78);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius-pill);
    padding: 4px 6px;
    z-index: 50;
    border: 1px solid rgba(255,255,255,0.1);
}
.zoom-toolbar button {
    width: 30px; height: 30px;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: rgba(255,255,255,0.85);
    font-size: 14px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background var(--transition), color var(--transition);
    line-height: 1;
    font-weight: 600;
}
.zoom-toolbar button:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}
.zoom-toolbar .zoom-sep {
    width: 1px; height: 16px;
    background: rgba(255,255,255,0.15);
    margin: 0 2px;
    flex-shrink: 0;
}
#zoom-level {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: rgba(255,255,255,0.65);
    min-width: 40px;
    text-align: center;
    letter-spacing: 0.02em;
    padding: 0 4px;
}

/* ---- Tag overlay & dots ---- */
#tag-overlay {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none; overflow: visible;
}
.photo-tag {
    position: absolute;
    width: 22px; height: 22px; border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: auto; cursor: pointer;
    font-weight: 700; font-size: 10px; color: #fff;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid rgba(255,255,255,0.85);
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
    z-index: 10;
    transition: transform var(--transition), box-shadow var(--transition);
    text-shadow: 0 1px 2px rgba(0,0,0,0.35);
    background: var(--tag-unknown);
}
.photo-tag:hover {
    transform: translate(-50%, -50%) scale(1.4);
    z-index: 20;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.photo-tag.active {
    transform: translate(-50%, -50%) scale(1.2);
    z-index: 15;
    box-shadow: 0 0 0 3px rgba(91,33,182,0.45);
}
.photo-tag:nth-child(5n+1) { background: var(--tag1); }
.photo-tag:nth-child(5n+2) { background: var(--tag2); }
.photo-tag:nth-child(5n+3) { background: var(--tag3); }
.photo-tag:nth-child(5n+4) { background: var(--tag4); }
.photo-tag:nth-child(5n+5) { background: var(--tag5); }
.photo-tag.unknown         { background: var(--tag-unknown) !important; }

.photo-tag::after {
    content: attr(data-name);
    position: absolute; top: calc(100% + 6px); left: 50%;
    transform: translateX(-50%);
    background: rgba(15,23,42,0.92); color: #fff !important;
    font-size: 11px; font-weight: 500; line-height: 1.4;
    padding: 4px 9px; border-radius: var(--radius);
    white-space: nowrap; pointer-events: none;
    opacity: 0; transition: opacity 0.15s;
    z-index: 9999; text-shadow: none !important;
    box-shadow: var(--shadow); letter-spacing: 0.01em;
    font-family: var(--font);
}
.photo-tag:hover::after { opacity: 1; }

.admin-mode .photo-tag { cursor: grab; }
.admin-mode .photo-tag:active { cursor: grabbing; }

#tag-overlay.dots-hidden .photo-tag {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
    color: transparent;
    text-shadow: none !important;
}
#tag-overlay.dots-hidden .photo-tag:hover {
    background: rgba(255,255,255,0.2) !important;
    border-color: rgba(255,255,255,0.4) !important;
    transform: translate(-50%, -50%) scale(1.2);
}

#photo-container.pannable              { cursor: grab; }
#photo-container.panning              { cursor: grabbing !important; }
#photo-container.pannable .photo-tag  { cursor: pointer; }

.photo-tag.temp {
    background: #f59e0b !important;
    border-color: rgba(255,255,255,0.9);
    animation: tagPulse 1.6s infinite;
}
@keyframes tagPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50%       { transform: translate(-50%, -50%) scale(1.25); opacity: 0.8; }
}

/* ---- Right panel (person info) ---- */
#person-info-panel {
    position: fixed;
    top: var(--header-height); right: 0;
    width: var(--panel-width-right);
    height: calc(100vh - var(--header-height));
    background: var(--surface);
    border-left: 1px solid var(--border);
    transform: translateX(100%);
    transition: transform var(--transition);
    z-index: 500;
    overflow-y: auto; padding: 0;
}
#person-info-panel.open { transform: translateX(0); }

#person-info-content,
#person-edit-content,
#suggestions-content { padding: 16px; }

.pi-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    margin-bottom: 14px; padding-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle);
}
.pi-name { margin: 0; font-size: 1.05rem; font-weight: 700; line-height: 1.3; word-break: break-word; }
.pi-meta { color: var(--text-2); font-size: 0.8rem; margin: 3px 0 0; }
.pi-section { margin-top: 10px; }
.pi-label {
    font-size: 0.7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.07em;
    color: var(--text-3); margin-bottom: 2px;
}
.pi-value { font-size: 0.875rem; color: var(--text); }

.pi-crop {
    width: 100%; aspect-ratio: 1/1;
    overflow: hidden; border-radius: var(--radius-card);
    border: 1px solid var(--border-subtle);
    background: var(--bg); margin-bottom: 14px;
    position: relative; cursor: crosshair;
}
.pi-crop > div { width: 100%; height: 100%; background-repeat: no-repeat; user-select: none; }

/* ---- Admin layout ---- */
.admin-layout #person-info-panel {
    position: relative; top: auto; right: auto;
    transform: none;
    transition: width var(--transition);
    flex-shrink: 0; overflow: hidden;
    display: flex; flex-direction: row;
    width: var(--panel-width-right);
    border-left: 1px solid var(--border);
    box-shadow: none;
}
.admin-layout #person-info-panel.collapsed { width: 28px; }
.admin-layout #person-info-panel .panel-tab { order: -1; border-right: 1px solid var(--border); }
.admin-layout #person-info-panel.collapsed .panel-tab i { transform: scaleX(-1); }

.admin-panel-inner {
    flex: 1; min-width: 0;
    overflow-y: auto; display: flex; flex-direction: column;
}
.admin-layout #photo-container { flex: 1; min-width: 0; }

.admin-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    padding: 0 4px;
    flex-shrink: 0;
}
.admin-tab {
    flex: 1; padding: 10px 14px;
    border: none; background: none; cursor: pointer;
    font-weight: 500; font-size: 0.8rem; color: var(--text-2);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color var(--transition), border-color var(--transition);
}
.admin-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-content { display: none; }
.tab-content.active { display: block; }

.edit-form .form-label {
    font-size: 0.7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--text-3); margin-bottom: 3px;
}
.edit-form .form-control,
.edit-form .form-select { font-size: 0.875rem; }
.edit-form .btn { width: 100%; margin-bottom: 6px; }

.suggestion-item {
    padding: 10px 12px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-card);
    margin-bottom: 8px;
    font-size: 0.875rem; cursor: pointer;
    background: var(--surface);
    transition: background var(--transition), border-color var(--transition);
}
.suggestion-item:hover { background: var(--bg); }
.suggestion-item.si-selected { background: var(--accent-light); border-color: var(--accent-border); }
.suggestion-item .si-name { font-weight: 700; color: var(--text); margin-bottom: 3px; }
.suggestion-item .si-meta { color: var(--text-2); font-size: 0.775rem; line-height: 1.5; }
.suggestion-item .si-user { font-weight: 500; color: var(--text); }
.suggestion-item .si-comment {
    margin-top: 5px; font-style: italic; color: var(--text-2);
    background: var(--bg); border-radius: var(--radius);
    padding: 4px 8px; font-size: 0.8rem; border: 1px solid var(--border-subtle);
}
.suggestion-item .si-actions { display: flex; gap: 6px; margin-top: 10px; }
.suggestion-item .si-actions .btn { flex: 1; font-size: 0.78rem; padding: 5px 8px; }

/* ============================================================
   HOMEPAGE
   ============================================================ */
.hero-section {
    position: relative;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 60%, #2e1065 100%);
    padding: 110px 0 90px;
    color: white;
    text-align: center;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 65% 35%, rgba(139,92,246,0.2) 0%, transparent 70%);
    pointer-events: none;
}
.hero-title {
    font-size: clamp(2.4rem, 6vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    color: #fff;
    margin-bottom: 20px;
    line-height: 1.08;
    position: relative;
}
.hero-title-accent { color: #a78bfa; }
.hero-subtitle {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.68);
    max-width: 500px;
    margin: 0 auto 40px;
    line-height: 1.75;
    position: relative;
}
.hero-ctas {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    position: relative;
}
.hero-ctas .btn-outline-hero {
    background: transparent;
    border: 1.5px solid rgba(255,255,255,0.35);
    color: rgba(255,255,255,0.9);
    border-radius: var(--radius-pill);
    padding: 10px 22px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: border-color var(--transition), background var(--transition), color var(--transition);
}
.hero-ctas .btn-outline-hero:hover {
    border-color: rgba(255,255,255,0.75);
    background: rgba(255,255,255,0.1);
    color: #fff;
    transform: translateY(-1px);
}

/* Features section */
.features-section {
    background: #f8fafc;
    padding: 80px 0;
    border-top: 1px solid var(--border);
}
.features-section .section-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 10px;
}
.features-section .section-title {
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text);
    margin-bottom: 12px;
    line-height: 1.2;
}
.features-section .section-subtitle {
    font-size: 1rem;
    color: var(--text-2);
    max-width: 440px;
    line-height: 1.7;
}
.feature-item {
    display: flex;
    gap: 16px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-subtle);
}
.feature-item:last-child { border-bottom: none; }
.feature-icon-wrap {
    width: 44px; height: 44px;
    border-radius: var(--radius-lg);
    background: var(--accent-light);
    border: 1px solid var(--accent-border);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    color: var(--accent);
    font-size: 1rem;
}
.feature-item-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}
.feature-item-desc {
    font-size: 0.875rem;
    color: var(--text-2);
    line-height: 1.6;
    margin: 0;
}

/* App preview mockup */
.app-preview {
    background: var(--brand-dark);
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: var(--shadow-violet);
    border: 1px solid rgba(255,255,255,0.06);
    aspect-ratio: 16/10;
    position: relative;
    display: flex;
    flex-direction: column;
}
.app-preview-bar {
    height: 32px;
    background: rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 6px;
    flex-shrink: 0;
}
.app-preview-dot {
    width: 9px; height: 9px;
    border-radius: 50%;
}
.app-preview-dot:nth-child(1) { background: #ef4444; }
.app-preview-dot:nth-child(2) { background: #f59e0b; }
.app-preview-dot:nth-child(3) { background: #10b981; }
.app-preview-body {
    flex: 1;
    display: flex;
    overflow: hidden;
}
.app-preview-sidebar {
    width: 80px;
    background: rgba(255,255,255,0.04);
    border-right: 1px solid rgba(255,255,255,0.06);
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.app-preview-sidebar-item {
    height: 28px;
    border-radius: 6px;
    background: rgba(255,255,255,0.06);
}
.app-preview-sidebar-item.active {
    background: rgba(91,33,182,0.4);
}
.app-preview-main {
    flex: 1;
    background: #1e293b;
    position: relative;
    overflow: hidden;
}
.app-preview-photo-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}
.app-preview-dot-tag {
    position: absolute;
    width: 16px; height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.85);
    font-size: 7px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ID section */
.id-section {
    background: var(--surface);
    padding: 80px 0;
    border-top: 1px solid var(--border);
}
.id-section .section-title {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text);
    margin-bottom: 10px;
}
.id-section .section-subtitle {
    color: var(--text-2);
    font-size: 0.95rem;
    margin-bottom: 32px;
}
.id-form-wrap {
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================================
   PAGE HERO (about, help, etc)
   ============================================================ */
.page-hero {
    background: var(--brand-dark);
    padding: 60px 0 52px;
    color: white;
}
.page-hero .page-hero-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    color: #fff;
    margin-bottom: 10px;
    line-height: 1.1;
}
.page-hero .page-hero-sub {
    font-size: 1rem;
    color: rgba(255,255,255,0.62);
    max-width: 500px;
    line-height: 1.7;
    margin: 0;
}

/* ============================================================
   DASHBOARD (my/index.php)
   ============================================================ */
.dash-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 28px 0 20px;
    gap: 16px;
    flex-wrap: wrap;
}
.dash-page-title {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text);
    margin: 0;
    line-height: 1.2;
}
.dash-page-sub {
    font-size: 0.875rem;
    color: var(--text-2);
    margin: 3px 0 0;
}

.stats-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 36px;
}
.stat-chip {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.stat-chip .stat-icon {
    font-size: 1.1rem;
    color: var(--accent);
    margin-bottom: 4px;
}
.stat-chip .stat-value {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text);
    line-height: 1;
}
.stat-chip .stat-label {
    font-size: 0.75rem;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-weight: 600;
}

.section-heading {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-3);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-subtle);
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}
.photo-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    overflow: hidden;
    transition: box-shadow var(--transition), transform var(--transition);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}
.photo-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}
.photo-card-thumb {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--bg);
}
.photo-card-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}
.photo-card:hover .photo-card-thumb img {
    transform: scale(1.05);
}
.photo-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15,23,42,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.photo-card:hover .photo-card-overlay { opacity: 1; }
.photo-card-body {
    padding: 12px 14px;
    flex: 1;
}
.photo-card-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.photo-card-id {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-3);
    margin: 0;
    letter-spacing: 0.01em;
}
.photo-card-owner {
    font-size: 0.75rem;
    color: var(--text-2);
    margin: 4px 0 0;
}

.empty-state {
    text-align: center;
    padding: 64px 24px;
    background: var(--surface);
    border: 1.5px dashed var(--border);
    border-radius: var(--radius-card);
}
.empty-state-icon {
    font-size: 2.5rem;
    color: var(--text-3);
    margin-bottom: 16px;
}
.empty-state-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}
.empty-state-sub {
    font-size: 0.875rem;
    color: var(--text-2);
    margin-bottom: 20px;
}

/* ============================================================
   PRICING
   ============================================================ */
.pricing-hero {
    background: var(--brand-dark);
    padding: 64px 0 56px;
    text-align: center;
    color: white;
}
.pricing-hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 10px;
}
.pricing-hero p {
    font-size: 1rem;
    color: rgba(255,255,255,0.62);
    max-width: 440px;
    margin: 0 auto;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
    align-items: start;
}
.pricing-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow var(--transition);
}
.pricing-card:hover { box-shadow: var(--shadow-card); }
.pricing-card.featured {
    border-color: var(--accent-border);
    box-shadow: var(--shadow-violet);
    transform: translateY(-6px);
    position: relative;
    z-index: 1;
}
.pricing-card-header {
    padding: 28px 24px 20px;
    border-bottom: 1px solid var(--border-subtle);
}
.pricing-card.featured .pricing-card-header {
    background: linear-gradient(135deg, var(--brand-dark-2) 0%, #2e1065 100%);
    border-bottom-color: rgba(255,255,255,0.08);
}
.pricing-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: rgba(167,139,250,0.2);
    color: #a78bfa;
    border: 1px solid rgba(167,139,250,0.3);
    border-radius: var(--radius-pill);
    padding: 3px 10px;
    margin-bottom: 10px;
}
.pricing-plan-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 4px;
}
.pricing-card.featured .pricing-plan-name { color: #fff; }
.pricing-plan-desc {
    font-size: 0.8rem;
    color: var(--text-2);
    margin: 0;
}
.pricing-card.featured .pricing-plan-desc { color: rgba(255,255,255,0.55); }
.pricing-price {
    margin-top: 16px;
    display: flex;
    align-items: baseline;
    gap: 4px;
}
.pricing-price .amount {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--text);
    line-height: 1;
}
.pricing-card.featured .pricing-price .amount { color: #fff; }
.pricing-price .currency {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-2);
    align-self: flex-start;
    margin-top: 6px;
}
.pricing-card.featured .pricing-price .currency { color: rgba(255,255,255,0.55); }
.pricing-price .period {
    font-size: 0.8rem;
    color: var(--text-3);
}
.pricing-card.featured .pricing-price .period { color: rgba(255,255,255,0.4); }

.pricing-body {
    padding: 20px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.pricing-features {
    list-style: none;
    padding: 0; margin: 0 0 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}
.pricing-features li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.875rem;
    color: var(--text);
}
.pricing-features li .fi {
    flex-shrink: 0;
    margin-top: 1px;
    font-size: 0.75rem;
}
.pricing-features li .fi-yes { color: var(--success); }
.pricing-features li .fi-no  { color: var(--text-3); }
.pricing-features li.disabled { color: var(--text-3); }

/* Feature comparison table */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.comparison-table thead th {
    padding: 12px 16px;
    text-align: center;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-3);
    border-bottom: 2px solid var(--border);
    background: var(--surface);
}
.comparison-table thead th:first-child { text-align: left; }
.comparison-table thead th.featured-col { color: var(--accent); }
.comparison-table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text);
    vertical-align: middle;
    text-align: center;
}
.comparison-table tbody td:first-child { text-align: left; font-weight: 500; }
.comparison-table tbody tr:nth-child(even) td { background: #f8fafc; }
.comparison-table tbody tr:hover td { background: var(--accent-light); }
.ct-yes { color: var(--accent); font-size: 0.9rem; }
.ct-no  { color: var(--text-3); font-size: 0.9rem; }

/* ============================================================
   AUTH PAGES
   ============================================================ */
.auth-wrap {
    min-height: calc(100vh - var(--header-height));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
    background: var(--bg);
}
.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    padding: 36px 32px;
    box-shadow: var(--shadow-md);
}
.auth-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text);
    text-align: center;
    margin-bottom: 24px;
    letter-spacing: -0.03em;
}
.auth-switch {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-2);
    margin: 0;
}
.auth-switch a { color: var(--accent); text-decoration: none; font-weight: 600; }
.auth-switch a:hover { text-decoration: underline; }

.social-btns {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 22px;
}
.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 16px;
    font-weight: 600;
    font-size: 0.875rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-pill) !important;
    transition: background var(--transition), transform 0.1s;
    text-decoration: none;
    color: inherit;
}
.btn-social:active { transform: scale(0.98); }
.btn-google { background: #fff; color: #3c4043; border-color: var(--border); }
.btn-google:hover { background: #f8f9fa; border-color: #ccc; color: #3c4043; }
.btn-facebook { background: #1877f2; color: #fff; border-color: #1877f2; }
.btn-facebook:hover { background: #166fe5; border-color: #166fe5; color: #fff; }

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--text-3);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 18px 0;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-subtle);
}
.auth-divider:not(:empty)::before { margin-right: 1.5em; }
.auth-divider:not(:empty)::after  { margin-left:  1.5em; }

/* ============================================================
   CONTENT PAGES (About, Help, Contact)
   ============================================================ */
.content-section {
    padding: 56px 0;
}
.content-section + .content-section {
    border-top: 1px solid var(--border-subtle);
}
.content-section.alt-bg {
    background: #f8fafc;
}

.accent-border-section {
    border-left: 4px solid var(--accent);
    padding-left: 20px;
    margin: 24px 0;
}
.accent-border-section p { margin: 0; color: var(--text-2); font-size: 0.95rem; line-height: 1.75; }

.feature-grid-2x2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-top: 20px;
}
.feature-tile {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    padding: 18px 20px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}
.feature-tile-icon {
    width: 38px; height: 38px;
    border-radius: var(--radius-lg);
    background: var(--accent-light);
    color: var(--accent);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}
.feature-tile-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 3px;
}
.feature-tile-desc {
    font-size: 0.8rem;
    color: var(--text-2);
    margin: 0;
    line-height: 1.5;
}

.cta-block {
    background: var(--brand-dark);
    border-radius: var(--radius-card);
    padding: 48px 40px;
    text-align: center;
    margin: 40px 0;
}
.cta-block h3 {
    color: #fff;
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
}
.cta-block p {
    color: rgba(255,255,255,0.6);
    font-size: 0.95rem;
    margin-bottom: 24px;
}

/* Help accordion */
.help-accordion {
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    overflow: hidden;
}
.help-accordion .accordion-item {
    border: none;
    border-bottom: 1px solid var(--border-subtle);
}
.help-accordion .accordion-item:last-child { border-bottom: none; }
.help-accordion .accordion-button {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
    background: var(--surface);
    padding: 16px 20px;
    box-shadow: none;
}
.help-accordion .accordion-button:not(.collapsed) {
    color: var(--accent);
    background: var(--accent-light);
}
.help-accordion .accordion-button:not(.collapsed)::after {
    filter: invert(27%) sepia(90%) saturate(700%) hue-rotate(250deg);
}
.help-accordion .accordion-button:focus { box-shadow: none; }
.help-accordion .accordion-body {
    font-size: 0.875rem;
    color: var(--text-2);
    line-height: 1.7;
    padding: 14px 20px 18px;
    background: var(--surface);
}

.help-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    padding: 24px;
    height: 100%;
}
.help-card h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 14px;
}
.help-card ul {
    padding-left: 0;
    list-style: none;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.help-card ul li {
    font-size: 0.875rem;
    color: var(--text-2);
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.5;
}
.help-card ul li::before {
    content: '';
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
    margin-top: 7px;
}

/* Trust badges (pricing) */
.trust-badges {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 40px;
}
.trust-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-2);
    font-size: 0.875rem;
    font-weight: 500;
}
.trust-badge i {
    font-size: 1.1rem;
    color: var(--accent);
}

/* ============================================================
   SHARED FOOTER
   ============================================================ */
.site-footer {
    background: var(--brand-dark);
    color: rgba(255,255,255,0.55);
    padding: 56px 0 0;
}
.footer-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
}
.footer-brand img { height: 26px; border-radius: var(--radius); }
.footer-brand:hover { color: #fff; text-decoration: none; }
.footer-tagline {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.4);
    line-height: 1.6;
    max-width: 200px;
}
.footer-col-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: rgba(255,255,255,0.8);
    margin-bottom: 14px;
}
.footer-links {
    list-style: none;
    padding: 0; margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.footer-links a {
    color: rgba(255,255,255,0.45);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color var(--transition);
}
.footer-links a:hover { color: rgba(255,255,255,0.9); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 18px 0;
    margin-top: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.footer-bottom-copy {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.3);
}
.footer-bottom-links {
    display: flex;
    gap: 20px;
}
.footer-bottom-links a {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.3);
    text-decoration: none;
}
.footer-bottom-links a:hover { color: rgba(255,255,255,0.7); }

/* ============================================================
   MY SECTION HEADING (legacy compat)
   ============================================================ */
.my-section-heading {
    font-size: 0.75rem; font-weight: 700; color: var(--text-3);
    text-transform: uppercase; letter-spacing: 0.08em;
    margin-bottom: 16px; padding-bottom: 10px;
    border-bottom: 1px solid var(--border-subtle);
}

/* ============================================================
   UTILITIES
   ============================================================ */
.visually-hidden {
    position: absolute; width: 1px; height: 1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.text-accent { color: var(--accent); }
.text-muted  { color: var(--text-2) !important; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
    .pricing-grid { grid-template-columns: 1fr; max-width: 400px; }
    .pricing-card.featured { transform: none; }
    .feature-grid-2x2 { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    :root {
        --panel-width-left:  100vw;
        --panel-width-right: 100vw;
    }
    .site-nav  { display: none; position: static; transform: none; }
    .header-end { display: none; }
    .nav-toggle { display: flex; }

    .header-bar.nav-open {
        flex-wrap: wrap;
        height: auto;
        padding-bottom: 12px;
    }
    .header-bar.nav-open .site-nav,
    .header-bar.nav-open .header-end {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 4px;
        order: 10;
    }
    .header-bar.nav-open .site-nav a {
        padding: 10px 12px;
        color: var(--text);
        font-size: 0.95rem;
        border-radius: var(--radius-lg);
    }
    .header-bar.nav-open .header-end {
        padding-top: 8px;
        border-top: 1px solid var(--border-subtle);
    }
    .header-bar.nav-open .nav-toggle { margin-left: auto; }

    .photo-tag { width: 20px; height: 20px; font-size: 9px; }
    .hero-section { padding: 72px 0 56px; }
    .features-section { padding: 52px 0; }
    .id-section { padding: 52px 0; }
    .page-hero { padding: 44px 0 36px; }
    .pricing-hero { padding: 44px 0 36px; }
    .cta-block { padding: 36px 24px; }
    .trust-badges { gap: 24px; }
    .footer-bottom { flex-direction: column; align-items: flex-start; gap: 10px; }
    .photo-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
    .dash-page-header { padding: 20px 0 14px; }
    .stats-strip { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
    .auth-card { padding: 28px 22px; }
    .user-menu-btn span { display: none; }
    .app-preview { display: none; }
}

@media (max-width: 480px) {
    .hero-title { letter-spacing: -0.03em; }
    .hero-ctas { flex-direction: column; align-items: center; }
    .hero-ctas .btn { width: 100%; max-width: 280px; }
}
