/* Portal sign-in page (page-templates/portal-login.php). */
:root {
    --wsms-navy: #0f172a;
    --wsms-navy-light: #1e293b;
    --wsms-emerald: #059669;
    --wsms-emerald-hover: #047857;
    --wsms-emerald-light: #ecfdf5;
    --wsms-border: #e2e8f0;
    --wsms-muted: #64748b;
    --wsms-bg: #f8fafc;
    --wsms-card: #ffffff;
    --wsms-font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

body.wsms-portal-login-body {
    font-family: var(--wsms-font);
    background-color: #0d1527;
    background-image: 
        radial-gradient(at 0% 0%, rgba(5, 150, 105, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(30, 41, 59, 0.3) 0px, transparent 50%);
    min-height: 100vh;
    color: #0f172a;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Top Navigation Strip */
.wsms-login-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 2rem;
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
}

.wsms-login-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #ffffff;
}

.wsms-brand-crest {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.wsms-brand-title {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    display: block;
}

.wsms-brand-subtitle {
    font-size: 0.75rem;
    color: #94a3b8;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.wsms-topbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.wsms-session-pill {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.4rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.wsms-back-link {
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.wsms-back-link:hover {
    color: #ffffff;
}

/* Center Main Split Wrapper */
.wsms-login-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    width: 100%;
}

.wsms-login-container {
    width: 100%;
    max-width: 1060px;
    background: #ffffff;
    border-radius: 1.25rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    display: grid;
    grid-template-columns: 1.05fr 1.2fr;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Left Side: Institutional Banner / Features */
.wsms-login-hero {
    background: linear-gradient(145deg, #0f172a 0%, #1e293b 100%);
    padding: 3rem 2.5rem;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    border-right: 1px solid #334155;
}

.wsms-hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(5, 150, 105, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
}

.wsms-hero-heading {
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.wsms-hero-desc {
    color: #94a3b8;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 2.25rem;
}

.wsms-role-feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.wsms-role-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
}

.wsms-feature-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.wsms-feature-text strong {
    display: block;
    font-size: 0.9rem;
    color: #f1f5f9;
    font-weight: 600;
    margin-bottom: 0.15rem;
}

.wsms-feature-text span {
    font-size: 0.8rem;
    color: #94a3b8;
    line-height: 1.4;
}

.wsms-hero-footer {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
    color: #64748b;
}

/* Right Side: The Login Card */
.wsms-login-pane {
    padding: 3rem 2.75rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #ffffff;
}

.wsms-login-header {
    margin-bottom: 1.75rem;
}

.wsms-login-header h2 {
    font-size: 1.55rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
    margin-bottom: 0.4rem;
}

.wsms-login-header p {
    color: #64748b;
    font-size: 0.9rem;
}

/* Segmented Role Tabs */
.wsms-role-tabs {
    display: flex;
    background: #f1f5f9;
    border-radius: 0.65rem;
    padding: 0.25rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e2e8f0;
}

.wsms-role-tab {
    flex: 1;
    padding: 0.55rem 0.5rem;
    border: none;
    background: transparent;
    font-size: 0.82rem;
    font-weight: 600;
    color: #64748b;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.wsms-role-tab.is-active {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Alert */
.wsms-alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 0.85rem 1rem;
    border-radius: 0.6rem;
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Inputs */
.wsms-form-group {
    margin-bottom: 1.25rem;
}

.wsms-form-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.45rem;
}

.wsms-form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
}

.wsms-forgot-link {
    font-size: 0.8rem;
    color: var(--wsms-emerald);
    font-weight: 600;
    text-decoration: none;
}

.wsms-forgot-link:hover {
    text-decoration: underline;
}

.wsms-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.wsms-input-icon {
    position: absolute;
    left: 1rem;
    color: #94a3b8;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wsms-input-field {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 2.65rem;
    border: 1.5px solid #cbd5e1;
    border-radius: 0.65rem;
    font-size: 0.95rem;
    font-family: inherit;
    color: #0f172a;
    background: #ffffff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.wsms-input-field:focus {
    outline: none;
    border-color: var(--wsms-emerald);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

.wsms-toggle-pwd {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wsms-toggle-pwd:hover {
    color: #475569;
}

/* Checkbox */
.wsms-remember-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.wsms-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #64748b;
    cursor: pointer;
}

.wsms-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--wsms-emerald);
    cursor: pointer;
}

/* Submit Button */
.wsms-btn-submit {
    width: 100%;
    padding: 0.9rem;
    background: var(--wsms-emerald);
    color: #ffffff;
    border: none;
    border-radius: 0.65rem;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.3);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.wsms-btn-submit:hover {
    background: var(--wsms-emerald-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(5, 150, 105, 0.4);
}

.wsms-btn-submit:active {
    transform: translateY(0);
}

/* Demo Credentials Quick Switcher */

/* Logged In State Card */
.wsms-logged-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.85rem;
    padding: 1.75rem;
    text-align: left;
}

.wsms-user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #e2e8f0;
}

.wsms-user-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 1.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(5, 150, 105, 0.25);
}

.wsms-user-meta strong {
    font-size: 1.15rem;
    color: #0f172a;
    display: block;
    margin-bottom: 0.2rem;
}

.wsms-role-badge {
    display: inline-block;
    background: var(--wsms-emerald-light);
    color: var(--wsms-emerald);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.wsms-logged-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.wsms-btn-primary-app {
    background: var(--wsms-emerald);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.85rem 1.25rem;
    border-radius: 0.6rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
    transition: background 0.15s;
}

.wsms-btn-primary-app:hover {
    background: var(--wsms-emerald-hover);
}

.wsms-btn-secondary-app {
    background: #1e293b;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.88rem;
    padding: 0.75rem 1.25rem;
    border-radius: 0.6rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background 0.15s;
}

.wsms-btn-secondary-app:hover {
    background: #0f172a;
}

.wsms-btn-logout {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #475569;
    font-weight: 600;
    font-size: 0.88rem;
    padding: 0.65rem 1rem;
    border-radius: 0.6rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: all 0.15s;
}

.wsms-btn-logout:hover {
    background: #f1f5f9;
    color: #0f172a;
}

/* Footer */
.wsms-login-footer {
    text-align: center;
    padding: 1.5rem 1rem;
    color: #64748b;
    font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 900px) {
    .wsms-login-container {
        grid-template-columns: 1fr;
    }
    .wsms-login-hero {
        padding: 2.25rem 2rem;
    }
    .wsms-login-pane {
        padding: 2.25rem 2rem;
    }
}

/* The theme's global input styles (loaded by wp_head) outranked these, so the
   fields turned grey and the icons sat on top of the placeholder text. */
.wsms-login-pane .wsms-input-wrap .wsms-input-field {
    padding-left: 2.75rem;
    background: #ffffff;
}
.wsms-login-pane .wsms-input-icon { z-index: 1; }
