* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: 
        linear-gradient(135deg, rgba(15, 23, 42, 0.40) 0%, rgba(15, 23, 42, 0.55) 100%),
        url('/assets/images/login-bg.jpg') no-repeat center center fixed;
    background-size: cover;
    color: #1e293b;
    position: relative;
}

/* --- WebGL DotGrid Canvas Background --- */
.dot-grid {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    pointer-events: auto;
    opacity: 0.35;
}

.dot-grid__canvas {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
}

/* --- Middle Card (Slightly Curved Box with Dual-Brand Accent) --- */
.login-card {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    padding: 38px 32px 28px 32px;
    border-radius: 14px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45), 0 4px 14px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.95);
    overflow: hidden;
    text-align: center;
    animation: fadeInCard 0.4s ease-out;
}

/* Balanced Top Accent Bar: Emerald Green to Signature Orange */
.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #20b784 0%, #20b784 62%, #f7941e 100%);
}

@keyframes fadeInCard {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Company Logo Header */
.login-brand-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 16px;
}

.company-logo {
    max-width: 225px;
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(4, 7, 7, 0.05));
    transition: transform 0.2s ease;
}

.company-logo:hover {
    transform: scale(1.02);
}

/* System Title & Subtitle Typography */
.login-header-text {
    margin-bottom: 22px;
    text-align: center;
}

.login-system-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #040707;
    letter-spacing: -0.015em;
    line-height: 1.35;
    margin-bottom: 6px;
}

.login-subtitle {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
    line-height: 1.4;
}

/* Heading (Legacy / Fallback) */
.login-title {
    font-size: 1.55rem;
    font-weight: 700;
    color: #040707;
    letter-spacing: -0.01em;
    margin-bottom: 24px;
}

/* Form */
.login-form {
    text-align: left;
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    color: #58585a;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

/* --- Form Inputs (The Fill-Blank Zone: Clearly defined & high-contrast) --- */
.form-input {
    width: 100%;
    padding: 11px 14px;
    background: #f8fafc; /* Distinct fill-blank zone tint avoiding flat white-on-white */
    border: 1.5px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.925rem;
    color: #040707;
    outline: none;
    caret-color: #20b784; /* Highly visible brand green insertion caret */
    cursor: text; /* Normal standard cursor */
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

select.form-input {
    cursor: pointer;
}

.form-input-readonly,
.form-input:read-only {
    background: #f1f5f9;
    color: #475569;
    font-weight: 600;
    cursor: default;
    border-color: #e2e8f0;
}

.form-input-readonly:hover,
.form-input:read-only:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.form-input-readonly:focus,
.form-input:read-only:focus {
    background: #f1f5f9;
    border-color: #cbd5e1;
    box-shadow: none;
}

.form-hint {
    font-size: 0.72rem;
    color: #64748b;
    margin-top: 4px;
    display: block;
}

.form-input:hover {
    background: #ffffff;
    border-color: #20b784;
}

.form-input:focus {
    background: #ffffff;
    border-color: #20b784;
    box-shadow: 0 0 0 3.5px rgba(32, 183, 132, 0.2);
}

/* Password Input with Toggle View/Hide Button */
.password-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.password-input-wrap .form-input {
    padding-right: 42px; /* Prevent entered password from overlapping the eye button */
}

.btn-toggle-password {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: color 0.15s ease, background-color 0.15s ease;
    z-index: 2;
}

.btn-toggle-password:hover {
    color: #20b784;
    background-color: rgba(32, 183, 132, 0.1);
}

.btn-toggle-password:focus-visible {
    outline: 2px solid #20b784;
}

.btn-toggle-password .eye-icon {
    pointer-events: none;
    display: block;
}

.form-row-link {
    display: flex;
    justify-content: flex-end;
    margin-top: 6px;
    margin-bottom: 20px;
}

.forgot-link {
    font-size: 0.775rem;
    color: #20b784;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s ease;
}

.forgot-link:hover {
    color: #f7941e;
    text-decoration: underline;
}

/* Primary Brand Button (Balanced Inetcare Emerald Gradient with hover feedback) */
.btn-login {
    display: block;
    width: 100%;
    padding: 12px 16px;
    background: linear-gradient(135deg, #20b784 0%, #169b6e 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.875rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(32, 183, 132, 0.32);
    transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.btn-login:hover {
    background: linear-gradient(135deg, #1aa476 0%, #12875f 100%);
    box-shadow: 0 6px 18px rgba(32, 183, 132, 0.42);
}

.btn-login:active {
    transform: scale(0.99);
}

/* Footer Link */
.login-footer-text {
    margin-top: 20px;
    font-size: 0.775rem;
    color: #58585a;
    text-align: center;
}

.login-footer-text a {
    color: #20b784;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s ease;
}

.login-footer-text a:hover {
    color: #f7941e;
    text-decoration: underline;
}

/* Alert Message */
.alert {
    background: #fef2f2;
    border: 1px solid #fee2e2;
    color: #991b1b;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-bottom: 16px;
    text-align: left;
    line-height: 1.4;
}

.alert-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

/* Register Card slight width tweak */
.register-card {
    max-width: 430px;
    padding: 32px 32px 26px 32px;
}
