/*
 * Úpravy vzhledu nad skinem Elastic (plugin brand).
 * Barva značky je v proměnných --brand, --brand-deep, --brand-soft z cache/*-accent.css.
 */

/* ---------- Přihlášení ---------- */

body.task-login {
    background: #f1f4f9;
}
html.dark-mode body.task-login {
    background: #161b1f;
}
body.task-login #layout-content {
    background:
        radial-gradient(1200px 520px at 50% -140px, var(--brand-soft, #eaf1ff) 0%, transparent 70%),
        transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    padding: 2rem 1rem;
    overflow-y: auto;
}
html.dark-mode body.task-login #layout-content {
    background: radial-gradient(1200px 520px at 50% -140px, rgba(255, 255, 255, .06) 0%, transparent 70%);
}
body.task-login #logo {
    top: 0;
    height: 72px;
    max-height: 72px;
    max-width: 92%;
    margin-bottom: 1.75rem;
    opacity: 1;
}
body.task-login #login-form {
    top: 0;
    max-width: 400px;
    width: 100%;
    background: #fff;
    border-radius: 18px;
    padding: 1.75rem 1.75rem 1.25rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 12px 40px -12px rgba(15, 23, 42, .18);
    text-align: left;
}
html.dark-mode body.task-login #login-form {
    background: #20282d;
    box-shadow: 0 0 0 1px #33414a, 0 12px 40px -12px rgba(0, 0, 0, .6);
}
body.task-login .brand-welcome {
    margin: 0 0 1.1rem;
    font-size: 1.15rem;
    font-weight: 600;
    color: #1e293b;
    text-align: center;
}
html.dark-mode body.task-login .brand-welcome {
    color: #e2e8f0;
}
body.task-login #login-form td.title {
    display: none;
}
body.task-login #login-form .form-control,
body.task-login #login-form .input-group-text {
    height: 3rem;
    font-size: 1rem;
    border-radius: 10px;
}
body.task-login #login-form .input-group > .form-control {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}
body.task-login #login-form .input-group > .input-group-prepend .input-group-text {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}
body.task-login #login-form tbody tr + tr td {
    padding-top: .65rem;
}
body.task-login #rcmloginsubmit {
    height: 3rem;
    margin-top: 1.1rem;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 10px;
}
body.task-login .brand-hint {
    margin: 1rem 0 .25rem;
    font-size: .85rem;
    line-height: 1.45;
    color: #64748b;
    text-align: center;
}
body.task-login #login-footer {
    margin-top: 1.25rem;
    font-size: .8rem;
    text-align: center;
    color: #94a3b8;
}
@media screen and (max-width: 480px) {
    body.task-login #layout-content {
        justify-content: flex-start;
        padding-top: 2.5rem;
    }
    body.task-login #logo {
        height: 56px;
        margin-bottom: 1.25rem;
    }
    body.task-login #login-form {
        padding: 1.25rem 1.1rem 1rem;
        border-radius: 14px;
    }
}

/* ---------- Aplikace ---------- */

/* logo v postranním menu */
#layout-menu #logo {
    max-width: 44px;
    max-height: 44px;
    margin: 7px auto;
    opacity: 1;
    border-radius: 11px;
}
@media screen and (max-width: 1024px) {
    #layout-menu #logo {
        max-width: 30px;
    }
}

/* položky menu – zvýraznění vybrané záložky */
#layout-menu a.selected,
#layout-menu a:hover {
    background-color: var(--brand-menu-hover, rgba(255, 255, 255, .08));
}
html.dark-mode #layout-menu a.selected,
html.dark-mode #layout-menu a:hover {
    background-color: rgba(255, 255, 255, .06);
}

/* jemnější zaoblení tlačítek a polí */
.btn,
.form-control,
.custom-select,
.input-group-text {
    border-radius: 8px;
}
.input-group > .form-control:not(:first-child),
.input-group > .custom-select:not(:first-child) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}
.input-group > .form-control:not(:last-child),
.input-group > .custom-select:not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

/* seznam zpráv – nepřečtené výrazněji, víc vzduchu */
#messagelist tr.unread td.subject span.subject a,
#messagelist tr.unread td.subject span.fromto {
    font-weight: 700;
}
#messagelist tr.unread td.subject span.subject a {
    color: #0f172a;
}
html.dark-mode #messagelist tr.unread td.subject span.subject a {
    color: #f1f5f9;
}

/* hlavička panelů */
#layout > div > .header {
    background-color: #f8fafc;
}
html.dark-mode #layout > div > .header {
    background-color: transparent;
}

/* ---------- Zůstat přihlášen ---------- */

body.task-login .brand-remember {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin: .9rem 0 0;
    font-size: .95rem;
    color: #334155;
    cursor: pointer;
    user-select: none;
}
body.task-login .brand-remember input {
    width: 1.15rem;
    height: 1.15rem;
    margin: 0;
    accent-color: var(--brand, #2f6fed);
    cursor: pointer;
}
html.dark-mode body.task-login .brand-remember {
    color: #cbd5e1;
}

/* ---------- Instalační lišta appky ---------- */

#brand-install {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: .75rem;
    max-width: 520px;
    margin: 0 auto;
    padding: .75rem .6rem .75rem 1rem;
    background: #fff;
    color: #1e293b;
    border-radius: 14px;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, .06), 0 12px 32px -8px rgba(15, 23, 42, .35);
    font-size: .92rem;
    line-height: 1.4;
}
html.dark-mode #brand-install {
    background: #263036;
    color: #e2e8f0;
    box-shadow: 0 0 0 1px #3a4850, 0 12px 32px -8px rgba(0, 0, 0, .7);
}
#brand-install .brand-install-text {
    flex: 1;
}
#brand-install .brand-share {
    width: 1.1em;
    height: 1.1em;
    vertical-align: -.2em;
    color: var(--brand, #2f6fed);
}
#brand-install .brand-install-go {
    flex: none;
    border: 0;
    border-radius: 9px;
    padding: .55rem .9rem;
    background: var(--brand, #2f6fed);
    color: #fff;
    font-weight: 600;
    font-size: .92rem;
}
#brand-install .brand-install-close {
    flex: none;
    width: 2.25rem;
    height: 2.25rem;
    border: 0;
    background: transparent;
    color: inherit;
    opacity: .55;
    font-size: 1.5rem;
    line-height: 1;
}

/* ---------- Nastavení: upozornění v telefonu ---------- */

.brand-push-pref {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem .75rem;
}
.brand-push-pref .brand-push-buttons {
    display: inline-flex;
    gap: .5rem;
}
.brand-push-pref .btn {
    margin: 0;
}
