/* ============================================
   IndoHRM Login Page - Modern Design
   ============================================ */

/* --- Reset & Base --- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.5); }

*, *::before, *::after { box-sizing: border-box; }
a { text-decoration: none; }
h1, h2, h3, p { margin: 0; }
:focus { outline: none; }

html, body {
    height: 100%;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    font-weight: 400;
    color: #162033;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Background Overlay --- */
.login-body:before {
    content: '';
    position: fixed;
    top: 0; right: 0; bottom: 0; left: 0;
    background-image:
        radial-gradient(circle at top left, rgba(255,255,255,0.76), transparent 30%),
        linear-gradient(145deg, #eef3f8 0%, #dce6ef 48%, #d2dde8 100%);
    background-repeat: repeat;
}
.login-body-recruit:before {
    content: '';
    position: fixed;
    top: 0; right: 0; bottom: 0; left: 0;
    background-image: linear-gradient(135deg, #00ab66, rgba(192, 233, 248, 0.6), #00ab66);
}

.wrapper {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 22px;
}

/* --- Login Card Container --- */
.login-container {
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
}

.login-card {
    display: flex;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 24px;
    border: 1px solid rgba(22, 34, 51, 0.08);
    box-shadow: 0 18px 40px rgba(20, 32, 51, 0.08), 0 4px 12px rgba(20, 32, 51, 0.05);
    overflow: hidden;
    min-height: 540px;
}

/* --- Left: Branding --- */
.login-brand {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 50px 40px;
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0)),
        linear-gradient(160deg, #10283f 0%, #173651 52%, #214666 100%);
}
.brand-content {
    position: relative;
    z-index: 1;
    text-align: center;
}
.brand-eyebrow {
    margin-bottom: 18px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.58);
}
.brand-content img,
.brand-content .logo {
    max-width: 220px;
    min-width: 120px;
    margin-bottom: 24px;
    filter: drop-shadow(0 10px 22px rgba(0,0,0,0.16));
}
.brand-name {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.22);
    margin-bottom: 12px;
    line-height: 1.24;
    letter-spacing: -0.02em;
}
.brand-tagline {
    font-size: 14px;
    color: rgba(255,255,255,0.78);
    font-weight: 500;
    line-height: 1.65;
    max-width: 280px;
    margin: 0 auto;
}

/* Decorative circles */
.brand-decoration {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
}
.deco-circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.05;
}
.deco-1 {
    width: 220px; height: 220px;
    background: #fff;
    top: -72px; right: -60px;
}
.deco-2 {
    width: 120px; height: 120px;
    background: #fff;
    bottom: 38px; left: -42px;
}
.deco-3 {
    width: 96px; height: 96px;
    border: 2px solid rgba(255,255,255,0.22);
    bottom: -28px; right: 56px;
    opacity: 0.18;
}

/* --- Right: Form Area --- */
.login-form-area {
    flex: 1;
    padding: 54px 48px;
    background: linear-gradient(180deg, rgba(255,255,255,0.985), rgba(249,251,253,0.985));
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-form-shell {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding: 4px 0;
}

.login-kicker {
    margin-bottom: 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.3px;
    text-transform: uppercase;
    color: #526981;
}

.login-title {
    font-size: 32px;
    font-weight: 700;
    color: #142033;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}
.login-subtitle {
    font-size: 15px;
    color: #617183;
    margin-bottom: 34px;
    line-height: 1.55;
}

/* --- Form Fields --- */
.form-group {
    margin-bottom: 19px;
}
.field-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #32465d;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.7px;
}

.input-icon-wrap {
    position: relative;
}
.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #75879a;
    font-size: 14px;
    pointer-events: none;
    z-index: 1;
}
.form-control {
    display: block;
    width: 100%;
    height: 48px;
    padding: 11px 15px;
    font-size: 15px;
    color: #162033;
    background: #ffffff;
    border: 1px solid #d0d9e2;
    border-radius: 12px;
    transition: all 0.25s ease;
    line-height: 1.4;
    margin: 0;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
}
.form-control.with-icon {
    padding-left: 44px;
}
.form-control:focus {
    background: #ffffff;
    border-color: #7b95ae;
    box-shadow: 0 0 0 4px rgba(123, 149, 174, 0.14);
}
.form-control::placeholder,
.form-control::-webkit-input-placeholder {
    color: #8a99aa;
}
.form-control::-moz-placeholder {
    color: #8a99aa;
    opacity: 1;
}
.form-control:-ms-input-placeholder {
    color: #8a99aa;
}

