/* ══════════════════════════════════════════════════════════════════════════
   CALCULATOR INSIDER — PRECISION PINE & ALABASTER STONE DESIGN SYSTEM v4.0
   ══════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;

    /* Precision Pine Green & Alabaster Stone Brand Palette */
    --primary-color: #064e3b;
    --primary-hover: #047857;
    --primary-light: #f0fdf4;
    --primary-mid: #a7f3d0;
    --primary-glow: rgba(6, 78, 59, 0.08);

    --secondary-color: #0284c7;
    --secondary-light: #f0f9ff;
    --secondary-mid: #bae6fd;
    --secondary-glow: rgba(2, 132, 199, 0.08);

    --accent-color: #e11d48;
    --accent-light: #fff1f2;
    --accent-mid: #fecdd3;
    --accent-glow: rgba(225, 29, 72, 0.08);

    /* Backgrounds */
    --bg-color: #fafaf9;
    --bg-gradient: linear-gradient(135deg, #f5f5f4 0%, #fafaf9 50%, #f0fdf4 100%);
    --card-bg: #ffffff;
    --card-hover: #fafaf9;

    /* Text */
    --text-color: #1c1917;
    --text-secondary: #44403c;
    --text-muted: #78716c;
    --text-light: #a8a29e;

    /* Borders */
    --border-color: #e7e5e4;
    --border-light: #f5f5f4;
    --border-focus: #064e3b;

    /* Status */
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;

    /* Crisp Multi-layered Stone Shadows */
    --shadow-xs: 0 1px 2px rgba(28, 25, 23, 0.03);
    --shadow-sm: 0 2px 8px rgba(28, 25, 23, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
    --shadow-md: 0 8px 24px rgba(28, 25, 23, 0.06), 0 2px 8px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 16px 48px rgba(28, 25, 23, 0.08), 0 4px 16px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 32px 80px rgba(28, 25, 23, 0.10), 0 8px 32px rgba(0, 0, 0, 0.05);

    /* compatibility names mapping */
    --shadow-soft-sm: var(--shadow-sm);
    --shadow-soft-md: var(--shadow-md);
    --shadow-soft-lg: var(--shadow-lg);

    /* Radii - Shaper for a premium, precision look */
    --radius-xl: 12px;
    --radius-lg: 8px;
    --radius-md: 6px;
    --radius-sm: 4px;
    --radius-xs: 2px;

    --glass-blur: blur(8px);
}

/* ════ RESET ════ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html, body { overflow-x: hidden; width: 100%; scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--bg-color);
    background-image: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #f5f5f4; }
::-webkit-scrollbar-thumb { background: var(--primary-mid); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-color); }

a { text-decoration: none; color: inherit; transition: all 0.2s ease; }
ul { list-style: none; }

/* ════ LAYOUT ════ */
.container { max-width: 1320px; margin: 0 auto; padding: 0 28px; width: 100%; }

/* ════════════════════ NAVIGATION ════════════════════ */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 72px;
    display: flex;
    align-items: center;
    box-shadow: 0 1px 0 rgba(6, 78, 59, 0.04), var(--shadow-xs);
    transition: all 0.3s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 850;
    color: var(--text-color);
    letter-spacing: -0.03em;
}

.logo i {
    font-size: 1.4rem;
    color: var(--primary-color);
    filter: drop-shadow(0 2px 4px rgba(6, 78, 59, 0.2));
}

.logo .text-primary { color: var(--primary-color); }

.nav-links { display: flex; gap: 6px; align-items: center; }

