:root {
    --sgi-ink: #07101c;
    --sgi-navy: #0b1730;
    --sgi-blue: #174f91;
    --sgi-blue-dark: #0c356c;
    --sgi-green: #008c5a;
    --sgi-surface: #f3f5f7;
    --sgi-card: #ffffff;
    --sgi-text: #122033;
    --sgi-muted: #667085;
    --sgi-border: #d8dee5;
    --sgi-danger: #d92d20;
    --sgi-warning: #f79009;
    --sgi-radius-sm: 6px;
    --sgi-radius: 10px;
    --sgi-radius-lg: 14px;
    --sgi-shadow: 0 6px 18px rgba(12, 53, 108, 0.09);
    --sgi-transition: 200ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

html,
body {
    min-height: 100%;
    background: var(--sgi-ink);
    color: var(--sgi-text);
    font-family: "SVN-Omny", "Segoe UI", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
[data-ng-click],
[ng-click] {
    -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid rgba(31, 91, 216, 0.32);
    outline-offset: 2px;
}

.language-selector {
    top: max(14px, env(safe-area-inset-top)) !important;
    right: max(14px, env(safe-area-inset-right)) !important;
    width: 46px;
    height: 46px;
    padding: 7px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    background: rgba(7, 16, 28, 0.56);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.language-selector svg {
    display: block;
    width: 30px !important;
    cursor: pointer;
    transition: transform var(--sgi-transition);
}

.language-selector:active svg {
    transform: scale(0.92);
}

/* Home and authentication */
.app-home {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    height: auto !important;
    margin: 0;
    padding: max(28px, env(safe-area-inset-top)) 4vw max(32px, env(safe-area-inset-bottom));
    overflow: hidden;
    isolation: isolate;
    background:
        linear-gradient(145deg, rgba(0, 91, 62, 0.62), rgba(5, 24, 37, 0.46) 42%, rgba(5, 30, 72, 0.34)),
        url("../img/bg1.png") center / cover no-repeat,
        #071923;
}

.app-home::before,
.app-home::after {
    position: absolute;
    z-index: -1;
    content: "";
    pointer-events: none;
}

.app-home::before {
    inset: 0;
    background: linear-gradient(132deg, transparent 0 58%, rgba(255, 255, 255, 0.025) 58% 72%, transparent 72%);
}

.app-home::after {
    inset: 0;
    opacity: 0.08;
    background-image: repeating-linear-gradient(135deg, transparent 0 35px, rgba(255, 255, 255, 0.08) 36px);
    mask-image: linear-gradient(to bottom right, #000, transparent 68%);
}

.auth-column,
.brand-column {
    position: relative;
    z-index: 1;
    padding: 38px clamp(18px, 4vw, 64px) !important;
}

.brand-column {
    display: flex;
    min-height: 520px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.brand-column .pad-logo {
    width: min(60%, 360px) !important;
    height: auto;
    filter: drop-shadow(0 12px 30px rgba(0, 0, 0, 0.2));
}

.brand-column h5,
.brand-column h2 {
    max-width: 680px;
    margin-right: auto;
    margin-left: auto;
    letter-spacing: -0.01em;
}

.brand-column h2 {
    line-height: 1.18;
    text-wrap: balance;
}

.app-home .register-box,
.app-home .holder-info {
    max-width: 560px;
}

.app-home .register-box .card {
    overflow: hidden;
    border: 0 !important;
    border-radius: var(--sgi-radius-lg) !important;
    background: #fff;
    box-shadow: 0 12px 32px rgba(3, 21, 50, 0.2);
}

.app-home .register-box .card-header {
    padding: 26px 24px 8px !important;
    background: transparent !important;
}

.app-home .register-box .card-header h4 {
    margin: 0;
    padding: 0;
    color: var(--sgi-navy) !important;
    font-size: clamp(22px, 3vw, 28px) !important;
    letter-spacing: -0.02em;
}

.app-home .register-box .card-body {
    padding: 18px 24px 26px !important;
}

.app-home .form-control {
    height: 54px;
    padding: 0 16px;
    border: 1px solid var(--sgi-border);
    border-radius: var(--sgi-radius-sm) !important;
    background: #f7f8fa;
    color: var(--sgi-text);
    font-size: 16px;
    text-align: center;
    box-shadow: none;
    transition: border-color var(--sgi-transition), box-shadow var(--sgi-transition), background var(--sgi-transition);
}

.app-home .form-control:focus {
    border-color: var(--sgi-blue);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(31, 91, 216, 0.12);
}

.btn-submit {
    min-height: 48px;
    padding: 10px 18px;
    border-radius: var(--sgi-radius-sm);
    background: var(--sgi-blue-dark);
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: none;
    transition: transform var(--sgi-transition), box-shadow var(--sgi-transition), filter var(--sgi-transition);
}

.btn-submit:not(:disabled):active,
.btn-home:not(:disabled):active,
.btn-header:not(:disabled):active {
    transform: scale(0.98);
}

.btn-submit:disabled,
.btn-submit.disabled {
    box-shadow: none;
    filter: grayscale(0.35);
}

.holder-info {
    overflow: hidden;
    border: 0;
    border-radius: var(--sgi-radius-lg);
    box-shadow: 0 10px 28px rgba(3, 21, 50, 0.18);
}

.holder-info > .pad-top-5 {
    display: grid;
    min-height: 38px;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 16px;
    border-bottom: 1px solid #edf0f4;
}

.holder-info > .pad-top-5:last-child {
    border-bottom: 0;
}

.holder-info-label {
    min-width: 0;
    line-height: 1.3;
}

.holder-info-value {
    display: inline-flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 5px;
    color: var(--sgi-text);
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.holder-info-value > span {
    min-width: 34px;
    color: var(--sgi-muted);
    font-size: 0.9em;
    text-align: left;
}

.holder-info-separator {
    margin: 12px 0 6px;
    border-color: var(--sgi-border);
}

.holder-info-total {
    margin: 8px -10px -8px;
    padding: 11px 10px 8px;
    border: 0 !important;
    border-radius: var(--sgi-radius-sm);
    background: #eef2f6;
}

.holder-info-total .holder-info-value {
    color: var(--sgi-blue-dark);
    font-size: 17px;
}

.btn-home {
    min-height: 46px;
    padding: 10px 16px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 8px;
    background: #fff;
    color: var(--sgi-blue-dark) !important;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(3, 21, 50, 0.12);
    transition: transform var(--sgi-transition), box-shadow var(--sgi-transition);
}

/* Voting workspace */
.app-voting {
    min-height: 100vh;
    min-height: 100svh;
    height: auto !important;
    align-items: stretch;
    background: var(--sgi-surface);
}

.app-voting > .col-lg-6:not(.voting-panel) {
    background:
        radial-gradient(circle at 10% 5%, rgba(0, 166, 81, 0.3), transparent 38%),
        radial-gradient(circle at 90% 85%, rgba(31, 91, 216, 0.45), transparent 45%),
        var(--sgi-ink);
}

.voting-panel {
    min-height: 100vh;
    min-height: 100svh;
    padding: 0 18px 96px;
    background: var(--sgi-surface) !important;
    overflow-y: auto;
}

.voting-toolbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    width: calc(100% + 36px) !important;
    min-height: 72px;
    margin: 0 -18px 18px;
    padding: 0 18px;
    grid-template-columns: minmax(0, 1fr) max-content;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(18, 32, 51, 0.08);
    background: var(--sgi-surface);
    box-shadow: none;
}

.voting-toolbar .pad-top-25 {
    padding-top: 0;
}

.voting-toolbar b {
    color: var(--sgi-navy);
    font-size: 19px;
}

.voting-toolbar-title {
    display: flex;
    min-width: 0;
    align-items: center;
}

.voting-toolbar-title b,
.voting-toolbar-actions,
.voting-toolbar-actions .btn-header {
    white-space: nowrap;
}

.voting-toolbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.voting-toolbar-actions .btn-header {
    flex: 0 0 auto;
}

.btn-header {
    min-height: 40px;
    padding: 8px 12px;
    border-radius: var(--sgi-radius-sm);
    font-weight: 700;
    transition: transform var(--sgi-transition), filter var(--sgi-transition);
}

.btn-export {
    background: var(--sgi-green);
}

.btn-close {
    background: var(--sgi-navy);
}

.holder-info-elector {
    margin-bottom: 16px;
}

.shareholder-summary-card,
.elector-card {
    overflow: hidden;
    margin-bottom: 14px !important;
    border: 1px solid var(--sgi-border) !important;
    border-radius: var(--sgi-radius) !important;
    background: var(--sgi-card);
    box-shadow: none;
    transition: transform var(--sgi-transition), box-shadow var(--sgi-transition);
}

.shareholder-summary-header,
.elector-card-header {
    display: flex;
    min-height: 62px;
    padding: 13px 16px !important;
    align-items: center;
    gap: 10px;
    border: 0 !important;
    background: var(--sgi-navy) !important;
    color: #fff !important;
}

.shareholder-summary-header {
    background: #08724d !important;
}

.shareholder-summary-header > .card-tools,
.elector-card-header > .card-tools {
    margin: 0 !important;
    flex: 0 0 auto;
    align-self: center;
}

.shareholder-summary-header .btn-tool,
.elector-card-header .btn-tool {
    display: inline-flex;
    width: 38px;
    height: 38px;
    margin: 0;
    padding: 0;
    align-items: center;
    justify-content: center;
    border-radius: var(--sgi-radius-sm);
    background: rgba(255, 255, 255, 0.08);
    line-height: 1;
}

.shareholder-summary-header .btn-tool i,
.elector-card-header .btn-tool i {
    display: block;
    margin: 0 !important;
    color: #fff !important;
    line-height: 1;
}

.shareholder-summary-header > div[data-card-widget="collapse"] {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.shareholder-summary-card .card-body {
    padding: 16px !important;
    line-height: 1.6;
}

.summary-info-row {
    display: grid;
    min-height: 32px;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 14px;
}

.summary-info-row > :last-child {
    color: var(--sgi-text);
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.summary-info-value {
    min-width: 76px;
}

.summary-info-total {
    margin: 7px -6px -4px;
    padding: 8px 6px;
    border-radius: var(--sgi-radius-sm);
    background: #eef2f6;
}

.elector-card-header .card-title {
    max-width: calc(100% - 48px);
    margin: 0;
    padding: 5px 0;
    color: #fff;
    font-size: 17px;
    line-height: 1.35;
    text-wrap: balance;
}

.elector-card > .card-body {
    padding: 16px !important;
}

.status-elector {
    position: relative;
    display: grid;
    min-height: 36px;
    margin-bottom: 16px;
    padding: 8px 10px;
    grid-template-columns: 8px minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
    border: 1px solid var(--sgi-border);
    border-radius: var(--sgi-radius-sm);
    background: #f8fafc;
    color: var(--sgi-muted);
    font-size: 14px;
    font-weight: 700;
}

.status-elector::before {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #98a2b3;
    content: "";
}

.status-elector.status-open {
    border-color: rgba(0, 166, 81, 0.28);
    background: #eef8f3;
    color: #087443;
}

.status-elector.status-open::before {
    background: var(--sgi-green);
    box-shadow: none;
}

.status-elector.status-closed {
    background: #f2f4f7;
    color: #475467;
}

.status-elector-copy {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.status-elector-note {
    font-size: 13px;
    font-style: italic;
    font-weight: 600;
}

.count-down {
    position: static;
    padding: 4px 8px;
    border-radius: 4px;
    background: rgba(217, 45, 32, 0.09);
    color: var(--sgi-danger) !important;
    font-size: 15px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    transform: none;
}

.sub-info {
    border: 1px solid rgba(31, 91, 216, 0.16);
    border-radius: var(--sgi-radius-sm);
    background: #eef2f6;
    color: var(--sgi-text);
}

.vote-owner-panel {
    display: grid;
    margin: 0 0 16px;
    gap: 10px;
}

.vote-owner-selector {
    position: relative;
    display: grid;
    width: 100%;
    min-height: 64px;
    padding: 11px 42px 11px 13px;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    border: 1px solid rgba(23, 79, 145, 0.25);
    border-radius: var(--sgi-radius-sm);
    background: #f1f5fa;
    color: var(--sgi-text);
    text-align: left;
    cursor: pointer;
    transition: border-color var(--sgi-transition), background var(--sgi-transition), transform var(--sgi-transition);
}

.vote-owner-selector:hover {
    border-color: rgba(23, 79, 145, 0.48);
    background: #edf3fa;
}

.vote-owner-selector:active {
    transform: translateY(1px);
}

.vote-owner-selector-label {
    display: block;
    margin-bottom: 3px;
    color: var(--sgi-muted);
    font-size: 12px;
    font-weight: 600;
}

.vote-owner-selector-value {
    display: block;
    min-width: 0;
}

.vote-owner-selector-value b,
.vote-owner-selector-value small {
    display: block;
}

.vote-owner-selector-value b {
    overflow-wrap: anywhere;
    font-size: 14px;
    line-height: 1.35;
}

.vote-owner-selector-value small {
    margin-top: 2px;
    color: var(--sgi-blue-dark);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.vote-owner-selector > i {
    position: absolute;
    right: 16px;
    color: var(--sgi-blue);
    font-size: 13px;
}

.delegation-summary {
    overflow: hidden;
    border: 1px solid var(--sgi-border);
    border-left: 3px solid var(--sgi-blue);
    border-radius: var(--sgi-radius-sm);
    background: #fff;
}

.delegation-summary-heading {
    display: flex;
    min-height: 34px;
    padding: 8px 12px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px solid #e8edf2;
    background: #f8fafc;
    color: var(--sgi-muted);
    font-size: 12px;
}

.delegation-summary-heading b {
    color: var(--sgi-blue-dark);
    font-weight: 700;
}

.delegation-summary-heading span {
    white-space: nowrap;
}

.delegation-carousel {
    min-height: 98px;
}

.delegation-person {
    min-height: 98px;
    padding: 12px 48px;
}

.delegation-person-name {
    display: block;
    margin-bottom: 8px;
    overflow-wrap: anywhere;
    color: var(--sgi-text);
    font-size: 14px;
    line-height: 1.35;
}

.delegation-person-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.delegation-person-details span,
.delegation-person-details small,
.delegation-person-details b {
    display: block;
    min-width: 0;
}

.delegation-person-details small {
    margin-bottom: 2px;
    color: var(--sgi-muted);
    font-size: 11px;
}

.delegation-person-details b {
    overflow-wrap: anywhere;
    color: var(--sgi-blue-dark);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.delegation-carousel-control {
    top: 50%;
    width: 30px !important;
    height: 38px;
    border: 1px solid #dce4ed;
    border-radius: 5px;
    background: #f3f6f9;
    color: var(--sgi-blue-dark);
    opacity: 1;
    transform: translateY(-50%);
}

.delegation-carousel-control.carousel-control-prev { left: 8px; }
.delegation-carousel-control.carousel-control-next { right: 8px; }
.delegation-carousel-control:hover { color: var(--sgi-blue); }

.vote-owner-modal .modal-dialog {
    max-width: 540px;
}

.vote-owner-modal .modal-content {
    overflow: hidden;
    border: 0;
    border-radius: var(--sgi-radius);
    box-shadow: 0 18px 52px rgba(7, 16, 28, 0.25);
}

.vote-owner-modal .modal-header {
    padding: 14px 16px;
    align-items: center;
    border: 0;
    background: var(--sgi-navy);
}

.vote-owner-modal .modal-header small {
    display: block;
    margin-bottom: 2px;
    color: rgba(255, 255, 255, 0.66);
    font-size: 11px;
}

.vote-owner-modal .modal-title {
    margin: 0;
    padding: 0;
    color: #fff;
    font-size: 18px;
    line-height: 1.3;
}

.vote-owner-modal .close {
    width: 36px;
    height: 36px;
    margin: 0;
    padding: 0;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    line-height: 1;
    opacity: 1;
}

.vote-owner-modal .modal-body {
    max-height: min(66vh, 560px);
    padding: 12px !important;
    overflow-y: auto;
    background: #f4f6f8;
}

.vote-owner-options {
    display: grid;
    gap: 8px;
}

.vote-owner-option {
    position: relative;
    display: grid;
    min-height: 64px;
    margin: 0;
    padding: 11px 12px;
    grid-template-columns: 20px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--sgi-border);
    border-radius: var(--sgi-radius-sm);
    background: #fff;
    cursor: pointer;
    transition: border-color var(--sgi-transition), background var(--sgi-transition);
}

.vote-owner-option:hover,
.vote-owner-option.is-selected {
    border-color: rgba(0, 140, 90, 0.52);
    background: #f2faf6;
}

.vote-owner-option.is-disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.vote-owner-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.vote-owner-radio {
    position: relative;
    width: 19px;
    height: 19px;
    border: 1.5px solid #98a2b3;
    border-radius: 50%;
    background: #fff;
}

.vote-owner-option.is-selected .vote-owner-radio {
    border-color: var(--sgi-green);
}

.vote-owner-option.is-selected .vote-owner-radio::after {
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: var(--sgi-green);
    content: "";
}

.vote-owner-option-copy,
.vote-owner-option-copy b,
.vote-owner-option-copy small {
    display: block;
    min-width: 0;
}

.vote-owner-option-copy b {
    overflow-wrap: anywhere;
    color: var(--sgi-text);
    font-size: 14px;
    line-height: 1.35;
}

.vote-owner-option-copy small {
    margin-top: 3px;
    overflow-wrap: anywhere;
    color: var(--sgi-muted);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.vote-owner-voted {
    color: var(--sgi-green);
    font-size: 11px;
    white-space: nowrap;
}

.vote-owner-modal .modal-footer {
    padding: 10px 12px;
    justify-content: flex-end;
    border-top: 1px solid var(--sgi-border);
}

.vote-question {
    margin: 0 -2px 16px;
    padding: 16px;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.vote-question > .row:first-child {
    margin-bottom: 8px;
    font-size: 16px;
    line-height: 1.5;
}

.vote-question > hr:last-child {
    display: none;
}

.vote-question .form-check {
    min-height: 48px;
    margin-bottom: 8px;
    padding: 0;
}

.vote-question .form-check-label {
    display: flex;
    width: 100%;
    min-height: 48px;
    padding: 11px 12px;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--sgi-border);
    border-radius: var(--sgi-radius-sm);
    background: #f7f8fa;
    cursor: pointer;
    transition: border-color var(--sgi-transition), background var(--sgi-transition), transform var(--sgi-transition);
}

.vote-question .form-check-label:active {
    transform: scale(0.99);
}

.vote-question .form-check-label:focus-within {
    border-color: var(--sgi-blue);
    background: rgba(31, 91, 216, 0.05);
}

.vote-question .form-check-label:has(.form-check-input:checked) {
    border-color: #8eabd0;
    background: #eef3f9;
    box-shadow: inset 3px 0 0 var(--sgi-blue);
}

.vote-question .vote-option-row {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: center;
    column-gap: 11px;
}

.vote-option-content {
    display: block;
    min-width: 0;
    line-height: 1.35;
}

.vote-option-text {
    display: block;
    color: var(--sgi-text);
    font-size: 16px;
}

.vote-option-meta {
    display: block;
    margin-top: 4px;
    color: var(--sgi-muted);
    font-size: 12px;
    font-style: italic;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.vote-question .form-check-input,
.candidate-row .form-check-input {
    position: static;
    width: 22px;
    height: 22px;
    margin: 0;
    flex: 0 0 auto;
    accent-color: var(--sgi-blue);
}

.candidate-list {
    overflow: hidden;
    margin-bottom: 12px;
    border: 1px solid var(--sgi-border);
    border-radius: var(--sgi-radius-sm);
    background: #fff;
}

.candidate-row {
    display: grid;
    margin: 0;
    padding: 12px;
    grid-template-columns: minmax(0, 1fr) minmax(132px, 158px);
    align-items: center;
    gap: 12px;
    border: 0;
    border-bottom: 1px solid var(--sgi-border);
    border-radius: 0;
    background: #fff;
    transition: background var(--sgi-transition), box-shadow var(--sgi-transition);
}

.candidate-row:last-child {
    border-bottom: 0;
}

.candidate-row > [class*="col-"] {
    width: auto;
    max-width: none;
    padding: 0;
    flex: initial;
}

.candidate-identity,
.candidate-allocation {
    min-width: 0;
}

.candidate-row:has(.form-check-input:checked) {
    background: #f3f7fb;
    box-shadow: inset 3px 0 0 var(--sgi-blue);
}

.election-section {
    margin-top: 2px;
}

.election-stats {
    padding: 10px 12px;
    border: 1px solid var(--sgi-border);
    border-radius: var(--sgi-radius-sm);
    background: #eef1f4;
}

.election-stat-row {
    display: grid;
    min-height: 28px;
    margin: 0;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 12px;
}

.election-stat-row > [class*="col-"] {
    width: auto;
    max-width: none;
    padding: 2px 0;
    flex: initial;
}

.election-stat-row > .num-holder {
    padding-left: 10px;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.election-stat-progress {
    grid-template-columns: 1fr;
    margin-top: 3px;
    padding-top: 5px;
    gap: 1px;
    border-top: 1px solid var(--sgi-border);
}

.election-stat-progress > .num-holder {
    justify-self: end;
    padding-left: 0;
}

.election-distribute {
    margin: 10px 0;
    padding: 10px 12px;
    border: 1px solid rgba(31, 91, 216, 0.14);
    border-radius: var(--sgi-radius-sm);
    background: #f3f6fa;
}

.election-distribute > .pad-left-3 {
    display: flex;
    padding-left: 0;
    align-items: center;
    gap: 9px;
    line-height: 1.35;
}

.election-distribute .switch {
    width: 38px;
    height: 22px;
    flex: 0 0 38px;
}

.election-distribute .slider::before {
    width: 18px;
    height: 18px;
}

.election-distribute input:checked + .slider::before {
    transform: translateX(16px);
}

.election-list-header {
    display: grid;
    min-height: 44px;
    margin: 0 0 8px;
    padding: 8px 2px;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--sgi-border);
}

.election-list-header > [class*="col-"] {
    width: auto;
    max-width: none;
    padding: 0;
}

.election-list-title {
    font-size: 16px;
    white-space: nowrap;
}

.election-list-limit {
    display: inline-flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 6px;
    color: var(--sgi-muted);
    font-size: 13px;
    line-height: 1.25;
    text-align: right;
}

.election-list-limit b {
    min-width: 24px;
    padding: 3px 7px;
    border-radius: 3px;
    background: #e7edf5;
    color: var(--sgi-blue-dark);
    text-align: center;
}

.candidate-select {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    line-height: 1.3;
}

.candidate-select b {
    min-width: 0;
    overflow-wrap: anywhere;
}

.candidate-position {
    margin: 3px 0 0 31px;
    color: var(--sgi-muted);
    font-size: 13px;
    line-height: 1.3;
}

.candidate-stepper {
    width: 100%;
    flex-wrap: nowrap;
}

.candidate-row .form-group {
    margin-bottom: 0;
}

.candidate-allocation .form-group.row {
    display: block;
    margin: 0;
}

.candidate-vote-label {
    position: absolute;
    overflow: hidden;
    width: 1px;
    height: 1px;
    padding: 0;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.candidate-stepper-col {
    width: 100%;
    max-width: none;
    padding: 0;
}

.candidate-row .input-group-text,
.candidate-row .form-control {
    height: 44px;
    border-color: var(--sgi-border);
    background: #f8fafc;
}

.candidate-row .input-group-text {
    min-width: 44px;
    justify-content: center;
    color: var(--sgi-blue-dark);
    cursor: pointer;
}

.candidate-row .form-control {
    min-width: 80px;
    color: var(--sgi-text);
    font-size: 16px;
    font-weight: 700;
    text-align: center;
}

.vote-submit-wrap {
    position: sticky;
    bottom: 0;
    z-index: 10;
    margin: 18px -16px -16px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(18, 32, 51, 0.08);
    background: #fff;
}

.vote-submit-action {
    height: 50px !important;
}

/* Chat, dialogs and feedback */
.fixed-icon-chat {
    right: max(18px, env(safe-area-inset-right));
    bottom: max(22px, calc(env(safe-area-inset-bottom) + 16px));
    width: 58px;
    height: 58px;
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 14px;
    background: #08724d;
    color: #fff;
    box-shadow: 0 7px 18px rgba(0, 87, 59, 0.24);
    cursor: pointer;
    transition: transform var(--sgi-transition), box-shadow var(--sgi-transition);
}

.fixed-icon-chat:active {
    transform: scale(0.94);
}

.chat-unread-badge {
    top: -5px;
    right: -5px;
    min-width: 23px;
    height: 23px;
    border-radius: 12px;
    line-height: 19px;
    box-shadow: 0 4px 12px rgba(217, 45, 32, 0.35);
}

.fixed-form-chat {
    right: max(18px, env(safe-area-inset-right));
    bottom: max(92px, calc(env(safe-area-inset-bottom) + 86px));
    left: auto;
    width: min(420px, calc(100vw - 36px));
    height: min(620px, 68vh);
    height: min(620px, 68svh);
    overflow: hidden;
    border: 0;
    border-radius: 12px;
    box-shadow: 0 16px 46px rgba(3, 21, 50, 0.26);
}

.fixed-form-chat .card-header {
    min-height: 60px;
    padding: 8px 10px 8px 16px;
    border: 0;
    background: var(--sgi-navy) !important;
    color: #fff !important;
}

.fixed-form-chat .card-header .btn-tool {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: var(--sgi-radius-sm);
}

.fixed-form-chat .card-header .card-title,
.fixed-form-chat .card-header .btn-tool i {
    color: #fff !important;
}

.fixed-form-chat .card-body {
    min-height: 0;
    padding: 0 !important;
}

.fixed-form-chat .direct-chat-messages {
    padding: 16px;
    background: var(--sgi-surface);
}

.fixed-form-chat .direct-chat-text {
    border-radius: 4px 12px 12px 12px;
    box-shadow: none;
}

.fixed-form-chat .direct-chat-msg.right .direct-chat-text {
    border-radius: 12px 4px 12px 12px;
    border-color: var(--sgi-blue);
    background: var(--sgi-blue);
}

.fixed-form-chat .direct-chat-infos > div {
    border-radius: 4px !important;
    background-color: var(--sgi-blue-dark) !important;
}

.fixed-form-chat .card-footer {
    padding: 12px;
    border-top: 1px solid var(--sgi-border);
    background: #fff;
}

.fixed-form-chat .card-footer .form-control {
    min-height: 44px;
    border-color: var(--sgi-border);
    border-radius: var(--sgi-radius-sm) 0 0 var(--sgi-radius-sm);
}

.fixed-form-chat .card-footer .btn {
    min-height: 44px;
    border-radius: 0 var(--sgi-radius-sm) var(--sgi-radius-sm) 0;
    background: var(--sgi-blue);
}

.modal-content {
    overflow: hidden;
    border: 0;
    border-radius: 12px;
    box-shadow: 0 18px 54px rgba(3, 21, 50, 0.24);
}

.modal-header,
.modal-footer {
    border-color: var(--sgi-border);
}

.modal .btn {
    min-height: 44px;
    border-radius: var(--sgi-radius-sm);
}

/* Voting and election result modals */
.result-modal.modal-lg {
    max-width: none;
}

.result-modal .modal-dialog {
    width: auto;
    max-width: 620px;
}

.result-modal-content {
    display: flex;
    max-height: calc(100vh - 32px);
    max-height: calc(100svh - 32px);
    flex-direction: column;
    background: var(--sgi-surface);
}

.result-modal-header {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    padding: 11px 10px 11px 14px;
    border: 0;
    color: #fff;
    border-left: 3px solid var(--sgi-green);
    background: var(--sgi-navy);
}

.result-modal-heading {
    min-width: 0;
    padding-right: 8px;
}

.result-modal-eyebrow {
    display: block;
    margin-bottom: 2px;
    color: #72e6aa;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.3;
    text-transform: none;
}

.result-modal-heading h2 {
    margin: 0;
    color: #fff;
    font-size: 18px !important;
    font-weight: 600;
    line-height: 1.22;
    text-wrap: balance;
}

.result-modal-close {
    display: inline-flex;
    width: 44px;
    min-width: 44px;
    height: 44px;
    margin: 0 !important;
    padding: 0 !important;
    align-items: center;
    justify-content: center;
    border: 0 !important;
    border-radius: 0;
    color: #fff !important;
    background: transparent !important;
    opacity: 1 !important;
    text-shadow: none;
}

.result-modal-close i {
    display: inline-flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 16px;
}

.result-modal-close:active {
    transform: scale(0.94);
}

.result-modal-body {
    min-height: 0;
    padding: 14px;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--sgi-surface);
}

.result-question-list,
.result-election-list {
    display: grid;
    gap: 12px;
}

.result-question-card {
    padding: 14px;
    border: 1px solid var(--sgi-border);
    border-radius: 8px;
    background: #fff;
    box-shadow: none;
}

.result-question-card:has(.result-passed) {
    border-left: 3px solid var(--sgi-green);
}

.result-question-card:has(.result-not-passed) {
    border-left: 3px solid var(--sgi-danger);
}

.result-status-pill {
    display: inline-flex;
    min-height: 30px;
    padding: 5px 10px;
    align-items: center;
    gap: 6px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
}

.result-status-pill.result-passed {
    color: #067647;
    background: #ecfdf3;
}

.result-status-pill.result-not-passed {
    color: #b42318;
    background: #fef3f2;
}

.result-question-title {
    margin: 11px 0 2px;
    color: var(--sgi-text);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.45;
}

.result-chart-wrap {
    position: relative;
    width: 100%;
    height: 270px;
    margin-top: 4px;
}

.result-chart {
    width: 100% !important;
    height: 100% !important;
}

.result-election-list {
    counter-reset: candidate-rank;
}

.result-candidate-row {
    display: grid;
    min-width: 0;
    padding: 13px;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    border: 1px solid var(--sgi-border);
    border-radius: var(--sgi-radius-sm);
    background: #fff;
}

.result-candidate-row.result-elected {
    border-color: #a6e9c5;
    box-shadow: inset 3px 0 0 var(--sgi-green);
    background: #f4fbf7;
}

.result-candidate-rank {
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    color: var(--sgi-blue-dark);
    background: #eaf0ff;
    font-size: 14px;
    font-weight: 800;
}

.result-elected .result-candidate-rank {
    color: #067647;
    background: #d1fadf;
}

.result-candidate-info,
.result-candidate-votes {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.result-candidate-info b {
    overflow-wrap: anywhere;
    color: var(--sgi-text);
    font-size: 15px;
    line-height: 1.35;
}

.result-candidate-info span {
    margin-top: 3px;
    color: #067647;
    font-size: 12px;
    font-weight: 700;
}

.result-candidate-votes {
    align-items: flex-end;
    white-space: nowrap;
}

.result-candidate-votes b {
    color: var(--sgi-blue-dark);
    font-size: 15px;
}

.result-candidate-votes span {
    color: var(--sgi-muted);
    font-size: 12px;
}

.result-modal-footer {
    flex: 0 0 auto;
    padding: 12px 14px max(12px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--sgi-border);
    background: #fff;
}

.result-close-action {
    width: 100%;
    min-height: 48px !important;
    color: #fff;
    background: var(--sgi-blue-dark);
    box-shadow: none;
}

.result-close-action:hover,
.result-close-action:focus {
    color: #fff;
}

.toast-success,
.toast-error,
.toast-warning {
    border-radius: 14px !important;
    box-shadow: var(--sgi-shadow) !important;
}

@media (min-width: 992px) {
    .app-home {
        padding: 32px clamp(44px, 5vw, 96px);
    }

    .auth-column {
        max-width: 44%;
        padding-right: clamp(32px, 5vw, 88px) !important;
        flex: 0 0 44%;
        justify-content: flex-end !important;
    }

    .brand-column {
        max-width: 56%;
        padding-left: clamp(32px, 5vw, 88px) !important;
        flex: 0 0 56%;
        align-items: center;
        text-align: center !important;
    }

    .brand-column .pad-logo {
        width: min(48%, 320px) !important;
    }

    .brand-column h5,
    .brand-column h2 {
        max-width: 720px;
        margin-right: auto;
        margin-left: auto;
    }

    .brand-column > div[ng-show] {
        width: min(100%, 420px);
    }

    .brand-column > .btn-home {
        width: auto;
        min-width: 180px;
    }

    .brand-column > div[ng-show] .row {
        margin-right: -6px;
        margin-left: -6px;
    }

    .brand-column > div[ng-show] .col-6 {
        padding-right: 6px;
        padding-left: 6px;
    }

    .brand-column > div[ng-show] .btn-home {
        width: 100%;
    }

    .app-home .auth-column .w-80,
    .app-home .auth-column .holder-info {
        width: min(100%, 520px) !important;
    }

    .app-voting {
        width: 100% !important;
        max-width: none;
        flex-wrap: nowrap;
        justify-content: flex-start;
    }

    .app-voting > .col-lg-6:not(.voting-panel),
    .voting-panel {
        height: 100vh !important;
    }

    .app-voting > .col-lg-6:not(.voting-panel) {
        position: sticky;
        top: 0;
        max-width: 48%;
        padding: 0;
        flex: 0 0 48%;
    }

    .app-voting .laptop {
        display: flex;
        height: 100%;
        padding: clamp(24px, 4vw, 72px);
        align-items: center;
        justify-content: center;
    }

    .app-voting .laptop iframe {
        width: 100%;
        height: auto !important;
        aspect-ratio: 16 / 9;
        border-radius: 10px;
        background: #02060c;
        box-shadow: 0 20px 54px rgba(0, 0, 0, 0.28);
    }

    .voting-panel {
        max-width: 52%;
        padding-right: clamp(22px, 3vw, 48px);
        padding-left: clamp(22px, 3vw, 48px);
        flex: 0 0 52%;
        border-left: 1px solid rgba(18, 32, 51, 0.08);
    }

    .voting-panel .voting-toolbar {
        width: calc(100% + 2 * clamp(22px, 3vw, 48px)) !important;
        margin-right: calc(-1 * clamp(22px, 3vw, 48px));
        margin-left: calc(-1 * clamp(22px, 3vw, 48px));
        padding-right: clamp(22px, 3vw, 48px);
        padding-left: clamp(22px, 3vw, 48px);
    }

    .app-voting.without-stream {
        justify-content: center;
        background:
            linear-gradient(90deg, rgba(11, 23, 48, 0.025) 1px, transparent 1px) 0 0 / 56px 56px,
            var(--sgi-surface);
    }

    .app-voting.without-stream > .col-lg-6:not(.voting-panel) {
        display: none;
    }

    .app-voting.without-stream .voting-panel {
        width: min(100%, 980px);
        max-width: 980px;
        flex-basis: 980px;
        border-right: 1px solid rgba(18, 32, 51, 0.08);
        box-shadow: 0 0 42px rgba(12, 53, 108, 0.08);
    }
}

@media (max-width: 991.98px) {
    .app-home {
        display: flex;
        padding-right: 16px;
        padding-left: 16px;
        align-content: center;
    }

    .brand-column {
        min-height: auto;
        padding: max(60px, calc(env(safe-area-inset-top) + 42px)) 18px 22px !important;
    }

    .brand-column .pad-logo {
        width: min(52vw, 210px) !important;
        padding: 0 0 18px;
    }

    .brand-column .size-text-normal {
        font-size: 15px !important;
    }

    .brand-column h2 {
        margin-bottom: 8px;
        font-size: clamp(21px, 6vw, 28px) !important;
    }

    .brand-column .pad-bottom-name {
        padding-bottom: 8px !important;
    }

    .brand-column .icon-show-web,
    .app-home > .icon-mobile {
        display: none !important;
    }

    .auth-column {
        padding: 8px 0 34px !important;
    }

    .app-home .register-box,
    .app-home .holder-info,
    .app-home .w-80 {
        width: 100% !important;
    }

    .app-home .register-box .card-header {
        padding-top: 22px !important;
    }

    .app-home .register-box .card-body {
        padding: 14px 18px 20px !important;
    }

    .app-home .holder-info {
        margin-top: 0;
        padding: 18px;
    }

    .app-home .btn-home {
        width: 100%;
    }

    .app-voting {
        display: block;
    }

    .app-voting > .col-lg-6:not(.voting-panel) {
        padding: 0;
    }

    .app-voting .fixed-top-element {
        position: sticky;
        top: 0;
        z-index: 30;
        overflow: hidden;
        border-radius: 0 0 16px 16px;
        box-shadow: 0 10px 30px rgba(7, 16, 28, 0.22);
    }

    .app-voting .fixed-top-element iframe {
        display: block;
        height: min(200px, 32vh);
    }

    .voting-panel {
        padding-right: 12px;
        padding-bottom: 96px;
        padding-left: 12px;
    }

    .voting-toolbar {
        width: calc(100% + 24px) !important;
        min-height: 64px;
        margin-right: -12px;
        margin-left: -12px;
        padding: 0 12px;
    }

    .voting-toolbar b {
        font-size: 17px;
    }

    .holder-info-elector {
        margin-top: 2px;
    }

    .shareholder-summary-header,
    .elector-card-header {
        min-height: 58px;
        padding: 10px 12px !important;
    }

    .elector-card-header .card-title {
        font-size: 16px;
    }

    .elector-card > .card-body {
        padding: 12px !important;
    }

    .status-elector {
        padding-left: 10px;
    }

    .delegation-person {
        padding-right: 44px;
        padding-left: 44px;
    }

    .delegation-person-details {
        grid-template-columns: minmax(0, 1fr) minmax(112px, auto);
    }

    .vote-owner-modal .modal-dialog {
        margin: 10px;
    }

    .vote-owner-option {
        grid-template-columns: 20px minmax(0, 1fr);
    }

    .vote-owner-voted {
        grid-column: 2;
    }

    .vote-question {
        padding: 13px;
    }

    .candidate-row {
        padding: 11px 12px;
        grid-template-columns: minmax(0, 1fr) 138px;
        gap: 10px;
    }

    .candidate-row > [class*="col-"] {
        width: auto;
        max-width: none;
        padding: 0;
        flex: initial;
    }

    .vote-submit-wrap {
        margin-right: -12px;
        margin-bottom: -12px;
        margin-left: -12px;
        padding-right: 12px;
        padding-left: 12px;
    }

    .fixed-form-chat {
        right: 8px;
        bottom: max(88px, calc(env(safe-area-inset-bottom) + 82px));
        left: 8px;
        width: auto;
        height: min(640px, 72vh);
        height: min(640px, 72svh);
        border-radius: 12px;
    }

    .modal-dialog {
        margin: 12px;
    }
}

@media (max-width: 575.98px) {
    .candidate-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 9px;
    }

    .candidate-allocation {
        padding-left: 31px;
    }
}

@media (max-width: 430px) {
    .voting-toolbar-title b {
        font-size: 16px;
    }

    .voting-toolbar-actions .btn-header {
        padding-right: 10px;
        padding-left: 10px;
        font-size: 14px;
    }
}

@media (max-width: 374px) {
    .app-home {
        padding-right: 12px;
        padding-left: 12px;
    }

    .brand-column {
        padding-bottom: 14px !important;
    }

    .brand-column .pad-logo {
        width: min(46vw, 170px) !important;
    }

    .brand-column h2 {
        font-size: 20px !important;
    }

    .brand-column h5 {
        font-size: 14px !important;
    }

    .auth-column {
        padding-bottom: 20px !important;
    }

    .voting-toolbar {
        gap: 5px;
    }

    .voting-toolbar-title b {
        font-size: 14px;
    }

    .voting-toolbar-actions {
        gap: 4px;
    }

    .voting-toolbar-actions .btn-header {
        padding: 7px;
        font-size: 12px;
    }

    .status-elector {
        font-size: 13px;
    }

    .status-elector-note {
        font-size: 12px;
    }

    .count-down {
        font-size: 13px;
    }

    .result-modal .modal-dialog {
        margin: 8px;
    }

    .result-modal-content {
        max-height: calc(100vh - 16px);
        max-height: calc(100svh - 16px);
    }

    .result-modal-header {
        padding: 10px 8px 10px 11px;
    }

    .result-modal-heading h2 {
        font-size: 16px !important;
    }

    .result-modal-body {
        padding: 10px;
    }

    .result-question-card {
        padding: 12px;
    }

    .result-question-title {
        font-size: 15px;
    }

    .result-chart-wrap {
        height: 238px;
    }

    .result-candidate-row {
        padding: 11px;
        grid-template-columns: 32px minmax(0, 1fr) auto;
        gap: 8px;
    }

    .result-candidate-rank {
        width: 32px;
        height: 32px;
    }

    .result-modal-footer {
        padding: 10px max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
