/* ==========================================================================
   DAILYCOSMOS — PRECISION WORKSTATION DESIGN SYSTEM
   Inspired by Linear.app, Raycast Pro, and Apple Professional Interfaces
   ========================================================================== */

/* --- 1. GLOBAL DESIGN TOKENS & THEME ENGINE --- */
:root,
[data-theme='slate'] {
    --bg-canvas: #090b10;
    --grad-1: #090b10;
    --grad-2: #0d1117;
    --grad-3: #111620;
    --grad-4: #0a0d14;
    
    --surface-1: #12161f;
    --surface-2: #181d28;
    --surface-3: #202736;
    --surface-hover: #262e3f;
    
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-medium: rgba(255, 255, 255, 0.16);
    --border-focus: #38bdf8;
    
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-tertiary: #64748b;
    
    --accent-color: #38bdf8;
    --accent-muted: rgba(56, 189, 248, 0.12);
    --accent-glow: 0 0 16px rgba(56, 189, 248, 0.25);
    
    --panel-bg: #12161f;
    --input-bg: #181d28;
    --input-border: rgba(255, 255, 255, 0.1);
    --btn-secondary-bg: #202736;
}

[data-theme='dev'] {
    --bg-canvas: #071018;
    --grad-1: #081522;
    --grad-2: #0b2034;
    --grad-3: #081a2b;
    --grad-4: #05111c;
    
    --surface-1: #0e2235;
    --surface-2: #132d46;
    --surface-3: #1a3c5d;
    --surface-hover: #214b73;
    
    --border-subtle: rgba(56, 189, 248, 0.25);
    --border-medium: rgba(56, 189, 248, 0.45);
    --border-focus: #00f0ff;
    
    --text-primary: #f0f9ff;
    --text-secondary: #bae6fd;
    --text-tertiary: #7dd3fc;
    
    --accent-color: #00f0ff;
    --accent-muted: rgba(0, 240, 255, 0.14);
    --accent-glow: 0 0 20px rgba(0, 240, 255, 0.35);
    
    --panel-bg: #0e2235;
    --input-bg: #132d46;
    --input-border: rgba(56, 189, 248, 0.3);
    --btn-secondary-bg: #1a3c5d;
}

[data-theme='light'] {
    --bg-canvas: #f8fafc;
    --grad-1: #f8fafc;
    --grad-2: #f1f5f9;
    --grad-3: #e2e8f0;
    --grad-4: #f8fafc;
    
    --surface-1: #ffffff;
    --surface-2: #f1f5f9;
    --surface-3: #e2e8f0;
    --surface-hover: #cbd5e1;
    
    --border-subtle: rgba(0, 0, 0, 0.08);
    --border-medium: rgba(0, 0, 0, 0.16);
    --border-focus: #0284c7;
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #94a3b8;
    
    --accent-color: #0284c7;
    --accent-muted: rgba(2, 132, 199, 0.1);
    --accent-glow: 0 0 16px rgba(2, 132, 199, 0.15);
    
    --panel-bg: #ffffff;
    --input-bg: #f8fafc;
    --input-border: #cbd5e1;
    --btn-secondary-bg: #e2e8f0;
}

[data-theme='ocean'] {
    --bg-canvas: #051329;
    --grad-1: #051329;
    --grad-2: #0a2540;
    --grad-3: #0e375e;
    --grad-4: #051329;
    
    --surface-1: #0a233d;
    --surface-2: #0e3054;
    --surface-3: #144373;
    --surface-hover: #1b538c;
    
    --border-subtle: rgba(255, 255, 255, 0.1);
    --border-medium: rgba(255, 255, 255, 0.2);
    --border-focus: #38bdf8;
    
    --text-primary: #f0f9ff;
    --text-secondary: #bae6fd;
    --text-tertiary: #7dd3fc;
    
    --accent-color: #38bdf8;
    --accent-muted: rgba(56, 189, 248, 0.14);
    --accent-glow: 0 0 16px rgba(56, 189, 248, 0.3);
    
    --panel-bg: #0a233d;
    --input-bg: #0e3054;
    --input-border: rgba(255, 255, 255, 0.12);
    --btn-secondary-bg: #144373;
}

