/* Style System: Magic Help Dashboard */

:root {
    /* Color Palette */
    --bg-dark: #07050a;
    --bg-panel: rgba(18, 13, 28, 0.7);
    --bg-panel-solid: #120d1c;
    --border-glow: rgba(155, 81, 224, 0.15);
    --border-glow-hover: rgba(0, 242, 254, 0.3);
    
    /* Neon Colors */
    --neon-teal: #00f2fe;
    --neon-teal-glow: rgba(0, 242, 254, 0.25);
    --neon-violet: #9b51e0;
    --neon-violet-glow: rgba(155, 81, 224, 0.3);
    --neon-gold: #f2c94c;
    --neon-gold-glow: rgba(242, 201, 76, 0.25);
    --neon-red: #ff4757;
    --neon-red-glow: rgba(255, 71, 87, 0.35);
    --neon-green: #2ed573;
    --neon-green-glow: rgba(46, 213, 115, 0.25);
    
    /* Text */
    --text-primary: #f5f2fa;
    --text-secondary: #a39cb5;
    --text-muted: #6e6780;
    
    /* Font Families */
    --font-header: 'Cinzel', serif;
    --font-body: 'Outfit', sans-serif;
    
    /* UI Dimensions */
    --sidebar-width: 280px;
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: var(--neon-violet) var(--bg-dark);
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: var(--neon-violet);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--neon-teal);
}

/* Ethereal Glowing Background */
.glow-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    animation: float 20s infinite alternate;
}

.orb-1 {
    top: -10%;
    right: 10%;
    width: 500px;
    height: 500px;
    background: var(--neon-violet);
}

.orb-2 {
    bottom: -10%;
    left: 10%;
    width: 600px;
    height: 600px;
    background: var(--neon-teal);
    animation-delay: -5s;
}

.orb-3 {
    top: 40%;
    left: 40%;
    width: 400px;
    height: 400px;
    background: var(--neon-gold);
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(40px, 40px) scale(1.15); }
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: rgba(10, 8, 18, 0.85);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-glow);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 10;
}

.brand {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 50px;
}

.brand-logo {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 242, 254, 0.05);
    border: 1px solid var(--neon-teal);
    border-radius: 12px;
    box-shadow: 0 0 15px var(--neon-teal-glow);
}

.rune-logo-svg {
    width: 28px;
    height: 28px;
}

.glowing-path {
    animation: rune-pulse 3s infinite alternate;
}

@keyframes rune-pulse {
    0% { filter: drop-shadow(0 0 1px var(--neon-teal)); opacity: 0.8; }
    100% { filter: drop-shadow(0 0 8px var(--neon-teal)); opacity: 1; }
}

.brand h2 {
    font-family: var(--font-header);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 2px;
    background: linear-gradient(135deg, var(--text-primary), var(--neon-teal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    transition: var(--transition);
    border: 1px solid transparent;
}

.nav-item i {
    font-size: 18px;
    transition: var(--transition);
}

.nav-item:hover, .nav-item.active {
    color: var(--text-primary);
    background: rgba(155, 81, 224, 0.08);
    border-color: rgba(155, 81, 224, 0.25);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.nav-item.active i {
    color: var(--neon-teal);
    text-shadow: 0 0 10px var(--neon-teal-glow);
}

.sidebar-footer {
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    color: var(--text-muted);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--neon-teal);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--neon-teal);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 242, 254, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(0, 242, 254, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 242, 254, 0); }
}

/* Main Content Area */
.main-content {
    margin-left: var(--sidebar-width);
    flex-grow: 1;
    padding: 40px;
    max-width: 1300px;
    width: calc(100% - var(--sidebar-width));
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 25px;
}