/* Toggle password button */
.toggle-password {
    position: absolute;
    right: 13px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #7d8fa2;
    cursor: pointer;
    padding: 6px;
    font-size: 14px;
    z-index: 1;
    transition: color 0.2s;
}
.toggle-password:hover {
    color: #344860;
}

/* Remember me */
.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #4d6077;
    cursor: pointer;
    font-weight: 500;
}
.remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #1f78b4;
}

/* --- Errors --- */
input.error {
    border-color: #d86c6c !important;
    background: #fff5f5 !important;
}
input:read-only {
    cursor: not-allowed;
    background-color: rgba(255,255,255,0.05);
}
span.error, .errorSummary {
    color: #b64848;
    font-size: 12px;
    text-align: left;
    display: block;
    margin-top: 4px;
    font-weight: 600;
}
.errorSummary > p { display: none; }
.errorSummary > ul {
    margin: 6px 0;
    padding-left: 16px;
}
.errorSummary > ul > li { padding: 2px 0; }
span.required { color: #ff6b6b; }

/* --- Login Button --- */
.btn-login, a.btn-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 50px;
    padding: 0 20px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(180deg, #2c6a98 0%, #245a84 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 22px rgba(36, 90, 132, 0.18);
    margin-top: 4px;
    line-height: 1;
    letter-spacing: 0.01em;
}
.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(36, 90, 132, 0.24);
}
.btn-login:active {
    transform: translateY(0);
}
.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}
.form-group-submit {
    margin-bottom: 16px;
}

.login-microcopy {
    margin: -2px 0 16px;
    font-size: 12px;
    line-height: 1.55;
    color: #7a8796;
}

.btn-arrow {
    font-size: 13px;
    transition: transform 0.2s;
}
.btn-login:hover .btn-arrow {
    transform: translateX(3px);
}

