/* Login page (Views/Auth/Login.cshtml) */
:root {
    --a-teal: #0e6b6e;
    --a-teal-d: #0a5154;
    --a-teal-dd: #07393b;
    --a-teal-l: #73b0b7;
    --a-ink: #16282d;
    --a-muted: #5f6f74;
    --a-line: #d7dfe1;
    --a-field: #ffffff;
    --a-bg: #f3f6f7;
    --a-card: #ffffff;
    --a-error: #b42318;
    --a-error-bg: #fef3f2;
    --a-error-line: #fecdca;
    --a-ok: #067647;
    --a-ok-bg: #ecfdf3;
    --a-ok-line: #abefc6;
    --a-focus: 0 0 0 3px rgba(14, 107, 110, .22);
}

*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body.auth {
    margin: 0;
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: var(--a-ink);
    background: var(--a-bg);
    -webkit-font-smoothing: antialiased;
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(420px, 1fr);
    min-height: 100vh;
}

/* Left: photo with brand overlay */
.auth-hero {
    position: relative;
    background-color: var(--a-teal-dd);
    background-size: cover;
    background-position: center;
    color: #fff;
}
.auth-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(7, 57, 59, .92) 0%, rgba(10, 81, 84, .78) 45%, rgba(14, 107, 110, .55) 100%);
}
.auth-hero-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    padding: 48px 56px;
}
.auth-hero-brand {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    opacity: .9;
}
.auth-hero-copy { max-width: 480px; }
.auth-hero-copy h2 {
    margin: 0 0 14px;
    font-size: 34px;
    line-height: 1.2;
    font-weight: 600;
    letter-spacing: -.01em;
}
.auth-hero-copy p {
    margin: 0;
    font-size: 16px;
    color: rgba(255, 255, 255, .82);
}
.auth-hero-foot { font-size: 13px; color: rgba(255, 255, 255, .7); }

/* Right: sign-in card */
.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    background: var(--a-card);
}
.auth-card { width: 100%; max-width: 380px; }

.auth-logo { display: block; height: auto; margin: 0 0 28px; }

.auth-card h1 {
    margin: 0 0 4px;
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -.01em;
}
.auth-lead { margin: 0 0 24px; color: var(--a-muted); }

/* Fields */
.auth-field { margin-bottom: 16px; }
.auth-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--a-ink);
}
.auth-field input,
.auth-select select {
    display: block;
    width: 100%;
    height: 44px;
    padding: 0 12px;
    font: inherit;
    color: var(--a-ink);
    background: var(--a-field);
    border: 1px solid var(--a-line);
    border-radius: 8px;
    transition: border-color .15s, box-shadow .15s;
}
.auth-field input:focus,
.auth-select select:focus {
    outline: none;
    border-color: var(--a-teal);
    box-shadow: var(--a-focus);
}
.auth-select { position: relative; }
.auth-select select {
    padding-right: 36px;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}
.auth-select::after {
    content: "";
    position: absolute;
    right: 14px;
    top: 50%;
    width: 8px;
    height: 8px;
    margin-top: -6px;
    border-right: 2px solid var(--a-muted);
    border-bottom: 2px solid var(--a-muted);
    transform: rotate(45deg);
    pointer-events: none;
}
.auth-select select:disabled {
    cursor: default;
    opacity: 1;
    color: var(--a-ink);
    background: var(--a-bg);
}
.auth-select:has(select:disabled)::after { display: none; }

/* Sections */
.auth-section { margin-top: 20px; }
.auth-section-title {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--a-muted);
}
.auth-hint { margin: 8px 0 0; font-size: 13px; color: var(--a-muted); }

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0 4px;
    font-size: 12px;
    color: var(--a-muted);
    text-transform: uppercase;
    letter-spacing: .06em;
}
.auth-divider::before,
.auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--a-line); }

/* Buttons */
.auth-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 46px;
    padding: 0 16px;
    font: inherit;
    font-weight: 600;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background-color .15s, border-color .15s, box-shadow .15s;
}
.auth-btn:focus-visible { outline: none; box-shadow: var(--a-focus); }
.auth-btn-primary { color: #fff; background: var(--a-teal); }
.auth-btn-primary:hover { background: var(--a-teal-d); }
.auth-btn-secondary { color: var(--a-teal-d); background: #fff; border-color: var(--a-teal); }
.auth-btn-secondary:hover { background: #eef6f6; }
.auth-btn-microsoft { color: #fff; background: var(--a-teal); }
.auth-btn-microsoft:hover { background: var(--a-teal-d); }
.auth-btn-microsoft svg { flex: none; background: #fff; padding: 2px; border-radius: 3px; box-sizing: content-box; }
.auth-btn.is-busy { pointer-events: none; color: transparent; }
.auth-btn.is-busy svg { visibility: hidden; }
.auth-btn.is-busy::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, .5);
    border-top-color: #fff;
    border-radius: 50%;
    animation: auth-spin .7s linear infinite;
}
.auth-btn-secondary.is-busy::after { border-color: rgba(14, 107, 110, .3); border-top-color: var(--a-teal); }
@keyframes auth-spin { to { transform: rotate(360deg); } }

/* Suppliers' toggle */
.auth-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 12px 14px;
    font: inherit;
    text-align: left;
    color: var(--a-ink);
    background: #fff;
    border: 1px solid var(--a-line);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color .15s, background-color .15s;
}
.auth-toggle:hover { border-color: var(--a-teal-l); background: #f8fbfb; }
.auth-toggle:focus-visible { outline: none; box-shadow: var(--a-focus); }
.auth-toggle .auth-section-title { margin-bottom: 2px; }
.auth-toggle-sub { display: block; font-size: 14px; }
.auth-chevron { flex: none; color: var(--a-muted); transition: transform .2s; }
.auth-toggle[aria-expanded="true"] .auth-chevron { transform: rotate(180deg); }
.auth-toggle + .auth-form { margin-top: 16px; }

.auth-form[hidden] { display: none; }

.auth-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 18px;
    font-size: 14px;
    color: var(--a-muted);
    cursor: pointer;
}
.auth-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--a-teal); }

/* Messages */
.auth-alert {
    margin: 0 0 16px;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid;
    border-radius: 8px;
}
.auth-alert-error { color: var(--a-error); background: var(--a-error-bg); border-color: var(--a-error-line); }
.auth-alert-success { color: var(--a-ok); background: var(--a-ok-bg); border-color: var(--a-ok-line); }

.auth-link { color: var(--a-teal); font-weight: 600; text-decoration: none; }
.auth-link:hover { text-decoration: underline; }
.auth-back { display: block; margin-top: 16px; text-align: center; font-size: 14px; }

.auth-support {
    margin: 32px 0 0;
    padding-top: 20px;
    border-top: 1px solid var(--a-line);
    font-size: 13px;
    color: var(--a-muted);
}

/* Tablets and phones: the photo becomes a slim header band */
@media (max-width: 900px) {
    .auth-shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
    .auth-hero-inner { padding: 20px 24px; }
    .auth-hero-copy, .auth-hero-foot { display: none; }
    .auth-panel { align-items: flex-start; padding: 32px 16px 40px; }
}
