﻿:root {
    --bg: #f5f5f5;
    --card: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --primary: #1a1a1a;
    --primary-600: #1d4ed8;
    --ring: rgba(37, 99, 235, 0.5);
    --error: #ef4444;
    --brand-green: #006128;
    --brand-green-disabled: #4a9968;
    --brand-blue: #326eea;
}

/* Global reset / base */
* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", Arial, "Apple Color Emoji", "Segoe UI Emoji";
    background: var(--bg);
    color: var(--text);
}

/* Layout */
.container {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

/* Card styles (default wide card) */
.card {
    width: 100%;
    max-width: 900px;
    background: var(--card);
    border-radius: 16px;
    padding: 28px;
    backdrop-filter: blur(6px);
    box-shadow: none;
}

    /* Helper for narrow card (use on forgot-password) */
    .card.narrow {
        max-width: 420px;
    }

/* Page headings */
.page-title {
    text-align: left;
    font-size: 28px;
    font-weight: 700;
    margin-top: 0;
    color: #000000;
}

.password-page-title {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    margin-top: 0;
    color: #000000;
}

.title {
    margin: 0 0 6px 0;
    font-size: 24px;
    font-weight: 700;
}

.subtitle {
    margin: 0 0 20px 0;
    color: var(--muted);
    font-size: 14px;
    text-align: center;
}

/* Form and fields */
.field {
    margin-bottom: 16px;
}

    .field label, label {
        display: block;
        margin-bottom: 6px;
        font-size: 14px;
    }

.input-wrap {
    position: relative;
}

input[type="text"],
input[type="password"],
input[type="email"] {
    width: 100%;
    padding: 12px 44px 12px 12px;
    border-radius: 4px;
    border: 1px solid #d1d5dc;
    background: #ffffff;
    color: #111827;
    font-size: 16px;
    line-height: 1.5;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

#password {
    padding-right: 12px;
}
/* password has no right icon */

#confirm-password {
    padding-right: 12px;
}

/* Hide browser's native password reveal button */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
    display: none;
}

input[type="password"]::-webkit-credentials-auto-fill-button,
input[type="password"]::-webkit-reveal {
    display: none;
}

input::placeholder {
    color: #6b7280;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
}

/* Prevent autofill from changing font size */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-text-size-adjust: 100%;
    font-size: 16px !important;
    line-height: 1.5 !important;
    transition: background-color 5000s ease-in-out 0s;
    -webkit-box-shadow: 0 0 0 1000px white inset !important;
}

input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--ring);
    background: #ffffff;
}

/* Password toggle */
.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
}

.toggle-password:hover {
    color: var(--text);
}

/* Actions and buttons */
.actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
}

.remember {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
}

/* Unified submit button: use brand green so both pages match */
.submit-btn {
    width: 100%;
    padding: 12px 16px;
    border-radius: 6px;
    border: none;
    background: var(--brand-blue);
    color: white;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: transform 0.05s ease, filter 0.15s ease;
    margin-top: 6px;
}

    .submit-btn:hover {
        /* filter: brightness(1.05);*/
    }

    .submit-btn:disabled {
        filter: opacity(0.5);
        background: var(--brand-blue);
    }

    .submit-btn:active {
        transform: translateY(1px);
    }

/* Alternate submit style used for inline/right-aligned buttons (keeps same color) */
.form-left .submit-btn,
.submit-btn.alt {
    width: auto;
    align-self: flex-end;
    padding: 12px 28px;
    font-size: 16px;
    background: var(--brand-blue);
    border-radius: 6px;
}