.nav-links li a {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding: 7px 16px;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.nav-links li a:hover { color: var(--primary-color); background: var(--primary-light); }

.nav-links li a.active {
    color: var(--primary-color);
    background: var(--primary-light);
    font-weight: 700;
    box-shadow: inset 0 0 0 1px var(--primary-mid);
}

.mobile-menu-toggle {
    display: none;
    background: var(--primary-light);
    border: 1.5px solid var(--primary-mid);
    width: 42px; height: 42px;
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    color: var(--primary-color);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.mobile-menu-toggle:hover { background: var(--primary-color); color: #fff; }

/* ════════════════════ MAIN LAYOUT ════════════════════ */
.main-layout {
    display: flex;
    gap: 36px;
    margin: 44px auto;
    align-items: start;
}

.content-area { flex: 1; min-width: 0; }

.sidebar {
    width: 310px;
    flex-shrink: 0;
    position: sticky;
    top: 104px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ════ WIDGETS ════ */
.widget {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.widget::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.widget.greeting-widget::after {
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
}

.widget:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.widget-header {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--text-color);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.widget-header i { color: var(--primary-color); font-size: 1rem; }

/* ════════════════════ HERO SECTION ════════════════════ */
.hero {
    text-align: center;
    padding: 64px 32px;
    background: linear-gradient(135deg, #f5f5f4 0%, #ffffff 50%, #f0fdf4 100%) !important;
    border: 1.5px solid var(--border-color) !important;
    border-radius: var(--radius-xl) !important;
    box-shadow: var(--shadow-md) !important;
    margin-bottom: 36px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -80px; right: -80px;
    width: 280px; height: 280px;
    background: radial-gradient(circle, rgba(6, 78, 59, 0.04) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -80px; left: -80px;
    width: 280px; height: 280px;
    background: radial-gradient(circle, rgba(2, 132, 199, 0.03) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 900;
    color: var(--text-color);
    letter-spacing: -0.04em;
    margin-bottom: 16px;
    line-height: 1.15;
    position: relative;
    z-index: 1;
}

.hero h1 span.text-primary {
    color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
    font-weight: 400;
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

/* ════════════════════ TOOLS GRID ════════════════════ */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 16px;
    margin-top: 28px;
}

.tool-card {
    background: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-lg) !important;
    padding: 22px 14px !important;
    text-align: center;
    box-shadow: var(--shadow-xs) !important;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.tool-card::before { display: none !important; }

.tool-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: var(--shadow-md) !important;
    border-color: var(--primary-color) !important;
    background: var(--card-hover) !important;
}

.icon-wrap {
    width: 54px !important;
    height: 54px !important;
    margin: 0 auto 14px !important;
    border-radius: var(--radius-md) !important;
    background: var(--primary-light) !important;
    color: var(--primary-color) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 20px !important;
    border: 1px solid var(--primary-mid) !important;
    box-shadow: none !important;
    transition: all 0.22s ease !important;
}

.tool-card:hover .icon-wrap {
    background: var(--primary-color) !important;
    color: #ffffff !important;
    transform: scale(1.06) rotate(-2deg) !important;
    box-shadow: 0 4px 12px rgba(6, 78, 59, 0.15) !important;
    border-color: var(--primary-color) !important;
}

.tool-card h3 {
    font-family: var(--font-heading) !important;
    font-size: 0.88rem !important;
    font-weight: 750 !important;
    color: var(--text-color) !important;
    margin: 0 0 4px 0 !important;
    line-height: 1.35 !important;
    transition: color 0.2s !important;
}

.tool-card:hover h3 { color: var(--primary-color) !important; }

.view-count-badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    background: var(--border-light) !important;
    color: var(--text-muted) !important;
    padding: 2px 8px !important;
    border-radius: var(--radius-sm) !important;
    font-size: 0.67rem !important;
    font-weight: 600;
    border: 1px solid var(--border-color) !important;
}

/* ════════════════════ FORMS & INPUTS ════════════════════ */
.form-group { margin-bottom: 22px; text-align: left; }

.form-label {
    display: block;
    margin-bottom: 8px;
    font-family: var(--font-heading);
    font-weight: 750;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-control {
    width: 100%;
    padding: 13px 16px;
    background: #ffffff;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-color);
    font-family: var(--font-body);
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(6, 78, 59, 0.08);
    background: #fafaf9;
}

.btn-primary {
    font-family: var(--font-heading);
    background: var(--primary-color);
    color: #ffffff;
    border: none;
    padding: 14px 26px;
    border-radius: var(--radius-md);
    font-weight: 750;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(6, 78, 59, 0.15);
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 0.01em;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(6, 78, 59, 0.25);
    background: var(--primary-hover);
}

.btn-primary:active { transform: translateY(0); }

/* ════════════════════ RESPONSIVE ════════════════════ */
@media (max-width: 1024px) {
    .main-layout { flex-direction: column; gap: 24px; margin: 28px auto; }
    .sidebar { width: 100%; position: static; }
}

@media (max-width: 768px) {
    .navbar { height: 66px; }
    .logo { font-size: 1.3rem; }
    .mobile-menu-toggle { display: flex; }

    .nav-links {
        display: none !important;
        position: fixed;
        top: 66px; left: 0; right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: var(--glass-blur);
        flex-direction: column;
        padding: 20px 16px;
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow-lg);
        gap: 8px;
        z-index: 999;
    }
    .nav-links.active { display: flex !important; }
    .nav-links li { width: 100%; }
    .nav-links li a {
        display: block;
        padding: 12px 16px;
        border-radius: var(--radius-md);
        text-align: center;
        width: 100%;
        border: 1px solid var(--border-color);
    }
    .tools-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
    .hero { padding: 40px 20px; border-radius: var(--radius-lg) !important; }
    .hero h1 { font-size: 2rem; }
}

@media (max-width: 480px) {
    .tools-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }
    .tool-card { padding: 18px 10px !important; }
    .icon-wrap { width: 48px !important; height: 48px !important; font-size: 18px !important; }
    .tool-card h3 { font-size: 0.82rem !important; }
    .container { padding: 0 16px; }
}

/* ════════════════════ ADVANCED CALCULATOR CARD ════════════════════ */
.adv-card {
    max-width: 980px;
    margin: 44px auto;
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    font-family: var(--font-body);
    transition: all 0.3s ease;
}

.adv-header {
    background: linear-gradient(135deg, var(--primary-light) 0%, #ffffff 100%);
    padding: 48px 40px;
    text-align: center;
    border-bottom: 1.5px solid var(--border-color);
}

.adv-header i {
    font-size: 3rem;
    margin-bottom: 18px;
    color: var(--primary-color);
    filter: drop-shadow(0 4px 6px rgba(6, 78, 59, 0.15));
}

.adv-header h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 850;
    letter-spacing: -0.04em;
    margin-bottom: 10px;
    color: var(--text-color);
}

.adv-header p { font-size: 1rem; color: var(--text-muted); }

.adv-content { padding: 44px 40px; background: #fafaf9; }

.adv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; margin-bottom: 28px; }

.adv-input-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 750;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.adv-input {
    width: 100%;
    padding: 13px 16px;
    background: #ffffff;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    font-family: var(--font-body);
    transition: all 0.2s ease;
}

.adv-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(6, 78, 59, 0.08);
    outline: none;
    background: #fafaf9;
}

.adv-calc-btn {
    width: 100%;
    padding: 16px;
    background: var(--primary-color);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1.05rem;
    font-weight: 750;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 6px rgba(6, 78, 59, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: var(--font-heading);
    letter-spacing: 0.02em;
}

.adv-calc-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(6, 78, 59, 0.25); background: var(--primary-hover); }

.adv-result-card {
    margin-top: 32px;
    background: linear-gradient(135deg, var(--primary-light) 0%, #ffffff 100%);
    border-radius: var(--radius-lg);
    padding: 36px;
    text-align: center;
    border: 1.5px solid var(--primary-mid);
    box-shadow: var(--shadow-md);
    display: none;
    animation: resultReveal 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes resultReveal {
    from { opacity: 0; transform: translateY(16px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.adv-result-value {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--primary-color);
    line-height: 1;
    margin: 10px 0;
    font-family: var(--font-heading);
    letter-spacing: -0.04em;
}

.adv-result-label {
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.legend-insight {
    margin-top: 26px;
    padding: 16px 20px;
    background: rgba(6, 78, 59, 0.04);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary-color);
    text-align: left;
}

.legend-chart-container {
    margin-top: 28px;
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

@media (max-width: 600px) {
    .adv-card { margin: 16px 8px; border-radius: var(--radius-lg); }
    .adv-header { padding: 28px 20px; }
    .adv-header h2 { font-size: 1.5rem; }
    .adv-header i { font-size: 2.2rem; }
    .adv-content { padding: 24px 16px; }
    .adv-result-card { padding: 24px 16px; }
    .adv-result-value { font-size: 2.2rem; }
}

/* ════════════════════ GLOBAL CALCULATOR INTERCEPTOR ════════════════════ */
div[class^="super-card"],
div[class*=" super-card"] {
    background: var(--card-bg) !important;
    border-radius: var(--radius-lg) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: var(--shadow-md) !important;
    overflow: hidden !important;
    color: var(--text-color) !important;
    backdrop-filter: none !important;
}

div[class^="frosted-bg"],
div[class*=" frosted-bg"],
div[class^="frosted-header"],
div[class*=" frosted-header"] {
    background: linear-gradient(135deg, var(--primary-light) 0%, #ffffff 100%) !important;
    border-bottom: 1.5px solid var(--border-color) !important;
    position: relative !important;
    padding: 40px 20px !important;
}

div[class^="super-card"]>div[style*="background: #ffffff"],
div[class^="super-card"]>div[style*="background:#ffffff"],
div[class^="super-card"]>div[style*="background: white"],
div[class^="super-card"] div[style*="background: #ffffff"],
div[class^="super-card"] div[style*="background: #f8fafc"],
div[class^="super-card"] div[style*="background: #f1f5f9"],
div[class^="super-card"] div[style*="background: #fff"] {
    background: #ffffff !important;
    color: var(--text-color) !important;
    border-color: var(--border-color) !important;
}

div[class^="super-card"] label,
div[class^="super-card"] span[style*="color: #"],
div[class^="super-card"] label[style*="color: #"],
div[class^="super-card"] div[style*="color: #"] {
    color: var(--text-secondary) !important;
}

div[class^="super-card"] h1,
div[class^="super-card"] h2,
div[class^="super-card"] h3,
div[class^="super-card"] h4,
div[class^="super-card"] h5,
div[class^="super-card"] h6 {
    color: var(--text-color) !important;
    font-family: var(--font-heading) !important;
}

div[class^="super-card"] div[style*="background: #f1f5f9"],
div[class^="super-card"] div[style*="background: #e2e8f0"] {
    background: var(--primary-light) !important;
    border: 1px solid var(--primary-mid) !important;
}

div[class^="super-card"] button[style*="background: #ffffff"],
div[class^="super-card"] button[style*="background: white"] {
    background: var(--primary-color) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
}

div[class^="super-card"] button[style*="background: transparent"] {
    background: transparent !important;
    color: var(--text-muted) !important;
}

input[class^="input-glass"],
input[class*=" input-glass"],
textarea[class^="input-glass"],
textarea[class*=" input-glass"],
select[class^="input-glass"],
select[class*=" input-glass"] {
    background: #ffffff !important;
    border: 1.5px solid var(--border-color) !important;
    border-radius: var(--radius-md) !important;
    padding: 13px !important;
    font-size: 1.05rem !important;
    font-weight: 600 !important;
    color: var(--text-color) !important;
    text-align: center !important;
    transition: all 0.2s ease !important;
    font-family: var(--font-body) !important;
}

input[class^="input-glass"]:focus,
textarea[class^="input-glass"]:focus,
select[class^="input-glass"]:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 4px rgba(6, 78, 59, 0.08) !important;
    outline: none !important;
    background: #fafaf9 !important;
}

button[class^="btn-wow"],
button[class*=" btn-wow"],
input[type="submit"][class^="btn-wow"],
input[type="submit"][class*=" btn-wow"] {
    background: var(--primary-color) !important;
    color: #ffffff !important;
    padding: 14px 20px !important;
    border-radius: var(--radius-md) !important;
    font-weight: 800 !important;
    border: none !important;
    box-shadow: 0 2px 6px rgba(6, 78, 59, 0.15) !important;
    cursor: pointer !important;
    transition: all 0.22s ease !important;
    font-family: var(--font-heading) !important;
}

button[class^="btn-wow"]:hover,
button[class*=" btn-wow"]:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(6, 78, 59, 0.25) !important;
    background: var(--primary-hover) !important;
}

div[class^="super-card"] div[style*="background: #f0fdf4"],
div[class^="super-card"] div[style*="background: #f8fafc"] {
    background: linear-gradient(135deg, var(--primary-light) 0%, #ffffff 100%) !important;
    border: 1px solid var(--primary-mid) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-sm) !important;
}

div[class^="mega-val"],
div[class*=" mega-val"],
span[class^="mega-val"],
span[class*=" mega-val"] {
    font-size: 4rem !important;
    font-weight: 900 !important;
    color: var(--primary-color) !important;
    background: none !important;
    -webkit-text-fill-color: var(--primary-color) !important;
    letter-spacing: -0.04em !important;
    font-family: var(--font-heading) !important;
}

@media (max-width: 768px) {
    div[class^="mega-val"],
    div[class*=" mega-val"] { font-size: 2.5rem !important; }
}

div[class^="super-card"] div[style*="border-bottom: 1px dashed"] {
    border-bottom: 1px dashed var(--primary-mid) !important;
}

div[class^="super-card"] b[style*="color: #"] { color: var(--text-color) !important; }

.gauge-body::after { background: #ffffff !important; }
.gauge-needle { background: var(--primary-color) !important; }

div[class^="super-card"] select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23064e3b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 16px center !important;
    background-size: 14px !important;
    padding-right: 42px !important;
}

.sci-display-neural { background: var(--primary-light) !important; border-bottom: 1.5px solid var(--primary-mid) !important; }
#sci-main-display { color: var(--text-color) !important; }
.btn-neural { background: #ffffff !important; border: 1px solid var(--border-color) !important; color: var(--text-secondary) !important; border-radius: var(--radius-sm) !important; font-weight: 600 !important; transition: all 0.18s ease !important; }
.btn-neural:hover { background: var(--primary-light) !important; color: var(--primary-color) !important; border-color: var(--primary-mid) !important; }
.btn-neural.num { color: var(--text-color) !important; background: #ffffff !important; }
.btn-neural.op { color: var(--primary-color) !important; background: var(--primary-light) !important; border-color: var(--primary-mid) !important; font-weight: 700 !important; }
.btn-neural.fn { color: var(--secondary-color) !important; background: var(--secondary-light) !important; border-color: var(--secondary-mid) !important; }
.btn-neural.action { color: var(--danger-color) !important; background: #fff5f5 !important; border-color: #fecaca !important; }
.btn-neural.equal { background: var(--primary-color) !important; color: #ffffff !important; border: none !important; box-shadow: 0 2px 6px rgba(6, 78, 59, 0.2) !important; font-weight: 800 !important; }
.sci-tape-neural { background: var(--primary-light) !important; border-left: 1.5px solid var(--primary-mid) !important; }
.tape-item { border-bottom: 1px dotted var(--primary-mid) !important; }
.tape-res { color: var(--primary-color) !important; font-weight: 700 !important; }

/* Responsive grid override */
@media (max-width: 600px) {
    * { max-width: 100vw; }
    .container, .main-layout, .content-area, .sidebar {
        width: 100% !important; max-width: 100% !important;
        margin-left: 0 !important; margin-right: 0 !important;
        padding-left: 8px !important; padding-right: 8px !important;
    }
    canvas { width: 100% !important; height: auto !important; }
}

.main-layout.full-width { display: block; width: 100%; max-width: 100%; margin: 30px auto; }
.main-layout.full-width .content-area { width: 100%; }