[data-theme='cyberpunk'] {
    --bg-canvas: #0d0914;
    --grad-1: #0d0914;
    --grad-2: #190e29;
    --grad-3: #26123e;
    --grad-4: #0d0914;
    
    --surface-1: #170f26;
    --surface-2: #211536;
    --surface-3: #2e1e4a;
    --surface-hover: #3b285f;
    
    --border-subtle: rgba(236, 72, 153, 0.22);
    --border-medium: rgba(236, 72, 153, 0.45);
    --border-focus: #f43f5e;
    
    --text-primary: #fdf2f8;
    --text-secondary: #f472b6;
    --text-tertiary: #db2777;
    
    --accent-color: #f43f5e;
    --accent-muted: rgba(244, 63, 94, 0.15);
    --accent-glow: 0 0 20px rgba(244, 63, 94, 0.4);
    
    --panel-bg: #170f26;
    --input-bg: #211536;
    --input-border: rgba(236, 72, 153, 0.3);
    --btn-secondary-bg: #2e1e4a;
}

[data-theme='sunset'] {
    --bg-canvas: #120909;
    --grad-1: #180c0c;
    --grad-2: #261210;
    --grad-3: #3b1915;
    --grad-4: #120909;
    
    --surface-1: #20100e;
    --surface-2: #2d1714;
    --surface-3: #3d201c;
    --surface-hover: #4e2924;
    
    --border-subtle: rgba(251, 146, 60, 0.2);
    --border-medium: rgba(251, 146, 60, 0.4);
    --border-focus: #f97316;
    
    --text-primary: #fff7ed;
    --text-secondary: #fdba74;
    --text-tertiary: #fb923c;
    
    --accent-color: #f97316;
    --accent-muted: rgba(249, 115, 22, 0.15);
    --accent-glow: 0 0 16px rgba(249, 115, 22, 0.3);
    
    --panel-bg: #20100e;
    --input-bg: #2d1714;
    --input-border: rgba(251, 146, 60, 0.25);
    --btn-secondary-bg: #3d201c;
}

[data-theme='forest'] {
    --bg-canvas: #06110a;
    --grad-1: #06110a;
    --grad-2: #0c1f13;
    --grad-3: #122d1c;
    --grad-4: #06110a;
    
    --surface-1: #0f2718;
    --surface-2: #163622;
    --surface-3: #1f472e;
    --surface-hover: #295b3b;
    
    --border-subtle: rgba(52, 211, 153, 0.2);
    --border-medium: rgba(52, 211, 153, 0.4);
    --border-focus: #10b981;
    
    --text-primary: #ecfdf5;
    --text-secondary: #a7f3d0;
    --text-tertiary: #6ee7b7;
    
    --accent-color: #10b981;
    --accent-muted: rgba(16, 185, 129, 0.15);
    --accent-glow: 0 0 16px rgba(16, 185, 129, 0.3);
    
    --panel-bg: #0f2718;
    --input-bg: #163622;
    --input-border: rgba(52, 211, 153, 0.25);
    --btn-secondary-bg: #1f472e;
}

[data-theme='aurora'] {
    --bg-canvas: #061214;
    --grad-1: #061214;
    --grad-2: #0c2024;
    --grad-3: #132e33;
    --grad-4: #061214;
    
    --surface-1: #0f262b;
    --surface-2: #16363d;
    --surface-3: #1f474f;
    --surface-hover: #285963;
    
    --border-subtle: rgba(45, 212, 191, 0.2);
    --border-medium: rgba(45, 212, 191, 0.4);
    --border-focus: #14b8a6;
    
    --text-primary: #f0fdfa;
    --text-secondary: #99f6e4;
    --text-tertiary: #5eead4;
    
    --accent-color: #14b8a6;
    --accent-muted: rgba(20, 184, 166, 0.15);
    --accent-glow: 0 0 16px rgba(20, 184, 166, 0.3);
    
    --panel-bg: #0f262b;
    --input-bg: #16363d;
    --input-border: rgba(45, 212, 191, 0.25);
    --btn-secondary-bg: #1f474f;
}

[data-theme='northern'] {
    --bg-canvas: #080b18;
    --grad-1: #080b18;
    --grad-2: #0f162e;
    --grad-3: #182348;
    --grad-4: #080b18;
    
    --surface-1: #131c3a;
    --surface-2: #1b274e;
    --surface-3: #243363;
    --surface-hover: #2e407a;
    
    --border-subtle: rgba(129, 140, 248, 0.2);
    --border-medium: rgba(129, 140, 248, 0.4);
    --border-focus: #6366f1;
    
    --text-primary: #eef2ff;
    --text-secondary: #c7d2fe;
    --text-tertiary: #a5b4fc;
    
    --accent-color: #6366f1;
    --accent-muted: rgba(99, 102, 241, 0.15);
    --accent-glow: 0 0 16px rgba(99, 102, 241, 0.3);
    
    --panel-bg: #131c3a;
    --input-bg: #1b274e;
    --input-border: rgba(129, 140, 248, 0.25);
    --btn-secondary-bg: #243363;
}

