
/* Corporate theme. Login retains its own layout. */
body:not(.login) {
    color-scheme: dark;

    --primary: #22364d;
    --secondary: #17273b;
    --accent: #e8b854;
    --primary-fg: #f2f5fa;

    --body-fg: #e1e8f2;
    --body-bg: #0d1624;
    --body-quiet-color: #b7c3d4;
    --body-medium-color: #cbd5e3;
    --body-loud-color: #ffffff;

    --header-color: #dce5f1;
    --header-branding-color: #e8b854;
    --header-bg: #152338;
    --header-link-color: #edf2f8;

    --breadcrumbs-fg: #b9c8db;
    --breadcrumbs-link-fg: #f1d395;
    --breadcrumbs-bg: #152235;

    --link-fg: #f0c970;
    --link-hover-color: #ffe4a9;
    --link-selected-fg: #ffe4a9;

    --hairline-color: #2d3c50;
    --border-color: #3d4e64;
    --darkened-bg: #152235;
    --selected-bg: #263b54;
    --selected-row: #293d50;

    --button-fg: #ffffff;
    --button-bg: #304963;
    --button-hover-bg: #3c5a79;
    --default-button-bg: #d60903;
    --default-button-hover-bg: #b80803;
    --close-button-bg: #34445a;
    --close-button-hover-bg: #455b76;
    --delete-button-bg: #a92d36;
    --delete-button-hover-bg: #87222a;

    --object-tools-fg: #ffffff;
    --object-tools-bg: #304963;
    --object-tools-hover-bg: #3c5a79;

    --error-fg: #ffb4bb;
    --message-success-bg: #183d31;
    --message-warning-bg: #493b20;
    --message-error-bg: #48252e;

    font-family: "Segoe UI", Arial, sans-serif;
    background:
        radial-gradient(ellipse at top left, #1e3148 0%, transparent 65%)
        fixed,
        #0d1624;
    color: var(--body-fg);
}

body:not(.login) #header {
    min-height: 84px;
    box-sizing: border-box;
    padding: 14px 32px;
    gap: 20px;
    background: linear-gradient(110deg, #24374e, #111c2d);
    border-bottom: 1px solid #415068;
    box-shadow: 0 5px 20px rgba(0, 0, 0, .18);
}

body:not(.login) #branding {
    float: none;
}
.phoenix-header-brand {
    display: flex;
    align-items: center;
    gap: 23px;
    text-decoration: none;
}
.phoenix-header-brand img {
    display: block;
    width: 170px;
    height: auto;
}
.phoenix-header-brand span {
    padding-left: 23px;
    border-left: 1px solid #59657a;
    color: #d3deeb;
    font-size: 14px;
    line-height: 1.5;
}

body:not(.login) #user-tools {
    color: #c9d4e3;
    font-size: 11px;
    line-height: 1.8;
}
body:not(.login) .theme-toggle {
    display: none;
}
body:not(.login) #user-tools a,
body:not(.login) #user-tools button {
    color: #f0d190;
}

body:not(.login) #content {
    padding: 30px 36px;
}
body:not(.login) #content h1 {
    color: #f3f6fb;
    font-size: 25px;
    font-weight: 500;
    margin-bottom: 24px;
}

body:not(.login) .module {
    background: #142135;
    border: 1px solid #34445a;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, .12);
}
body:not(.login) .module caption,
body:not(.login) .module h2,
body:not(.login) .inline-group h2 {
    padding: 13px 15px;
    background: #20334a;
    color: #edc77b;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .4px;
}
body:not(.login) .module caption {
    border-radius: 11px 11px 0 0;
}
body:not(.login) .module caption a {
    color: #edc77b;
}
body:not(.login) .module table {
    width: 100%;
}
body:not(.login) .module td,
body:not(.login) .module th {
    padding: 13px 15px;
}
body:not(.login) .module tbody tr:nth-child(odd),
body:not(.login) .row1 {
    background: #142135;
}
body:not(.login) .module tbody tr:nth-child(even),
body:not(.login) .row2 {
    background: #19283d;
}
body:not(.login) .module tbody tr:hover {
    background: #24384f;
}
body:not(.login) .module th a {
    font-weight: 500;
}
body:not(.login) .addlink,
body:not(.login) .changelink {
    color: #d9e3f0;
}

body:not(.login).dashboard #content {
    width: auto;
}
body:not(.login).dashboard #content-main {
    width: calc(100% - 325px);
    max-width: 1050px;
}
body:not(.login).dashboard #content-related {
    width: 285px;
    margin-right: 0;
    background: #142135;
    border: 1px solid #34445a;
    border-radius: 12px;
}
body:not(.login) #content-related h2 {
    color: #edc77b;
    padding: 16px;
    border-bottom: 1px solid #34445a;
}
body:not(.login) #content-related h3 {
    color: #d2ddeb;
}

body:not(.login) div.breadcrumbs {
    padding: 13px 36px;
    border-bottom: 1px solid #2e3c50;
}
body:not(.login) #nav-sidebar {
    background: #101c2c;
    border-right: 1px solid #34445a;
}
body:not(.login) #toggle-nav-sidebar {
    background: #19283d;
    color: #e8b854;
    border-color: #34445a;
}
body:not(.login) #nav-filter {
    box-sizing: border-box;
    max-width: 100%;
}

