/* LATGA Outlook add-in — santūri spalvų paletė.
   Pakeiskite wwwroot/app.css. HTML ir JavaScript keisti nereikia.
   Paletės HEX reikšmės paimtos iš pateikto pavyzdžio.
*/
:root {
    --brand-white: #FFFFFF;
    --brand-black: #0A0A0A;
    --brand-green: #AFF500;
    --brand-green-soft: #D7FF9B;
    --brand-peach: #EBCDB4;
    --brand-gray: #BEC3C8;
    /* Neutralūs ir pašviesinti paletės atspalviai */
    --page-bg: #F6F7F6;
    --surface: var(--brand-white);
    --surface-soft: #F8F9F7;
    --text: var(--brand-black);
    --text-muted: #555C60;
    --border: #DFE2DF;
    --success-bg: #F4FAEC;
    --warning-bg: #FAF1E9;
    --error-text: #713C26;
    --radius: 10px;
    --control-radius: 7px;
    font-family: "Segoe UI", system-ui, sans-serif;
    color: var(--text);
    background: var(--page-bg);
    font-size: 14px;
    line-height: 1.5;
    color-scheme: light;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 0; }

header {
    padding: 20px 20px 16px;
    background: var(--surface);
    border-top: 3px solid var(--brand-green-soft);
    border-bottom: 1px solid var(--border);
}
.brand {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 650;
    letter-spacing: .07em;
    overflow-wrap: anywhere;
}
h1 {
    margin: 9px 0 12px;
    font-size: 22px;
    font-weight: 650;
    line-height: 1.25;
    letter-spacing: -.025em;
}
h2 {
    margin: 0 0 14px;
    font-size: 16px;
    font-weight: 650;
    line-height: 1.35;
    letter-spacing: -.015em;
}
p { line-height: 1.5; }
header p { margin: 3px 0; }
main { padding: 14px; }
.muted {
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}
section {
    margin-bottom: 14px;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 2px 5px rgb(10 10 10 / 2%);
}
label {
    display: block;
    margin: 11px 0 7px;
    font-size: 13px;
    font-weight: 600;
}
input, select {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 40px;
    margin-top: 6px;
    padding: 8px 10px;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--brand-green);
    border-radius: var(--control-radius);
    font: inherit;
}
input::placeholder { color: var(--text-muted); opacity: 1; }
select { cursor: pointer; }
input:hover:not(:disabled) { background: var(--brand-green-soft); }
button {
    max-width: 100%;
    min-height: 40px;
    margin: 7px 4px 0 0;
    padding: 9px 14px;
    border: 1px solid var(--brand-green);
    border-radius: var(--control-radius);
    background: var(--brand-green);
    color: var(--brand-black);
    font: inherit;
    font-weight: 600;
    line-height: 1.35;
    cursor: pointer;
    overflow-wrap: anywhere;
}
button:hover:not(:disabled) {
    background: var(--brand-green-soft);
    border-color: var(--brand-green);
}
button:active:not(:disabled) { background: var(--brand-green-soft); }
button:disabled {
    opacity: .5;
    cursor: not-allowed;
}
.secondary {
    background: var(--success-bg);
    color: var(--text);
    border-color: var(--brand-green);
    font-weight: 500;
}
.secondary:hover:not(:disabled) {
    background: var(--brand-green-soft);
    border-color: var(--brand-green);
}
.secondary:active:not(:disabled) { background: var(--brand-green-soft); }
button:focus-visible,
input:focus-visible,
select:focus-visible,
button:focus,
input:focus,
select:focus {
    border-color: var(--brand-green);
    outline: none;
    box-shadow: none;
}
summary:focus-visible,
a:focus-visible {
    outline: 2px solid var(--brand-green);
    outline-offset: 3px;
}
input:disabled, select:disabled {
    color: var(--text-muted);
    background: #F0F1EE;
    border-color: var(--border);
    cursor: not-allowed;
    opacity: .75;
}
.file {
    padding: 14px 0;
    border-top: 1px solid var(--border);
}
.file:first-child { padding-top: 0; border-top: 0; }
.file:last-child { padding-bottom: 6px; }
.file strong {
    display: block;
    font-weight: 600;
    overflow-wrap: anywhere;
}
.file span { display: block; margin-top: 4px; }
.file label:not(.file-choice) { margin-top: 10px; }
.file-choice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 8px 0;
    cursor: pointer;
    line-height: 1.5;
}
.file-choice input[type=checkbox] {
    appearance: none;
    display: grid;
    place-content: center;
    width: 18px;
    height: 18px;
    min-height: 18px;
    flex: 0 0 18px;
    margin: 1px 0 0;
    padding: 0;
    border: 1px solid var(--brand-green);
    border-radius: 4px;
    cursor: pointer;
}
.file-choice input[type=checkbox]:checked { background: var(--brand-green); }
.file-choice input[type=checkbox]:checked::after {
    content: "";
    width: 5px;
    height: 9px;
    border: solid var(--brand-black);
    border-width: 0 2px 2px 0;
    transform: translateY(-2px) rotate(45deg);
}
.file-choice input[type=checkbox]:indeterminate { background: var(--brand-green); }
.file-choice input[type=checkbox]:indeterminate::after {
    content: "";
    width: 10px;
    height: 2px;
    background: var(--brand-black);
}
.file-choice:hover input[type=checkbox]:not(:disabled) {
    background: var(--brand-green-soft);
    border-color: var(--brand-green);
}
.file-choice input[type=checkbox]:disabled { cursor: not-allowed; }
.file-choice strong { min-width: 0; padding-top: 0; }
#selectionControls { padding: 1px 0 8px; }
#commonSettings {
    margin-bottom: 14px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-soft);
}
#commonSettings > label:first-child { margin-top: 0; }
#commonSettings .muted { margin: 8px 0; }
#saveDefault { margin-top: 3px; font-size: 12px; }
#signSelected {
    width: 100%;
    margin-right: 0;
    margin-top: 12px;
}
#account {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px;
    box-shadow: none;
}
#username {
    flex: 1 1 120px;
    min-width: 0;
    font-size: 13px;
    font-weight: 600;
    overflow-wrap: anywhere;
}
#logout { margin: 0; font-size: 12px; }
#account[hidden], [hidden] { display: none !important; }
.all button { width: 100%; margin-right: 0; }

