@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap");

:root {
    --primary: #657691;
    --primary-dark: #363851;
    --danger: #fb2b4a;
    --bg-start: #eef0f7;
    --bg-end: #dfe2e9;
    --card-bg: #ffffff;
    --border: #d6dbe5;
    --input-border: #c9cfdb;
    --text-main: #2f3344;
    --text-soft: #6b7280;
    --button-tone: #4b5b73;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body.auth-body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-family:
        "Inter",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        sans-serif;
    min-height: 100vh;
    background:
        linear-gradient(135deg, #eef2f4 0%, #d6dce0 100%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.25) 30%, transparent 30%),
        linear-gradient(135deg, transparent 65%, rgba(255, 255, 255, 0.18) 65%);
}

body.auth-body::before {
    content: "";
    position: fixed;
    inset: 0;

    background: url("/logo.png") no-repeat center 75%;
    background-size: 800px;

    opacity: 0.08;
    filter: grayscale(60%);
    pointer-events: none;
}

/* page placement - move card upward like Odoo */
.auth-page {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 82px;
    padding-left: 16px;
    padding-right: 16px;
    padding-bottom: 24px;
}

/* vertical portrait card */
.auth-card {
    width: 100%;
    max-width: 300px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 16px 16px 14px;
    box-shadow: 0 2px 10px rgba(54, 56, 81, 0.04);
    backdrop-filter: blur(4px);
}

.auth-logo {
    text-align: center;
    margin-bottom: 10px;
}

.auth-logo img {
    height: 44px;
    width: auto;
    max-width: 170px;
    object-fit: contain;
}

.auth-divider-line {
    height: 1px;
    background: var(--border);
    margin: 12px 0 16px;
}

.auth-divider-bottom {
    margin: 14px 0 10px;
}

.auth-title {
    margin: 0 0 5px;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: 0.01em;
    color: #1f2937;
}

.auth-subtitle {
    margin: 0 0 14px;
    font-size: 0.68rem;
    line-height: 1.5;
    color: #6b7280;
}

.auth-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}

.auth-row label {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--text-main);
}

.auth-row-spaced {
    margin-top: 14px;
}

.auth-link {
    font-size: 10px;
    color: var(--text-soft);
    text-decoration: none;
}

.auth-link:hover {
    color: var(--danger);
}

.auth-input {
    width: 100%;
    height: 36px;
    border-radius: 4px;
    border: 1px solid var(--input-border);
    background: rgba(255, 255, 255, 0.95);
    padding: 0 12px;
    font-size: 10.5px;
    color: var(--text-main);
    outline: none;
}

.auth-input::placeholder {
    color: #8a93a3;
}

.auth-input[readonly] {
    background: #f8fafc;
    color: #475569;
    cursor: default;
}

.auth-input:focus {
    border-color: #b9a8b4;
    box-shadow: 0 0 0 3px rgba(185, 168, 180, 0.18);
}

/* password field with eye icon */
.auth-password-wrap {
    position: relative;
}

.auth-input-password {
    padding-right: 40px;
}

.auth-reset-link {
    display: block;
    text-align: right;
    margin-top: 6px;
    font-size: 12px;
    color: #6b7280;
}

.auth-reset-link:hover {
    color: #fb2b4a;
}

.auth-eye-btn {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    color: #111827;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.auth-eye-btn svg {
    width: 16px;
    height: 16px;
}

/* login button */
.auth-btn {
    width: 100%;
    height: 34px;
    margin-top: 16px;
    border: none;
    border-radius: 4px;
    background: var(--button-tone);
    color: #fff;
    font-size: 10.5px;
    font-weight: 500;
    cursor: pointer;
    transition: filter 0.15s ease;
}

.auth-btn:hover {
    background: #363851;

    filter: brightness(1.03);
}

.auth-center {
    text-align: center;
    font-size: 10px;
    color: var(--text-soft);
}

.auth-powered {
    margin-top: 0;
}

.auth-error,
.auth-success {
    margin: 0 0 14px;
    padding: 10px 12px;
    border-radius: 4px;
    font-size: 11px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.auth-error {
    border: 1px solid #f0d3d9;
    background: #fff6f7;
    color: #b64f61;
}

.auth-success {
    border: 1px solid #d5e5d3;
    background: #f4faf3;
    color: #466245;
}

@media (max-width: 480px) {
    body.auth-body::before {
        background-size: 520px;
        background-position: center 78%;
    }

    .auth-page {
        padding-top: 28px;
        padding-left: 12px;
        padding-right: 12px;
    }

    .auth-card {
        max-width: 100%;
        padding: 14px 14px 12px;
    }

    .auth-row {
        flex-wrap: wrap;
        gap: 6px;
    }
}
