/**
 * Ainul LinkApp - Neumorphic Components
 * Links, Design Studio, Preview, QR, Modal, Responsive
 */

/* ========== MAIN CONTENT ========== */
.main-content { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.content-area { flex: 1; border-radius: 20px; padding: 30px; overflow-y: auto; }
.content-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 25px; flex-wrap: wrap; gap: 10px; }
.content-header h1 { font-size: 22px; font-weight: 700; color: #1e293b; display: flex; align-items: center; gap: 10px; }
.content-header p { color: var(--gray-light); font-size: 12px; margin-top: 4px; }

.badge { padding: 6px 14px; border-radius: 20px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.badge-live { display: inline-flex; align-items: center; gap: 6px; }
.badge-live .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ========== STATS ========== */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 25px; }
.stat-card { border-radius: 20px; padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.stat-card .stat-label { font-size: 10px; font-weight: 700; color: var(--gray-light); text-transform: uppercase; letter-spacing: 2px; }
.stat-card .stat-value { font-size: 28px; font-weight: 800; color: #1e293b; }

/* ========== CARDS ========== */
.card { border-radius: 25px; margin-bottom: 20px; overflow: hidden; }
.card-header { padding: 20px 24px; }
.card-header h2 { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; color: var(--gray-light); display: flex; align-items: center; gap: 8px; }
.card-body { padding: 24px; }
.dashboard-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }

/* ========== SETTINGS GRID (2-col) ========== */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.settings-card { border-radius: 25px; padding: 24px; }
.settings-card-full { grid-column: 1 / -1; }
.settings-card-form { display: contents; }
.settings-card-form > .settings-card { display: block; }
.settings-card-header { font-size: 14px; font-weight: 700; color: #1e293b; display: flex; align-items: center; gap: 8px; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid rgba(163,177,198,0.2); }
.settings-card-header .material-symbols-outlined { font-size: 20px; color: var(--primary); }

/* ========== AVATAR UPLOAD ========== */
.avatar-upload-wrap { display: flex; flex-direction: column; align-items: center; margin-bottom: 18px; }
.avatar-upload-circle { width: 90px; height: 90px; border-radius: 50%; overflow: hidden; display: flex; align-items: center; justify-content: center; position: relative; cursor: pointer; }
.avatar-upload-circle img { width: 100%; height: 100%; object-fit: cover; }
.avatar-letter { font-size: 32px; font-weight: 800; color: var(--primary); }
.avatar-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center; color: #fff; opacity: 0; transition: opacity 0.2s; }
.avatar-upload-circle:hover .avatar-overlay { opacity: 1; }
.avatar-hint { font-size: 10px; color: var(--gray-light); margin-top: 8px; }

/* ========== DESIGN PICKERS ========== */
.font-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-top: 10px; }
.font-option { padding: 10px; border-radius: 12px; cursor: pointer; text-align: center; transition: all 0.2s; border: 2px solid transparent; }
.font-option.active { border-color: var(--primary); color: var(--primary); }

.btn-style-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 12px; }
.btn-style-option { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px; border-radius: 15px; cursor: pointer; transition: all 0.2s; }
.btn-style-option.active { color: var(--primary); }
.btn-style-demo { width: 40px; height: 20px; border-radius: 4px; background: #cbd5e1; }

.btn-demo-raised { background: var(--neu-bg); box-shadow: 2px 2px 4px var(--neu-shadow), -2px -2px 4px var(--neu-light); }
.btn-demo-flat { background: #cbd5e1; box-shadow: none; }
.btn-demo-outline { background: transparent; border: 1.5px solid #64748b; }
.btn-demo-pill { border-radius: 20px; background: #cbd5e1; }
.btn-demo-rounded { border-radius: 8px; background: #cbd5e1; }
.btn-demo-sharp { border-radius: 0; background: #cbd5e1; }
.btn-demo-glass { background: rgba(255,255,255,0.3); backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,0.4); }
.btn-demo-gradient { background: linear-gradient(135deg, #6C5CE7, #a29bfe); }
.btn-demo-soft { background: var(--neu-bg); box-shadow: inset 2px 2px 4px var(--neu-shadow), inset -2px -2px 4px var(--neu-light); }
.btn-demo-neon { border: 1px solid #6C5CE7; box-shadow: 0 0 8px rgba(108,92,231,0.5); }
.btn-demo-retro { box-shadow: 3px 3px 0 #1e293b; border: 2px solid #1e293b; background: #fff; }
.btn-demo-bubble { border-radius: 20px; background: radial-gradient(circle at 30% 30%, #a29bfe, #6C5CE7); }


/* ========== FILE UPLOAD ========== */
.file-upload-area { padding: 16px; border-radius: 15px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.bg-preview-thumb { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; }
.upload-placeholder { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; padding: 12px; cursor: pointer; }
.file-upload-area label { font-size: 12px; }
.file-upload-area input[type="checkbox"] { accent-color: var(--danger); margin-right: 4px; }

/* ========== LINKS LAYOUT ========== */
.links-layout, .design-layout { display: flex; gap: 30px; justify-content: center; align-items: flex-start; }
.links-panel, .design-panel { flex: 1; max-width: 800px; min-width: 0; }

/* ========== LINK ITEMS ========== */
.link-item { display: flex; align-items: flex-start; gap: 15px; padding: 20px; border-radius: 20px; margin-bottom: 16px; transition: all 0.2s ease; }
.link-item.link-inactive { opacity: 0.5; }
.link-item .drag-handle { color: #cbd5e1; cursor: grab; margin-top: 4px; }
.link-info { flex: 1; min-width: 0; }
.link-info .link-title { font-weight: 700; font-size: 15px; color: #1e293b; margin-bottom: 2px; }
.link-info .link-url { color: var(--primary); font-size: 12px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; max-width: 280px; }
.link-actions { display: flex; gap: 8px; flex-shrink: 0; margin-top: 12px; }
.empty-state { text-align: center; padding: 40px; color: var(--gray-light); font-size: 14px; }

/* ========== FORMS ========== */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: #475569; margin-bottom: 8px; }
.form-group input[type="text"], .form-group input[type="url"],
.form-group input[type="email"], .form-group input[type="password"],
.form-group input[type="datetime-local"], .form-group select {
    width: 100%; padding: 12px 16px; border: none; border-radius: 15px;
    font-family: 'Poppins', sans-serif; font-size: 14px; outline: none;
    background: var(--neu-bg); color: #334155;
    box-shadow: inset 3px 3px 6px var(--neu-shadow), inset -3px -3px 6px var(--neu-light);
}
.form-group input:focus, .form-group select:focus { box-shadow: inset 4px 4px 8px var(--neu-shadow), inset -4px -4px 8px var(--neu-light), 0 0 0 2px rgba(108,92,231,0.15); }
.form-group input[type="range"] { width: 100%; accent-color: var(--primary); height: 6px; cursor: pointer; -webkit-appearance: none; appearance: none; background: transparent; }
.form-group input[type="range"]::-webkit-slider-runnable-track { width: 100%; height: 8px; border-radius: 4px; background: var(--neu-bg); box-shadow: inset 2px 2px 4px var(--neu-shadow), inset -2px -2px 4px var(--neu-light); }
.form-group input[type="range"]::-webkit-slider-thumb { height: 20px; width: 20px; border-radius: 50%; background: var(--neu-bg); box-shadow: 2px 2px 5px var(--neu-shadow), -2px -2px 5px var(--neu-light); cursor: pointer; -webkit-appearance: none; appearance: none; margin-top: -6px; }

.color-input-wrap { display: flex; gap: 10px; align-items: center; padding: 8px 14px; border-radius: 15px; }
.color-input-wrap input[type="color"] { width: 24px; height: 24px; border: none; border-radius: 50%; cursor: pointer; padding: 0; }
.color-text { flex: 1; font-family: monospace; font-weight: 600; font-size: 12px; color: #64748b; background: transparent; border: none; outline: none; }

.toggle-group { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.toggle-option { padding: 12px; text-align: center; border-radius: 15px; cursor: pointer; font-size: 13px; font-weight: 600; transition: all 0.2s; color: #94a3b8; display: flex; align-items: center; justify-content: center; gap: 8px; }
.toggle-option input { display: none; }
.toggle-option.active { color: var(--primary); }

/* ========== PHONE PREVIEW ========== */
.phone-preview-wrap {
    width: 320px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 12px;
    position: fixed; right: 40px; top: 100px; z-index: 999;
    padding: 15px; border-radius: 45px;
    background: rgba(224, 229, 236, 0.7);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.4);
    box-shadow: 20px 20px 60px rgba(0,0,0,0.1), -10px -10px 30px rgba(255,255,255,0.8);
    transition: opacity 0.3s; cursor: default;
}
.phone-preview-wrap:hover { opacity: 1; }
.preview-drag-handle {
    width: 60px; height: 10px; background: rgba(108,92,231,0.3); border-radius: 5px;
    cursor: grab; margin-bottom: 8px; border: 1px solid rgba(255,255,255,0.4);
}
.preview-drag-handle:active { cursor: grabbing; }
.preview-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 3px; color: var(--gray-light); margin-bottom: 5px; }

/* Content Media Sizing */
.content-media-wrap { width: 100%; margin: 10px 0; border-radius: 16px; overflow: hidden; background: rgba(224,229,236,0.3); }
.content-img { width: 100%; max-height: 280px; object-fit: cover; display: block; border-radius: 12px; }
.content-video-wrap { width: 100%; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; background: #000; }
.content-video-wrap iframe { width: 100%; height: 100%; border: none; }
.content-text-block { width: 100%; padding: 15px; border-radius: 16px; font-size: 14px; line-height: 1.6; }
.phone-frame {
    width: 250px; min-height: 500px; border-radius: 40px; padding: 12px;
    border: 6px solid #1e293b; background: #fff; overflow: hidden; position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}
.phone-notch { width: 90px; height: 18px; background: #1e293b; border-radius: 0 0 15px 15px; margin: 0 auto 10px; position: relative; z-index: 10; }
.phone-screen { border-radius: 28px; min-height: 430px; padding: 18px 12px; overflow-y: auto; }

.preview-avatar { width: 50px; height: 50px; border-radius: 50%; margin: 0 auto 8px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 20px; }
.preview-username { text-align: center; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.preview-bio { text-align: center; font-size: 9px; color: inherit; opacity: 0.6; margin-bottom: 20px; }
.preview-links { display: flex; flex-direction: column; gap: 12px; }
.preview-link-btn { display: block; padding: 12px 14px; color: #475569; text-decoration: none; text-align: center; font-weight: 700; font-size: 10px; text-transform: uppercase; letter-spacing: 1px; transition: all 0.2s; }

/* ========== QR CODE ========== */
.qr-container { max-width: 500px; margin: 0 auto; }
.qr-image { width: 250px; height: 250px; border-radius: 20px; margin: 0 auto 20px; display: block; }
.qr-url { font-size: 14px; color: var(--primary); font-weight: 600; margin-bottom: 5px; text-align: center; }
.qr-hint { font-size: 12px; color: var(--gray-light); margin-bottom: 20px; text-align: center; }
.qr-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ========== PROFILE URL ========== */
.profile-url-box { display: flex; gap: 10px; }
.profile-url-box input { flex: 1; padding: 10px 15px; border: none; border-radius: 15px; font-size: 13px; font-family: 'Poppins', sans-serif; background: var(--neu-bg); color: var(--gray); box-shadow: inset 3px 3px 6px var(--neu-shadow), inset -3px -3px 6px var(--neu-light); outline: none; }
.quick-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.quick-action-btn { flex: 1; min-width: 100px; padding: 16px; border-radius: 20px; text-align: center; color: var(--primary); font-weight: 600; font-size: 12px; transition: all 0.2s; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.quick-action-btn:active { box-shadow: inset 2px 2px 5px #bec4cf, inset -2px -2px 5px #ffffff; }

/* ========== MODAL ========== */
.modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.3); z-index: 1000; align-items: center; justify-content: center; padding: 20px; }
.modal.active { display: flex; }
.modal-content { border-radius: 25px; padding: 30px; width: 100%; max-width: 450px; animation: modalIn 0.3s ease; }
@keyframes modalIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.modal-header h3 { font-size: 16px; font-weight: 700; color: #1e293b; }
.modal-close { width: 35px; height: 35px; border: none; border-radius: 10px; font-size: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center; }

/* ========== SOCIAL MEDIA ========== */
.social-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; }
.social-input-row { display: flex; align-items: center; gap: 10px; }
.social-icon-label { display: flex; align-items: center; gap: 6px; width: 130px; flex-shrink: 0; font-size: 12px; font-weight: 600; }
.social-svg { width: 20px; height: 20px; flex-shrink: 0; display: flex; align-items: center; }
.social-svg svg { width: 100%; height: 100%; }
.social-name { white-space: nowrap; }
.social-input-row input[type="url"] {
    flex: 1; padding: 8px 12px; border: none; border-radius: 10px; min-width: 0;
    font-family: 'Poppins', sans-serif; font-size: 12px; outline: none;
    background: var(--neu-bg); color: #334155;
    box-shadow: inset 2px 2px 4px var(--neu-shadow), inset -2px -2px 4px var(--neu-light);
}
.social-input-row input[type="url"]:focus { box-shadow: inset 3px 3px 6px var(--neu-shadow), inset -3px -3px 6px var(--neu-light), 0 0 0 2px rgba(108,92,231,0.15); }

/* ========== ADMIN TABLE ========== */
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th { text-align: left; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--gray-light); padding: 10px 12px; border-bottom: 2px solid rgba(163,177,198,0.2); }
.admin-table td { padding: 12px; border-bottom: 1px solid rgba(163,177,198,0.1); vertical-align: middle; }
.admin-table tr:hover td { background: rgba(108,92,231,0.03); }

/* ========== BADGES ========== */
.badge-admin { background: linear-gradient(135deg, #6C5CE7, #a29bfe); color: #fff; padding: 4px 10px; border-radius: 8px; font-size: 10px; font-weight: 700; }
.badge-user { background: rgba(163,177,198,0.2); color: #64748b; padding: 4px 10px; border-radius: 8px; font-size: 10px; font-weight: 700; }
.badge-active { background: rgba(0,209,178,0.15); color: #00b894; padding: 4px 10px; border-radius: 8px; font-size: 10px; font-weight: 700; }
.badge-inactive { background: rgba(255,118,117,0.15); color: #d63031; padding: 4px 10px; border-radius: 8px; font-size: 10px; font-weight: 700; }

/* ========== BTN DANGER/SUCCESS ========== */
.btn-danger { background: linear-gradient(135deg, #ff7675, #d63031); color: #fff !important; border: none; }
.btn-success { background: linear-gradient(135deg, #00b894, #00cec9); color: #fff !important; border: none; }

/* ========== SHARE BUTTONS ========== */
.share-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.share-buttons { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.share-btn-item { display: flex; align-items: center; gap: 8px; padding: 14px 16px; border-radius: 15px; text-decoration: none; font-size: 12px; font-weight: 600; transition: all 0.2s; }
.share-btn-item:hover { transform: translateY(-2px); }
.share-btn-item .social-svg { width: 20px; height: 20px; }
.share-preview-link { display: block; text-decoration: none; border-radius: 15px; transition: all 0.2s; }
.share-preview-link:hover { transform: translateY(-2px); }

/* ========== USER DETAIL ========== */
.user-detail-grid { display: flex; flex-direction: column; gap: 10px; }
.detail-item { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid rgba(163,177,198,0.1); font-size: 13px; }
.detail-label { font-weight: 600; color: var(--gray-light); font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; }

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .phone-preview-wrap { width: 280px; }
    .settings-grid { grid-template-columns: 1fr; }
    .share-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .dashboard-wrapper { flex-direction: column; padding: 10px; }
    .sidebar { position: fixed; left: -280px; top: 0; bottom: 0; z-index: 100; width: 260px; border-radius: 0 20px 20px 0; transition: left 0.3s; }
    .sidebar.active { left: 0; }
    .sidebar-toggle { display: flex; align-items: center; justify-content: center; }
    .sidebar-overlay.active { display: block; z-index: 95; }
    
    .content-area { padding: 20px; }
    .content-header { gap: 15px; }
    .content-header h1 { font-size: 20px; }

    .links-layout, .design-layout { flex-direction: column; align-items: stretch; }
    .phone-preview-wrap { width: 100%; position: static; order: 10; margin-top: 30px; }
    .phone-frame { margin: 0 auto; }
    .stats-grid { grid-template-columns: 1fr; }
    .stat-card .stat-value { font-size: 24px; }
    .dashboard-cards { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    
    .link-item { flex-wrap: wrap; padding: 15px; }
    .link-info .link-url { max-width: 100%; }
    .link-actions { width: 100%; justify-content: flex-end; }
    
    .social-grid { grid-template-columns: 1fr; }
    .btn-style-picker { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }
    .share-layout { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .auth-card { padding: 25px 20px; }
    .auth-header { margin-bottom: 25px; }
    .auth-header h1 { font-size: 20px; }
    .auth-logo { width: 50px; height: 50px; font-size: 24px; }

    .content-area { padding: 15px; }
    .content-header h1 { font-size: 18px; }
    .neu-card[style*="padding:40px"] { padding: 25px !important; }

    .stat-card { padding: 15px; }
    .stat-card .stat-value { font-size: 22px; }
    
    .profile-url-box { flex-direction: column; gap: 8px; }
    .profile-url-box button { width: 100%; justify-content: center; }
    .quick-actions { flex-direction: column; }

    .link-actions { gap: 4px; }

    .social-input-row { flex-direction: column; align-items: stretch; }
    .social-icon-label { width: 100%; margin-bottom: 5px; }
    
    .font-picker { grid-template-columns: repeat(2, 1fr); }
    .btn-style-picker { grid-template-columns: repeat(3, 1fr); }

    .admin-table { font-size: 11px; }
    .share-buttons { grid-template-columns: 1fr; }
    .qr-image { width: 200px; height: 200px; }
    .analytics-grid { grid-template-columns: 1fr 1fr !important; }
    .analytics-charts-row, .analytics-bottom-row { grid-template-columns: 1fr !important; }
    .theme-presets-grid { grid-template-columns: repeat(3, 1fr) !important; }
    .dash-stats-row { grid-template-columns: 1fr !important; }
    .icon-picker-wrap input[type="text"] { font-size: 16px !important; }
}

/* ========== ANALYTICS PAGE ========== */
.analytics-period-picker { display: flex; gap: 8px; }
.period-btn {
    padding: 8px 14px; border-radius: 10px; font-size: 12px; font-weight: 700;
    color: var(--gray-light); text-decoration: none; transition: all 0.2s;
}
.period-btn.active { color: var(--primary); }

.analytics-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px;
}
.stat-card { border-radius: 20px; padding: 18px; display: flex; align-items: center; gap: 14px; }
.stat-icon {
    width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center;
    justify-content: center; flex-shrink: 0; color: #fff;
}
.stat-icon .material-symbols-outlined { font-size: 24px; }
.stat-body { flex: 1; min-width: 0; }
.stat-value { font-size: 24px; font-weight: 800; color: #1e293b; line-height: 1; margin-bottom: 4px; }
.stat-label { font-size: 11px; font-weight: 600; color: var(--gray-light); text-transform: uppercase; letter-spacing: 1px; }
.stat-trend { color: var(--gray-light); opacity: 0.4; }

.analytics-charts-row {
    display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px;
}
.chart-card { border-radius: 20px; padding: 20px; }
.chart-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.chart-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: #1e293b; }
.chart-title .material-symbols-outlined { font-size: 18px; color: var(--primary); }
.chart-wrap { height: 200px; position: relative; }

.analytics-bottom-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.analytics-table-card, .analytics-device-card { border-radius: 20px; padding: 20px; }

/* Top Links */
.top-links-list { display: flex; flex-direction: column; gap: 12px; padding-top: 4px; }
.top-link-item { display: flex; align-items: center; gap: 12px; }
.top-link-rank { font-size: 18px; width: 28px; text-align: center; flex-shrink: 0; }
.top-link-info { flex: 1; min-width: 0; }
.top-link-title { font-size: 13px; font-weight: 600; color: #1e293b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 5px; }
.top-link-bar-wrap { height: 6px; background: rgba(163,177,198,0.3); border-radius: 3px; overflow: hidden; }
.top-link-bar { height: 100%; background: linear-gradient(90deg, #6C5CE7, #a29bfe); border-radius: 3px; transition: width 0.8s ease; }
.top-link-count { font-size: 13px; font-weight: 800; color: var(--primary); flex-shrink: 0; }

/* Device Legend */
.device-legend { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.device-legend-item { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #475569; }
.device-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.device-pct { margin-left: auto; font-weight: 700; color: #1e293b; }

/* ========== PROFILE COMPLETENESS ========== */
.completeness-card { border-radius: 20px; padding: 20px; margin-bottom: 20px; }
.completeness-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; gap: 12px; }
.completeness-header h3 { font-size: 15px; font-weight: 700; color: #1e293b; }
.completeness-score {
    font-size: 22px; font-weight: 800; flex-shrink: 0; padding: 6px 14px;
    border-radius: 12px; line-height: 1;
}
.score-high { background: rgba(5,150,105,0.12); color: #059669; }
.score-mid { background: rgba(217,119,6,0.12); color: #d97706; }
.score-low { background: rgba(220,38,38,0.12); color: #dc2626; }
.completeness-bar-wrap { margin-bottom: 14px; }
.completeness-bar-track { height: 10px; background: rgba(163,177,198,0.3); border-radius: 5px; overflow: hidden; }
.completeness-bar-fill {
    height: 100%; width: 0; border-radius: 5px;
    background: linear-gradient(90deg, #6C5CE7, #a29bfe);
    transition: width 1.2s cubic-bezier(0.4,0,0.2,1);
}
.completeness-tips { display: flex; flex-direction: column; gap: 8px; }
.completeness-tip { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #475569;
    padding: 8px 12px; border-radius: 10px; background: rgba(108,92,231,0.05); }

/* ========== DASHBOARD STATS ROW ========== */
.dash-stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.dash-stat { border-radius: 20px; padding: 18px; display: flex; align-items: center; gap: 14px; }
.dash-stat-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; }
.dash-stat-icon .material-symbols-outlined { font-size: 22px; }
.dash-stat-val { font-size: 22px; font-weight: 800; color: #1e293b; line-height: 1; }
.dash-stat-lbl { font-size: 11px; color: var(--gray-light); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; margin-top: 3px; }

/* ========== THEME PRESETS ========== */
.theme-presets-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.theme-preset-card {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    padding: 12px 8px; border-radius: 15px; cursor: pointer; transition: all 0.2s;
    border: 2px solid transparent; background: var(--neu-bg);
}
.theme-preset-card:hover { transform: translateY(-2px); border-color: rgba(108,92,231,0.3); }
.theme-preset-card.preset-selected { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(108,92,231,0.15); }
.preset-swatch { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.preset-swatch-btn { width: 24px; height: 12px; border-radius: 6px; opacity: 0.85; }
.preset-name { font-size: 10px; font-weight: 700; color: #475569; text-align: center; line-height: 1.3; }

/* ========== ICON PICKER ========== */
.icon-picker-wrap { display: flex; flex-direction: column; gap: 10px; }
.icon-picker-wrap input[type="text"] {
    width: 100%; padding: 10px 14px; border: none; border-radius: 12px;
    font-size: 20px; font-family: 'Poppins', sans-serif; outline: none;
    background: var(--neu-bg); color: #334155;
    box-shadow: inset 3px 3px 6px var(--neu-shadow), inset -3px -3px 6px var(--neu-light);
}
.quick-emoji-grid {
    display: flex; flex-wrap: wrap; gap: 6px; max-height: 100px; overflow-y: auto;
    padding: 8px; border-radius: 12px; background: var(--neu-bg);
    box-shadow: inset 2px 2px 4px var(--neu-shadow), inset -2px -2px 4px var(--neu-light);
}
.emoji-btn {
    font-size: 20px; width: 36px; height: 36px; border: none; background: transparent;
    cursor: pointer; border-radius: 8px; transition: background 0.15s; display: flex; align-items: center; justify-content: center;
}
.emoji-btn:hover { background: rgba(108,92,231,0.1); }
.emoji-clear { font-size: 12px; color: var(--danger); opacity: 0.6; }

/* ========== LINK BADGES ========== */
.link-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.badge { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 20px; font-size: 10px; font-weight: 700; }
.badge-schedule { background: rgba(217,119,6,0.1); color: #d97706; }
.badge-lock { background: rgba(108,92,231,0.1); color: var(--primary); }
.badge-hidden { background: rgba(163,177,198,0.2); color: var(--gray-light); }

/* ========== CONTENT BLOCKS ========== */
.block-tab-btn { padding: 10px 16px; border-radius: 12px; cursor: pointer; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; border: none; transition: all 0.2s; }
.block-tab-btn.active { color: var(--primary); }
.block-item { padding: 18px; border-radius: 20px; transition: all 0.2s; }
.block-item.block-inactive { opacity: 0.5; }
.sortable-ghost { opacity: 0.3; }

/* ========== RESPONSIVE ADDITIONS ========== */
@media (max-width: 1100px) {
    .analytics-grid { grid-template-columns: repeat(2, 1fr); }
    .theme-presets-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .analytics-grid { grid-template-columns: repeat(2, 1fr); }
    .analytics-charts-row, .analytics-bottom-row { grid-template-columns: 1fr; }
    .analytics-period-picker { flex-wrap: wrap; }
    .dash-stats-row { grid-template-columns: 1fr 1fr; }
    .theme-presets-grid { grid-template-columns: repeat(3, 1fr); }
    .completeness-header { flex-wrap: wrap; }
    .dashboard-cards { grid-template-columns: 1fr !important; }
}

@media (max-width: 480px) {
    .analytics-grid { grid-template-columns: 1fr 1fr; }
    .stat-value { font-size: 18px; }
    .dash-stats-row { grid-template-columns: 1fr; }
    .theme-presets-grid { grid-template-columns: repeat(3, 1fr); }
    .chart-wrap { height: 160px; }
    .quick-emoji-grid { max-height: 80px; }
    .icon-picker-wrap input[type="text"] { font-size: 16px; }
}

