/* Dia.html — load LAST after Bootstrap and all app CSS so premium tokens apply */
@import url("https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,500;1,600&display=swap");

:root {
    --dw-primary: #1B5F97;
    --dw-primary-dark: #0369a1;
    --dw-primary-light: #e0f2fe;
    --dw-surface: #f1f5f9;
    --dw-surface-elevated: #ffffff;
    --dw-text: #0f172a;
    --dw-text-secondary: #475569;
    --dw-text-muted: #64748b;
    --dw-border: #e2e8f0;
    --dw-border-strong: #cbd5e1;
    --dw-radius: 10px;
    --dw-radius-sm: 6px;
    --dw-shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.06), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
    --dw-shadow-lg: 0 12px 24px -8px rgba(15, 23, 42, 0.12), 0 4px 8px -4px rgba(15, 23, 42, 0.06);
    --dw-font-sans: "Montserrat", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Higher specificity than Bootstrap Reboot + later app sheets */
body#body {
    font-family: var(--dw-font-sans) !important;
    font-size: 15px !important;
    line-height: 1.5 !important;
    color: var(--dw-text) !important;
    background-color: var(--dw-surface) !important;
}

body#body *:not(i):not(.fa):not(.fas):not(.far):not(.fab):not(.fa-solid):not(.fa-regular):not(.fa-brands) {
    font-family: var(--dw-font-sans) !important;
}

/* Align Bootstrap 5 components with the same palette */
body#body {
    --bs-body-font-family: var(--dw-font-sans);
    --bs-body-color: var(--dw-text);
    --bs-body-bg: var(--dw-surface);
    --bs-primary: #1B5F97;
    --bs-primary-rgb: 27, 95, 151;
    --bs-link-color: #0369a1;
    --bs-link-hover-color: #1B5F97;
}

.login-box {
    background: linear-gradient(165deg, var(--dw-primary) 0%, var(--dw-primary-dark) 100%) !important;
    border-radius: var(--dw-radius) !important;
    box-shadow: var(--dw-shadow-lg) !important;
}

.login-btn:hover {
    background-color: var(--dw-primary) !important;
}

/* Dialog login (ref/DialogLogin.html) — not used by Diary */
@keyframes dlg-ecgpulse {
    0%, 100% { opacity: 0.55; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.35); }
}

body#body:has(.dlg-login) {
    background-color: #fff !important;
}

body#body:has(.dlg-login) #bodyId {
    min-height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Fixed left menubar sits over #bodyId; keep a gap beside the rail */
body#body:has(nav.menubar) #bodyId {
    margin-left: 66px;
}

.dlg-login {
    display: flex;
    height: 100vh;
    background: #fff;
    font-family: var(--dw-font-sans);
    color: #10211f;
    -webkit-font-smoothing: antialiased;
}

.dlg-loginbrand {
    flex: 0 0 46%;
    background: linear-gradient(155deg, #1b5f97, #0e3b5e 70%);
    color: #fff;
    padding: 52px 52px 38px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.dlg-login .dlg-ecg-pulse {
    animation: dlg-ecgpulse 1.8s ease-in-out infinite;
    transform-origin: 65px 46px;
}

.dlg-login-field {
    height: 46px;
    border: 1px solid #dce6e4;
    border-radius: 11px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    margin-top: 7px;
    background: #fff;
}

.dlg-login-field input {
    border: none;
    outline: none;
    flex: 1;
    font-family: var(--dw-font-sans);
    font-size: 14px;
    color: #10211f;
    background: none;
    box-shadow: none;
}

.dlg-login-field input::placeholder {
    color: #9aaca9;
}

.dlg-login-cta {
    width: 100%;
    height: 47px;
    border: none;
    border-radius: 12px;
    background: #1B5F97;
    color: #fff;
    font-family: var(--dw-font-sans);
    font-weight: 700;
    font-size: 14.5px;
    cursor: pointer;
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.dlg-login-cta:hover {
    background: #1e78be;
}

@media (max-width: 860px) {
    .dlg-login {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }
    .dlg-loginbrand {
        flex: none;
        padding: 16px 20px 14px;
    }
    .dlg-login-hero {
        margin-top: 8px !important;
    }
    .dlg-login-headline {
        font-size: 18px !important;
        line-height: 1.25 !important;
    }
    .dlg-login-sub {
        font-size: 13px !important;
        line-height: 1.4 !important;
        margin-top: 6px !important;
    }
    .dlg-login-trust,
    .dlg-login-eco {
        display: none !important;
    }
    .dlg-login-form {
        align-items: flex-start !important;
        padding: 18px 20px 24px !important;
        overflow: visible !important;
    }
}
