/* --- Modern sidebar navigation --- */
body {
    background: #f5f6f8;
    margin: 0;
    font-family: 'Segoe UI', 'Arial', sans-serif;
    color: #222;
    overflow-x: hidden;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}
:root {
    --sidebar-width: 400px;
    --content-max-width: 1400px;
}
.logo-container {
    display: flex;
    align-items: center;
    background: transparent;
    padding: 24px 0 8px 0;
    margin: 0 0 8px var(--sidebar-width);
    justify-content: center;
    width: calc(100vw - var(--sidebar-width));
    max-width: var(--content-max-width);
}
.logo {
    height: 1px;
    margin-left: 0;
}

.tabs {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    background: #e3e5e8;
    padding: 32px 0 32px 48px;
    min-width: 340px;
    min-height: 600px;
    border-radius: 0 32px 32px 0;
    box-shadow: 4px 0 32px 0 rgba(180,180,180,0.10);
    position: absolute;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 10;
}
.tool-report-card {
    max-width: 100%;
    margin: 0 auto;
    background: #f8f9fa;
    border-radius: 16px;
    padding: 28px 32px 36px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 12px 36px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.tool-panel-inner {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 14px;
    padding: 28px 32px;
    border: 1px solid #dbe3ec;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    gap: 22px;
}

#hypermill_pdf {
    width: 100%;
    max-width: 100%;
    margin: 0;
    display: block;
    padding: 32px 36px;
    font-size: 1.8rem;
    border: 3px dashed rgba(13, 110, 253, 0.5);
    border-radius: 18px;
    background: linear-gradient(135deg, #ffffff 0%, #f3f7ff 100%);
    color: #1c2a3a;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#hypermill_pdf:focus,
#hypermill_pdf:hover {
    border-color: #0d6efd;
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.2);
    outline: none;
}

#hypermill_pdf::file-selector-button,
#hypermill_pdf::-webkit-file-upload-button {
    padding: 24px 40px;
    margin-right: 24px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #0d6efd 0%, #4dabf7 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 1.4rem;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

#hypermill_pdf::file-selector-button:hover,
#hypermill_pdf::-webkit-file-upload-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(13, 110, 253, 0.28);
}

#hypermill_pdf::file-selector-button:active,
#hypermill_pdf::-webkit-file-upload-button:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.25);
}

.hypermill-file-box {
    padding: 22px 24px 26px;
    border: 2px solid #dbe3ec;
    border-radius: 18px;
    background: rgba(241, 245, 255, 0.65);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}


.tool-instruction-box {
    background: #fff3cd;
    border-left: 6px solid #ffc107;
    border-radius: 10px;
    padding: 18px 22px;
    color: #6c4f00;
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.22);
}

.tool-instruction-box ul {
    margin: 0;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.95rem;
}

.tab-button {
    display: flex;
    align-items: center;
    width: 260px;
    padding: 22px 32px;
    margin: 0 0 24px 0;
    font-size: 1.7rem;
    font-weight: 700;
    color: #222;
    background: linear-gradient(180deg, #f7f8fa 0%, #d3d5d8 100%);
    border: none;
    border-radius: 22px;
    box-shadow: 0 4px 18px 0 rgba(120,120,120,0.13), 0 1.5px 4px 0 rgba(0,0,0,0.10);
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s, color 0.15s, transform 0.08s;
    text-align: left;
    letter-spacing: 0.5px;
    outline: none;
    text-decoration: none !important;
    gap: 18px;
}

.tabs .tab-button {
    justify-content: center !important;
    text-align: center;
}

.tab-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6em;
    height: 1.6em;
    margin-right: 14px;
    vertical-align: middle;
}