/* Hints, errors */
.hint {
    margin-top: 14px;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

.error {
    color: var(--error);
    font-size: 16px;
    margin-top: 8px;
    margin-bottom: 20px;
}

.field-hint {
    margin-top: 6px;
    font-size: 12px;
    color: #6b7280;
}

/* Two-column layout inside the login form */
.form-columns {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.form-left {
    width: 100%;
    max-width: 420px;
    flex: 0 0 420px;
}

.form-right {
    flex: 1 1 auto;
    border-left: 1px solid #d1d5dc;
    padding-left: 24px;
}

/* Labels, tooltips */
.label-row {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-start;
}

    .label-row label {
        margin: 0;
        line-height: 1;
    }

.tooltip {
    position: relative;
    display: inline-flex;
}

    .tooltip-button {
        border: 1px solid #d1d5dc;
        background: #ffffff;
        color: #6b7280;
        border-radius: 50%;
        width: 20px;
        height: 20px;
        line-height: 18px;
        font-size: 15px;
        cursor: help;
        padding: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .tooltip-button:focus {
        outline: none;
        box-shadow: 0 0 0 3px var(--ring);
    }

.tooltip-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 10;
    width: 320px;
    max-width: calc(100vw - 48px);
    padding: 12px;
    background: #ffffff;
    border: 1px solid #d1d5dc;
    border-radius: 8px;
    color: #374151;
    font-size: 12px;
    line-height: 1.5;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.12s ease, transform 0.12s ease;
    pointer-events: none;
}

.tooltip:hover .tooltip-panel,
.tooltip:focus-within .tooltip-panel {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.input-tooltip {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-52%);
}

.tooltip-panel.above {
    top: auto;
    bottom: calc(100% + 8px);
}

/* Footer info under the card */
.footer-row {
    width: 100%;
    max-width: 900px;
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.footer-info {
    color: #374151;
    font-size: 14px;
}

    .footer-info .sep {
        margin: 0 10px;
        color: #9ca3af;
    }

.footer-meta {
    color: #6b7280;
    font-size: 12px;
    text-align: right;
}

/* Misc info card */
.card.info {
    max-width: 520px;
}

.info {
    line-height: 1.5;
    color: #374151;
    font-size: 14px;
}

    .info h2 {
        margin: 0 0 8px 0;
        font-size: 16px;
        font-weight: 600;
        color: #111827;
    }

    .info p {
        margin: 0 0 10px 0;
    }

    .info ul {
        margin: 0 0 0 18px;
        padding: 0;
    }

    .info li {
        margin: 6px 0;
    }

/* Back link on forgot-password page */
.back-link {
    display: block;
    margin: 24px auto 0 auto;
    text-align: center;
    color: var(--primary);
    font-size: 14px;
    text-decoration: none;
}

    .back-link:hover {
        text-decoration: underline;
        color: var(--primary-600);
    }

/* Responsive */
@media (max-width: 420px) {
    .card {
        padding: 22px;
    }
}

@media (max-width: 920px) {
    .content-row {
        max-width: 100%;
    }

    .form-columns {
        flex-direction: column;
    }

    .form-left {
        flex-basis: auto;
        max-width: 100%;
    }

    .form-right {
        border-left: none;
        padding-left: 0;
    }

    .footer-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .footer-meta {
        text-align: left;
    }
}

/* Alerts */
.alert {
    background-color: #FFF5F5;
    border-top: 4px solid #F56565;
    border-bottom-left-radius: 0.375rem; /* rounded-b */
    border-bottom-right-radius: 0.375rem;
    color: #C53030;
    padding: 0.75rem 1rem; /* px-4 py-3 */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); /* shadow-md */
    margin-bottom: 20px;
}

.alert-content {
    display: flex;
    align-items: center;
}

.alert-icon {
    padding-top: 0.25rem; /* py-1 */
}

.icon {
    fill: currentColor;
    height: 1.5rem; /* h-6 */
    width: 1.5rem; /* w-6 */
    color: #F56565;
    margin-right: 1rem; /* mr-4 */
}

.alert-message {
    flex: 1;
}

.error-title {
    font-weight: 500; /* font-bold */
    margin: 0;
}

.description {
    margin: 0;
    font-size: 0.875rem; /* text-sm */
    line-height: 1.25rem;
}

.alert-success {
    background-color: #F0FFF4;
    border-top: 4px solid #48BB78;
    color: #276749;
}

    .alert-success .icon {
        color: #48BB78;
    }

.icon-success {
    fill: currentColor;
    height: 1.5rem;
    width: 1.5rem;
    color: #48BB78;
    margin-right: 1rem;
}
html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
}

/* Site-wide footer (version / environment / build date). The version
   and build date are baked in at build time (see src/Directory.Build.targets
   + src/Web/AppVersion.cs); the environment name is resolved at runtime
   via IWebHostEnvironment. */
.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 6px 16px;
    text-align: center;
    color: #9ca3af;
    font-size: 11px;
    background: transparent;
    pointer-events: none;
}

.site-footer .sep {
    margin: 0 6px;
    color: #d1d5db;
}