@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

:root {
    --primary: #6c5ce7;
    --primary-light: #a29bfe;
    --primary-dark: #2d1b69;
    --accent-green: #00b894;
    --accent-pink: #fd79a8;
    --bg-light: #f8f7ff;
    --bg-white: #ffffff;
    --text-dark: #2d3436;
    --text-muted: #5a6366;
    --border-color: #e8e6f0;
    --shadow-sm: 0 2px 8px rgba(108,92,231,0.08);
    --shadow-md: 0 4px 16px rgba(108,92,231,0.12);
    --shadow-lg: 0 8px 32px rgba(108,92,231,0.16);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --sidebar-width: 260px;
    --navbar-height: 60px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    min-height: 100vh;
}

/* ===== Sidebar ===== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--primary-dark) 0%, #3d2b79 100%);
    color: white;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logo {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--accent-green));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    font-size: 1.5rem;
}

.sidebar-header h5 {
    font-weight: 700;
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
}

.sidebar-header small {
    color: var(--primary-light);
    font-size: 0.8rem;
}

.sidebar-menu {
    padding: 0 0 1rem 0;
}

/* ===== Search box ===== */
.sidebar-search {
    position: sticky; top: 0; z-index: 10;
    display: flex; align-items: center;
    padding: 0.75rem 1rem; margin: 0 0.75rem 0.5rem;
    background: rgba(0,0,0,0.2); border-radius: 8px;
    gap: 8px;
}
.search-icon { font-size: 0.8rem; color: rgba(255,255,255,0.4); flex-shrink: 0; }
.search-input {
    flex: 1; background: transparent; border: none; outline: none;
    color: #fff; font-size: 0.85rem; min-width: 0;
}
.search-input::placeholder { color: rgba(255,255,255,0.35); }
.search-clear { font-size: 0.65rem; color: rgba(255,255,255,0.4); cursor: pointer; flex-shrink: 0; }
.search-clear:hover { color: #fff; }

/* ===== Collapsible section ===== */
.menu-section {
    padding: 0.85rem 1.5rem 0.45rem;
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255,255,255,1);
    font-weight: 600;
}
.section-icon {
    font-size: 0.8rem;
    margin-right: 0.4rem;
    opacity: 0.85;
}
.collapsible-header {
    cursor: pointer;
    display: flex; justify-content: space-between; align-items: center;
    user-select: none;
    transition: color 0.2s;
}
.collapsible-header:hover { color: rgba(255,255,255,0.85); }
.section-arrow { font-size: 0.6rem; transition: transform 0.25s ease; }
.arrow-up { transform: rotate(180deg); }

.section-body {
    max-height: 0; overflow: hidden;
    transition: max-height 0.3s ease;
}
.section-body.section-open {
    max-height: 600px; /* 足够展开所有子项 */
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 0.55rem 1.5rem;
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    transition: color 0.2s, background 0.2s, border-color 0.2s;
    font-size: 0.85rem;
    border-left: 3px solid transparent;
}

.menu-item i {
    font-size: 1.1rem;
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
}

.menu-item:hover {
    color: white;
    background: rgba(255,255,255,0.08);
}

.menu-item.active {
    color: white;
    background: rgba(255,255,255,0.12);
    border-left-color: var(--accent-green);
}

/* ===== Navbar ===== */
.navbar {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--navbar-height);
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    z-index: 1100;
    box-shadow: var(--shadow-sm);
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: var(--text-muted);
    cursor: pointer;
    margin-right: 1rem;
    display: none;
}

.page-title {
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.navbar-right {
    display: flex;
    align-items: center;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-dark);
    text-decoration: none;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    transition: background-color 0.2s;
}

.user-menu:hover {
    background: var(--bg-light);
}

.user-avatar {
    font-size: 1.4rem;
    color: var(--primary);
}

/* ===== Main Content ===== */
.main-content {
    margin-left: var(--sidebar-width);
    padding-top: var(--navbar-height);
    min-height: 100vh;
}

.content-wrapper {
    padding: 1.5rem;
}

/* ===== Cards ===== */
.card {
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    padding: 1rem 1.25rem;
}

/* ===== Stat Cards ===== */
.stat-card {
    border-radius: var(--radius-md);
    padding: 1.25rem;
    border: none;
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    background: rgba(255,255,255,0.25);
    color: white;
    margin-bottom: 0.75rem;
}

.stat-card .stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    line-height: 1;
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.8);
    margin-top: 0.25rem;
}

