/* =========================
   RESET GENERAL
========================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* =========================
   LOGIN PAGE
========================= */
.login-page {
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #dfe9f3, #ffffff);
    position: relative;
    overflow-x: hidden;

    display: flex;
    align-items: center;
    justify-content: center;
}

.login-page::before,
.login-page::after {
    content: "";
    position: fixed;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
}

.login-page::before {
    background: #cce5ff;
    top: -120px;
    left: -120px;
}

.login-page::after {
    background: #f8d7da;
    bottom: -120px;
    right: -120px;
}

.login-box {
    width: 100%;
    max-width: 350px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    border: 1px solid #cccccc;
    padding: 25px;
    box-shadow: 2px 4px 15px rgba(0,0,0,0.1);
    border-radius: 8px;
    font-family: sans-serif;
}

.login-box h2 {
    text-align: center;
    margin-top: 0;
}

.login-box input[type="text"],
.login-box input[type="password"],
.login-box select {
    width: 100%;
    padding: 12px 14px;
    margin: 8px 0;
    display: block;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
}

.login-box input[type="submit"],
.login-box input[type="reset"] {
    width: 100%;
    background-color: #4CAF50;
    color: white;
    padding: 14px 20px;
    margin: 8px 0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.login-box input[type="submit"]:hover,
.login-box input[type="reset"]:hover {
    background-color: #45a049;
}

.login-box p {
    text-align: center;
    font-size: 13px;
    line-height: 1.4;
}

/* =========================
   ADEVERINTA BAC
========================= */
.adeverinta-app {
    font-family: "Times New Roman", serif;
    color: #000;
    padding: 15px;
    overflow-x: hidden;
}

.no-print {
    font-family: Arial, sans-serif;
    margin: 20px auto;
    text-align: center;
}

.search-box {
    background: #f5f5f5;
    padding: 18px;
    border: 1px solid #ddd;
    border-radius: 8px;
    width: 80%;
    margin: 0 auto 25px auto;
}

.search-box form {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.search-box input[type="text"] {
    width: 260px;
    max-width: 100%;
    padding: 10px;
    border: 1px solid #aaa;
    border-radius: 4px;
    font-size: 16px;
}

.search-box input[type="submit"],
.print-btn,
.logout-btn {
    padding: 10px 18px;
    border: none;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 15px;
}

.search-box input[type="submit"] {
    background: #4CAF50;
}

.print-btn {
    background: #2f6690;
}

.logout-btn {
    background: #b33939;
}

.page {
    width: 190mm;
    max-width: 100%;
    min-height: 270mm;
    margin: 20px auto;
    padding: 20mm;
    border: 1px solid #ccc;
    background: #fff;
}

.document-meta {
    font-size: 13px;
    text-align: left;
    margin-bottom: 35px;
}

.document-title {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    margin: 25px 0 35px 0;
    text-transform: uppercase;
}

.document-text {
    font-size: 17px;
    line-height: 1.6;
    text-align: justify;
    text-indent: 35px;
}

.section-title {
    margin-top: 30px;
    text-align: center;
    font-size: 16px;
    font-family: Arial, sans-serif;
    font-weight: bold;
}

.results {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-family: Arial, sans-serif;
    font-size: 11px;
}

.results th,
.results td {
    border: 1px solid #000;
    padding: 7px;
    text-align: center;
    vertical-align: middle;
    word-break: break-word;
}

.results th {
    background: #eeeeee;
    font-weight: bold;
}

.final-row {
    font-weight: bold;
    background: #f5f5f5;
}

.footer-text {
    margin-top: 30px;
    font-size: 16px;
    line-height: 1.5;
    text-align: justify;
}

.error-box {
    width: 80%;
    margin: 20px auto;
    padding: 15px;
    background: #ffe0e0;
    border: 1px solid #cc0000;
    color: #900;
    text-align: center;
}

/* =========================
   TOOLTIP INFO
========================= */
.info-tooltip {
    position: relative;
    display: inline-block;
    margin-left: 8px;
    cursor: pointer;
}

.info-tooltip .info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: #2f6690;
    color: #fff;
    border-radius: 50%;
    font-size: 13px;
    font-weight: bold;
    font-family: Arial, sans-serif;
}

.info-tooltip .info-text {
    visibility: hidden;
    opacity: 0;
    width: 260px;
    max-width: 80vw;
    background: #333;
    color: #fff;
    text-align: left;
    padding: 10px;
    border-radius: 6px;
    position: absolute;
    z-index: 999;
    left: 25px;
    top: -10px;
    font-size: 13px;
    line-height: 1.4;
    transition: opacity 0.3s;
}

.info-tooltip:hover .info-text {
    visibility: visible;
    opacity: 1;
}

/* =========================
   TELEFON
========================= */
@media screen and (max-width: 480px) {
    .login-page {
        padding: 12px;
        align-items: flex-start;
        padding-top: 40px;
    }

    .login-box {
        max-width: 100%;
        padding: 20px;
        border-radius: 10px;
    }

    .login-box h2 {
        font-size: 22px;
    }

    .adeverinta-app {
        padding: 8px;
    }

    .search-box {
        width: 100%;
        padding: 14px;
    }

    .search-box p {
        display: flex;
        gap: 8px;
        flex-direction: column;
    }

    .search-box input[type="text"],
    .search-box input[type="submit"],
    .print-btn,
    .logout-btn {
        width: 100%;
    }

    .page {
        width: 100%;
        min-height: auto;
        padding: 15px;
        margin: 10px auto;
    }

    .document-meta {
        font-size: 12px;
        margin-bottom: 20px;
    }

    .document-title {
        font-size: 22px;
        margin: 20px 0;
    }

    .document-text {
        font-size: 15px;
        text-indent: 0;
        text-align: left;
    }

    .footer-text {
        font-size: 14px;
        text-align: left;
    }

    .results {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        font-size: 10px;
    }
}

/* =========================
   TABLETA
========================= */
@media screen and (min-width: 481px) and (max-width: 900px) {
    .login-box {
        max-width: 420px;
    }

    .search-box {
        width: 95%;
    }

    .page {
        width: 100%;
        padding: 25px;
        min-height: auto;
    }

    .document-text {
        font-size: 16px;
    }

    .results {
        font-size: 10px;
    }
}

/* =========================
   PRINT
========================= */
@media print {
    @page {
        size: auto;
        margin: 10mm;
    }

    .no-print,
    .info-tooltip {
        display: none !important;
    }

    .adeverinta-app {
        padding: 0;
        font-size: 12pt;
    }

    .page {
        width: auto;
        max-width: none;
        min-height: auto;
        margin: 0;
        padding: 0;
        border: none;
    }

    .document-title {
        margin-top: 20px;
    }

    .results {
        display: table;
        overflow: visible;
        white-space: normal;
        font-size: 9pt;
    }

    .results th,
    .results td {
        padding: 5px;
    }

    a[href]:after {
        content: none !important;
    }
}