*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #f0f2f5;
    font-family: Arial, sans-serif;
    padding: 30px;
    display: flex;
    justify-content: center;
}

/* ===== Containers ====== */
.container {
    background-color: #ffffff;
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.container-sm { max-width: 500px; }
.container-md { max-width: 750px; }
.container-lg { max-width: 1000px; }

.container-center {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ===== Headers ====== */
h2 {
    text-align: center;
    color: #333;
    margin-bottom: 25px;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 20px;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.home-logo {
    height: 30px;
    width: auto;
    transition: opacity 0.2s;
}
.home-logo:hover { opacity: 0.8; }

.navbar-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
    font-size: 14px;
    color: #555;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    gap: 15px;
}

.search-box {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-box input[type="text"] {
    width: auto;
    min-width: 300px;
}

/* ===== Buttons and links ====== */
.btn {
    color: white;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    transition: background-color 0.2s ease-in-out;
}

.btn-sm {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
}

.btn-md {
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 15px;
}

.btn-lg {
    padding: 12px;
    border-radius: 8px;
    font-size: 16px;
    width: 100%;
    margin-top: 20px;
}

.btn-primary { background-color: #007bff; }
.btn-primary:hover { background-color: #0056b3; }

.btn-secondary { background-color: #6c757d; }
.btn-secondary:hover { background-color: #5a6268; }

.btn-success { background-color: #28a745; }
.btn-success:hover { background-color: #1e7e34; }

.btn-danger { background-color: #dc3545; }
.btn-danger:hover { background-color: #b02a37; }

.btn-swagger { background-color: #49cc90; }
.btn-swagger:hover { background-color: #3aa876; }

.btn-link {
    display: block;
    margin-top: 15px;
    text-align: center;
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
    background: none;
    border: none;
    padding: 0;
    width: 100%;
}
.btn-link:hover { text-decoration: underline; }

.action-link {
    font-size: 15px;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
}

.action-edit { color: #007bff; }
.action-edit:hover { text-decoration: underline; }

.action-delete { color: #c00; }
.action-delete:hover { text-decoration: underline; }

/* =====  Forms and inputs ====== */
label {
    display: block;
    margin-top: 15px;
    margin-bottom: 5px;
    color: #555;
    text-align: left;
}

input[type="text"],
input[type="password"],
.multiselect-btn {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
    box-sizing: border-box;
    font-size: 15px;
    background: white;
    color: #333;
}

input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.2);
    cursor: pointer;
}

/* ===== Tables ====== */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #f0f2f5;
    color: #333;
}

tr:hover { background-color: #f9f9f9; }

.import-table { width: 100%; }

.import-table td:nth-child(1) { overflow-wrap: anywhere; }

.import-table td:nth-child(2) {
    min-width: 150px;
    width: 350px;
    overflow-wrap: anywhere;
    font-family: monospace;
}

.import-table td:nth-child(3) {
    width: 1%;
    white-space: nowrap;
}

.import-table form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.password-input {
    padding: 6px;
    border-radius: 6px;
    border: 1px solid #ccc;
    width: 150px;
    min-width: 120px;
}

/* ===== Pagination ====== */
.pagination {
    margin-top: 20px;
    text-align: center;
}

.pagination-info {
    margin-bottom: 12px;
    color: #555;
}

.pagination-links a {
    margin: 0 10px;
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
}
.pagination-links a:hover { text-decoration: underline; }

/* ===== Messages ====== */
.message-success {
    color: #28a745;
    text-align: center;
    font-size: 14px;
}

.message-error {
    border-left: 4px solid #c00;
    background-color: #ffe5e5;
    padding: 16px 18px;
    border-radius: 8px;
    color: #661111;
    margin-bottom: 25px;
    text-align: center;
    font-size: 14px;
}

/* ===== Home page ====== */
.logo-img {
    width: 120px;
    height: auto;
    margin-bottom: 25px;
    animation: fadeIn 1s ease-in;
}

.main-title {
    color: #1e3050;
    font-size: 2.5rem;
}

.main-subtitle {
    color: #7f8c8d;
    font-size: 1.1rem;
    font-weight: 300;
    margin: 10px 0 40px 0;
    letter-spacing: 1px;
    text-transform: uppercase;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== Other ====== */
.multiselect {
    position: relative;
    width: 100%;
}

.multiselect-btn {
    cursor: pointer;
    text-align: left;
}

.multiselect-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    margin-top: 5px;
    padding: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    max-height: 180px;
    overflow-y: auto;
    display: none;
    z-index: 10;
}

.multiselect.open .multiselect-options { display: block; }

.multiselect-options label {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    cursor: pointer;
    margin-top: 0;
}

.error-page-links {
    display: flex;
    justify-content: center;
    gap: 30px;
}