[data-theme='midnight'] {
    --bg-canvas: #030406;
    --grad-1: #030406;
    --grad-2: #07090e;
    --grad-3: #0c0f17;
    --grad-4: #030406;
    
    --surface-1: #0c0f17;
    --surface-2: #121622;
    --surface-3: #191f2e;
    --surface-hover: #21283b;
    
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-medium: rgba(255, 255, 255, 0.18);
    --border-focus: #a855f7;
    
    --text-primary: #faf5ff;
    --text-secondary: #d8b4fe;
    --text-tertiary: #c084fc;
    
    --accent-color: #a855f7;
    --accent-muted: rgba(168, 85, 247, 0.15);
    --accent-glow: 0 0 16px rgba(168, 85, 247, 0.3);
    
    --panel-bg: #0c0f17;
    --input-bg: #121622;
    --input-border: rgba(255, 255, 255, 0.1);
    --btn-secondary-bg: #191f2e;
}

[data-theme='rosegold'] {
    --bg-canvas: #12090d;
    --grad-1: #12090d;
    --grad-2: #1e0e16;
    --grad-3: #2d1421;
    --grad-4: #12090d;
    
    --surface-1: #24111b;
    --surface-2: #301724;
    --surface-3: #402030;
    --surface-hover: #52293e;
    
    --border-subtle: rgba(251, 113, 133, 0.2);
    --border-medium: rgba(251, 113, 133, 0.4);
    --border-focus: #f43f5e;
    
    --text-primary: #fff1f2;
    --text-secondary: #fecdd3;
    --text-tertiary: #fda4af;
    
    --accent-color: #fb7185;
    --accent-muted: rgba(251, 113, 133, 0.15);
    --accent-glow: 0 0 16px rgba(251, 113, 133, 0.3);
    
    --panel-bg: #24111b;
    --input-bg: #301724;
    --input-border: rgba(251, 113, 133, 0.25);
    --btn-secondary-bg: #402030;
}

/* --- 2. BASE STYLING & RESET --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    min-height: 100vh;
}

body {
    background-color: var(--bg-canvas);
    background-image: radial-gradient(circle at 50% 10%, var(--grad-2) 0%, var(--grad-1) 55%, var(--bg-canvas) 100%);
    background-attachment: fixed;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 24px;
    position: relative;
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

*:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

body.has-custom-bg {
    background-image: none !important;
    background-color: #020408 !important;
}

.custom-bg-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.4s ease, filter 0.2s ease;
    pointer-events: none;
}

body.has-custom-bg .custom-bg-overlay {
    opacity: 1;
}

.bg-scrim {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    background: rgba(0, 0, 0, var(--scrim-opacity, 0.4));
    opacity: 0;
    transition: opacity 0.4s ease, background-color 0.2s ease;
    pointer-events: none;
}

body.has-custom-bg .bg-scrim {
    opacity: 1;
}

#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    opacity: 0.35;
}

.main-view,
.main-container,
#widget-panel,
#github-panel,
#dev-dashboard-view {
    position: relative;
    z-index: 10;
}

/* --- 3. TOP COMMAND TOOLBAR --- */
.top-command-bar {
    position: fixed;
    top: 20px;
    right: 24px;
    z-index: 50;
}

.command-bar-group {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--surface-1);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 4px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.command-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    line-height: 1;
}

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

.command-btn.active {
    color: var(--accent-color);
    background: var(--accent-muted);
    border-color: var(--accent-color);
}

.btn-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    letter-spacing: -0.01em;
}

/* --- 4. MAIN CENTRAL WORKSTATION --- */
.main-workstation {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    width: 100%;
    max-width: 860px;
    z-index: 10;
    position: relative;
    margin: 0 auto;
}

/* Spotlight Search Bar */
.spotlight-search-wrap {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 580px;
    background: var(--surface-1);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 4px 6px 4px 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.spotlight-search-wrap:focus-within {
    border-color: var(--accent-color);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    background: var(--surface-2);
}

.search-engine-picker-wrap {
    position: relative;
}

.engine-picker-btn {
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    padding: 4px 6px;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.engine-picker-btn:hover {
    background: var(--surface-hover);
    border-color: var(--border-medium);
}

.engine-picker-btn img {
    width: 16px;
    height: 16px;
    border-radius: 2px;
}

.engine-chevron {
    color: var(--text-tertiary);
}

.engine-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: var(--surface-1);
    border: 1px solid var(--border-medium);
    border-radius: 8px;
    padding: 4px;
    width: 160px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.engine-option {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 500;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    text-align: left;
    width: 100%;
    transition: background 0.15s ease;
}

.engine-option:hover {
    background: var(--surface-2);
}

.engine-option.active {
    background: var(--accent-muted);
    color: var(--accent-color);
}

.engine-option img {
    width: 14px;
    height: 14px;
}

#main-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    padding: 8px 12px;
    min-width: 80px;
}

#main-search-input::placeholder {
    color: var(--text-tertiary);
}