.stat-primary { background: linear-gradient(135deg, #6c5ce7, #a29bfe); }
.stat-green { background: linear-gradient(135deg, #00b894, #55efc4); }
.stat-pink { background: linear-gradient(135deg, #fd79a8, #fab1a0); }
.stat-orange { background: linear-gradient(135deg, #e17055, #fdcb6e); }

/* ===== Buttons ===== */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.5rem 1.25rem;
    font-weight: 500;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a4bd6, #9189f0);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108,92,231,0.3);
}

.btn-outline-primary {
    border: 2px solid var(--primary);
    color: var(--primary);
    border-radius: var(--radius-sm);
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, var(--accent-green), #55efc4);
    border: none;
    border-radius: var(--radius-sm);
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c, #fd79a8);
    border: none;
    border-radius: var(--radius-sm);
}

/* ===== Tables ===== */
.table-custom {
    border-radius: var(--radius-md);
    overflow: hidden;
}

.table-custom thead th {
    background: var(--bg-light);
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.75rem 1rem;
}

.table-custom tbody td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
}

/* ===== Badges ===== */
.badge-active {
    background: #d4edda;
    color: #155724;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.78rem;
}

.badge-inactive {
    background: #e2e3e5;
    color: #383d41;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.78rem;
}

.badge-expired {
    background: #fff3cd;
    color: #856404;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.78rem;
}

.badge-cancelled {
    background: #f8d7da;
    color: #721c24;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.78rem;
}

.badge-info {
    background: #cce5ff;
    color: #004085;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.78rem;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.78rem;
}

.bg-purple {
    background-color: var(--primary) !important;
    color: white;
}

/* ===== Forms ===== */
.form-control, .form-select {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.55rem 0.85rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(108,92,231,0.12);
}

.form-label {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-dark);
    margin-bottom: 0.4rem;
}

/* ===== Color Input Group ===== */
.color-input-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.color-input-group .form-control-color {
    width: 40px;
    height: 40px;
    padding: 3px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    flex-shrink: 0;
}

.color-input-group .form-control-color:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(108,92,231,0.12);
}

.color-input-group .form-control-color::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-input-group .form-control-color::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}

/* ===== Footer ===== */
.main-footer {
    padding: 1rem 1.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    border-top: 1px solid var(--border-color);
    margin-top: 2rem;
}

/* ===== Tabs ===== */
.nav-tabs .nav-link {
    color: var(--text-muted);
    border: none;
    padding: 0.75rem 1.25rem;
    font-weight: 500;
    border-bottom: 3px solid transparent;
}

.nav-tabs .nav-link.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: transparent;
}

.nav-tabs .nav-link:hover {
    color: var(--primary);
    border-bottom-color: var(--primary-light);
}

/* ===== Pagination ===== */
.pagination .page-link {
    border: none;
    color: var(--primary);
    border-radius: var(--radius-sm);
    margin: 0 2px;
}

.pagination .page-item.active .page-link {
    background: var(--primary);
    color: white;
}

/* ===== Responsive ===== */
@media (max-width: 991.98px) {
    .sidebar {
        top: var(--navbar-height);
        transform: translateX(-100%);
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .navbar {
        left: 0;
    }
    .main-content {
        margin-left: 0;
    }
    .sidebar-toggle {
        display: block;
    }
}

@media (max-width: 768px) {
    .content-wrapper {
        padding: 1rem;
    }
    .stat-card .stat-value {
        font-size: 1.4rem;
    }
    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 480px) {
    .content-wrapper {
        padding: 0.75rem;
    }
    .stat-card {
        padding: 1rem;
    }
    .stat-card .stat-value {
        font-size: 1.2rem;
    }
    .photo-grid {
        grid-template-columns: 1fr 1fr;
    }
    input, select, textarea {
        font-size: 16px;
    }
}

/* ===== Sidebar Overlay ===== */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

.sidebar-overlay.show {
    display: block;
}

/* ===== Action Buttons ===== */
.btn-action {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.9rem;
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    color: var(--primary-light);
    margin-bottom: 1rem;
}

.empty-state h5 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

/* ===== Photo Grid ===== */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.photo-item {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.photo-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.photo-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.photo-item .photo-info {
    padding: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.gallery-member-card {
    height: calc(100vh - 180px);
    display: flex;
    flex-direction: column;
}

.gallery-member-card .card-header {
    flex-shrink: 0;
}

.gallery-member-card .member-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.25rem;
}

.member-list-item {
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.15s ease;
    margin-bottom: 2px;
}

.member-list-item:hover {
    background: var(--bg-hover);
}

.member-list-item.active {
    background: var(--primary-light);
    border-left: 3px solid var(--primary);
}

.member-avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
}

/* ===== Comparison ===== */
.compare-container {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
}

.compare-slider {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 4px;
    background: white;
    cursor: ew-resize;
    z-index: 10;
    box-shadow: 0 0 8px rgba(0,0,0,0.3);
}

.compare-slider::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* ===== Login Page ===== */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 50%, #00b894 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    background: rgba(255,255,255,0.95);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    width: 100%;
    max-width: 420px;
    backdrop-filter: blur(10px);
}

.login-card h2 {
    color: var(--primary-dark);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.login-card .login-subtitle {
    color: var(--primary);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.login-card .form-control {
    border-radius: 10px;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.login-card .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(108,92,231,0.15);
}

.btn-login {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border: none;
    border-radius: 10px;
    padding: 0.75rem;
    font-weight: 500;
    color: white;
    width: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108,92,231,0.4);
    color: white;
}

.login-card .input-group-text {
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-right: none;
    border-radius: 10px 0 0 10px;
    color: var(--primary);
}

.login-card .input-group .form-control {
    border-left: none;
    border-radius: 0 10px 10px 0;
}

.login-logo {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--accent-green));
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.8rem;
    color: white;
}

.login-card .alert {
    border-radius: 10px;
    font-size: 0.9rem;
}

@media (max-width: 480px) {
    .login-card {
        padding: 2rem 1.5rem;
        margin: 1rem;
        border-radius: 16px;
    }
}

/* ===== Modal Header Gradient ===== */
.modal-header-gradient {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    color: white;
}

/* ===== Birthday Card ===== */
.card-birthday {
    border-left: 4px solid #e91e8c;
}

.card-birthday .card-header {
    background: linear-gradient(135deg, #fce4ec, #fff0f5);
}

.card-birthday .card-header i {
    color: #e91e8c;
}

.badge-birthday {
    background-color: #e91e8c;
    color: white;
}

/* ===== Inactive Member Card ===== */
.card-inactive {
    border-left: 4px solid #ff9800;
}

.card-inactive .card-header {
    background: linear-gradient(135deg, #fff8e1, #fff3e0);
}

.card-inactive .card-header i {
    color: #ff9800;
}

/* ===== Animations ===== */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== Scrollbar ===== */
.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
}

.avatar-edit-overlay {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 24px;
    height: 24px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    cursor: pointer;
    transition: background-color 0.2s;
    border: 2px solid white;
}

.avatar-edit-overlay:hover {
    background: var(--primary-dark);
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===== Dashboard Row Drag ===== */
.dash-row {
    display: flex;
    align-items: stretch;
    gap: 0;
    margin-bottom: 0.25rem;
    border-radius: 10px;
    transition: box-shadow 0.2s, transform 0.15s;
}
.dash-row:hover { box-shadow: 0 2px 12px rgba(0,0,0,.06); }

.dash-row-handle {
    width: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: width 0.2s, background 0.2s;
    border-radius: 8px 0 0 8px;
    user-select: none;
    background: transparent;
    flex-shrink: 0;
}
.dash-row-handle:active { cursor: grabbing; }

.dash-row-content {
    flex: 1;
    min-width: 0;
}

.dash-row-toggle {
    width: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 0 0.5rem;
    transition: width 0.2s;
}

/* 编辑模式 */
.dash-editing .dash-row-handle { width: 32px; background: rgba(108,92,231,0.06); }
.dash-editing .dash-row-toggle { width: 50px; }
.dash-editing .dash-row { border: 1.5px dashed var(--primary-light); }
.dash-editing .dash-row:hover { border-color: var(--primary); }

/* 隐藏行（编辑模式下灰色占位） */
.dash-row-hidden {
    opacity: 0.25;
    filter: grayscale(0.8);
}
.dash-row-hidden .dash-row-content { pointer-events: none; }

.dash-ghost {
    opacity: 0.3;
    background: var(--primary-light);
    border-radius: 10px;
}

/* stat-card 行内可拖拽 */
.dash-editing .stat-cards-row .stat-card { cursor: grab; }
.dash-editing .stat-cards-row .stat-card:active { cursor: grabbing; }
.dash-editing .stat-cards-row .col-xl-3 { transition: transform 0.15s; }
.dash-editing .stat-cards-row .col-xl-3:hover { transform: scale(1.02); }

/* ===== 照片上传区域 ===== */
.upload-area {
    border: 2px dashed #a29bfe;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s, background 0.3s;
}
.upload-area:hover {
    border-color: #6c5ce7;
    background: #f8f7ff;
}
.upload-area.dragover {
    border-color: #6c5ce7;
    background: #f0eeff;
}

/* ===== 拍照姿势指导 ===== */
#guideBody ul li { margin-bottom: 4px; }

/* ===== 指标说明tooltip ===== */
.metric-info {
    display: inline-flex;
    align-items: center;
    cursor: help;
    position: relative;
}
.metric-info .info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #6b7280;
    font-size: 10px;
    font-weight: 700;
    margin-left: 4px;
    flex-shrink: 0;
    transition: background 0.2s;
}
.metric-info:hover .info-icon {
    background: #6c5ce7;
    color: #fff;
}
.metric-info .info-tip {
    display: none;
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: #f3f4f6;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.6;
    max-width: 360px;
    min-width: 180px;
    z-index: 1000;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    text-align: left;
}
.metric-info .info-tip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1f2937;
}
.metric-info:hover .info-tip {
    display: block;
}
/* Mobile: tap to toggle */
@media (hover: none) {
    .metric-info .info-tip {
        display: none;
    }
    .metric-info.active .info-tip {
        display: block;
    }
}
#guideAngleSpecific { min-height: 40px; }
