body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background: #f4f6f8;
    color: #1f2d3d;
}

.container {
    max-width: 960px;
    margin: 40px auto;
    padding: 0 20px 30px 20px;
    box-sizing: border-box;
}

.login-box,
.topbar,
.line {
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    box-sizing: border-box;
}

.login-box {
    max-width: 420px;
    margin: 40px auto;
    padding: 35px;
    border-top: 5px solid #1f4e79;
    text-align: center;
}

.topbar {
    border-top: 5px solid #1f4e79;
    padding: 24px 28px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.topbar h2 {
    margin: 0 0 6px 0;
    font-size: 28px;
    color: #1f2d3d;
}

.topbar h3 {
    margin: 0;
    font-size: 18px;
    color: #777;
    font-weight: normal;
}

.topbar a,
.login-box a,
.container a {
    color: #1f4e79;
    text-decoration: none;
    font-weight: bold;
}

.topbar a:hover,
.login-box a:hover,
.container a:hover {
    text-decoration: underline;
}

.line {
    padding: 24px;
    margin-bottom: 20px;
    border-left: 5px solid #1f4e79;
}

.line h4 {
    margin: 0 0 18px 0;
    font-size: 20px;
    color: #1f2d3d;
}

.line-row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

input[type="text"],
input[type="password"],
input[type="email"] {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    box-sizing: border-box;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    outline: none;
    background: #fafafa;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.line-row input[type="text"] {
    flex: 1;
    min-width: 240px;
}

.login-box input[type="text"],
.login-box input[type="password"],
.login-box input[type="email"] {
    margin-bottom: 18px;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus {
    border-color: #4a90e2;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.12);
}

button {
    border: none;
    background: #1f4e79;
    color: white;
    padding: 12px 18px;
    font-size: 15px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}

button:hover {
    background: #163a59;
}

button:active {
    transform: translateY(1px);
}

.login-box button {
    width: 100%;
    font-size: 16px;
}

.status {
    margin-top: 14px;
    display: inline-block;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: bold;
}

.status.active {
    background: #e8f7ed;
    color: #1f7a3f;
}

.status.inactive {
    background: #f3f4f6;
    color: #777;
}

.message {
    margin-top: 12px;
    font-size: 14px;
    color: #555;
    min-height: 18px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 54px;
    height: 30px;
}

.switch input {
    display: none;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #cbd5e1;
    border-radius: 999px;
    transition: 0.25s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    top: 4px;
    background: white;
    border-radius: 50%;
    transition: 0.25s;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

input:checked + .slider {
    background: #1f4e79;
}

input:checked + .slider:before {
    transform: translateX(24px);
}

/* Login page branding */
.logo-wrap {
    margin-bottom: 18px;
}

.logo-wrap.center {
    text-align: center;
    margin: 0 0 18px 0;
}

.portal-logo {
    max-width: 160px;
    height: auto;
    display: inline-block;
    border-radius: 6px;
}

.brand-title {
    font-size: 30px;
    font-weight: bold;
    color: #1f2d3d;
    margin: 0 0 12px 0;
    text-align: center;
}

.portal-title,
.portal-subtitle {
    text-align: center;
    color: #777;
    font-size: 18px;
    font-weight: normal;
    margin: 0 0 28px 0;
}

.login-box p {
    margin-top: 16px;
    margin-bottom: 0;
    text-align: center;
}

.portal-section-title {
    margin: 30px 0 18px 0;
    font-size: 22px;
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.footer-note {
    text-align: center;
    margin-top: 18px;
    font-size: 12px;
    color: #999;
}

@media (max-width: 700px) {
    .container {
        margin: 20px auto;
        padding: 0 14px 20px 14px;
    }

    .login-box {
        margin: 20px auto;
        padding: 28px 20px;
    }

    .topbar {
        padding: 20px;
        align-items: flex-start;
    }

    .topbar h2 {
        font-size: 22px;
    }

    .topbar h3 {
        font-size: 16px;
    }

    .line {
        padding: 20px;
    }

    .line-row {
        align-items: stretch;
    }

    .line-row input[type="text"] {
        width: 100%;
        min-width: 100%;
    }

    .line-row button {
        width: 100%;
    }
}

