/* SiapNgeweb CRM — Auth Page (Login/Register)
   2-column layout: 60% image | 40% form, 100vh */

/* ===== Self-contained variables ===== */
:root {
    --auth-radius: 10px;
    --auth-duration: 250ms;
    --auth-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===== Reset for auth page ===== */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
}

/* ===== Layout ===== */
.scrm-auth-page {
    display: grid;
    grid-template-columns: 60% 40%;
    height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: var(--heading-font, 'Poppins', sans-serif);
}

/* ===== Left: Visual Panel ===== */
.scrm-auth-visual {
    position: relative;
    overflow: hidden;
    background: var(--primary-color, #426ef0);
}
.scrm-auth-visual-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.scrm-auth-visual-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.6) 100%);
}

/* ===== Right: Form Panel ===== */
.scrm-auth-form-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: var(--surface-color, #ffffff);
    overflow-y: auto;
    height: 100vh;
    box-sizing: border-box;
}

/* Logo */
.scrm-auth-logo {
    margin-bottom: 28px;
}
.scrm-auth-logo .custom-logo-link img {
    max-height: 38px;
    width: auto;
    display: block;
}
.scrm-auth-logo-text {
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--primary-color, #426ef0);
    letter-spacing: -0.02em;
    text-decoration: none;
}

.scrm-auth-form-wrap {
    width: 100%;
    max-width: 400px;
    text-align: center;
}

/* Form header */
.scrm-auth-form-header {
    margin-bottom: 28px;
}
.scrm-auth-form-header h1 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--heading-color, #111111);
    margin: 0 0 6px;
}
.scrm-auth-form-header p {
    font-size: 0.875rem;
    color: var(--text-color, #444444);
    margin: 0;
    line-height: 1.5;
}

/* Auth panels — show/hide */
.scrm-auth-panel {
    display: none;
}
.scrm-auth-panel.active {
    display: block;
}

/* Tab switcher */
.scrm-auth-tabs {
    display: flex;
    background: var(--bg-color, #f4f7fc);
    border-radius: var(--auth-radius);
    padding: 4px;
    margin-bottom: 24px;
    gap: 4px;
}
.scrm-auth-tab {
    flex: 1;
    text-align: center;
    padding: 10px 16px;
    border-radius: calc(var(--auth-radius) - 2px);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-color, #444444);
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--body-font, 'Poppins', sans-serif);
    transition: all var(--auth-duration) var(--auth-ease);
}
.scrm-auth-tab:hover {
    color: var(--heading-color, #111111);
}
.scrm-auth-tab.active {
    background: var(--primary-color, #426ef0);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(66, 110, 240, 0.3);
}

/* Alert messages */
.scrm-auth-error {
    background: var(--status-danger, #fef2f2);
    border: 1px solid var(--status-danger-border, #fecaca);
    color: var(--status-danger-text, #dc2626);
    padding: 10px 14px;
    border-radius: var(--auth-radius);
    font-size: 0.8125rem;
    margin-bottom: 16px;
    line-height: 1.5;
}
.scrm-auth-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
    padding: 10px 14px;
    border-radius: var(--auth-radius);
    font-size: 0.8125rem;
    margin-bottom: 16px;
    line-height: 1.5;
}

/* Form */
.scrm-auth-form {
    display: flex;
    flex-direction: column;
}
.scrm-form-group {
    margin-bottom: 16px;
}
.scrm-form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--heading-color, #111111);
    margin-bottom: 6px;
    text-align: left;
}
.scrm-input {
    width: 100%;
    padding: 11px 14px;
    background: var(--surface-color, #ffffff);
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: var(--auth-radius);
    color: var(--heading-color, #111111);
    font-family: var(--body-font, 'Poppins', sans-serif);
    font-size: 0.875rem;
    transition: border-color 150ms ease, box-shadow 150ms ease;
    outline: none;
    box-sizing: border-box;
    text-align: left;
}
.scrm-input::placeholder {
    color: var(--text-muted, #9ca3af);
}
.scrm-input:focus {
    border-color: var(--primary-color, #426ef0);
    box-shadow: 0 0 0 3px rgba(66, 110, 240, 0.15);
}

/* 2-col row for password fields */
.scrm-form-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Remember + forgot row */
.scrm-form-row {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
}
.scrm-form-row-between {
    justify-content: space-between;
}
.scrm-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    color: var(--text-color, #444444);
    cursor: pointer;
}
.scrm-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color, #426ef0);
    cursor: pointer;
}
.scrm-auth-link {
    font-size: 0.8125rem;
    color: var(--primary-color, #426ef0);
    text-decoration: none;
    transition: color 150ms ease;
}
.scrm-auth-link:hover {
    color: var(--primary-hover, #234fd1);
}

/* Submit button */
.scrm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--auth-radius);
    font-family: var(--body-font, 'Poppins', sans-serif);
    font-size: 0.9375rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all var(--auth-duration) var(--auth-ease);
}
.scrm-btn-primary {
    background: var(--primary-color, #426ef0);
    color: #ffffff;
}
.scrm-btn-primary:hover {
    background: var(--primary-hover, #234fd1);
    transform: translateY(-1px);
    box-shadow: 0 8px 25px -5px rgba(66, 110, 240, 0.4);
}
.scrm-btn-primary:active {
    transform: translateY(0);
}
.scrm-btn-full {
    width: 100%;
}

/* Footer link */
.scrm-auth-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color, #e0e0e0);
}
.scrm-auth-footer a {
    font-size: 0.8125rem;
    color: var(--text-color, #444444);
    text-decoration: none;
    transition: color 150ms ease;
}
.scrm-auth-footer a:hover {
    color: var(--primary-color, #426ef0);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .scrm-auth-page {
        grid-template-columns: 50% 50%;
    }
}

@media (max-width: 768px) {
    html, body {
        overflow: auto;
        height: auto;
    }
    .scrm-auth-page {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr;
        height: auto;
        min-height: 100vh;
        overflow: visible;
    }
    .scrm-auth-visual {
        display: none;
    }
    .scrm-auth-form-panel {
        height: auto;
        min-height: 100vh;
        padding: 24px;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        background:
            url("data:image/svg+xml,%3Csvg width='200' height='200' viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 10c20 30 60-10 80 20s-20 50 10 70-10 60-40 50-60-20-70 10S-10 90 20 70s30-50 10-60z' fill='%23426ef0' fill-opacity='0.05'/%3E%3Cpath d='M150 80c-20 40 20 50 0 80s-50 10-40-20 40-30 20-50 30-40 20-10z' fill='%23426ef0' fill-opacity='0.05'/%3E%3C/svg%3E"),
            #ffffff;
    }
    .scrm-auth-logo .custom-logo-link img {
        max-height: 44px;
    }
    .scrm-form-row-2col {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .scrm-auth-form-panel {
        padding: 20px;
    }
}
