
/* =========================================
   DAMS - Enterprise Login Styles
   File: static/login.css
========================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #eff6ff;
    --text-dark: #172554;
    --text-main: #334155;
    --text-muted: #64748b;
    --border: #dbe3ef;
    --background: #f3f6fb;
    --white: #ffffff;
    --danger: #b91c1c;
}

html {
    min-height: 100%;
}

body {
    font-family: Inter, Arial, Helvetica, sans-serif;
    background: var(--background);
    color: var(--text-main);
    min-height: 100vh;
}

/* =========================================
   Main Layout
========================================= */

.shell {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 35px;
}

.brand-panel {
    flex: 1;
    max-width: 550px;
    background: linear-gradient(145deg, #102b60, #2563eb);
    color: var(--white);
    padding: 55px 45px;
    border-radius: 22px 0 0 22px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-panel {
    flex: 1;
    max-width: 550px;
    background: var(--white);
    padding: 45px;
    border-radius: 0 22px 22px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* =========================================
   Brand Section
========================================= */

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 65px;
}

.logo {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 14px;
    font-size: 20px;
    font-weight: 800;
    color: var(--white);
}

.brand h1,
.brand strong {
    color: var(--white);
    font-size: 21px;
    font-weight: 750;
    letter-spacing: 0.3px;
}

.intro {
    max-width: 440px;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 18px;
    padding: 7px 12px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.14);
    color: #dbeafe;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.intro h2 {
    color: var(--white);
    font-size: clamp(28px, 4vw, 39px);
    line-height: 1.25;
    margin-bottom: 18px;
}

.intro p {
    color: #dbeafe;
    font-size: 15px;
    line-height: 1.8;
}

.features {
    display: grid;
    gap: 17px;
    margin-top: 38px;
}

.features > div,
.features li {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #eff6ff;
    font-size: 14px;
    line-height: 1.5;
}

/* =========================================
   Login Card
========================================= */

.card {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
}

.card h2 {
    color: var(--text-dark);
    font-size: 27px;
    font-weight: 750;
    margin-bottom: 9px;
}

.card > p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 30px;
}

/* =========================================
   Role Selection
========================================= */

.roles {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 25px;
}

.role {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 52px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: var(--text-main);
    cursor: pointer;
    font-size: 14px;
    font-weight: 650;
    transition: 0.2s ease;
}

.role:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.role:has(input:checked) {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary-dark);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.08);
}

.role input {
    accent-color: var(--primary);
}

/* =========================================
   Form Fields
========================================= */

.field,
.form-group {
    margin-bottom: 21px;
}

.field label,
.form-group label {
    display: block;
    margin-bottom: 9px;
    color: var(--text-main);
    font-size: 13px;
    font-weight: 650;
}

.input,
.field input,
.form-group input {
    width: 100%;
    min-height: 48px;
    padding: 13px 14px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: #fff;
    color: var(--text-dark);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input::placeholder,
.field input::placeholder,
.form-group input::placeholder {
    color: #94a3b8;
}

.input:focus,
.field input:focus,
.form-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
}

/* =========================================
   Password Field
========================================= */

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 72px;
}

.toggle-password {
    position: absolute;
    top: 50%;
    right: 13px;
    transform: translateY(-50%);
    padding: 5px;
    border: none;
    background: transparent;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.toggle-password:hover {
    color: var(--primary-dark);
}

/* =========================================
   Remember Me / Options
========================================= */

.options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 4px 0 24px;
    color: var(--text-muted);
    font-size: 13px;
}

.options label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.options input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* =========================================
   Submit Button
========================================= */

.submit,
.login-button {
    width: 100%;
    min-height: 49px;
    padding: 14px 18px;
    border: none;
    border-radius: 9px;
    background: var(--primary);
    color: var(--white);
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.submit:hover,
.login-button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.submit:active,
.login-button:active {
    transform: translateY(0);
}

.submit:focus-visible,
.login-button:focus-visible,
.toggle-password:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.3);
    outline-offset: 3px;
}

