* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    background-color: #dfe6ec;
    overflow-x: hidden;
}

.full-width-table {
    width: 95%;
    margin: 0 auto;
}

.login-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(to bottom, #e9eef3, #dfe6ec);
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: linear-gradient(to bottom, #e9eef3, #dfe6ec);
    color: #2c3e50;
}

/* NAVBAR */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background-color: #ffffff;
    border-bottom: 1px solid #ccc;
}

.logo {
    width: 120px;
    margin-right: 30px;
}

.brand {
    font-size: 22px;
    font-weight: bold;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-right {
    display: flex;
    align-items: center;
}

.nav-link {
    margin-right: 20px;
    text-decoration: none;
    color: #2c3e50;
}

.user-box {
    background: #f1f3f5;
    padding: 8px 15px;
    border-radius: 20px;
}

/* MAIN */
.container {
    padding: 40px;
    text-align: center;
}

.welcome {
    margin-bottom: 10px;
}

.total {
    float: right;
    margin-top: -40px;
}

/* TOOL CARDS */
.tool-container {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 20px;
    margin-bottom: 50px;
}

.tool-card {
    background: white;
    padding: 25px;
    width: 280px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 480px;
}

/* make text take space */
.tool-card p {
    flex-grow: 1;
}

/* 🔥 IMPORTANT: push button down */
.tool-card a {
    margin-top: auto;
}

/* hover keep same */
.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.tool-icon {
    width: 250px;
    height: 250px;
    object-fit: contain;
    margin-bottom: 15px;
}

/* 🔥 FULL WIDTH BUTTON */
.tool-btn {
    background: #2d89ef;
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
}

.tool-btn:hover {
    background: #1b5fbf;
}

/* ACTIVITY */
.activity-box {
    width: 100%;
    padding: 0 40px;   /* same spacing as dashboard */
    margin-top: 20px;
}

.activity-box h3 {
    text-align: left;
    margin-bottom: 10px;
}

.page-btn.active-page {
    background: #2d89ef;
    color: white;

    width: 35px;
    height: 35px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%; /* 🔥 makes it circle */
    font-weight: bold;
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.modern-table th {
    background: #f1f3f5;
    padding: 14px;
    text-align: center;
    font-weight: bold;
}

.modern-table td {
    padding: 14px;
    border-top: 1px solid #ddd;
    text-align: center;
}

.modern-table tr:hover {
    background: #f9fbfd;
}

.history-link {
    display: block;
    text-align: left;
    margin-top: 10px;
    color: #000000;
    text-decoration: underline;
    cursor: pointer;
    font-size: 14px;
}

/* PROFILE DROPDOWN */
.profile-dropdown {
    position: relative;
    display: inline-block;
}

/* make hover area bigger */
.profile-dropdown::after {
    content: "";
    position: absolute;
    top: 100%;
    right: 0;
    width: 100%;
    height: 15px; /* invisible bridge */
}

/* user button */
.user-box {
    background: #f1f3f5;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
}

/* dropdown */
.dropdown-menu {
    position: absolute;
    right: 0;
    top: 100%; /* attach directly */
    margin-top: 5px; /* small gap */
    background: white;
    min-width: 140px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    border-radius: 8px;
    overflow: hidden;
    z-index: 1000;

    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    transition: 0.2s ease;
}

/* show smoothly */
.profile-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* TOOLS DROPDOWN */
.tools-dropdown {
    position: relative;
    display: inline-block;
    padding: 0;
}

.tools-menu {
    position: absolute;
    top: 100%;
    left: 0;

    background: white;

    width: max-content; /* 🔥 FIX WIDTH EXACTLY */
    padding: 0;

    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);

    overflow: hidden;

    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    transition: 0.2s ease;
}

/* show */
.tools-dropdown:hover .tools-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* items */
.tools-menu a {
    display: block;

    padding: 14px 25px; /* 🔥 symmetric spacing */

    white-space: nowrap;
    color: #2c3e50;
    text-decoration: none;
}

/* hover */
.tools-menu a:hover {
    background: #f1f3f5;
}

/* items */
.dropdown-menu a {
    display: block;
    width: 100%;
    white-space: nowrap;
    padding: 12px 15px;
    text-decoration: none;
    color: #2c3e50;
}

.dropdown-menu a:hover {
    background: #f1f3f5;
}

.total-scan-nav {
    margin-right: 25px;
    font-weight: bold;
    font-size: 16px;
    color: #2c3e50;
}

/* LOGIN PAGE */
/* .login-body {
    background: linear-gradient(to bottom, #e9eef3, #dfe6ec);
    font-family: Arial, sans-serif;
} */

/* logo */
.login-logo {
    text-align: center;
    margin-top: 60px;
}

.login-logo img {
    width: 120px;
}

/* container */
.login-container {
    width: 350px;
    margin: 30px auto;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    text-align: center;
}

/* title */
.login-container h2 {
    margin-bottom: 5px;
}

.login-container input:focus {
    outline: none;
    border-color: #4a6cf7;
    box-shadow: 0 0 5px rgba(74,108,247,0.3);
}

.subtitle {
    font-size: 14px;
    color: #777;
    margin-bottom: 20px;
}

/* inputs */
.login-container input {
    width: 85%;              /* smaller */
    padding: 12px;
    margin: 10px auto;       /* center */
    display: block;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 14px;
}

/* button */
.login-btn {
    width: 85%;
    padding: 12px;
    background: linear-gradient(to right, #4a6cf7, #6a5af9);
    border: none;
    color: white;
    border-radius: 8px;
    margin-top: 10px;
    cursor: pointer;
    font-size: 15px;
    margin: 15px auto;
    display: block;
}

.login-btn:hover {
    opacity: 0.9;
}

/* register text */
.register-text {
    margin-top: 15px;
    font-size: 14px;
}

.register-text a {
    color: #4a6cf7;
    text-decoration: none;
}

/* PAGE CONTAINER */
.checker-container {
    width: 500px;
    margin-top: 20px;
    margin: 30px auto;
    text-align: center;
}

.history-container {
    width: 100%;
    margin-top: 50px;
}

/* TITLE */
.checker-title {
    margin-bottom: 20px;
    letter-spacing: 1px;
}

/* INPUT */
.checker-container input {
    width: 80%;
    padding: 12px;
    margin: 10px auto;
    display: block;
    border-radius: 8px;
    border: 1px solid #ccc;
}

/* BUTTON */
.main-btn {
    width: 80%;
    padding: 12px;
    margin-top: 10px;
    background: linear-gradient(to right, #4a6cf7, #6a5af9);
    border: none;
    color: white;
    border-radius: 8px;
    cursor: pointer;
}

/* RESULT */
.result-box {
    margin-top: 20px;
}

/* BAR */
.bar {
    width: 80%;
    height: 10px;
    background: #ddd;
    margin: 10px auto;
    border-radius: 5px;
}

.bar-fill {
    height: 10px;
    transition: width 0.5s ease-in-out;
}

/* WHY BOX */
.why-box {
    background: #f1f3f5;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    text-align: left;
}

/* GENERATOR */
.generator-box {
    margin-top: 30px;
}

/* COPY BUTTON */
.copy-btn {
    margin-top: 10px;
    padding: 8px 15px;
    background: #2d89ef;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

/* COPY MESSAGE */
.copy-msg {
    margin-top: 10px;
    color: green;
}

/* ERROR */
.error-msg {
    color: red;
    font-weight: bold;
}

/* TITLE LINE */
.title-line {
    width: 90%;
    height: 3px;
    background: #2c3e50;
    margin: 10px auto;
}

.title-container {
    width: 100%;
    text-align: center;
}

/* BACK BUTTON */
.back-btn {
    width: 100%;
    text-align: left;   /* 🔥 force left */
    margin-top: 15px;
    padding-left: 60px; /* same spacing as header */
}

.back-btn a {
    text-decoration: none;
    color: #2c3e50;
    font-size: 14px;
}

.back-btn a:hover {
    text-decoration: underline;
}

/* COLOR SYSTEM */
.weak {
    color: red;
}

.medium {
    color: orange;
}

.strong {
    color: green;
}

/* BAR */
.bar {
    width: 80%;
    height: 12px;
    background: #ddd;
    margin: 10px auto;
    border-radius: 6px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    transition: width 0.5s ease-in-out;
}

/* BAR COLORS */
.weak-bar {
    background: red;
}

.medium-bar {
    background: orange;
}

.strong-bar {
    background: green;
}

.inline-form {
    margin: 0;
}

.input-label {
    display: block;
    text-align: left;
    width: 80%;
    margin: 20px auto 5px auto;
    font-weight: bold;
}

/* PAGINATION */
.pagination {
    margin-top: 20px;
    text-align: center;
}

.pagination a {
    margin: 0 10px;
    text-decoration: none;
    color: #2d89ef;
    font-weight: bold;
}

.page-number {
    font-weight: bold;
}

/* CENTER DOWNLOAD */
.download-center {
    text-align: center;
    margin-top: 20px;
}

.page-info {
    width: 100%;
    padding: 0 60px;
    margin: 25px 0 5px 0;   /* more space from title, closer to table */
    text-align: left;
    font-size: 14px;
}

.page-btn {
    background: transparent;
    border: none;
}

.page-btn:hover {
    text-decoration: underline;
}

/* DELETE BUTTON */
.delete-btn {
    background-color: #e74c3c;
    border: none;
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
}

.delete-btn:hover {
    background-color: #c0392b;
}

/* DELETE ALL BUTTON */
.delete-all-btn {
    background-color: #e74c3c;
    border: none;
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
}

.delete-all-btn:hover {
    background-color: #922b21;
}

/* ACTION BUTTONS ALIGN */
.history-actions {
    display: flex;
    justify-content: center;
    align-items: center;   /* 🔥 THIS FIXES LEVEL */
    gap: 20px;
    margin-top: 20px;
}

.history-table-wrapper {
    width: 100%;
}

.action-btn {
    display: flex;              /* 🔥 IMPORTANT */
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    height: 44px;              /* 🔥 SAME HEIGHT */
    border-radius: 8px;
    font-size: 14px;
    color: white;
    border: none;
    cursor: pointer;
}
/* TOAST */
#toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #2ecc71;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    opacity: 0;
    transition: 0.3s;
}

#toast.show {
    opacity: 1;
}

.download-btn {
    background: #3498db;
    text-decoration: none; /* remove underline */
}

.download-btn:hover {
    background: #3498dbb9;
}

/* FULL PAGE CENTER */
.error-page {
    height: 100vh;
    margin: 0;
    display: flex;
    justify-content: center;   /* center horizontally */
    align-items: center;       /* center vertically */
    background: #dfe6ec;
    overflow: hidden;
}

/* STACK IMAGE + BUTTON */
.error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* IMAGE FIX */
.error-img {
    width: 350px;
    max-width: 80%;
    display: block;
    margin-bottom: 20px;
}

/* BUTTON FIX */
.error-btn {
    display: inline-block;
    padding: 12px 25px;
    background: #3498db;
    color: white;
    text-decoration: none;   /* ❌ remove underline */
    border-radius: 8px;
    font-size: 14px;
}

/* HOVER */
.error-btn:hover {
    background: #2c80b4;
}

/* ABOUT PAGE */
.about-intro {
    width: 65%;
    margin: 30px auto;
    text-align: center;
    font-size: 17px;   /* 🔥 bigger */
    line-height: 1.7;  /* 🔥 more readable */
}

.about-row {
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #ccc;
    padding-bottom: 40px;
    gap: 60px;
    margin: 60px auto;
    width: 75%;
}

.about-row:last-child {
    border-bottom: none;
}

.about-row.reverse {
    flex-direction: row-reverse;
}

.about-img {
    width: 180px;
}

.about-text {
    max-width: 450px;
    text-align: left;
    font-size: 16px;
    line-height: 1.7;
}

.about-text h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

/* FOOTER */
.footer {
    background: #ffffff; /* 🔥 white like header */
    color: #2c3e50;
    margin-top: 30px;
    padding: 20px 20px;
    border-top: 1px solid #ccc;
}

.footer-container {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
}

.footer-col {
    max-width: 250px;
}

.footer-logo {
    width: 150px;
    margin-bottom: 10px;
}

.footer-col a {
    display: block;
    color: #2c3e50;
    text-decoration: none;
    margin: 8px 0;
}

.footer-col a:hover {
    text-decoration: underline;
}

.footer-col h4 {
    margin-bottom: 8px;
}

.footer-bottom {
    text-align: center;
    margin-top: 25px;
    font-size: 14px;
}

/* POPUP */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    background: rgba(0,0,0,0.4);

    display: flex;
    justify-content: center;
    align-items: center;
}

.popup-box {
    background: white;
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    width: 300px;
}

.popup-box button {
    margin-top: 15px;
    padding: 8px 20px;
    background: #2d89ef;
    color: white;
    border: none;
    border-radius: 6px;
}