.header h1 {
    font-family: var(--font-header);
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 6px;
    letter-spacing: 1px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 15px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.btn-primary {
    background: linear-gradient(135deg, var(--neon-violet), #7b2cbf);
    color: #fff;
    box-shadow: 0 4px 15px var(--neon-violet-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(155, 81, 224, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
}

.btn-success {
    background: linear-gradient(135deg, var(--neon-green), #20bf6b);
    color: #fff;
    box-shadow: 0 4px 15px var(--neon-green-glow);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 213, 115, 0.5);
}

.btn-glow {
    position: relative;
    overflow: hidden;
}

.btn-glow::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0) 100%);
    transform: rotate(30deg);
    animation: reflection 4s infinite linear;
}

@keyframes reflection {
    0% { transform: translate(-30%, -30%) rotate(30deg); }
    100% { transform: translate(30%, 30%) rotate(30deg); }
}

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
    border-radius: 8px;
}

.btn-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition);
}

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

/* Sections Control */
.view-section {
    display: none;
    animation: fadeIn 0.4s ease-out forwards;
}

.view-section.active {
    display: block;
}

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

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--bg-panel);
    backdrop-filter: blur(15px);
    border: 1px solid var(--border-glow);
    border-radius: var(--border-radius);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition);
}

.stat-card:hover {
    border-color: var(--border-glow-hover);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    transform: translateY(-2px);
}