/* =========================================
   Error Message
========================================= */

.error,
.error-message {
    padding: 12px 14px;
    margin-bottom: 20px;
    border: 1px solid #fecaca;
    border-radius: 9px;
    background: #fef2f2;
    color: var(--danger);
    font-size: 13px;
    line-height: 1.5;
}

/* =========================================
   Footer / Security
========================================= */

.secure {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 25px;
    color: var(--text-muted);
    font-size: 12px;
    text-align: center;
}

.footnote,
.login-footer {
    margin-top: 28px;
    color: #94a3b8;
    font-size: 12px;
    line-height: 1.8;
    text-align: center;
}

.outside {
    margin-top: 18px;
    color: var(--text-muted);
    font-size: 12px;
    text-align: center;
}

.mobile-brand {
    display: none;
}

/* =========================================
   Legacy Login Layout Support
========================================= */

.login-container {
    width: 100%;
    padding: 20px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    margin: auto;
    padding: 40px;
    border-radius: 16px;
    background: var(--white);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.logo-section {
    margin-bottom: 35px;
    text-align: center;
}

.logo-icon {
    width: 65px;
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    border-radius: 16px;
    background: var(--primary);
    color: white;
    font-size: 24px;
    font-weight: bold;
}

.logo-section h1 {
    margin-bottom: 10px;
    color: var(--text-dark);
    font-size: 23px;
}

.logo-section p {
    color: var(--text-muted);
    font-size: 14px;
}

/* =========================================
   Responsive Design
========================================= */

@media (max-width: 900px) {
    .shell {
        padding: 20px;
    }

    .brand-panel {
        padding: 40px 30px;
    }

    .form-panel {
        padding: 35px 28px;
    }

    .intro h2 {
        font-size: 29px;
    }
}

@media (max-width: 700px) {
    body {
        background: #fff;
    }

    .shell {
        min-height: 100vh;
        display: block;
        padding: 0;
    }

    .brand-panel {
        display: none;
    }

    .form-panel {
        width: 100%;
        min-height: 100vh;
        max-width: none;
        padding: 35px 24px;
        border-radius: 0;
    }

    .card {
        max-width: 430px;
    }

    .mobile-brand {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        margin-bottom: 38px;
        color: var(--text-dark);
        font-size: 19px;
        font-weight: 750;
    }

    .mobile-brand .logo {
        background: var(--primary);
        color: white;
    }
}

@media (max-width: 420px) {
    .form-panel {
        padding: 28px 19px;
    }

    .card h2 {
        font-size: 24px;
    }

    .roles {
        gap: 8px;
    }

    .role {
        padding: 10px 7px;
        font-size: 13px;
    }

    .login-card {
        padding: 28px 22px;
    }

    .options {
        font-size: 12px;
    }
}


/* =========================================
   DAMS - Login UI Polish
========================================= */

/* Modern typography */
body {
    font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 14px;
    letter-spacing: -0.15px;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Main panels */
.shell {
    max-width: 1500px;
    margin: 0 auto;
    padding: 28px;
}

.brand-panel {
    padding: 65px 52px;
}

.form-panel {
    padding: 55px 60px;
}

/* Brand */
.brand {
    margin-bottom: 72px;
}

.brand a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 750;
    letter-spacing: 0.2px;
}

.brand a:hover {
    color: #dbeafe;
    text-decoration: none;
}

.logo {
    flex-shrink: 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12);
}

/* Left panel typography */
.intro h2 {
    font-size: 38px;
    line-height: 1.22;
    letter-spacing: -1px;
    font-weight: 750;
}

.intro p {
    font-size: 15px;
    line-height: 1.85;
    color: #e5edff;
}

.features {
    gap: 21px;
}

.features > div,
.features li {
    align-items: flex-start;
    line-height: 1.65;
    font-size: 13px;
}