.search-clear-btn {
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0 6px;
    line-height: 1;
}

.search-clear-btn:hover {
    color: var(--text-primary);
}

.search-shortcut-pill {
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    color: var(--text-tertiary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    padding: 2px 6px;
    margin-right: 4px;
    user-select: none;
}

.search-submit-btn {
    background: var(--accent-color);
    color: var(--bg-canvas);
    border: none;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.search-submit-btn:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

/* Hero Centerpiece */
.hero-container {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.hero-greeting {
    font-family: 'Inter', sans-serif;
    font-size: clamp(1.4rem, 2.5vw, 1.8rem);
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 8px;
}

#name {
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    border-bottom: 1px dashed var(--border-medium);
    padding-bottom: 2px;
    transition: color 0.2s, border-color 0.2s;
}

#name:hover {
    color: var(--accent-color);
    border-color: var(--accent-color);
}

.greeting-edit-icon {
    color: var(--text-tertiary);
    opacity: 0.6;
    display: inline-flex;
}

.clock-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    position: relative;
}

.hero-clock {
    font-family: 'Inter', 'JetBrains Mono', sans-serif;
    font-size: clamp(3.4rem, 7vw, 5.2rem);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.clock-config-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-tertiary);
    border-radius: 6px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.4;
}

.clock-wrap:hover .clock-config-btn {
    opacity: 1;
}

.clock-config-btn:hover {
    color: var(--accent-color);
    background: var(--surface-2);
    border-color: var(--border-subtle);
}

.hero-date {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-tertiary);
    letter-spacing: -0.01em;
}

/* Bookmarks Grid */
.bookmarks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 16px;
    width: 100%;
    max-width: 800px;
    margin-top: 12px;
}

.link-item {
    position: relative;
    border-radius: 10px;
    background: var(--surface-1);
    border: 1px solid var(--border-subtle);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
    overflow: hidden;
}

.link-item:hover {
    transform: translateY(-3px);
    background: var(--surface-2);
    border-color: var(--border-medium);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.link-item.dragging {
    opacity: 0.4;
    transform: scale(0.95);
}

.link-item.drag-over {
    border-color: var(--accent-color);
    box-shadow: 0 0 12px var(--accent-color);
}

.link-anchor {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 12px;
    text-decoration: none;
    gap: 10px;
    width: 100%;
}

.icon-container {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.favicon {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.fallback-icon {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--accent-color);
}

.link-name {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-align: center;
    max-width: 90px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.link-actions {
    position: absolute;
    top: 6px;
    right: 6px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.link-item:hover .link-actions {
    opacity: 1;
}

.edit-btn,
.delete-btn {
    background: var(--surface-1);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    border-radius: 4px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.edit-btn:hover {
    color: var(--text-primary);
    background: var(--surface-3);
    border-color: var(--border-medium);
}

.delete-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
    border-color: #ef4444;
}

/* --- 5. SIDEBAR WIDGETS (Desktop Fixed Placement) --- */
.sidebar-widget-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 20;
}

#widget-panel {
    position: fixed;
    top: 80px;
    left: 24px;
    width: 260px;
}

#github-panel {
    position: fixed;
    top: 80px;
    right: 24px;
    width: 280px;
    max-height: calc(100vh - 100px);
    display: flex;
    flex-direction: column;
}

.widget-card {
    background: var(--surface-1);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.github-card {
    display: flex;
    flex-direction: column;
    max-height: 100%;
    overflow: hidden;
}

.search-widget-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    padding: 6px 10px;
}

.search-widget-icon {
    color: var(--text-tertiary);
}

#search-input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.82rem;
    width: 100%;
}

#search-input::placeholder {
    color: var(--text-tertiary);
}

/* Quote Widget */
.quote-card {
    cursor: pointer;
    transition: border-color 0.2s;
}

.quote-card:hover {
    border-color: var(--border-medium);
}

.quote-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.quote-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-color);
}

.quote-refresh-btn {
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 2px;
    transition: transform 0.3s ease, color 0.2s;
}

.quote-refresh-btn:hover {
    color: var(--text-primary);
    transform: rotate(180deg);
}