.stat-icon {
    width: 55px;
    height: 55px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.icon-blue { background: rgba(0, 242, 254, 0.08); color: var(--neon-teal); border: 1px solid rgba(0, 242, 254, 0.2); }
.icon-red { background: rgba(255, 71, 87, 0.08); color: var(--neon-red); border: 1px solid rgba(255, 71, 87, 0.2); }
.icon-teal { background: rgba(155, 81, 224, 0.08); color: var(--neon-violet); border: 1px solid rgba(155, 81, 224, 0.2); }

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Titles and Filters */
.section-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.section-title-bar h2 {
    font-family: var(--font-header);
    font-size: 22px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title-bar h2 i {
    color: var(--neon-teal);
}

.filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-label {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Styled Form Elements */
.select-styled {
    background: #141022;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 13px;
    outline: none;
    cursor: pointer;
    transition: var(--transition);
}

.select-styled:focus {
    border-color: var(--neon-violet);
    box-shadow: 0 0 8px rgba(155, 81, 224, 0.25);
}

.input-styled {
    width: 100%;
    background: #110d1c;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.input-styled:focus {
    border-color: var(--neon-violet);
    box-shadow: 0 0 10px rgba(155, 81, 224, 0.25);
}

.textarea-styled {
    width: 100%;
    background: #110d1c;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    padding: 14px 16px;
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 14px;
    outline: none;
    resize: vertical;
    min-height: 100px;
    transition: var(--transition);
}

.textarea-styled:focus {
    border-color: var(--neon-violet);
    box-shadow: 0 0 10px rgba(155, 81, 224, 0.25);
}

/* Empty State */
.empty-state {
    background: var(--bg-panel);
    backdrop-filter: blur(15px);
    border: 1px solid var(--border-glow);
    border-radius: var(--border-radius);
    padding: 60px 40px;
    text-align: center;
    max-width: 600px;
    margin: 40px auto;
}

.empty-icon {
    font-size: 60px;
    color: var(--text-muted);
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(255,255,255,0.02);
}

.empty-state h3 {
    font-family: var(--font-header);
    font-size: 20px;
    margin-bottom: 12px;
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 25px;
    line-height: 1.5;
}

/* Staves Grid */
.staves-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.staves-grid:not(.view-list) .stave-card .card-photo-wrapper {
    aspect-ratio: 1 / 1 !important;
    height: auto !important;
    width: 100%;
}

/* List View Upgrades */
.staves-grid.view-list {
    grid-template-columns: 1fr !important;
    gap: 20px;
}

.staves-grid.view-list .stave-card {
    flex-direction: row !important;
    align-items: center;
    gap: 25px;
    padding: 20px 24px;
}

.staves-grid.view-list .card-photo-wrapper {
    width: 90px !important;
    height: 90px !important;
    margin-bottom: 0 !important;
    flex-shrink: 0;
}

.staves-grid.view-list .card-header {
    flex-grow: 1;
    margin-bottom: 0 !important;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    width: 25%;
}

.staves-grid.view-list .card-body {
    flex-grow: 2;
    margin-bottom: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 50%;
}

.staves-grid.view-list .card-intent {
    margin-bottom: 0 !important;
    -webkit-line-clamp: 2 !important;
}

.staves-grid.view-list .card-actions {
    grid-template-columns: 1fr !important;
    flex-direction: column;
    width: 130px !important;
    flex-shrink: 0;
    gap: 5px;
}

.staves-grid.view-list .card-actions .btn {
    padding: 6px 4px !important;
    font-size: 11px !important;
}

/* Styled view toggles */
.btn-toggle {
    transition: var(--transition);
}
.btn-toggle.active {
    background: rgba(0, 242, 254, 0.08) !important;
    border-color: var(--neon-teal) !important;
    color: var(--text-primary) !important;
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.15);
}

@media (max-width: 768px) {
    .staves-grid.view-list .stave-card {
        flex-direction: column !important;
        align-items: stretch;
    }
    .staves-grid.view-list .card-photo-wrapper {
        width: 100% !important;
        height: 120px !important;
    }
    .staves-grid.view-list .card-header, 
    .staves-grid.view-list .card-body {
        width: 100% !important;
    }
    .staves-grid.view-list .card-actions {
        width: 100% !important;
        grid-template-columns: repeat(3, 1fr) !important;
    }
}


/* Stave Card */
.stave-card {
    background: var(--bg-panel);
    backdrop-filter: blur(15px);
    border: 1px solid var(--border-glow);
    border-radius: var(--border-radius);
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stave-card:hover {
    border-color: var(--border-glow-hover);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    transform: translateY(-4px);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    gap: 10px;
}

.card-title-group h3 {
    font-family: var(--font-header);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.card-runes {
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--neon-teal);
    background: rgba(0, 242, 254, 0.05);
    padding: 3px 8px;
    border-radius: 6px;
    display: inline-block;
    letter-spacing: 1px;
    border: 1px solid rgba(0, 242, 254, 0.1);
}

.badge {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.badge-gray { background: rgba(110, 103, 128, 0.12); color: var(--text-secondary); border: 1px solid rgba(110, 103, 128, 0.2); }
.badge-green { background: rgba(46, 213, 115, 0.12); color: var(--neon-green); border: 1px solid rgba(46, 213, 115, 0.25); }
.badge-yellow { background: rgba(242, 201, 76, 0.12); color: var(--neon-gold); border: 1px solid rgba(242, 201, 76, 0.25); }
.badge-red { background: rgba(255, 71, 87, 0.12); color: var(--neon-red); border: 1px solid rgba(255, 71, 87, 0.35); }

.card-body {
    flex-grow: 1;
    margin-bottom: 25px;
}

.card-intent {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-timeline {
    background: rgba(255,255,255,0.02);
    border-radius: 10px;
    padding: 12px;
    font-size: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border: 1px solid rgba(255,255,255,0.03);
}

.timeline-info {
    display: flex;
    justify-content: space-between;
}

.duration-high { color: var(--neon-red); font-weight: 600; }
.duration-mid { color: var(--neon-gold); }
.duration-low { color: var(--text-secondary); }

.progress-track {
    height: 5px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(to right, var(--neon-teal), var(--neon-violet));
    border-radius: 10px;
    transition: width 1s ease-in-out;
}

.progress-bar.warning {
    background: linear-gradient(to right, var(--neon-gold), var(--neon-red));
}

.card-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.card-actions .btn {
    justify-content: center;
    font-size: 12px;
    padding: 10px 5px;
    border-radius: 8px;
}

/* Modals */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 3, 8, 0.75);
    backdrop-filter: blur(10px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--bg-panel-solid);
    border: 1px solid var(--border-glow);
    border-radius: 20px;
    width: 100%;
    max-width: 550px;
    padding: 35px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.5);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-backdrop.active .modal-content {
    transform: scale(1);
}

.modal-large {
    max-width: 750px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.modal-header h3 {
    font-family: var(--font-header);
    font-size: 22px;
    letter-spacing: 1px;
}

.modal-header h3 i {
    color: var(--neon-teal);
    margin-right: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.required {
    color: var(--neon-red);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* Diagnostic Wizard Styles */
.wizard-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
    padding: 0 10px;
}

.wizard-step-indicator {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    transition: var(--transition);
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid transparent;
}

.wizard-step-indicator.active {
    color: var(--neon-teal);
    background: rgba(0, 242, 254, 0.05);
    border-color: rgba(0, 242, 254, 0.2);
}

.wizard-step-indicator.completed {
    color: var(--neon-green);
    background: rgba(46, 213, 115, 0.05);
    border-color: rgba(46, 213, 115, 0.2);
}

.wizard-step-line {
    flex-grow: 1;
    height: 1px;
    background: rgba(255,255,255,0.05);
    margin: 0 10px;
}

.wizard-steps-container {
    min-height: 280px;
}

.wizard-step-pane {
    display: none;
    animation: slideIn 0.3s ease-out forwards;
}

.wizard-step-pane.active {
    display: block;
}

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

.wizard-step-pane h4 {
    font-size: 18px;
    margin-bottom: 8px;
}

.step-desc {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 25px;
}

/* Radio and Checkbox Cards */
.radio-card-grid, .checkbox-card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.radio-card, .checkbox-card {
    position: relative;
    cursor: pointer;
}

.radio-card input, .checkbox-card input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-card-content, .checkbox-card-content {
    background: #110d1c;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    height: 100%;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.checkbox-card-content {
    flex-direction: row;
    align-items: center;
    gap: 15px;
    padding: 16px 20px;
}

.radio-card-icon {
    font-size: 24px;
    color: var(--text-muted);
    margin-bottom: 12px;
    transition: var(--transition);
}

.radio-card-content h5 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}

.radio-card-content p {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.radio-card input:checked + .radio-card-content,
.checkbox-card input:checked + .checkbox-card-content {
    border-color: var(--neon-teal);
    background: rgba(0, 242, 254, 0.02);
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.1);
}

.radio-card input:checked + .radio-card-content .radio-card-icon {
    color: var(--neon-teal);
}

.checkbox-card i {
    font-size: 20px;
    color: var(--text-muted);
    transition: var(--transition);
}

.checkbox-card input:checked + .checkbox-card-content i {
    color: var(--neon-teal);
}

/* Spinner and Results */
.spinner-rune {
    width: 80px;
    height: 80px;
    margin: 40px auto 20px;
}

.spinner-circle {
    animation: rotate 2.5s infinite linear;
    transform-origin: 50% 50%;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.diag-result-loading {
    text-align: center;
    padding: 40px 0;
}

.diag-result-loading p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 15px;
}

.diag-result-card {
    background: #110d1c;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 24px;
    animation: fadeIn 0.5s ease;
}

.diag-badge-container {
    margin-bottom: 12px;
}

.diag-badge {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
}

.diag-result-card h3 {
    font-family: var(--font-header);
    font-size: 20px;
    margin-bottom: 10px;
}

.diag-explanation {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 20px;
}

.diag-metrics {
    margin-bottom: 25px;
    background: rgba(255,255,255,0.02);
    padding: 14px;
    border-radius: 8px;
}

.metric {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.metric-label {
    font-size: 12px;
    color: var(--text-secondary);
}

/* AI Bridge Box */
.ai-bridge-box {
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    margin-top: 20px;
}

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

.ai-bridge-header span {
    font-size: 13px;
    font-weight: 600;
    color: var(--neon-teal);
}

.ai-bridge-desc {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.ai-bridge-textarea {
    background: #09070f;
    font-family: monospace;
    font-size: 11px;
    color: var(--text-secondary);
    border-color: rgba(255, 255, 255, 0.05);
    min-height: 80px;
}

/* Guide Container */
.guide-container {
    max-width: 1000px;
    margin: 0 auto;
}

.guide-header {
    margin-bottom: 40px;
}

.guide-header h2 {
    font-family: var(--font-header);
    font-size: 26px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.guide-header h2 i {
    color: var(--neon-violet);
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

.guide-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-glow);
    border-radius: var(--border-radius);
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.guide-card-icon {
    width: 45px;
    height: 45px;
    background: rgba(155, 81, 224, 0.05);
    border: 1px solid rgba(155, 81, 224, 0.2);
    border-radius: 10px;
    color: var(--neon-violet);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 20px;
}

.guide-card h3 {
    font-family: var(--font-header);
    font-size: 18px;
    margin-bottom: 10px;
}

.guide-card p {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 15px;
}

.guide-card ul {
    list-style-type: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.guide-card li {
    font-size: 12px;
    color: var(--text-secondary);
    position: relative;
    padding-left: 15px;
}

.guide-card li::before {
    content: '•';
    color: var(--neon-teal);
    position: absolute;
    left: 0;
    font-size: 14px;
}

.guide-alert {
    background: rgba(0, 242, 254, 0.03);
    border: 1px solid rgba(0, 242, 254, 0.15);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    gap: 15px;
    align-items: flex-start;
    font-size: 13px;
}

.guide-alert i {
    font-size: 20px;
    color: var(--neon-teal);
}

/* About Container */
.about-container {
    max-width: 800px;
    margin: 0 auto;
}

.about-container h2 {
    font-family: var(--font-header);
    font-size: 26px;
    margin-bottom: 12px;
}

.lead {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.about-steps {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.about-step {
    display: flex;
    gap: 25px;
    background: var(--bg-panel);
    border: 1px solid var(--border-glow);
    border-radius: var(--border-radius);
    padding: 24px;
}

.step-num {
    font-family: var(--font-header);
    font-size: 32px;
    font-weight: 800;
    color: var(--neon-teal);
    line-height: 1;
}

.about-step h3 {
    font-family: var(--font-header);
    font-size: 18px;
    margin-bottom: 8px;
}

.about-step p {
    color: var(--text-secondary);
    font-size: 13px;
}

/* Toasts */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #110d1c;
    border: 1px solid var(--neon-teal);
    border-radius: 10px;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
    pointer-events: none;
}

.toast.active {
    opacity: 1;
    transform: translateY(0);
}

.toast i {
    color: var(--neon-teal);
}

/* Runic Preview Style */
.font-runic-preview {
    font-style: italic;
    letter-spacing: 1px;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .staves-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .guide-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .staves-grid {
        grid-template-columns: 1fr;
    }
    .app-container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 20px;
    }
    .brand {
        margin-bottom: 20px;
    }
    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 20px;
    }
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .modal-content {
        width: 95%;
        padding: 20px;
    }
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .radio-card-grid, .checkbox-card-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* Library Catalog Styles */
.library-search-bar {
    margin-bottom: 25px;
}

.search-input-wrapper {
    position: relative;
    width: 100%;
}

.search-input-wrapper i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
    transition: var(--transition);
}

.search-input-wrapper input:focus + i {
    color: var(--neon-teal);
}

.search-input-wrapper input {
    padding-left: 45px;
}

.library-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 35px;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    padding: 8px 18px;
    border-radius: 20px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover {
    background: rgba(155, 81, 224, 0.05);
    border-color: rgba(155, 81, 224, 0.2);
    color: var(--text-primary);
}

.filter-btn.active {
    background: rgba(0, 242, 254, 0.08);
    border-color: var(--neon-teal);
    color: var(--text-primary);
    box-shadow: 0 0 12px rgba(0, 242, 254, 0.15);
}

.library-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.library-card {
    background: var(--bg-panel);
    backdrop-filter: blur(15px);
    border: 1px solid var(--border-glow);
    border-radius: var(--border-radius);
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
}

.library-card .card-photo-wrapper {
    aspect-ratio: 1 / 1 !important;
    height: auto !important;
    width: 100%;
    margin-bottom: 15px;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Library List View Styles */
.library-grid.lib-view-list {
    grid-template-columns: 1fr !important;
    gap: 20px;
}

.library-grid.lib-view-list .library-card {
    flex-direction: row !important;
    align-items: center;
    gap: 25px;
    padding: 20px 24px;
}

.library-grid.lib-view-list .card-photo-wrapper {
    width: 90px !important;
    height: 90px !important;
    aspect-ratio: 1 / 1 !important;
    margin-bottom: 0 !important;
    flex-shrink: 0;
}

.library-grid.lib-view-list .library-card-body {
    flex-grow: 1;
    margin-bottom: 0 !important;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.library-grid.lib-view-list .library-card-intent {
    margin-top: 5px !important;
    max-height: 80px;
    overflow-y: auto;
    width: 100%;
}

.library-grid.lib-view-list .library-card-body + div {
    margin-top: 0 !important;
    width: 180px !important;
    flex-shrink: 0;
}

.library-card:hover {
    border-color: var(--border-glow-hover);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    transform: translateY(-4px);
}

.library-card-author {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.library-card-body {
    flex-grow: 1;
    margin-bottom: 20px;
}

.library-card-intent {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-top: 15px;
    background: rgba(0, 0, 0, 0.15);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.02);
}

/* Responsive library layout */
@media (max-width: 1200px) {
    .library-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .library-grid {
        grid-template-columns: 1fr !important;
    }
    .library-grid.lib-view-list .library-card {
        flex-direction: column !important;
        align-items: stretch;
    }
    .library-grid.lib-view-list .card-photo-wrapper {
        width: 100% !important;
        height: auto !important;
    }
    .library-grid.lib-view-list .library-card-body + div {
        width: 100% !important;
    }
}

/* Magic Help v2.0 Upgraded Styles */
.diag-phase-selector .phase-tab {
    background: none;
    border: 1px solid transparent;
    color: var(--text-secondary);
    padding: 8px 12px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.diag-phase-selector .phase-tab:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
}

.diag-phase-selector .phase-tab.active {
    background: rgba(155, 81, 224, 0.08);
    border-color: rgba(155, 81, 224, 0.25);
    color: var(--neon-violet);
    box-shadow: 0 0 10px rgba(155, 81, 224, 0.15);
}

.diag-phase-selector #btn-phase-start.active {
    color: var(--neon-teal);
    background: rgba(0, 242, 254, 0.05);
    border-color: rgba(0, 242, 254, 0.2);
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.15);
}

.diag-phase-selector #btn-phase-end.active {
    color: var(--neon-red);
    background: rgba(255, 71, 87, 0.05);
    border-color: rgba(255, 71, 87, 0.25);
    box-shadow: 0 0 10px rgba(255, 71, 87, 0.15);
}

/* Complexes Grid Layout */
.complexes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

@media (max-width: 1024px) {
    .complexes-grid {
        grid-template-columns: 1fr;
    }
}

/* Diary Modal Styling */
.diary-body-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.diary-history-list {
    flex-grow: 1;
    overflow-y: auto;
    max-height: 280px;
    margin-top: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

@media (max-width: 768px) {
    .diary-body-layout {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Chronology Timeline & Esoteric Archive (New in v2.2)
   ========================================================================== */
.chronology-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

@media (max-width: 1024px) {
    .chronology-layout {
        grid-template-columns: 1fr;
    }
}

.chronology-timeline {
    position: relative;
    padding-left: 30px;
    border-left: 2px dashed rgba(255, 255, 255, 0.06);
    margin-left: 10px;
}

.chronology-node {
    position: relative;
    margin-bottom: 25px;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 20px;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.chronology-node:hover {
    border-color: rgba(0, 242, 254, 0.25);
    background: rgba(255, 255, 255, 0.03);
    box-shadow: 0 4px 20px rgba(0, 242, 254, 0.05);
}

.chronology-node::before {
    content: '';
    position: absolute;
    left: -37px;
    top: 24px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--text-muted);
    border: 3px solid #0d121d;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
    transition: var(--transition);
    z-index: 2;
}

.chronology-node.active::before {
    background: var(--neon-teal);
    box-shadow: 0 0 10px var(--neon-teal);
}

.chronology-node.inactive::before {
    background: var(--neon-violet);
    box-shadow: 0 0 10px var(--neon-violet);
}

.chronology-node-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    gap: 15px;
}

.chronology-node-title {
    font-family: var(--font-header);
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.chronology-node-meta {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.chronology-node-body {
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--text-secondary);
    margin-bottom: 15px;
    background: rgba(0,0,0,0.15);
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.02);
}

.chronology-efficiency-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.chronology-efficiency-badge.low {
    background: rgba(255, 71, 87, 0.08);
    border-color: rgba(255, 71, 87, 0.15);
    color: var(--neon-red);
}

.chronology-efficiency-badge.mid {
    background: rgba(255, 159, 26, 0.08);
    border-color: rgba(255, 159, 26, 0.15);
    color: var(--neon-gold);
}

.chronology-efficiency-badge.high {
    background: rgba(46, 213, 115, 0.08);
    border-color: rgba(46, 213, 115, 0.15);
    color: var(--neon-green);
}

.chronology-diaries-toggle {
    cursor: pointer;
    font-size: 12px;
    color: var(--neon-teal);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    user-select: none;
    transition: var(--transition);
}

.chronology-diaries-toggle:hover {
    color: #fff;
    text-shadow: 0 0 5px var(--neon-teal);
}

.chronology-diaries-container {
    margin-top: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    max-height: 250px;
    overflow-y: auto;
    display: none;
}

.chronology-diaries-container.active {
    display: block;
}

.chronology-diary-item {
    font-size: 12.5px;
    line-height: 1.4;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
}

.chronology-diary-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.chronology-diary-date {
    font-weight: 700;
    color: var(--text-primary);
    margin-right: 8px;
}

/* KPI Sidebar Styles */
.chronology-sidebar-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glow);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--neon-box-shadow);
}

.chronology-sidebar-card h4 {
    font-family: var(--font-header);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 15px;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 8px;
}

.chronology-chart-item {
    margin-bottom: 12px;
}

.chronology-chart-label {
    display: flex;
    justify-content: space-between;
    font-size: 12.5px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.chronology-chart-track {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.chronology-chart-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--neon-teal), var(--neon-violet));
    border-radius: 4px;
    transition: width 0.8s ease-out;
}

/* ==========================================================================
   Authentication & Login Page Styles (New in v2.3)
   ========================================================================== */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #080c14;
    background-image: 
        radial-gradient(at 0% 0%, rgba(155, 81, 224, 0.12) 0, transparent 50%),
        radial-gradient(at 100% 100%, rgba(0, 242, 254, 0.12) 0, transparent 50%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999; /* Higher than anything else */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.auth-card {
    background: rgba(13, 18, 29, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(25px) saturate(160%);
    width: 100%;
    max-width: 420px;
    padding: 35px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 50px rgba(0, 242, 254, 0.03);
    text-align: center;
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-overlay.active .auth-card {
    transform: translateY(0);
}

.auth-brand {
    margin-bottom: 25px;
}

.auth-brand .brand-logo {
    width: 65px;
    height: 65px;
    margin: 0 auto 12px auto;
}

.auth-brand h2 {
    font-family: var(--font-header);
    font-size: 26px;
    letter-spacing: 1px;
    color: #fff;
    margin-bottom: 6px;
}

.auth-brand p {
    font-size: 12.5px;
    color: var(--text-secondary);
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.03);
    padding: 4px;
    border-radius: 10px;
    margin-bottom: 25px;
}

.auth-tab {
    background: none;
    border: none;
    padding: 8px 0;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: var(--transition);
}

.auth-tab.active {
    background: rgba(255, 255, 255, 0.03);
    color: var(--neon-teal);
    text-shadow: 0 0 5px rgba(0, 242, 254, 0.2);
}

.auth-form {
    display: none;
    text-align: left;
}

.auth-form.active {
    display: block;
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    color: var(--text-muted);
    font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.05);
}

.auth-divider span {
    padding: 0 10px;
}

/* Google Sign-in Button Styles */
.btn-google {
    background: #fff;
    color: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.8);
    font-family: var(--font-body);
    font-size: 13.5px;
    font-weight: 600;
    padding: 11px 20px;
    border-radius: 8px;
    width: 100%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition);
}

.btn-google:hover {
    background: #f1f1f1;
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.1);
}

.google-icon {
    width: 18px;
    height: 18px;
}

/* Guest Button Styles */
.btn-guest {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 12px;
    cursor: pointer;
    margin-top: 15px;
    text-decoration: underline;
    transition: var(--transition);
}

.btn-guest:hover {
    color: var(--text-secondary);
}

/* ==========================================================================
   Practice Analytics & AI Oracle Styles
   ========================================================================== */

.analytics-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.analytics-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    transition: var(--transition);
}

.analytics-card:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 242, 254, 0.2);
    box-shadow: 0 10px 20px rgba(0, 242, 254, 0.05);
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-icon {
    font-size: 28px;
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-header);
}