.features strong {
    margin-right: 5px;
}

/* Login heading */
.card h2 {
    font-size: 29px;
    line-height: 1.3;
    letter-spacing: -0.7px;
    font-weight: 750;
}

.card > p {
    font-size: 14px;
    margin-bottom: 28px;
}

/* Role selection */
.roles {
    border: 0;
    padding: 0;
    min-width: 0;
    gap: 14px;
}

.roles legend {
    margin-bottom: 12px;
    color: #334155;
    font-size: 13px;
    font-weight: 650;
}

.role {
    min-height: 64px;
    justify-content: flex-start;
    padding: 13px 15px;
    gap: 11px;
    line-height: 1.45;
    text-align: left;
    font-size: 13px;
    border-radius: 11px;
}

.role input {
    flex-shrink: 0;
    margin: 0;
}

.role span {
    display: block;
}

.role strong {
    display: block;
    margin-bottom: 3px;
    font-size: 14px;
    font-weight: 700;
}

.role small {
    display: block;
    color: #64748b;
    font-size: 11px;
    line-height: 1.4;
}

/* Form labels */
.field label,
.form-group label {
    margin-bottom: 9px;
    font-size: 13px;
    font-weight: 650;
    color: #26364f;
}

/* Inputs */
.input,
.field input,
.form-group input {
    min-height: 50px;
    border: 1px solid #d9e2ef;
    border-radius: 10px;
    padding: 13px 15px;
    background: #fff;
    font-size: 14px;
    letter-spacing: 0;
}

.input:hover,
.field input:hover,
.form-group input:hover {
    border-color: #a9bee0;
}

.input:focus,
.field input:focus,
.form-group input:focus {
    border-color: #2563eb;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.09);
}

/* Password visibility */
.toggle-password {
    z-index: 2;
    padding: 7px 9px;
    border-radius: 6px;
    font-size: 12px;
}

.toggle-password:hover {
    background: #eff6ff;
}

/* Remember me */
.options {
    margin-top: 5px;
    margin-bottom: 26px;
    font-size: 12px;
}

.options label {
    color: #64748b;
}

/* Main button */
.submit,
.login-button {
    min-height: 52px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.1px;
    box-shadow: 0 5px 12px rgba(37, 99, 235, 0.15);
}

.submit:hover,
.login-button:hover {
    box-shadow: 0 7px 18px rgba(37, 99, 235, 0.22);
}

/* Footer */
.secure {
    margin-top: 29px;
    font-size: 12px;
    color: #64748b;
}

.footnote,
.outside {
    color: #8290a5;
    font-size: 12px;
    letter-spacing: 0;
}

/* Responsive */
@media (max-width: 900px) {
    .brand-panel {
        padding: 42px 30px;
    }

    .form-panel {
        padding: 38px 28px;
    }

    .intro h2 {
        font-size: 30px;
    }
}

@media (max-width: 700px) {
    .shell {
        padding: 0;
    }

    .form-panel {
        padding: 35px 24px;
    }

    .card h2 {
        font-size: 26px;
    }
}

@media (max-width: 420px) {
    .roles {
        grid-template-columns: 1fr;
    }

    .role {
        min-height: 58px;
    }

    .form-panel {
        padding: 28px 19px;
    }
}


/* =========================================
   DAMS LOGIN - FINAL HTML COMPATIBILITY FIX
========================================= */

/* Brand */
.brand {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    flex-shrink: 0;
}

.brand-name {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.brand-title {
    color: #ffffff;
    font-size: 27px;
    font-weight: 800;
    letter-spacing: 2px;
    line-height: 1.1;
}

.brand-subtitle {
    color: #dbeafe;
    font-size: 10px;
    font-weight: 650;
    letter-spacing: 1.3px;
    white-space: nowrap;
}

/* Left panel heading */
.intro h1 {
    color: #ffffff;
    font-size: clamp(30px, 3.2vw, 39px);
    line-height: 1.25;
    letter-spacing: -1px;
    font-weight: 800;
    margin-bottom: 17px;
}

.intro h1 em {
    font-style: italic;
    color: #dbeafe;
}

.intro .desc {
    color: #e5edff;
    font-size: 15px;
    line-height: 1.8;
}

/* Feature icons */
.feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
}