#quote-text {
    font-size: 0.85rem;
    font-style: italic;
    line-height: 1.4;
    color: var(--text-primary);
    margin-bottom: 6px;
}

#quote-author {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-tertiary);
}

/* GitHub Card */
.github-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-subtle);
}

.gh-title-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
}

.gh-profile-card {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.gh-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--border-medium);
    flex-shrink: 0;
}

.gh-info {
    min-width: 0;
    flex: 1;
}

.gh-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gh-bio {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gh-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    margin-bottom: 10px;
}

.gh-stat-box {
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    padding: 5px 2px;
    text-align: center;
}

.stat-value {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    display: block;
    font-size: 0.58rem;
    font-weight: 500;
    color: var(--text-tertiary);
    margin-top: 1px;
}

#github-repos {
    max-height: 180px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-right: 2px;
}

#github-repos::-webkit-scrollbar {
    width: 4px;
}

#github-repos::-webkit-scrollbar-thumb {
    background: var(--surface-3);
    border-radius: 4px;
}

.gh-top-repo {
    background: var(--accent-muted);
    border: 1px solid var(--accent-color);
    border-radius: 6px;
    padding: 7px 9px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.gh-top-repo:hover {
    background: rgba(56, 189, 248, 0.2);
    transform: translateY(-1px);
}

.gh-top-repo-title {
    font-size: 0.64rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-color);
    margin-bottom: 2px;
}

.gh-top-repo-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-primary);
}

.gh-top-repo-stars {
    font-size: 0.68rem;
    color: var(--text-secondary);
}

.gh-repo {
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    padding: 7px 9px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.gh-repo:hover {
    border-color: var(--border-medium);
    background: var(--surface-hover);
    transform: translateY(-1px);
}

.gh-repo-name {
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 2px;
}

.gh-repo-desc {
    font-size: 0.68rem;
    color: var(--text-secondary);
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
}

.gh-repo-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.65rem;
    color: var(--text-tertiary);
}

.gh-lang {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--text-secondary);
}

.gh-lang-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
}

.gh-config-row {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-subtle);
}

#gh-username-input {
    flex: 1;
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.75rem;
    padding: 5px 8px;
    outline: none;
}

#gh-username-input:focus {
    border-color: var(--accent-color);
}

#gh-update-btn {
    padding: 5px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
}

/* --- 6. DEV DASHBOARD HUD (Full Precision Layout) --- */
.dev-dashboard-view {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    min-height: 100vh;
    padding: 36px 20px 24px;
    position: relative;
    z-index: 10;
    animation: devFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

body[data-theme='dev'] .dev-dashboard-view {
    display: flex;
}

body[data-theme='dev'] .main-workstation,
body[data-theme='dev'] #widget-panel,
body[data-theme='dev'] #github-panel {
    display: none !important;
}

@keyframes devFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.99);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.dev-header {
    margin-bottom: 24px;
    text-align: center;
}

.dev-clock-display {
    font-family: 'Rajdhani', 'JetBrains Mono', sans-serif;
    font-size: clamp(2.8rem, 5.5vw, 4.2rem);
    font-weight: 700;
    color: var(--accent-color);
    letter-spacing: 0.06em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    line-height: 1;
    text-shadow: var(--accent-glow);
}

.dev-clock-divider {
    color: rgba(56, 189, 248, 0.4);
    font-weight: 400;
}

.dev-header-subtitle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    letter-spacing: 0.22em;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-top: 8px;
}

.dev-pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-color);
    box-shadow: 0 0 8px var(--accent-color);
    animation: devPulse 2s infinite ease-in-out;
}

@keyframes devPulse {
    0%, 100% { opacity: 0.4; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.2); }
}

.dev-grid {
    display: grid;
    grid-template-columns: 1.1fr 1.25fr;
    gap: 20px;
    width: 100%;
    max-width: 1080px;
}

.dev-right-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dev-card {
    background: var(--surface-1);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 16px 18px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
}

.dev-card:hover {
    border-color: var(--border-medium);
}

.dev-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 8px;
    font-family: 'JetBrains Mono', 'Rajdhani', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.dev-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dev-icon {
    color: var(--accent-color);
}

.dev-card-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dev-action-btn {
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-secondary);
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.dev-action-btn:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
    border-color: var(--border-medium);
}

.dev-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--accent-color);
    background: var(--accent-muted);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 2px 8px;
}

.dev-live-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent-color);
    box-shadow: 0 0 6px var(--accent-color);
}

/* Dev Weather & Radar Card */
.dev-weather-body {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 16px;
    align-items: center;
}

