/* Auth (Identity) pages — styled to match the MudBlazor dark shell and the
   mobile client's login screen (centered dark card, logo, green submit). */

:root {
    /* Light page background with a DARK auth card floating on it. Step 2b will add a
       @media (prefers-color-scheme: dark) block so these pages follow the system like the app. */
    --dlc-bg: #f4f4f6; /* light page background (AppTheme PaletteLight.Background) */
    --dlc-surface: #33333d; /* dark card on the light background */
    --dlc-text: rgba(255, 255, 255, 0.90);
    --dlc-text-secondary: rgba(255, 255, 255, 0.60);
    --dlc-border: rgba(255, 255, 255, 0.30);
    --dlc-success: #12b886; /* app primary green (the Login button) */
    --dlc-success-hover: #0fa574;
    --dlc-error: #f5657f;
    --dlc-link: #4fc3f7;
}

html, body {
    margin: 0;
    padding: 0;
}

body.dlc-auth {
    min-height: 100vh;
    background-color: var(--dlc-bg);
    font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: var(--dlc-text);
    -webkit-font-smoothing: antialiased;
}

.dlc-auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
}

.dlc-auth-card {
    width: 100%;
    max-width: 420px;
    background-color: var(--dlc-surface);
    color: var(--dlc-text);
    border-radius: 16px;
    padding: 24px 28px 28px;
    box-sizing: border-box;
    box-shadow: 0 3px 5px -1px rgba(0,0,0,.2), 0 6px 10px 0 rgba(0,0,0,.14), 0 1px 18px 0 rgba(0,0,0,.12);
}

.dlc-auth-logo {
    display: block;
    width: 200px;
    height: 200px;
    max-width: 100%;
    margin: 4px auto 8px;
    object-fit: contain;
}

.dlc-auth-title {
    margin: 0 0 4px;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--dlc-text);
}

.dlc-auth-subtitle {
    margin: 0 0 20px;
    text-align: center;
    font-size: .9rem;
    color: var(--dlc-text-secondary);
}

/* Floating-label outlined text field (mimics MudBlazor Variant.Outlined). */
.dlc-field {
    position: relative;
    margin-bottom: 18px;
}

.dlc-input {
    width: 100%;
    box-sizing: border-box;
    padding: 16px 12px 8px;
    background-color: transparent;
    color: var(--dlc-text);
    border: 1px solid var(--dlc-border);
    border-radius: 8px;
    font-size: 1rem;
    line-height: 1.2;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.dlc-input:hover {
    border-color: rgba(255, 255, 255, 0.55);
}

.dlc-input:focus {
    border-color: var(--dlc-success);
    box-shadow: 0 0 0 1px var(--dlc-success);
}

.dlc-input:-webkit-autofill,
.dlc-input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--dlc-text);
    -webkit-box-shadow: 0 0 0 1000px var(--dlc-surface) inset;
    caret-color: var(--dlc-text);
}

.dlc-field label {
    position: absolute;
    left: 10px;
    top: 15px;
    padding: 0 4px;
    background-color: var(--dlc-surface);
    color: var(--dlc-text-secondary);
    font-size: 1rem;
    pointer-events: none;
    transition: top .15s ease, left .15s ease, font-size .15s ease, color .15s ease;
}

/* Float the label up when the field is focused or filled.
   Inputs use placeholder=" " so :placeholder-shown detects the empty state. */
.dlc-input:focus + label,
.dlc-input:not(:placeholder-shown) + label {
    top: -8px;
    left: 8px;
    font-size: .75rem;
}

.dlc-input:focus + label {
    color: var(--dlc-success);
}

.dlc-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0 18px;
    color: var(--dlc-text-secondary);
    font-size: .95rem;
}

.dlc-check input {
    width: 18px;
    height: 18px;
    accent-color: var(--dlc-success);
}

.dlc-btn {
    display: inline-block;
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    background-color: var(--dlc-success);
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: .03em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 3px 1px -2px rgba(0,0,0,.2), 0 2px 2px 0 rgba(0,0,0,.14), 0 1px 5px 0 rgba(0,0,0,.12);
    transition: background-color .15s ease;
}

.dlc-btn:hover {
    background-color: var(--dlc-success-hover);
}

.dlc-links {
    margin-top: 18px;
    text-align: center;
}

.dlc-links p {
    margin: 8px 0;
    font-size: .9rem;
    color: var(--dlc-text-secondary);
}

.dlc-auth a {
    color: var(--dlc-link);
    text-decoration: none;
}

.dlc-auth a:hover {
    text-decoration: underline;
}

/* Validation messages / error alert (mimics MudAlert Severity.Error). */
.dlc-auth .text-danger,
.dlc-auth .field-validation-error {
    display: block;
    margin: 4px 2px 0;
    color: var(--dlc-error);
    font-size: .85rem;
}

.dlc-alert {
    margin: 0 0 16px;
    padding: 10px 14px;
    border-radius: 8px;
    background-color: rgba(245, 101, 127, 0.15);
    color: var(--dlc-error);
    font-size: .9rem;
}

.dlc-alert:empty,
.dlc-alert .validation-summary-valid {
    display: none;
}

.dlc-alert ul {
    margin: 0;
    padding-left: 18px;
}