.feature-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    color: #dbeafe;
}

.feature-icon svg {
    width: 100%;
    height: 100%;
}

.feature-item span:last-child {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.feature-item b {
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
}

.feature-item small {
    color: #dbeafe;
    font-size: 12px;
    line-height: 1.5;
}

/* Login header */
.login-header {
    margin-bottom: 27px;
}

.login-header h2 {
    color: #172554;
    font-size: 29px;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -0.7px;
    margin-bottom: 8px;
}

.login-header p {
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
}

/* Role selection */
.roles {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
    border: 0;
    padding: 0;
    margin: 0 0 25px;
    min-width: 0;
}

.roles legend {
    display: block;
    width: 100%;
    margin-bottom: 12px;
    color: #334155;
    font-size: 13px;
    font-weight: 650;
}

.role {
    min-width: 0;
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 11px;
    padding: 12px;
    border: 1px solid #dbe3ef;
    border-radius: 11px;
    background: #ffffff;
    cursor: pointer;
    transition: 0.2s ease;
}

.role input {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    accent-color: #2563eb;
}

.role-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: #64748b;
}

.role > span:last-of-type {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.role > span b {
    color: #172554;
    font-size: 14px;
    font-weight: 750;
}

.role > span small {
    color: #64748b;
    font-size: 11px;
    line-height: 1.4;
}

.role.selected,
.role:has(input:checked) {
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: 0 0 0 2px rgba(37,99,235,.07);
}

.role.selected .role-icon {
    color: #2563eb;
}

/* Form fields */
.field {
    display: block;
    margin-bottom: 21px;
    color: #334155;
    font-size: 13px;
    font-weight: 650;
}

.field > label {
    display: block;
    margin-bottom: 9px;
}

/* Input wrapper */
.input-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-icon-wrapper .field-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 19px;
    height: 19px;
    color: #64748b;
    pointer-events: none;
    z-index: 1;
}

.input-icon-wrapper input {
    width: 100%;
    min-height: 52px;
    padding: 13px 46px;
    border: 1px solid #d9e2ef;
    border-radius: 10px;
    background: #ffffff;
    color: #172554;
    font-family: inherit;
    font-size: 14px;
    font-weight: 400;
    outline: none;
}

.input-icon-wrapper input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37,99,235,.09);
}

.input-icon-wrapper:focus-within .field-icon {
    color: #2563eb;
}

/* Password eye button */
.input-icon-wrapper .toggle-password {
    position: absolute;
    top: 50%;
    right: 10px;
    left: auto;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 8px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #64748b;
    cursor: pointer;
}

.toggle-password svg {
    width: 20px;
    height: 20px;
}

.toggle-password:hover {
    background: #eff6ff;
    color: #2563eb;
}

/* Submit button */
.submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
}

.submit svg {
    width: 18px;
    height: 18px;
}

/* Security icon */
.secure svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Mobile brand */
.mobile-brand {
    align-items: center;
    gap: 12px;
}

.mobile-brand .brand-title {
    color: #172554;
    font-size: 23px;
}

.mobile-brand .brand-subtitle {
    color: #64748b;
}

@media (max-width: 900px) {
    .intro h1 {
        font-size: 30px;
    }

    .form-panel {
        padding: 38px 28px;
    }
}

@media (max-width: 700px) {
    .roles {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .login-header h2 {
        font-size: 26px;
    }
}

@media (max-width: 420px) {
    .roles {
        grid-template-columns: 1fr;
    }

    .role {
        min-height: 65px;
    }

    .login-header h2 {
        font-size: 24px;
    }
}