.dev-radar-container {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    background: #06111a;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

#dev-radar-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.dev-radar-controls {
    position: absolute;
    top: 6px;
    right: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 5;
}

.dev-radar-controls button {
    background: rgba(10, 25, 40, 0.9);
    border: 1px solid var(--border-subtle);
    color: var(--accent-color);
    width: 20px;
    height: 20px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.dev-radar-controls button:hover {
    background: var(--surface-hover);
    border-color: var(--border-medium);
}

.dev-radar-tag {
    position: absolute;
    bottom: 6px;
    left: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    color: var(--text-tertiary);
    letter-spacing: 0.05em;
}

.dev-weather-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dev-weather-condition-icon {
    width: 44px;
    height: 44px;
    color: var(--accent-color);
}

.dev-weather-svg {
    width: 100%;
    height: 100%;
}

.dev-weather-headline {
    display: flex;
    flex-direction: column;
}

.dev-weather-state {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
}

.dev-weather-temp {
    font-family: 'Rajdhani', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-color);
    line-height: 1;
}

.dev-weather-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.dev-weather-metric {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dev-weather-telemetry-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.telemetry-chip {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    padding: 2px 6px;
    color: var(--text-secondary);
}

.dev-weather-location-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
}

.dev-mini-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    opacity: 0.8;
}

.dev-weather-bottom-bar {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}

.dev-weather-forecast-btn {
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    padding: 3px 6px;
    font-size: 0.8rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.15s ease;
}

.dev-weather-forecast-btn:hover,
.dev-weather-forecast-btn.active {
    background: var(--accent-muted);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* System Telemetry Card */
.dev-telemetry-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.dev-telemetry-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 8px 10px;
}

.dev-gauge-wrap {
    position: relative;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dev-radial-gauge {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.gauge-bg {
    fill: none;
    stroke: var(--surface-3);
    stroke-width: 5.5;
}

.gauge-fill {
    fill: none;
    stroke: var(--accent-color);
    stroke-width: 5.5;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.4s ease;
}

.gauge-text {
    position: absolute;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.dev-chart-wrap {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dev-chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: 'JetBrains Mono', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.chart-meta {
    color: var(--accent-color);
    font-size: 0.68rem;
}

#dev-cpu-canvas,
#dev-ram-canvas,
#dev-gpu-canvas,
#dev-disk-canvas {
    width: 100%;
    height: 34px;
    display: block;
}

.dev-net-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--border-subtle);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.dev-net-stat {
    display: flex;
    align-items: center;
    gap: 4px;
}

.net-arrow.down { color: var(--accent-color); font-weight: bold; }
.net-arrow.up { color: #38bdf8; font-weight: bold; }
.net-text strong { color: var(--text-primary); font-weight: 600; }
.dev-net-divider { color: var(--border-subtle); }
.dev-net-ping { display: flex; align-items: center; gap: 6px; font-size: 0.72rem; color: var(--accent-color); }
.ping-dot { width: 6px; height: 6px; border-radius: 50%; background: #10b981; }

/* Quick Search Card */
.dev-search-pill {
    display: flex;
    align-items: center;
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 6px 8px 6px 12px;
    transition: all 0.2s ease;
}

.dev-search-pill:focus-within {
    border-color: var(--accent-color);
    background: var(--surface-3);
}

.search-lens-icon {
    color: var(--text-tertiary);
    margin-right: 8px;
    display: flex;
}

#dev-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.88rem;
    min-width: 80px;
}

#dev-search-input::placeholder {
    color: var(--text-tertiary);
}

.dev-quick-badges {
    display: flex;
    align-items: center;
    gap: 4px;
}

.dev-badge {
    height: 24px;
    padding: 0 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    text-decoration: none;
    background: var(--surface-1);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.dev-badge:hover {
    color: var(--text-primary);
    border-color: var(--border-medium);
    background: var(--surface-hover);
}

/* --- 7. UNIFIED PRO FLYOUT DRAWERS & MODALS --- */
.panel {
    background: var(--surface-1);
    border: 1px solid var(--border-medium);
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    z-index: 100;
}

/* Drawer Backdrop Mask */
.drawer-backdrop {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 990;
    transition: opacity 0.25s ease;
}

.drawer-backdrop.hidden {
    display: none !important;
    opacity: 0;
}

/* Unified Right Flyout Drawer */
.drawer-panel {
    position: fixed;
    top: 16px;
    right: 16px;
    bottom: 16px;
    width: 390px;
    max-width: calc(100vw - 32px);
    background: var(--surface-1);
    border: 1px solid var(--border-medium);
    border-radius: 16px;
    padding: 22px;
    box-shadow: -16px 0 48px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    animation: drawerSlideIn 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer-panel::-webkit-scrollbar {
    width: 5px;
}

.drawer-panel::-webkit-scrollbar-thumb {
    background: var(--surface-3);
    border-radius: 4px;
}

@keyframes drawerSlideIn {
    from { opacity: 0; transform: translateX(24px); }
    to { opacity: 1; transform: translateX(0); }
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 12px;
}

.panel-header-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-color);
}

.panel-header h2,
.panel-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.panel-close-btn {
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    font-size: 1.3rem;
    cursor: pointer;
    line-height: 1;
    border-radius: 4px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.panel-close-btn:hover {
    color: var(--text-primary);
    background: var(--surface-2);
}

.drawer-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.section-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-tertiary);
    margin-bottom: 2px;
}

/* Themes Swatch Grid */
.themes-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}

