body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: #f4f6f9;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.login-container {
    width: 100%;
    max-width: 520px;
    padding: 20px;
}

.login-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
    padding: 40px;
}

.logo {
    text-align: center;
    margin-bottom: 25px;
}

.logo img {
    max-width: 220px;
    height: auto;
}

h1 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
}

.portal-text {
    text-align: center;
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 30px;
}

.alert-danger {
    padding: 12px 16px;
    margin-bottom: 20px;
    border: 1px solid #f5c2c7;
    background-color: #f8d7da;
    color: #842029;
    border-radius: 6px;
}

.form-row {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.form-row label {
    width: 110px;
    font-weight: 600;
    color: #333;
}

.form-row input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
}

.form-row input:focus {
    outline: none;
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13,110,253,0.15);
}

.login-button {
    width: 100%;
    padding: 12px;
    margin-top: 15px;
    background: #0d6efd;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.login-button:hover {
    background: #0b5ed7;
}

.notice {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e5e5e5;
    color: #666;
    font-size: 0.85rem;
    line-height: 1.5;
}

.notice strong {
    color: #c0392b;
}
/* */
.page-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.table-wrapper {
    overflow-x: auto;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.users-table th,
.users-table td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
    text-align: left;
}

.users-table th {
    background: #f4f6f9;
    font-weight: 600;
}

.users-table tr:hover {
    background: #f8f9fa;
}

.action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn {
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.btn-primary {
    background: #0d6efd;
    color: white;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-success {
    background: #198754;
    color: white;
}

.badge {
	margin: 0 4px;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 12px;
}

.badge-admin {
    background: #198754;
    color: white;
}

.badge-user {
    background: #6c757d;
    color: white;
}
.badge-info {
    background: #00f;
    color: white;
}
@media (max-width: 768px) {

    .users-table thead {
        display: none;
    }

    .users-table,
    .users-table tbody,
    .users-table tr,
    .users-table td {
        display: block;
        width: 100%;
    }

    .users-table tr {
        margin-bottom: 20px;
        border: 1px solid #ddd;
        border-radius: 8px;
        padding: 10px;
        background: white;
    }

    .users-table td {
        border: none;
        display: flex;
        justify-content: space-between;
    }

    .users-table td::before {
        font-weight: bold;
        margin-right: 10px;
    }

    .users-table td:nth-child(1)::before {
        content: "Username";
    }

    .users-table td:nth-child(2)::before {
        content: "Last Login";
    }

    .users-table td:nth-child(3)::before {
        content: "Admin";
    }

    .users-table td:nth-child(4)::before {
        content: "Actions";
    }
}
.action-buttons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.delete-user-form {
    display: inline;
    margin: 0;
}

.btn-danger {
    border: none;
    cursor: pointer;
    color: #fff;
    background-color: #c62828;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
}

.btn-danger:hover {
    background-color: #a61f1f;
}

.form-wrapper {
    max-width: 650px;
    margin-top: 1.5rem;
}

.user-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    border: 0;
}

.form-group input[type="text"], .form-group  input[type="password"] {
    width: 100%;
    box-sizing: border-box;
    padding: 0.65rem;
    border: 1px solid #bdbdbd;
    border-radius: 4px;
    font: inherit;
}

.form-group input[readonly] {
    background-color: #f3f3f3;
    color: #555555;
}

.form-group legend {
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.form-help {
    color: #606060;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.is-invalid {
    border: 2px solid #c62828;
    background-color: #fff5f5;
}

.is-invalid:focus {
    border-color: #c62828;
    outline: none;
    box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.2);
}

.alert {
    max-width: 650px;
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    border-radius: 4px;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
}

.alert-error {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
}

.btn-primary {
    color: #ffffff;
    background-color: #1565c0;
}

.btn-primary:hover {
    background-color: #0d47a1;
}
/* Tooltip */
.tooltip-container {
    position: relative;
    display: inline-flex;
}

.tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    z-index: 1000;

    width: max-content;
    max-width: 240px;
    padding: 0.45rem 0.65rem;

    color: #ffffff;
    background-color: #333333;
    border-radius: 4px;

    font-size: 0.875rem;
    line-height: 1.3;
    text-align: center;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transform: translateX(-50%) translateY(4px);
    transition:
        opacity 150ms ease,
        transform 150ms ease,
        visibility 150ms ease;
}

.tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;

    border: 6px solid transparent;
    border-top-color: #333333;

    transform: translateX(-50%);
}

.tooltip-container:hover .tooltip,
.tooltip-container:focus-within .tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}