:root {
    --waidok-blue: #040731;
    --waidok-intelligence-blue: #006cff;
    --waidok-magenta: #dc01b9;
    --waidok-transition-blue: #1b1c72;
    --waidok-white-paper: #ffffff;
    --waidok-gray-paper: #f2f2f2;
    --waidok-purple: #360da5;
    --waidok-light-blue: #b8d3ff;
    --bg: #f2f2f2;
    --panel: #ffffff;
    --text: #040731;
    --muted: #59627f;
    --line: #dce5f7;
    --accent: #006cff;
    --accent-dark: #0053c7;
    --danger: #dc01b9;
}

html {
    min-height: 100%;
    background-color: var(--waidok-gray-paper);
}

body {
    min-height: 100vh;
    background-color: var(--waidok-gray-paper);
    background-image:
        radial-gradient(circle at 52% -18%, rgba(0, 108, 255, .14), transparent 36%),
        linear-gradient(180deg, #ffffff 0%, #f2f2f2 42%, #f2f2f2 100%);
    background-repeat: no-repeat;
    color: var(--text);
    font-family: Lato, "Segoe UI", Arial, sans-serif;
}

main.container {
    min-height: calc(100vh - 74px);
}

a {
    color: var(--accent);
}

h1,
h2,
.brand,
.section-tab {
    color: var(--waidok-blue);
    font-family: Gladiora, Lato, "Segoe UI", Arial, sans-serif;
}

.topbar {
    background: linear-gradient(100deg, #040731 0%, #0b1256 58%, #1b1c72 100%);
    border-bottom: 0;
    color: #ffffff;
    box-shadow: 0 16px 40px rgba(4, 7, 49, .15);
}

.topbar.public {
    display: flex;
    align-items: center;
    min-height: 74px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: #ffffff;
    font-weight: 800;
    text-decoration: none;
}

.brand:hover {
    text-decoration: none;
}

.brand-logo {
    display: block;
    width: auto;
    height: 38px;
    max-width: 198px;
    object-fit: contain;
}

.brand-word {
    color: var(--waidok-light-blue);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    text-transform: uppercase;
}

.nav a {
    color: rgba(255, 255, 255, .74);
}

.nav a.active,
.nav a:hover {
    color: #ffffff;
}

.nav a.active {
    border-bottom: 2px solid var(--waidok-magenta);
    padding-bottom: 4px;
}

.userbar {
    color: var(--waidok-light-blue);
}

.user-menu {
    position: relative;
}

.user-menu summary {
    align-items: center;
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    gap: 10px;
    font-weight: 700;
    list-style: none;
}

.user-menu summary::-webkit-details-marker {
    display: none;
}

.user-avatar,
.icon-button {
    align-items: center;
    display: inline-flex;
    justify-content: center;
}

.user-avatar {
    background: rgba(184, 211, 255, .14);
    border: 1px solid rgba(184, 211, 255, .45);
    border-radius: 999px;
    height: 34px;
    width: 34px;
}

.user-avatar svg {
    flex: 0 0 18px;
    height: 18px !important;
    max-height: 18px;
    max-width: 18px;
    width: 18px !important;
}

.user-menu-panel {
    background: #ffffff;
    border: 1px solid rgba(0, 108, 255, .18);
    border-radius: 8px;
    box-shadow: 0 18px 45px rgba(4, 7, 49, .16);
    display: grid;
    gap: 4px;
    min-width: 240px;
    padding: 10px;
    position: absolute;
    right: 0;
    top: calc(100% + 12px);
    z-index: 20;
}

.user-menu-panel a,
.user-menu-panel button {
    background: transparent;
    border: 0;
    border-radius: 6px;
    color: var(--waidok-blue);
    cursor: pointer;
    display: block;
    font: inherit;
    font-weight: 700;
    padding: 9px 10px;
    text-align: left;
    width: 100%;
}

.user-menu-panel a:hover,
.user-menu-panel button:hover {
    background: #eef5ff;
    text-decoration: none;
}

.user-menu-head {
    border-bottom: 1px solid var(--line);
    display: grid;
    gap: 2px;
    margin-bottom: 4px;
    padding: 8px 10px 10px;
}

.user-menu-head span,
.user-menu-version {
    color: var(--muted);
    font-size: 12px;
}

.user-menu-version {
    border-top: 1px solid var(--line);
    margin-top: 4px;
    padding: 10px 10px 2px;
}

.link-button {
    color: #ffffff;
}

td.table-actions,
th.table-actions {
    min-width: 150px;
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
    width: 1%;
}

.row-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
}

.icon-button {
    appearance: none;
    background: #ffffff;
    border: 1px solid rgba(0, 108, 255, .25);
    border-radius: 6px;
    color: var(--waidok-intelligence-blue);
    cursor: pointer;
    height: 32px;
    padding: 0;
    width: 32px;
}

.icon-button:hover {
    background: #eef5ff;
    text-decoration: none;
}

.icon-button.danger {
    border-color: rgba(220, 1, 185, .28);
    color: var(--waidok-magenta);
}

.icon-button svg {
    flex: 0 0 17px;
    height: 17px !important;
    max-height: 17px;
    max-width: 17px;
    width: 17px !important;
}

.sr-only {
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    clip: rect(0, 0, 0, 0);
}

.app-version {
    align-self: center;
    border: 1px solid rgba(184, 211, 255, .45);
    border-radius: 999px;
    color: var(--waidok-light-blue);
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    padding: 4px 8px;
}

.container {
    width: min(100%, 1180px);
}

.panel,
.repeatable-item,
.alert {
    border-color: rgba(0, 108, 255, .16);
    box-shadow: 0 18px 45px rgba(4, 7, 49, .07);
}

.panel {
    background: rgba(255, 255, 255, .97);
}

.button {
    border: 0;
    background: linear-gradient(90deg, #006cff 0%, #360da5 54%, #dc01b9 100%);
    box-shadow: 0 10px 24px rgba(0, 108, 255, .22);
}

.button:hover {
    background: linear-gradient(90deg, #0053c7 0%, #2d0b8d 54%, #b9019b 100%);
}

.button.secondary {
    border: 1px solid rgba(0, 108, 255, .35);
    background: #ffffff;
    color: var(--waidok-intelligence-blue);
    box-shadow: none;
}

.button.danger {
    background: var(--waidok-magenta);
}

input,
select,
textarea {
    border-color: #cfdaf0;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--waidok-intelligence-blue);
    box-shadow: 0 0 0 3px rgba(0, 108, 255, .12);
    outline: none;
}

th {
    color: var(--waidok-transition-blue);
}

.badge {
    border-color: rgba(0, 108, 255, .22);
    background: #eef5ff;
    color: var(--waidok-transition-blue);
}

.section-tab {
    border-color: rgba(0, 108, 255, .2);
}

.section-tab.active {
    border-color: var(--waidok-intelligence-blue);
    color: var(--waidok-intelligence-blue);
    box-shadow: inset 0 -2px 0 var(--waidok-magenta);
}

.alert.success {
    border-color: rgba(0, 108, 255, .24);
    color: var(--waidok-transition-blue);
}

.alert.error,
.field-error {
    color: var(--waidok-magenta);
}

.client-cover {
    overflow: hidden;
    position: relative;
}

.client-cover::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 5px;
    background: linear-gradient(90deg, #006cff, #360da5, #dc01b9);
}

@media (max-width: 760px) {
    .brand-logo {
        height: 32px;
        max-width: 168px;
    }

    .brand-word {
        font-size: 11px;
    }
}