.analytics-widgets-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

@media (max-width: 900px) {
    .analytics-widgets-grid {
        grid-template-columns: 1fr;
    }
}

.widget-card h3 {
    font-family: var(--font-header);
    font-size: 16px;
    margin-bottom: 20px;
    color: var(--text-primary);
    border-left: 3px solid var(--neon-teal);
    padding-left: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Vitality Circular Meter */
.vitality-container {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 20px;
    flex-wrap: wrap;
    padding: 10px 0;
}

.energy-dial-wrapper {
    position: relative;
    width: 140px;
    height: 140px;
}

.energy-dial-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.energy-dial-svg circle {
    fill: none;
    stroke-width: 8;
}

.energy-dial-svg .dial-bg {
    stroke: rgba(255, 255, 255, 0.03);
}

.energy-dial-svg .dial-fill {
    stroke: var(--neon-teal);
    stroke-linecap: round;
    stroke-dasharray: 251.2; /* 2 * pi * r (r=40) = 251.2 */
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 0.8s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.8s ease;
    filter: drop-shadow(0 0 4px var(--neon-teal));
}

.energy-dial-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    display: flex;
    flex-direction: column;
}

.energy-dial-percent {
    font-family: var(--font-header);
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
}

.energy-dial-status {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 600;
}

.energy-metrics-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    min-width: 180px;
}

