:root {
    --primary-color: #3b82f6;
    --secondary-color: #60a5fa;
    --accent-color: #0ea5e9;
    --success: #22c55e;
    --font-main: 'Inter', sans-serif;
    --font-mono: 'Inter', sans-serif;

    /* Light Mode (Default) */
    --bg-page: #f1f5f9;
    --bg-header: rgba(255, 255, 255, 0.8);
    --bg-glass: rgba(255, 255, 255, 0.75);
    --border-glass: rgba(0, 0, 0, 0.08);
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-dim: rgba(0, 0, 0, 0.5);
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.08);
    --input-bg: #ffffff;
    --blob-opacity: 0.05;
    --subtle-bg: rgba(0, 0, 0, 0.03);
    --subtle-border: rgba(0, 0, 0, 0.06);
    --input-focus-bg: rgba(59, 130, 246, 0.05);
    --placeholder-color: rgba(0, 0, 0, 0.3);
    --table-text: #1e293b;
    --table-input-bg: rgba(0, 0, 0, 0.04);
    --table-input-border: rgba(0, 0, 0, 0.1);
    --table-row-border: rgba(0, 0, 0, 0.06);
    --dashed-border: rgba(0, 0, 0, 0.1);
}

.dark-mode {
    /* Dark Mode Override */
    --bg-page: #0f172a;
    --bg-header: rgba(15, 23, 42, 0.8);
    --bg-glass: rgba(30, 41, 59, 0.75);
    --border-glass: rgba(255, 255, 255, 0.1);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-dim: rgba(255, 255, 255, 0.5);
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --input-bg: rgba(15, 23, 42, 0.4);
    --blob-opacity: 0.15;
    --subtle-bg: rgba(255, 255, 255, 0.03);
    --subtle-border: rgba(255, 255, 255, 0.05);
    --input-focus-bg: rgba(15, 23, 42, 0.6);
    --placeholder-color: rgba(255, 255, 255, 0.2);
    --table-text: #ffffff;
    --table-input-bg: rgba(0, 0, 0, 0.2);
    --table-input-border: rgba(255, 255, 255, 0.1);
    --table-row-border: rgba(255, 255, 255, 0.05);
    --dashed-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-page);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

/* Background Animations Removed - using global Gainii theme backgrounds */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header Styling */
header {
    background: var(--bg-header);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-glass);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-shrink: 0;
}

.logo-icon {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 10px;
    background: transparent;
    border: none;
    display: block;
}

/* Navigation and Logo styles removed - using global components */

.date-display {
    color: var(--text-secondary);
    font-size: 0.85rem;
    padding: 0.35rem 1rem;
    border-radius: 20px;
    background: var(--border-glass);
    border: 1px solid var(--border-glass);
}

/* Page Date Bar */
.page-date-bar {
    display: flex;
    justify-content: flex-end;
    padding: 1rem 0 0.5rem 0;
}

/* Custom Multi-select Checkbox Dropdown */
.ms-container {
    position: relative;
}

.ms-header {
    background: transparent;
    border: 1px solid var(--border-glass);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 4px;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-width: 110px;
}

.ms-header:hover {
    border-color: var(--primary-color);
    color: var(--text-primary);
}

.ms-options {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-page);
    border: 1px solid var(--primary-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    padding: 0.75rem;
    z-index: 100;
    min-width: 160px;
    max-height: 300px;
    overflow-y: auto;
    margin-top: 0.5rem;
}

.ms-options.open {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.ms-options label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    cursor: pointer;
    color: var(--text-primary);
    white-space: nowrap;
    margin: 0;
    font-weight: 500;
}

.ms-options input[type="checkbox"] {
    width: 14px;
    height: 14px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

/* Theme Toggle Button */
.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--border-glass);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background: var(--primary-color);
    color: white;
    transform: rotate(20deg);
}

.dark-mode-hidden {
    display: block;
}

.light-mode-hidden {
    display: none;
}

.dark-mode .dark-mode-hidden {
    display: none;
}

.dark-mode .light-mode-hidden {
    display: block;
}

/* Tabs */
.tabs-container {
    display: flex;
    gap: 1rem;
    margin: 0 auto 2rem auto;
    padding: 0.5rem;
    background: var(--subtle-bg);
    border-radius: 12px;
    width: fit-content;
}

.tab-btn {
    padding: 0.6rem 1.5rem;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: var(--subtle-bg);
}

.tab-btn.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.5);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.result-mini.highlighted {
    background: rgba(59, 130, 246, 0.1) !important;
    border: 1px solid rgba(59, 130, 246, 0.2) !important;
    padding: 0.6rem 1rem;
    margin-top: 0.75rem;
    border-radius: 8px;
}

.result-mini.highlighted span {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.1rem;
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.03em;
}

/* Dashboard Layout */
.dashboard-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
    margin-bottom: 2rem;
}

.glass {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    box-shadow: var(--card-shadow);
}

/* Summary Footer Layout */
.summary-footer {
    width: 100%;
}

.summary-card {
    padding: 1.5rem 2rem;
}