details { margin-top: 16px; }
summary {
    color: var(--text);
    cursor: pointer;
    font-size: 13px;
    line-height: 1.5;
}
summary:hover {
    background: var(--brand-green-soft);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.challenge {
    margin-top: 16px;
    padding: 16px;
    text-align: center;
    background: var(--success-bg);
    border: 1px solid #A8BA93;
    border-radius: var(--radius);
}
.challenge p { margin: 6px 0; }
.vc {
    display: block;
    padding: 8px 0;
    font-size: 40px;
    font-weight: 650;
    letter-spacing: .16em;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
    color: var(--brand-black);
}
.notice {
    margin-bottom: 14px;
    padding: 12px 14px;
    border: 1px solid #DBE5D1;
    border-left: 3px solid var(--brand-green-soft);
    border-radius: 8px;
    background: var(--success-bg);
    color: #33402B;
    font-size: 13px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}
.error {
    background: var(--warning-bg);
    border-color: var(--brand-peach);
    border-left-color: #9A664B;
    color: var(--error-text);
}
ol { list-style: none; margin: 0; padding: 0; }
li {
    padding: 11px 0;
    border-bottom: 1px solid var(--border);
    overflow-wrap: anywhere;
}
li small { display: block; margin-top: 4px; color: var(--text-muted); }
    li small.status-error {
        color: #A65A5A;
    }
#currentDocument { font-weight: 600; overflow-wrap: anywhere; }
#partialNotice {
    padding: 12px;
    border: 1px solid var(--brand-peach);
    border-radius: 8px;
    background: var(--warning-bg);
    color: #614731;
}
a {
    color: var(--text);
    text-decoration: underline;
    text-underline-offset: 3px;
}
a:hover {
    background: var(--brand-green-soft);
    text-decoration-thickness: 2px;
}
footer {
    padding: 2px 20px 20px;
    color: var(--text-muted);
    font-size: 12px;
}

.design-preview {
    max-width: 600px;
    margin: 0 auto;
}
.design-scenario { margin-bottom: 30px; }
.design-scenario .file:first-of-type { padding-top: 0; border-top: 0; }
.design-scenario .file:last-of-type { padding-bottom: 6px; }
.design-heading {
    margin: 0 0 10px;
    padding: 0 2px;
    color: var(--text-muted);
    font-size: 14px;
}

@media (max-width: 360px) {
    header { padding: 16px 14px 14px; }
    main { padding: 10px; }
    section { padding: 13px; }
    h1 { font-size: 20px; }
    #account { padding: 12px 13px; }
    #commonSettings { padding: 10px; }
    footer { padding-right: 14px; padding-left: 14px; }
}
@media (prefers-reduced-motion: reduce) {
    button { transition: none; }
}
@media (forced-colors: active) {
    button, .secondary, input, select { border-color: ButtonText; }
    button:focus-visible, input:focus-visible, select:focus-visible,
    summary:focus-visible, a:focus-visible { outline-color: Highlight; }
}