.theme-swatch-card {
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    cursor: pointer;
    text-align: left;
    transition: all 0.18s ease;
}

.theme-swatch-card:hover {
    background: var(--surface-hover);
    border-color: var(--border-medium);
    transform: translateY(-1px);
}

.theme-swatch-card.active {
    border-color: var(--accent-color);
    background: var(--accent-muted);
    box-shadow: 0 0 0 1px var(--accent-color);
}

.swatch-dots {
    display: flex;
    align-items: center;
    gap: 5px;
}

.swatch-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.rainbow-dot {
    background: conic-gradient(from 0deg, #f43f5e, #eab308, #10b981, #06b6d4, #8b5cf6, #f43f5e) !important;
}

.swatch-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.swatch-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

.swatch-tag {
    font-size: 0.65rem;
    color: var(--text-tertiary);
}

/* Custom Theme Box */
.custom-theme-box {
    background: var(--surface-2);
    border: 1px solid var(--border-medium);
    border-radius: 10px;
    padding: 14px;
    margin-top: 10px;
}

.color-picker-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
}

.color-picker-wrap input[type="color"] {
    appearance: none;
    -webkit-appearance: none;
    border: none;
    width: 44px;
    height: 36px;
    border-radius: 6px;
    cursor: pointer;
    background: transparent;
}

.color-picker-wrap input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-picker-wrap input[type="color"]::-webkit-color-swatch {
    border: 1px solid var(--border-medium);
    border-radius: 6px;
}

.hex-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    color: var(--accent-color);
    background: var(--surface-1);
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid var(--border-subtle);
}

/* Wallpaper Presets Grid */
.wallpaper-presets-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.wp-preset-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 4px;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: all 0.15s ease;
}

.wp-preset-card:hover {
    background: var(--surface-2);
    border-color: var(--border-subtle);
}

.wp-preset-card.active {
    border-color: var(--accent-color);
    background: var(--accent-muted);
}

.wp-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 6px;
    background-size: cover;
    background-position: center;
    border: 1px solid var(--border-subtle);
}

.wp-thumb-none {
    background: var(--surface-3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--text-tertiary);
    text-align: center;
    padding: 4px;
}

.wp-name {
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Upload Dropzone */
.upload-dropzone {
    border: 1.5px dashed var(--border-medium);
    border-radius: 10px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    background: var(--surface-2);
    color: var(--text-secondary);
    transition: all 0.15s ease;
    position: relative;
}

.upload-dropzone:hover {
    border-color: var(--accent-color);
    background: var(--surface-hover);
    color: var(--text-primary);
}

.file-input-hidden {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.dropzone-text {
    font-size: 0.75rem;
    text-align: center;
}

.dropzone-text strong {
    color: var(--accent-color);
}

.input-action-row {
    display: flex;
    gap: 6px;
}

.input-action-row input {
    flex: 1;
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.8rem;
    padding: 8px 10px;
    outline: none;
}

.input-action-row input:focus {
    border-color: var(--accent-color);
}

/* Form Controls & Switches */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.form-group label {
    font-size: 0.76rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input[type="text"],
.form-group input[type="url"],
.form-group select {
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    padding: 8px 10px;
    outline: none;
    transition: border 0.15s;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--accent-color);
}

.range-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.range-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent-color);
    background: var(--surface-2);
    padding: 2px 6px;
    border-radius: 4px;
}

.custom-range {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: var(--surface-3);
    outline: none;
    accent-color: var(--accent-color);
    cursor: pointer;
}

.custom-range::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-color);
    cursor: pointer;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.4);
}

.custom-select {
    cursor: pointer;
}

/* Toggle Switch */
.toggle-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-size: 0.82rem;
    color: var(--text-primary);
}