.summary-grid {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    align-items: center;
    background: var(--subtle-bg);
    padding: 1rem;
    border-radius: 12px;
}

.report-table-container {
    width: 100%;
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.report-table th,
.report-table td {
    padding: 0.6rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-glass);
}

.report-table th {
    color: var(--text-primary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    background: var(--subtle-bg);
}

.report-table td:last-child {
    font-weight: 600;
    color: var(--primary-color);
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

.summary-card h2 {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    border-left: 3px solid var(--primary-color);
    padding-left: 0.5rem;
}

.summary-stat {
    display: flex;
    flex-direction: column;
    flex: 0 0 160px;
}

.summary-stat label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.summary-stat .value {
    font-family: var(--font-mono);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--primary-color);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.03em;
}

.summary-stat.primary {
    background: rgba(59, 130, 246, 0.1);
    padding: 0.3rem 0.75rem;
    border-radius: 8px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    flex: 0 0 200px;
}

.summary-stat .value-large {
    font-family: var(--font-mono);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--success);
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.03em;
}

.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr 1.5fr;
    gap: 1rem;
    border-top: 1px solid var(--border-glass);
    padding-top: 1rem;
}

.primary-btn {
    padding: 0.6rem;
    border: none;
    border-radius: 8px;
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.primary-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.secondary-btn {
    padding: 0.5rem;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

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

/* Main Content Styling */
.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.analysis-section {
    padding: 0.5rem 0.75rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 0.15rem;
}

.section-header h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.badge {
    background: var(--glass-border);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Input Grid */
.input-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.trial-column h4 {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.trial-column h4::before {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    background: var(--primary-color);
    border-radius: 50%;
}

.form-group {
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.form-group label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.75rem;
    min-width: 80px;
}

input[type="number"] {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--border-glass);
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
    transition: all 0.3s ease;
}

input[type="number"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: var(--input-focus-bg);
}

input::placeholder {
    color: var(--placeholder-color);
}

.result-mini {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    padding: 0.4rem;
    background: var(--subtle-bg);
    border-radius: 6px;
}

.result-mini span {
    color: var(--success);
    font-family: var(--font-mono);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

/* Summary Table Styles (Daily Analysis) */
.summary-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.summary-table th {
    text-align: left;
    padding: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-glass);
}

.summary-table td {
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.summary-table .text-right {
    text-align: right;
}

.summary-table .fw-bold {
    font-weight: 700;
}

.summary-table tfoot .total-row td {
    border-top: 2px solid var(--border-glass);
    border-bottom: none;
    font-weight: 800;
    padding-top: 1rem;
    color: var(--text-primary);
}

/* Light Mode Summary Table */
[data-theme='light'] .summary-table td {
    border-bottom-color: rgba(0, 0, 0, 0.05);
}
[data-theme='light'] .summary-table tfoot .total-row td {
    border-top-color: #eee;
}

.correction-input {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.correction-input input {
    width: 100px;
    padding: 0.4rem 0.75rem;
    font-size: 0.9rem;
}

/* Footer Styling Removed - using components/footer.html */

.double-targets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1.5rem;
}

.target-group {
    background: var(--subtle-bg);
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--subtle-border);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.target-group h4 {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
    text-align: center;
}

.t-inputs {
    display: flex;
    gap: 0.5rem;
}

.t-inputs input {
    width: 100%;
    padding: 0.5rem;
    text-align: center;
    font-weight: 600;
}

.mean-display {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    text-align: center;
    color: var(--primary-color);
    font-weight: 700;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--dashed-border);
}

.mean-display span {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

/* Size Analysis Specific Styles */
.analysis-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.25rem;
    color: var(--table-text);
}

.analysis-table th,
.analysis-table td {
    padding: 2px 4px;
    text-align: right;
    border-bottom: 1px solid var(--table-row-border);
}

.analysis-table th {
    color: var(--text-dim);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.analysis-table td:first-child,
.analysis-table th:first-child {
    text-align: left;
}

.analysis-table input {
    width: 100%;
    max-width: 90px;
    padding: 3px 6px;
    background: var(--table-input-bg);
    border: 1px solid var(--table-input-border);
    border-radius: 4px;
    color: var(--primary-color);
    font-family: var(--font-mono);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
    text-align: right;
}

.total-row {
    background: rgba(59, 130, 246, 0.05);
    font-weight: 700;
}

.total-row td {
    border-top: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.loss-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.loss-ok {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.loss-warn {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.text-dim {
    color: var(--text-dim);
}

/* Utility Classes */
.mt-1 {
    margin-top: 1rem !important;
}

.mt-1-5 {
    margin-top: 1.5rem !important;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.w-120 {
    width: 100% !important;
    max-width: 120px !important;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

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

.flex-end {
    align-items: flex-end !important;
}

/* MPS Card Component */
.mps-card {
    margin-top: 0.5rem;
    padding: 0.4rem 0.75rem;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 8px;
    border: 1px solid var(--subtle-border);
}

.mps-card label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-dim);
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.mps-card span {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Responsive Refinements */
@media (max-width: 1024px) {
    .header-actions {
        margin-left: auto;
    }

    .container {
        padding: 0 1.5rem;
    }

    .main-content {
        grid-template-columns: 1fr;
    }

    .nav-hamburger {
        display: flex;
    }

    #top-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--bg-page);
        border-bottom: 2px solid var(--primary-color);
        padding: 1.5rem;
        flex-direction: column;
        gap: 1rem;
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
        z-index: 1000;
    }

    #top-nav.open {
        display: flex;
        animation: slideDown 0.25s ease;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-8px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .nav-link {
        width: 100%;
        padding: 0.6rem 1rem;
    }

    header {
        position: relative;
    }
}

@media (max-width: 768px) {

    .summary-grid {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .summary-stat {
        flex: 1 1 140px;
    }

    .summary-stat.primary {
        flex: 1 1 100%;
    }

    .action-buttons {
        grid-template-columns: 1fr 1fr;
    }

    .primary-btn {
        grid-column: span 2;
    }
}

@media (max-width: 480px) {
    .header-content {
        gap: 0.5rem;
    }

    .logo {
        gap: 0.4rem;
    }

    .logo-icon {
        width: 28px;
        height: 28px;
        font-size: 1rem;
    }

    .logo h1 {
        font-size: 1.1rem;
        letter-spacing: 1px;
    }

    .theme-toggle,
    .nav-hamburger {
        width: 32px;
        height: 32px;
    }

    .input-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .form-group {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-group label {
        margin-bottom: 0.25rem;
    }

    .action-buttons {
        grid-template-columns: 1fr;
    }

    .primary-btn {
        grid-column: span 1;
    }

    .report-table th,
    .report-table td {
        padding: 0.4rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* Print Styles */
@media print {

    .background-blobs,
    .action-buttons,
    .badge,
    .demoBtn,
    .resetBtn,
    .nav-hamburger,
    .page-date-bar {
        display: none !important;
    }

    .glass {
        background: white !important;
        color: black !important;
        border: 1px solid #ccc !important;
        box-shadow: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    .summary-stat.primary {
        background: #f0f0f0 !important;
        border: 1px solid #ccc !important;
    }
}

@media (max-width: 640px) {
    .input-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}


.restart-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.6rem 1.25rem;
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
    border: 1.5px solid rgba(239, 68, 68, 0.25);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.05);
}

.restart-btn:hover {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.restart-btn svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.5;
    transition: transform 0.6s ease;
}

.restart-btn:hover svg {
    transform: rotate(-180deg);
}

.secondary-btn.restart-btn {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.25);
}

.demo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(16, 185, 129, 0.08);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.demo-btn:hover {
    background: var(--success);
    color: white;
}

.reset-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reset-btn:hover {
    background: #ef4444;
    color: white;
}

/* Daily Analysis Specific Refinements */
.sieve-input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-weight: 500;
    width: 100%;
    font-family: inherit;
}

.sieve-input:focus {
    outline: none;
    color: var(--primary-color);
}

.remove-row {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 4px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    transition: all 0.2s ease;
}

.remove-row:hover {
    background: #ef4444;
    color: white;
}

@media (max-width: 768px) {
    .range-grid {
        grid-template-columns: 1fr !important;
    }
}

.actions-col {
    width: 40px;
}

/* Daily Analysis Typography Boost */
.result-mini {
    font-size: 0.95rem !important;
    font-weight: 500;
}

.weight-display {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    display: block;
    margin-top: 0.25rem;
}

/* Ultra-Compact Settings Grid */
.settings-row-grid {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.setting-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.setting-item label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    margin: 0 !important;
}

.setting-item input {
    width: 100%;
    background: transparent !important;
    border: none !important;
    border-bottom: 2px solid var(--border-glass) !important;
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    color: var(--text-primary);
    padding: 0.15rem 0 !important;
    border-radius: 0 !important;
}

.setting-item input:focus {
    outline: none;
    border-color: var(--primary-color) !important;
}

@media (max-width: 850px) {
    .settings-row-grid {
        flex-direction: column;
    }
}

/* --- Coal & Coke Analysis Hub Styles --- */
.hub-container {
    padding: 4rem 0;
    max-width: 1200px;
    margin: 0 auto;
}

.hub-header {
    text-align: center;
    margin-bottom: 4rem;
}

.hub-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color) 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.hub-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
    padding: 0 1rem;
}

.tool-card {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    padding: 2.5rem;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

.tool-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.15);
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-color);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tool-card:hover::before {
    opacity: 1;
}

.tool-icon {
    width: 60px;
    height: 60px;
    background: var(--input-focus-bg);
    color: var(--primary-color);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.tool-card:hover .tool-icon {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1) rotate(-5deg);
}

.tool-info h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.tool-info p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.tool-action {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tool-card:hover .tool-action i {
    transform: translateX(5px);
}

.tool-action i {
    transition: transform 0.3s ease;
}

@media (max-width: 768px) {
    .hub-header h1 {
        font-size: 2rem;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }
}