.metric-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--text-secondary);
}

.metric-item .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.metric-item .dot.active {
    background: var(--neon-teal);
    box-shadow: 0 0 8px var(--neon-teal);
}

.metric-item .dot.warning {
    background: var(--neon-gold);
    box-shadow: 0 0 8px var(--neon-gold);
}

.metric-item .dot.danger {
    background: var(--neon-red);
    box-shadow: 0 0 8px var(--neon-red);
}

.metric-value {
    margin-left: auto;
    font-weight: 700;
    color: var(--text-primary);
}

.oracle-preview-box {
    transition: var(--transition);
}

.spheres-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sphere-progress-bar-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sphere-progress-label-row {
    display: flex;
    justify-content: space-between;
    font-size: 12.5px;
    color: var(--text-secondary);
}

.sphere-progress-bar-bg {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.02);
}

.sphere-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--neon-teal), var(--neon-violet));
    border-radius: 4px;
    width: 0%;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 8px rgba(0, 242, 254, 0.3);
}

/* Table Styles */
.table-container {
    width: 100%;
    overflow-x: auto;
    margin-top: 10px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.table-styled {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 13.5px;
}

.table-styled th {
    padding: 12px 16px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.01);
}

.table-styled td {
    padding: 14px 16px;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: var(--transition);
}

.table-styled tr:last-child td {
    border-bottom: none;
}

.table-styled tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Settings View Styles */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
}

@media (max-width: 900px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