body:not(.login) input:not([type=submit]):not([type=button]):not([type=checkbox]):not([type=radio]):not([type=hidden]),
body:not(.login) textarea,
body:not(.login) select {
    background: #0d1929;
    color: #edf2f8;
    border: 1px solid #52647b;
    border-radius: 7px;
}
body:not(.login) input:focus,
body:not(.login) textarea:focus,
body:not(.login) select:focus {
    outline: 2px solid #d9ad55;
    outline-offset: 2px;
}
body:not(.login) .button,
body:not(.login) input[type=submit],
body:not(.login) input[type=button],
body:not(.login) .submit-row a {
    border-radius: 7px;
}
body:not(.login) .submit-row {
    background: #17263a;
    border: 1px solid #34445a;
    border-radius: 10px;
}

body:not(.login) #changelist {
    background: #142135;
}
body:not(.login) #changelist #toolbar,
body:not(.login) #changelist .actions,
body:not(.login) #changelist .paginator {
    background: #17263a;
    color: #d5dfec;
}
body:not(.login) #changelist-filter {
    background: #17263a;
}
body:not(.login) #changelist-filter h2 {
    background: #20334a;
    color: #edc77b;
}
body:not(.login) .select2-container--admin-autocomplete .select2-selection {
    background: #0d1929;
    border-color: #52647b;
}
body:not(.login) .select2-container--admin-autocomplete .select2-selection__rendered {
    color: #edf2f8;
}
body:not(.login) .select2-container--admin-autocomplete .select2-dropdown,
body:not(.login) .select2-container--admin-autocomplete .select2-results__option {
    background: #17263a;
    color: #edf2f8;
}
body:not(.login) .select2-container--admin-autocomplete .select2-results__option--highlighted {
    background: #304963;
    color: #fff;
}
body:not(.login) a:focus-visible,
body:not(.login) button:focus-visible {
    outline: 2px solid #e8b854;
    outline-offset: 3px;
}

@media (max-width: 1100px) {
    .phoenix-header-brand span {
        display: none;
    }
}
@media (max-width: 767px) {
    body:not(.login) #header {
        padding: 14px 18px;
    }
    body:not(.login) #content {
        padding: 22px 16px;
    }
    body:not(.login).dashboard #content-main {
        width: 100%;
        max-width: none;
    }
    body:not(.login).dashboard #content-related {
        width: 100%;
        margin: 22px 0 0;
        box-sizing: border-box;
    }
    body:not(.login) div.breadcrumbs {
        padding: 12px 16px;
    }
}


/* PHOENIX_UI_RULES_START */

/* Add actions: green text and icons. */
body:not(.login) a.addlink,
body:not(.login) .module a.addlink {
    color: #8ce6a9;
}
body:not(.login) a.addlink:hover {
    color: #b9ffcf;
}
body:not(.login) .object-tools a.addlink {
    background-color: #176b3b;
    color: #ffffff;
}
body:not(.login) .object-tools a.addlink:hover,
body:not(.login) .object-tools a.addlink:focus {
    background-color: #21864c;
}
body:not(.login) input[name="_addanother"] {
    background: #176b3b;
    color: #ffffff;
}
body:not(.login) input[name="_addanother"]:hover {
    background: #21864c;
}
body:not(.login) .related-widget-wrapper-link.add-related img {
    filter: brightness(0) saturate(100%)
        invert(80%) sepia(38%) saturate(520%)
        hue-rotate(84deg) brightness(100%) contrast(91%);
}

/* Actions remain on the right. */
body:not(.login) .object-tools {
    float: right;
}
body:not(.login) .submit-row {
    text-align: right;
}

/* Desktop: move navigation to the right without reversing text. */
@media (min-width: 768px) {
    body:not(.login) .main > #nav-sidebar {
        order: 3;
        border-right: 0;
        border-left: 1px solid #34445a;
        margin-left: 0;
        margin-right: -275px;
    }
    body:not(.login) .main > #toggle-nav-sidebar {
        order: 2;
        left: auto;
        right: 0;
        border-right: 0;
        border-left: 1px solid #34445a;
        transform: scaleX(-1);
    }
    body:not(.login) .main > .content {
        order: 1;
    }
    body:not(.login) .main.shifted > #nav-sidebar {
        margin-left: 0;
        margin-right: 0;
    }
    body:not(.login) .main > #nav-sidebar + .content,
    body:not(.login) .main.shifted > #nav-sidebar + .content {
        max-width: calc(100% - 24px);
    }
    body:not(.login) .main.shifted > #nav-sidebar + .content {
        max-width: calc(100% - 299px);
    }
}

/* PHOENIX_UI_RULES_END */


/* PHOENIX_ADD_BUTTON_LABELS */
body:not(.login) .object-tools a.addlink {
    text-transform: none;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: normal;
    background-color: #176b3b;
    color: #ffffff;
}

body:not(.login) .object-tools a.addlink:hover,
body:not(.login) .object-tools a.addlink:focus {
    background-color: #21864c;
    color: #ffffff;
}