/* --- Links --- */
.login-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-top: 2px;
}
a.login-link {
    font-size: 13px;
    color: #546b81;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}
a.login-link:hover {
    color: #223b55;
}

/* --- Job Seeker Section --- */
.divider {
    text-align: center;
    margin: 24px 0 16px;
    position: relative;
}
.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0; right: 0;
    height: 1px;
    background: #dde6ed;
}
.divider span {
    position: relative;
    padding: 0 14px;
    background: transparent;
    font-size: 12px;
    color: #8291a0;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.jobseeker-text {
    text-align: center;
    font-size: 13px;
    color: #6a7988;
    margin-bottom: 12px;
}
.jobseeker-links {
    display: flex;
    gap: 10px;
}
.btn-outline, a.btn-outline {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 13px;
    color: #476076;
    background: #f7f9fb;
    border: 1px solid #d8e1e8;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}
.btn-outline:hover, a.btn-outline:hover {
    background: #edf2f6;
    border-color: #bac8d4;
    color: #2c445d;
}

/* --- CAPTCHA --- */
.captcha-group .captcha-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.captcha-group #img-captcha {
    border-radius: 6px;
    float: none;
}
.btn-captcha-refresh {
    font-size: 16px;
    color: #536b84;
    background: #f5f8fb;
    border: 1px solid #d3dde6;
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-captcha-refresh:hover {
    background: #edf3f8;
    color: #2d455e;
}

/* --- Alert Box --- */
.alert {
    padding: 14px 16px;
    margin-bottom: 20px;
    border: none;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
}
.alert-danger {
    color: #8a3030;
    background-color: #fdf0f0;
    border: 1px solid #ebc2c2;
}
.alert-success {
    background-color: #eef7f2;
    color: #306f4d;
    border: 1px solid #bad9c8;
}
.alert-dismissible .close {
    position: relative;
    top: -2px;
    right: -4px;
    float: right;
    font-size: 18px;
    font-weight: 700;
    color: inherit;
    opacity: 0.6;
    padding: 0;
    cursor: pointer;
    background: none;
    border: 0;
}

/* --- Footer --- */
.login-footer {
    text-align: center;
    margin-top: 22px;
    color: rgba(22, 32, 51, 0.62);
    font-size: 12px;
    letter-spacing: 0.02em;
}

/* --- Logo/Image Overrides --- */
.login-brand img,
.brand-content img {
    margin-top: 0;
    width: auto;
}
.logo {
    min-width: 120px;
    max-width: 220px;
    margin-bottom: 20px;
    margin-top: 0;
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet & below */
@media (max-width: 768px) {
    .wrapper {
        padding: 18px;
        align-items: flex-start;
        padding-top: 30px;
    }
    .login-card {
        flex-direction: column;
        min-height: auto;
    }
    .login-brand {
        padding: 30px 25px 20px;
    }
    .brand-content img,
    .brand-content .logo {
        max-width: 140px;
    }
    .brand-name {
        font-size: 22px;
    }
    .brand-tagline {
        font-size: 13px;
    }
    .brand-eyebrow {
        margin-bottom: 14px;
    }
    .login-form-area {
        padding: 30px 25px;
    }
    .login-form-shell {
        max-width: 100%;
    }
    .login-title {
        font-size: 27px;
    }
    .deco-1 { width: 120px; height: 120px; }
    .deco-2 { width: 80px; height: 80px; }
}

/* Phone */
@media (max-width: 480px) {
    .wrapper {
        padding: 10px;
        padding-top: 15px;
    }
    .login-card {
        border-radius: 16px;
    }
    .login-brand {
        padding: 25px 20px 15px;
    }
    .brand-content img,
    .brand-content .logo {
        max-width: 100px;
    }
    .brand-name {
        font-size: 19px;
    }
    .brand-eyebrow {
        font-size: 10px;
    }
    .login-form-area {
        padding: 25px 20px;
    }
    .login-title {
        font-size: 24px;
    }
    .login-subtitle {
        font-size: 14px;
        margin-bottom: 26px;
    }
    .form-control {
        height: 44px;
    }
    .btn-login {
        height: 46px;
        font-size: 14px;
    }
    .jobseeker-links {
        flex-direction: column;
    }
}

/* Large screens */
@media (min-width: 1200px) {
    .login-card {
        max-width: 960px;
    }
    .login-brand {
        flex: 1.1;
    }
}

/* Hidden helpers */
.hidden-xs { display: block; }
.hidden-sm { display: block; }
@media (max-width: 480px) { .hidden-xs { display: none; } }
@media (max-width: 768px) { .hidden-sm { display: none; } }

/* Form-vertical compat (Yii widget wraps form in this) */
.form-vertical {
    width: 100%;
    display: block;
    margin: 0;
}

/* Text helpers */
.text-center { text-align: center; }
.clearfix { display: block; content: ""; clear: both; }
.mb-3 { clear: both; content: ''; margin-bottom: 10px; }
.mt-0 { margin-top: 0 !important; }
.no-margin { margin: 0; }
.description { padding: 5px 0; font-size: 14px; }

/* Backwards compat: old classes that may be referenced elsewhere */
.btn-resend { background-color: #37b137 !important; }
a.link {
    font-size: 13px;
    color: #546b82;
}
a.link:active, a.link:hover, a.link:focus {
    color: #273f58;
}
