/* DiamondVision Authelia Login - safe readable version */

html,
body {
    min-height: 100vh !important;
    margin: 0 !important;
    background: #556879 !important;
    color: #ffffff !important;
}

body::before {
    display: none !important;
    content: none !important;
}

/* Outer containers */
#root,
#root > div,
main,
.MuiContainer-root,
.MuiBox-root,
.MuiGrid-root,
.MuiPaper-root {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

/* Login card/form */
form {
    width: min(720px, 88vw) !important;
    background: #101b27 !important;
    border: 1px solid #1c87c9 !important;
    border-top: 4px solid #ff6a00 !important;
    border-radius: 18px !important;
    padding: 34px 40px !important;
    box-shadow: 0 14px 34px rgba(0,0,0,0.45) !important;
}

/* Text */
h1, h2, h3, h4, h5, h6,
.MuiTypography-root {
    color: #ffffff !important;
    text-shadow: none !important;
}

/* Give fields more vertical room */
form .MuiFormControl-root,
form [class*="MuiFormControl-root"] {
    width: 100% !important;
    margin-bottom: 28px !important;
}

/* Input fields */
.MuiInputBase-root,
.MuiOutlinedInput-root {
    background: #d4dae2 !important;
    color: #111111 !important;
    border-radius: 10px !important;
    min-height: 64px !important;
}

/* Labels stay default position, but readable */
.MuiInputLabel-root,
.MuiFormLabel-root,
label {
    color: #111111 !important;
    font-weight: 700 !important;
    text-shadow: none !important;
}

.MuiInputLabel-root.Mui-focused,
.MuiFormLabel-root.Mui-focused {
    color: #111111 !important;
}

/* Typed text */
input,
.MuiInputBase-input,
.MuiOutlinedInput-input {
    color: #111111 !important;
    caret-color: #111111 !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    background: transparent !important;
}

/* Borders */
.MuiOutlinedInput-notchedOutline {
    border-color: #1c87c9 !important;
    border-width: 2px !important;
}

.Mui-focused .MuiOutlinedInput-notchedOutline {
    border-color: #ff6a00 !important;
    border-width: 2px !important;
    box-shadow: 0 0 10px rgba(255,106,0,0.75) !important;
}

/* Password eye icon */
.MuiInputAdornment-root svg,
.MuiIconButton-root svg {
    color: #111111 !important;
}

/* Remember Me */
.MuiFormControlLabel-label {
    color: #ffffff !important;
    font-size: 20px !important;
    font-weight: 700 !important;
}

.MuiCheckbox-root,
.MuiCheckbox-root svg {
    color: #d4dae2 !important;
}

.MuiCheckbox-root svg {
    background: #d4dae2 !important;
    border-radius: 4px !important;
}

.MuiCheckbox-root.Mui-checked svg {
    color: #ff6a00 !important;
}

/* Button */
.MuiButton-containedPrimary,
button[type="submit"] {
    min-height: 58px !important;
    background: linear-gradient(180deg, #249be6, #0b5c91) !important;
    border-top: 3px solid #ff6a00 !important;
    border-radius: 12px !important;
    color: #ffffff !important;
    font-size: 18px !important;
    font-weight: bold !important;
    letter-spacing: 0.08em !important;
    box-shadow: 0 8px 18px rgba(0,0,0,0.45) !important;
}

/* Links */
a,
.MuiLink-root {
    color: #c9ecff !important;
    font-size: 18px !important;
    font-weight: 700 !important;
}

a:hover,
.MuiLink-root:hover {
    color: #ffb26b !important;
}

/* Top language bar */
header,
.MuiAppBar-root,
.MuiToolbar-root {
    background: #101b27 !important;
    border-top: 3px solid #ff6a00 !important;
}

/* Hide footer if CSS catches it */
footer,
[class*="footer"],
[class*="Footer"] {
    display: none !important;
}

/* Hide avatar if CSS catches it */
.MuiAvatar-root,
[class*="Avatar"],
[data-testid*="Person"],
[data-testid*="AccountCircle"] {
    display: none !important;
}

/* Autofill */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-text-fill-color: #111111 !important;
    box-shadow: 0 0 0px 1000px #d4dae2 inset !important;
}

/* Final hamburger/menu visibility fix */
.MuiAppBar-root button:first-of-type,
.MuiToolbar-root button:first-of-type,
header button:first-of-type {
    background: #1c87c9 !important;
    border: 2px solid #ff6a00 !important;
    border-radius: 10px !important;
    color: #ffffff !important;
    min-width: 56px !important;
    min-height: 48px !important;
    opacity: 1 !important;
}

.MuiAppBar-root button:first-of-type svg,
.MuiToolbar-root button:first-of-type svg,
header button:first-of-type svg {
    color: #ffffff !important;
    fill: #ffffff !important;
    opacity: 1 !important;
}

.MuiAppBar-root button:first-of-type:hover,
.MuiToolbar-root button:first-of-type:hover,
header button:first-of-type:hover {
    background: #249be6 !important;
}

/* Return-to-portal button on Authelia pages */
.dv-portal-button {
    position: fixed !important;
    top: 12px !important;
    right: 120px !important;
    z-index: 9999 !important;
    background: linear-gradient(180deg, #1c87c9, #0b5c91) !important;
    border-top: 3px solid #ff6a00 !important;
    border-left: 1px solid #1c87c9 !important;
    border-right: 1px solid #1c87c9 !important;
    border-bottom: 1px solid #1c87c9 !important;
    border-radius: 10px !important;
    color: #ffffff !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 15px !important;
    font-weight: bold !important;
    text-decoration: none !important;
    padding: 10px 18px !important;
    box-shadow: 0 6px 14px rgba(0,0,0,0.45) !important;
}

.dv-portal-button:hover {
    background: linear-gradient(180deg, #249be6, #0d6ead) !important;
}

/* Authelia dialog readability fix */
[role="dialog"],
.MuiDialog-paper {
    background: #1f2d38 !important;
    color: #ffffff !important;
    border: 2px solid #56b7f0 !important;
    box-shadow: 0 12px 30px rgba(0,0,0,0.75) !important;
}

[role="dialog"] *,
.MuiDialog-paper * {
    color: #ffffff !important;
}

[role="dialog"] input,
.MuiDialog-paper input {
    background: #dfe6ee !important;
    color: #111111 !important;
}

[role="dialog"] button,
.MuiDialog-paper button {
    color: #ffffff !important;
}
