:root {
    --yellow: #FEBF00;
    --red: #E20015;
    --blue: #003E81;
    --black: #000000;
    --gray1: #d9d9d9;
    --gray2: #e6e6e6;
    --gray3: #f1f1f1;
    --pass: #afa;
    --fail: #f77;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
}

#header {
    background: #FEBF00 url(polytec_logo.png) no-repeat;
    background-position-x: 0%;
    background-position-y: 0%;
    background-position: 10px;
    background-size: 250px;
    width: 100%;
    height: 90px;
    margin: auto;
    padding: 0;
    text-align: center;
    vertical-align: middle;
    line-height: 80px;
    font-size: var(--fontsize-title);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 100%;
}

.header-title {
    flex: 1;
    text-align: center;
    font-size: large;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
    line-height: normal;
}

.user-info {
    color: black;
}

.logout-btn {
    background-color: var(--blue);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.logout-btn:hover {
    background-color: var(--red);
}

/* CONTENT STYLING */
#content {
    max-width: 1200px;
    margin: 30px auto;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
}

#content h2 {
    color: var(--blue);
    font-size: 28px;
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 10px;
}

#content h3 {
    color: var(--blue);
    font-size: 20px;
    margin-top: 30px;
    margin-bottom: 15px;
}

#content p {
    line-height: 1.6;
    color: #333;
}

#content ul,
#content ol {
    line-height: 1.8;
    color: #333;
}

/* NAVIGATION MENU */
.main-nav {
    background-color: var(--gray2);
    display: flex;
    justify-content: flex-start;
    gap: 0;
    padding: 0 0 0 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid var(--gray1);
}

.nav-link {
    color: var(--blue);
    text-decoration: none;
    padding: 15px 30px;
    font-weight: bold;
    font-size: 16px;
    transition: background-color 0.3s;
    border-right: 1px solid var(--gray1);
    background: none;
}

.nav-link:last-child {
    border-right: none;
}

.nav-link:hover {
    background-color: var(--gray1);
    color: var(--red);
}

.nav-link.active {
    background-color: var(--gray1);
    border-bottom: 3px solid var(--yellow);
    color: var(--blue);
}

.btn {
    display: inline-block;
    background-color: var(--blue);
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    margin: 10px 5px;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: var(--red);
}

.login-btn {
    font-size: 16px;
    padding: 15px 30px;
}

.login-container {
    text-align: center;
    margin-top: 30px;
}

.actions {
    margin-top: 20px;
    text-align: center;
}

form {
    background-color: white;
    border: 2px solid var(--gray1);
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    max-width: 900px;
    margin: 0 auto 30px auto;
}

form p {
    font-size: 16px;
    color: var(--blue);
    margin-bottom: 20px;
    font-weight: 500;
}

/* FILE INPUT STYLING */
.file-input-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
    margin-bottom: 20px;
}

.file-input-wrapper input[type="file"] {
    position: absolute;
    left: -9999px;
}

.file-input-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px 20px;
    background-color: var(--gray3);
    border: 2px dashed var(--gray1);
    border-radius: 12px;
    cursor: pointer;
    color: var(--blue);
    font-weight: 500;
    text-align: center;
    min-height: 180px;
}

.file-input-label:hover {
    background-color: #f8f8f8;
    border-color: var(--blue);
    box-shadow: 0 4px 12px rgba(0, 62, 129, 0.1);
}

.file-input-label.has-file {
    background-color: #e8f4f8;
    border-color: var(--blue);
    border-style: solid;
    border-width: 3px;
}

.file-input-label.drag-over {
    background-color: #d0e8f0;
    border-color: var(--blue);
    border-style: solid;
    border-width: 3px;
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(0, 62, 129, 0.2);
}

.file-icon {
    font-size: 48px;
    line-height: 1;
    transition: transform 0.3s ease;
}

.file-input-label:hover .file-icon {
    transform: scale(1.1);
}

.file-input-label.drag-over .file-icon {
    transform: scale(1.2) rotate(5deg);
}

.file-input-text {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 16px;
}

.file-input-text strong {
    font-size: 18px;
    color: var(--blue);
}

.file-hint {
    font-size: 14px;
    color: #666;
    font-weight: normal;
}

.file-name {
    display: inline-block;
    color: var(--blue);
    font-weight: bold;
    margin-top: 10px;
    padding: 8px 16px;
    background-color: white;
    border-radius: 6px;
    border: 2px solid var(--blue);
    font-size: 14px;
}

/* SUBMIT BUTTON STYLING */
input[type="submit"],
button[type="submit"] {
    background-color: var(--blue);
    color: white;
    padding: 15px 40px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    box-shadow: 0 2px 4px rgba(0, 62, 129, 0.2);
}

input[type="submit"]:hover,
button[type="submit"]:hover {
    background-color: var(--red);
    box-shadow: 0 4px 8px rgba(226, 0, 21, 0.3);
    transform: translateY(-1px);
}

input[type="submit"]:active,
button[type="submit"]:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 62, 129, 0.2);
}


/* STATUS DISPLAY DURING PROCESSING */
#status {
    margin-top: 30px;
    padding: 20px;
    font-size: 16px;
    display: none;
    background-color: var(--gray3);
    border-radius: 8px;
    border: 2px solid var(--gray1);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

#status>.loader {
    display: block;
    position: relative;
    height: 14px;
    border: 0px solid var(--gray2);
    background-color: var(--gray2);
    border-radius: 10px;
    overflow: hidden;
}

#status>.loader::after {
    content: '';
    width: 40%;
    height: 100%;
    background-color: var(--blue);
    position: absolute;
    top: 0;
    left: 0;
    box-sizing: border-box;
    animation: animloader 1s alternate infinite;
}

#status_text {
    margin-top: 15px;
    color: var(--blue);
    font-weight: 500;
    text-align: center;
}

@keyframes animloader {
    0% {
        left: 0;
        transform: translateX(-100%);
    }

    100% {
        left: 100%;
        transform: translateX(0%);
    }
}

/* HISTORY TABLE STYLING */
.history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: white;
}

.history-table th,
.history-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--gray1);
}

.history-table th {
    background-color: var(--blue);
    color: white;
    font-weight: bold;
}

.history-table tr:hover {
    background-color: var(--gray3);
}

.history-table a.pdf_download {
    color: var(--blue);
    text-decoration: none;
    font-weight: bold;
}

.history-table a.pdf_download:hover {
    color: var(--red);
    text-decoration: underline;
}

.test-result-pass {
    color: #198754;
    font-weight: bold;
}

.test-result-fail {
    color: #c1121f;
    font-weight: bold;
}
