/**
 * Observer public login only (observer/index.php).
 * Self-contained: do not depend on root style.css or observer_style.css.
 */

*, *::before, *::after {
    box-sizing: border-box;
}

body.observer-login-page {
    margin: 0;
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #2c3e50;
    background: #f1f5f9;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 16px;
}

body.observer-login-page .obs-login-wrap {
    width: 100%;
    max-width: 450px;
}

body.observer-login-page .obs-login-card {
    width: 100%;
    padding: 48px 36px 40px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
    border-top: 4px solid #3498db;
}

body.observer-login-page .obs-login-brand img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto 16px;
}

/* Role strip — explicit “button” look; links must not look like default <a> */
body.observer-login-page .obs-login-role-hint {
    text-align: center;
    font-size: 12px;
    color: #64748b;
    margin: 0 0 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

body.observer-login-page .obs-login-role-switcher {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    width: 100%;
    margin: 0 0 1.5rem;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    background: #f1f5f9;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

body.observer-login-page .obs-login-role-switcher > a,
body.observer-login-page .obs-login-role-switcher > .obs-role-active {
    flex: 1 1 0;
    min-width: 0;
    margin: 0;
    padding: 12px 8px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none !important;
    border: none;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    box-sizing: border-box;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

body.observer-login-page .obs-login-role-switcher > a {
    color: #475569 !important;
    background: #f8fafc;
    transition: background 0.15s ease, color 0.15s ease;
}

body.observer-login-page .obs-login-role-switcher > a:hover {
    background: #e2e8f0;
    color: #0f172a !important;
}

body.observer-login-page .obs-login-role-switcher > a:focus-visible {
    outline: 2px solid #3498db;
    outline-offset: 2px;
    z-index: 1;
}

body.observer-login-page .obs-login-role-switcher > .obs-role-active {
    color: #fff !important;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.25);
    cursor: default;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.35);
}

body.observer-login-page .obs-login-role-switcher > *:last-child {
    border-right: none;
}

body.observer-login-page .obs-login-role-switcher .obs-role-title {
    display: block;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

body.observer-login-page .obs-login-role-switcher .obs-role-sub {
    display: block;
    width: 100%;
    font-size: 10px;
    font-weight: 600;
    opacity: 0.95;
    text-transform: none;
    letter-spacing: 0.01em;
    line-height: 1.25;
    word-break: break-word;
}

body.observer-login-page .obs-login-role-switcher > a .obs-role-sub {
    color: #64748b;
}

body.observer-login-page .obs-login-role-switcher > .obs-role-active .obs-role-sub {
    color: rgba(255, 255, 255, 0.92);
    font-weight: 500;
}

/* Headings */
body.observer-login-page .obs-login-header {
    text-align: center;
    margin-bottom: 32px;
}

body.observer-login-page .obs-login-header h1 {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 600;
    color: #2c3e50;
}

body.observer-login-page .obs-login-header .obs-login-tagline {
    margin: 0;
    color: #7f8c8d;
    font-size: 16px;
}

/* Form */
body.observer-login-page .obs-form-group {
    margin-bottom: 22px;
}

body.observer-login-page .obs-form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
}

body.observer-login-page .obs-form-group input {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

body.observer-login-page .obs-form-group input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

body.observer-login-page .obs-error {
    display: none;
    padding: 12px 14px;
    margin-bottom: 16px;
    border-radius: 8px;
    background: #fee2e2;
    color: #b91c1c;
    font-size: 14px;
    border-left: 4px solid #e74c3c;
}

body.observer-login-page .obs-btn-primary {
    display: block;
    width: 100%;
    padding: 14px 20px;
    margin-top: 8px;
    font-size: 16px;
    font-weight: 700;
    color: #fff !important;
    text-align: center;
    text-decoration: none !important;
    background: #3498db;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.35);
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    font-family: inherit;
}

body.observer-login-page .obs-btn-primary:hover {
    background: #2980b9;
    box-shadow: 0 4px 14px rgba(52, 152, 219, 0.45);
}

body.observer-login-page .obs-btn-primary:active {
    transform: scale(0.99);
}

/* OTP */
body.observer-login-page .obs-otp-section {
    display: none;
    margin-top: 24px;
    padding: 24px;
    background: #f8fafc;
    border-radius: 10px;
    border-left: 4px solid #3498db;
}

body.observer-login-page .obs-otp-section h3 {
    margin: 0 0 8px;
    font-size: 1.1rem;
    color: #2c3e50;
}

body.observer-login-page .obs-otp-section > p {
    margin: 0 0 16px;
    color: #64748b;
    font-size: 14px;
}

body.observer-login-page .obs-resend {
    margin-top: 14px;
    text-align: center;
}

body.observer-login-page .obs-resend a {
    color: #2980b9;
    font-weight: 600;
    text-decoration: none;
    font-size: 14px;
}

body.observer-login-page .obs-resend a:hover {
    text-decoration: underline;
}

/* Footer link */
body.observer-login-page .obs-login-forgot {
    text-align: center;
    margin-top: 20px;
}

body.observer-login-page .obs-login-forgot a {
    color: #2980b9;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
}

body.observer-login-page .obs-login-forgot a:hover {
    text-decoration: underline;
}

@media (max-width: 400px) {
    body.observer-login-page .obs-login-card {
        padding: 36px 20px 32px;
    }
    body.observer-login-page .obs-login-role-switcher .obs-role-title {
        font-size: 14px;
    }
    body.observer-login-page .obs-login-role-switcher .obs-role-sub {
        font-size: 9px;
    }
}