.toggle-label input {
    display: none;
}

.toggle-custom {
    width: 36px;
    height: 20px;
    background: var(--surface-3);
    border-radius: 10px;
    position: relative;
    transition: background 0.2s ease;
}

.toggle-custom::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ffffff;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.toggle-label input:checked + .toggle-custom {
    background: var(--accent-color);
}

.toggle-label input:checked + .toggle-custom::after {
    transform: translateX(16px);
}

/* Privacy Panel Storage Box */
.privacy-description {
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--text-secondary);
    margin-bottom: 14px;
}

.privacy-description strong {
    color: var(--text-primary);
}

.storage-stat-box {
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.storage-stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.storage-stat-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-color);
}

/* Bookmark Modal Dialog & Favicon Preview */
.modal-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    animation: fadeIn 0.15s ease;
}

.modal-content {
    width: 100%;
    max-width: 420px;
    background: var(--surface-1);
    border: 1px solid var(--border-medium);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    animation: modalScale 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScale {
    from { opacity: 0; transform: scale(0.94) translateY(12px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.bookmark-live-preview {
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}

.preview-badge {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
}

.preview-card-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.preview-icon-wrap {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: var(--surface-3);
    border: 1px solid var(--border-medium);
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-icon-wrap img {
    width: 22px;
    height: 22px;
    border-radius: 4px;
}

.preview-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
}

.quick-preset-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.preset-chip {
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: 100px;
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 500;
    padding: 4px 10px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.preset-chip:hover {
    color: var(--text-primary);
    background: var(--surface-hover);
    border-color: var(--border-medium);
}

.btn-primary,
.btn-secondary,
.btn-danger {
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 8px 14px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s ease;
}

.btn-primary {
    background: var(--accent-color);
    color: #000000;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

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

.btn-secondary:hover {
    background: var(--surface-hover);
    border-color: var(--border-medium);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
}

.btn-danger:hover {
    background: #ef4444;
    color: #ffffff;
}

.full-width { width: 100%; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mb-2 { margin-bottom: 8px; }
.panel-divider { height: 1px; background: var(--border-subtle); margin: 14px 0; }

.form-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
}

/* Context Menu */
.context-menu-panel {
    position: fixed;
    z-index: 1150;
    width: 170px;
    padding: 4px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.context-item {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    width: 100%;
    text-align: left;
    transition: background 0.15s ease;
}

.context-item:hover {
    background: var(--surface-2);
}

.context-item.danger:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.12);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: var(--surface-1);
    border: 1px solid var(--border-medium);
    border-radius: 8px;
    padding: 10px 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    color: var(--text-primary);
    font-size: 0.82rem;
    font-weight: 500;
    animation: toastIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.toast-out {
    animation: toastOut 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes toastOut {
    to { opacity: 0; transform: translateY(12px); }
}

.hidden {
    display: none !important;
}

/* --- 8. RESPONSIVE BREAKPOINTS --- */
@media (min-width: 1400px) {
    .main-workstation {
        max-width: 760px;
    }
}

@media (max-width: 1399px) and (min-width: 1024px) {
    .main-workstation {
        max-width: 600px;
    }
    #widget-panel {
        width: 220px;
        left: 16px;
    }
    #github-panel {
        width: 250px;
        right: 16px;
    }
}

@media (max-width: 1023px) {
    body {
        padding: 16px;
        justify-content: flex-start;
    }
    
    .top-command-bar {
        position: static;
        margin-bottom: 20px;
        width: 100%;
        display: flex;
        justify-content: center;
    }
    
    .main-workstation {
        order: 1;
        width: 100%;
        max-width: 580px;
        margin: 0 auto;
    }

    #widget-panel {
        order: 2;
        position: static;
        width: 100%;
        max-width: 580px;
        margin: 24px auto 0;
        flex-direction: row;
    }

    #search-widget,
    #quote-widget {
        flex: 1;
    }
    
    #github-panel {
        order: 3;
        position: static;
        width: 100%;
        max-width: 580px;
        margin: 16px auto 0;
        max-height: none;
    }

    .github-card {
        max-height: none;
    }

    #github-repos {
        max-height: 220px;
    }
    
    .dev-grid {
        grid-template-columns: 1fr;
    }
    
    .dev-weather-body {
        grid-template-columns: 1fr;
    }
    
    .drawer-panel {
        top: 8px;
        right: 8px;
        bottom: 8px;
        left: 8px;
        width: auto;
        max-width: 100%;
    }
}

@media (max-width: 600px) {
    #widget-panel {
        flex-direction: column;
    }
    .gh-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