.tab-icon img,
.tab-icon svg {
    width: 1.6em !important;
    height: 1.6em !important;
    display: block;
}
.tab-button:active, .tab-button:focus, .tab-button:hover {
    background: linear-gradient(180deg, #e3e5e8 0%, #bfc2c7 100%);
    color: #1976d2;
    box-shadow: 0 8px 32px 0 rgba(100, 149, 237, 0.18);
    transform: scale(1.04);
    text-decoration: none !important;
}
.tab-button:visited {
    color: #222;
    text-decoration: none !important;
}

/* --- Main content area --- */
.tab-content {
    margin-left: var(--sidebar-width);
    margin-top: 40px;
    background: #f7f8fa;
    border-radius: 18px;
    box-shadow: 0 8px 32px 0 rgba(180,180,180,0.10);
    padding: 48px 64px 64px 64px;
    min-width: 0;
    max-width: var(--content-max-width);
    min-height: 400px;
    width: calc(100vw - var(--sidebar-width));
}
.center-form {
    align-items: flex-start;
}
.center-form form {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 32px;
    width: 100%;
}
.center-form input[type="text"] {
    font-size: 2.5rem;
    padding: 24px 32px;
    border-radius: 10px;
    border: 1.5px solid #bfc2c7;
    margin-bottom: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    text-align: left;
    background: #f5f6f8;
    color: #232a31;
    font-weight: 500;
    box-shadow: 0 2px 8px 0 rgba(80, 80, 80, 0.06);
}
.center-form label {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #232a31;
}

/* --- Large action button with icon --- */
.action-button {
    font-size: 2.2rem;
    font-weight: bold;
    padding: 28px 60px 28px 60px;
    border-radius: 14px;
    background: linear-gradient(90deg, #bfc2c7 0%, #e3e5e8 100%);
    color: #232a31;
    border: none;
    box-shadow: 0 8px 32px 0 rgba(180,180,180,0.18), 0 2px 8px 0 rgba(180,180,180,0.12);
    cursor: pointer;
    margin-top: 18px;
    margin-bottom: 10px;
    letter-spacing: 1px;
    transition: background 0.2s, transform 0.1s, box-shadow 0.1s;
    outline: none;
    display: flex;
    align-items: center;
    gap: 18px;
    justify-content: center;
}
.action-button:before {
    content: "\1F4C4";
    font-size: 2.2rem;
    margin-right: 12px;
    display: inline-block;
    color: #1976d2;
}
.action-button:hover, .action-button:focus {
    background: linear-gradient(90deg, #d3d5d8 0%, #bfc2c7 100%);
    color: #1976d2;
    box-shadow: 0 12px 36px 0 rgba(100, 149, 237, 0.22), 0 4px 12px 0 rgba(180,180,180,0.16);
}

/* --- Responsive --- */
@media (max-width: 1200px) {
    .tab-content {
        margin-left: 0;
        min-width: 0;
        width: 100%;
        max-width: 100vw;
        padding: 32px 8vw 32px 8vw;
    }
}

@media (max-width: 900px) {
    .tab-content {
        padding: 24px 6vw 28px;
        max-width: 100vw;
    }

    .tool-report-card,
    .tool-panel-inner,
    .hypermill-file-box {
        padding: 20px;
    }

    .center-form input[type="text"],
    #hypermill_pdf {
        font-size: 1.4rem;
        padding: 16px 18px;
    }

    .action-button {
        font-size: 1.6rem;
        padding: 18px 26px;
        width: 100%;
    }
}

@media (max-width: 700px) {
    .logo-container {
        margin: 0 0 8px 0;
        width: 100%;
        max-width: none;
        padding: 16px 0 8px 0;
    }

    .tabs {
        flex-direction: column;
        align-items: stretch;
        padding: 16px 12px;
        position: static;
        height: auto;
        border-radius: 0;
        box-shadow: none;
        gap: 12px;
    }

    .tab-button {
        width: 100% !important;
        min-width: 0 !important;
        margin: 0;
    }

    #instructions-subnav {
        padding: 0 12px;
    }

    #instructions-subnav .tab-button {
        width: 100% !important;
        min-width: 0 !important;
    }
}

@media (max-width: 640px) {
    .tab-content {
        margin-top: 20px;
        padding: 20px 16px 24px;
        border-radius: 12px;
    }

    .center-form form {
        gap: 20px;
    }

    .tool-report-card,
    .tool-panel-inner,
    .hypermill-file-box {
        padding: 18px;
        border-radius: 12px;
    }

    #hypermill_pdf::file-selector-button,
    #hypermill_pdf::-webkit-file-upload-button {
        padding: 14px 18px;
        font-size: 1rem;
        margin-right: 12px;
    }

    .tool-list-modal {
        width: 100%;
        max-height: 90vh;
    }

    .tool-list-modal__body {
        padding: 16px;
    }

    .tool-list-form {
        grid-template-columns: 1fr;
    }
}

.tab-content table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
}

.tab-content table {
    display: block;
    overflow-x: auto;
}
