* {
    box-sizing: border-box;
}

:root {
    --bg: #050f1b;
    --bg-soft: #071522;
    --sidebar: #071c31;
    --panel: rgba(11, 33, 53, .92);
    --panel-strong: #0b2135;
    --panel-soft: rgba(14, 44, 69, .78);
    --panel-hover: rgba(18, 56, 88, .88);
    --border: rgba(180, 216, 242, .09);
    --border-strong: rgba(64, 166, 255, .22);
    --text: #f7fbff;
    --muted: #8fa9bd;
    --muted-2: #6f8ba2;
    --blue: #159cff;
    --blue-2: #0060d8;
    --cyan: #00d2ff;
    --green: #2bd69b;
    --orange: #ffad42;
    --red: #ff6474;
    --shadow: 0 24px 80px rgba(0, 0, 0, .26);
    --shadow-soft: 0 14px 36px rgba(0, 0, 0, .16);
    --radius-xl: 22px;
    --radius-lg: 18px;
    --radius-md: 14px;
    --radius-sm: 11px;
}

html,
body {
    margin: 0;
    min-height: 100%;
    background:
        radial-gradient(circle at 82% -10%, rgba(0, 96, 216, .12), transparent 32%),
        linear-gradient(180deg, #050f1b 0%, #06111f 100%);
    color: var(--text);
    font-family:
        "Inter",
        -apple-system,
        BlinkMacSystemFont,
        "SF Pro Text",
        "SF Pro Display",
        "Helvetica Neue",
        "Segoe UI",
        Arial,
        sans-serif;
    font-size: 14px;
    letter-spacing: -.01em;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body {
    overflow-x: hidden;
}

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

a {
    color: inherit;
    text-decoration: none;
}

::selection {
    background: rgba(21, 156, 255, .28);
    color: #fff;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 236px minmax(0, 1fr);
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 30;
    width: 236px;
    min-height: 100vh;
    padding: 18px 14px;
    display: flex;
    flex-direction: column;
    background:
        linear-gradient(180deg, rgba(8, 32, 56, .98), rgba(6, 25, 44, .98));
    border-right: 1px solid var(--border);
    box-shadow: 20px 0 70px rgba(0, 0, 0, .12);
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 8px 22px;
}

.brand-logo-mark {
    width: 42px;
    height: 42px;
    object-fit: contain;
    filter: drop-shadow(0 8px 18px rgba(0, 125, 255, .22));
}

.brand-name {
    font-size: 16px;
    font-weight: 850;
    letter-spacing: -.02em;
}

.brand-subtitle {
    margin-top: 3px;
    color: #56b8ff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .14em;
}

.nav {
    display: grid;
    gap: 6px;
}

.nav-item {
    position: relative;
    min-height: 48px;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: 13px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #aec4d5;
    font-weight: 700;
    transition:
        background .18s ease,
        color .18s ease,
        border-color .18s ease,
        transform .18s ease;
}

.nav-item:hover {
    color: #fff;
    background: rgba(255, 255, 255, .035);
    transform: translateX(2px);
}

.nav-item.active {
    color: #fff;
    background:
        linear-gradient(135deg, rgba(21, 156, 255, .16), rgba(0, 96, 216, .08));
    border-color: rgba(21, 156, 255, .28);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .015);
}

.nav-item.active::before {
    content: "";
    position: absolute;
    left: -15px;
    top: 11px;
    width: 3px;
    height: 22px;
    border-radius: 3px;
    background: linear-gradient(180deg, var(--cyan), var(--blue));
    box-shadow: 0 0 14px rgba(21, 156, 255, .42);
}

.nav-icon {
    width: 24px;
    min-width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    color: #69bdfd;
    font-size: 18px;
    line-height: 1;
}

.nav-icon svg {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

.nav-item > svg {
    width: 18px;
    min-width: 18px;
    height: 18px;
}

.sidebar-footer {
    margin-top: auto;
    padding: 17px 8px 3px;
    border-top: 1px solid var(--border);
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-avatar,
.tenant-avatar {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border: 1px solid rgba(86, 184, 255, .15);
    border-radius: 12px;
    display: grid;
    place-items: center;
    background:
        linear-gradient(145deg, rgba(21, 156, 255, .22), rgba(0, 96, 216, .10));
    color: #fff;
    font-weight: 850;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

.tenant-avatar.large {
    width: 58px;
    height: 58px;
    border-radius: 16px;
}

.admin-user-copy {
    min-width: 0;
}

.admin-name {
    overflow: hidden;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-role {
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
}

.logout-link {
    display: inline-flex;
    margin-top: 12px;
    color: #7895aa;
    font-size: 11px;
    font-weight: 650;
    transition: color .18s ease;
}

.logout-link:hover {
    color: #fff;
}

.main {
    grid-column: 2;
    min-width: 0;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: 78px;
    padding: 13px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    background: rgba(5, 15, 27, .82);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
}

.topbar-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.topbar h1 {
    margin: 4px 0 0;
    overflow: hidden;
    font-size: 23px;
    font-weight: 820;
    letter-spacing: -.035em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-kicker,
.eyebrow {
    color: #5cb8fb;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-pill {
    min-height: 36px;
    padding: 0 13px;
    border: 1px solid var(--border);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    color: #bdd2e2;
    background: rgba(255, 255, 255, .018);
    font-size: 12px;
    font-weight: 700;
    transition: background .18s ease, border-color .18s ease;
}

.status-pill:hover {
    background: rgba(255, 255, 255, .04);
}

.dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 7px;
    border-radius: 50%;
    background: var(--green);
}

.status-pill.online .dot {
    background: var(--green);
    box-shadow: 0 0 12px rgba(43, 214, 155, .85);
}

.status-pill.degraded .dot {
    background: var(--orange);
    box-shadow: 0 0 12px rgba(255, 173, 66, .78);
}

.status-pill.offline .dot {
    background: var(--red);
    box-shadow: 0 0 12px rgba(255, 100, 116, .78);
}

.status-pill.degraded {
    color: #ffd18c;
    border-color: rgba(255, 173, 66, .22);
}

.status-pill.offline {
    color: #ff9da8;
    border-color: rgba(255, 100, 116, .22);
}

.mobile-menu-button {
    display: none;
    width: 38px;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: rgba(255, 255, 255, .03);
    color: #fff;
    cursor: pointer;
}

.content {
    width: min(100%, 1800px);
    margin: 0 auto;
    padding: 24px 28px 42px;
}

.app-footer {
    width: min(100%, 1800px);
    margin: 0 auto;
    padding: 0 28px 28px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: #5f7b91;
    font-size: 10px;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.page-intro {
    margin-bottom: 14px;
}

.page-intro p {
    margin: 7px 0 0;
    color: var(--muted);
    line-height: 1.55;
}

.hero-panel {
    position: relative;
    overflow: hidden;
    padding: 26px;
    border: 1px solid rgba(21, 156, 255, .18);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    background:
        radial-gradient(circle at 82% 20%, rgba(0, 210, 255, .13), transparent 26%),
        linear-gradient(135deg, rgba(11, 34, 55, .98), rgba(7, 27, 47, .96));
    box-shadow: var(--shadow-soft);
}

.hero-panel::after {
    content: "";
    position: absolute;
    right: -80px;
    bottom: -120px;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: rgba(21, 156, 255, .06);
    filter: blur(6px);
    pointer-events: none;
}

.hero-panel > * {
    position: relative;
    z-index: 1;
}

.hero-panel h2 {
    margin: 6px 0 8px;
    font-size: clamp(27px, 3vw, 37px);
    font-weight: 850;
    letter-spacing: -.045em;
}

.hero-panel p {
    max-width: 700px;
    margin: 0;
    color: #91aabd;
    line-height: 1.55;
}

.hero-actions,
.integration-actions,
.connection-flags,
.form-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.kpi-grid {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.kpi-card {
    position: relative;
    overflow: hidden;
    min-height: 132px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(160deg, rgba(14, 43, 67, .95), rgba(9, 30, 49, .94));
    box-shadow: 0 14px 34px rgba(0, 0, 0, .10);
    transition: transform .18s ease, border-color .18s ease;
}

.kpi-card:hover {
    transform: translateY(-2px);
    border-color: rgba(86, 184, 255, .16);
}

.kpi-card::after {
    content: "";
    position: absolute;
    right: -36px;
    top: -50px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(21, 156, 255, .045);
}

.kpi-label {
    color: #9bb3c6;
    font-size: 11px;
    font-weight: 750;
}

.kpi-value {
    margin-top: 16px;
    font-size: 34px;
    font-weight: 850;
    letter-spacing: -.045em;
}

.kpi-meta {
    margin-top: 7px;
    color: var(--muted-2);
    font-size: 11px;
}

.dashboard-grid,
.details-grid {
    margin-top: 16px;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 16px;
}

.panel,
.system-summary {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(180deg, rgba(11, 33, 53, .96), rgba(9, 29, 47, .96));
    box-shadow: 0 14px 38px rgba(0, 0, 0, .08);
}

.panel-header {
    min-height: 70px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--border);
}

.panel-header h3,
.system-overall h3 {
    margin: 4px 0 0;
    font-size: 16px;
    font-weight: 780;
    letter-spacing: -.02em;
}

.tenant-list,
.connection-list {
    padding: 8px 12px 12px;
}

.tenant-row,
.connection-row {
    padding: 12px 8px;
    display: flex;
    align-items: center;
    gap: 13px;
    border-bottom: 1px solid rgba(255, 255, 255, .05);
    transition: background .18s ease;
}

.tenant-row:last-child,
.connection-row:last-child {
    border-bottom: 0;
}

.tenant-row:hover,
.connection-row:hover {
    background: rgba(255, 255, 255, .018);
}

.tenant-main {
    flex: 1;
    min-width: 0;
}

.tenant-name,
.table-title {
    font-weight: 760;
}

.tenant-sub,
.table-sub {
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
}

.tenant-stat {
    margin-left: auto;
    text-align: right;
}

.tenant-stat span {
    display: block;
    color: var(--muted);
    font-size: 10px;
}

.badge {
    min-height: 23px;
    padding: 0 8px;
    border: 1px solid transparent;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .035em;
    text-transform: uppercase;
    white-space: nowrap;
}

.badge.success {
    color: #73f5c5;
    background: rgba(43, 214, 155, .085);
    border-color: rgba(43, 214, 155, .10);
}

.badge.warning {
    color: #ffd18c;
    background: rgba(255, 173, 66, .085);
    border-color: rgba(255, 173, 66, .10);
}

.badge.danger {
    color: #ff9da8;
    background: rgba(255, 100, 116, .085);
    border-color: rgba(255, 100, 116, .10);
}

.badge.neutral {
    color: #aac0d2;
    background: rgba(255, 255, 255, .035);
    border-color: rgba(255, 255, 255, .04);
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 13px 14px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, .052);
    vertical-align: middle;
}

th {
    color: #7895aa;
    background: rgba(255, 255, 255, .008);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .10em;
    text-transform: uppercase;
    white-space: nowrap;
}

tbody tr {
    transition: background .16s ease;
}

tbody tr:hover {
    background: rgba(255, 255, 255, .017);
}

tbody tr:last-child td {
    border-bottom: 0;
}

.integration-grid {
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.integration-card {
    min-height: 174px;
    padding: 17px;
    border: 1px solid var(--border);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    background: rgba(12, 38, 62, .76);
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.integration-card:hover {
    transform: translateY(-2px);
    border-color: rgba(86, 184, 255, .18);
    background: rgba(14, 44, 70, .88);
}

.integration-card.enabled {
    border-color: rgba(21, 156, 255, .24);
    box-shadow: inset 0 0 0 1px rgba(21, 156, 255, .025);
}

.integration-card-top,
.integration-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.integration-card h4 {
    margin: 7px 0 0;
    font-size: 15px;
}

.integration-category {
    color: #6d8ea8;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .10em;
    text-transform: uppercase;
}

.integration-code {
    margin-top: 13px;
    color: #7594ad;
}

.integration-footer {
    margin-top: auto;
    padding-top: 18px;
    color: var(--muted);
    font-size: 10px;
}

.definition-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.definition-grid > div {
    min-height: 72px;
    padding: 15px 18px;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.definition-grid > div:nth-child(2n) {
    border-right: 0;
}

.definition-grid span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 10px;
}

.primary-button,
.secondary-button,
.danger-button {
    min-height: 40px;
    padding: 0 15px;
    border-radius: 11px;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
    transition: transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.primary-button:hover,
.secondary-button:hover,
.danger-button:hover {
    transform: translateY(-1px);
}

.primary-button {
    background: linear-gradient(135deg, #159cff, #0077ea);
    color: #fff;
    box-shadow: 0 8px 22px rgba(0, 119, 234, .18);
}

.primary-button:hover {
    box-shadow: 0 11px 28px rgba(0, 119, 234, .24);
}

.secondary-button {
    background: rgba(255, 255, 255, .035);
    border-color: var(--border);
    color: #d2e5f3;
}

.secondary-button:hover {
    background: rgba(255, 255, 255, .06);
    border-color: rgba(86, 184, 255, .16);
}

.danger-button {
    background: rgba(255, 100, 116, .07);
    border-color: rgba(255, 100, 116, .18);
    color: #ff9daa;
}

.danger-button:hover {
    background: rgba(255, 100, 116, .12);
}

.primary-button.small,
.secondary-button.small,
.danger-button.small {
    min-height: 32px;
    padding: 0 11px;
    border-radius: 9px;
    font-size: 11px;
}

.inline-form {
    display: inline-flex;
    margin: 0;
}

.text-link {
    color: #69bdfd;
    font-size: 11px;
    font-weight: 750;
}

.text-link:hover {
    color: #a7dcff;
}

.empty-state {
    padding: 26px;
    color: var(--muted);
    text-align: center;
    line-height: 1.55;
}

.right {
    text-align: right;
}

.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11px;
}

.subpage-toolbar {
    min-height: 44px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.subpage-context {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--muted);
    font-size: 11px;
}

.subpage-context strong {
    color: var(--text);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 10px;
    font-weight: 750;
}

.integration-settings {
    display: grid;
}

.setting-row {
    min-height: 70px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid var(--border);
}

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

.setting-row strong {
    display: block;
}

.setting-row span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 10px;
}

.environment-switch {
    display: flex;
    gap: 7px;
}

.environment-switch form {
    margin: 0;
}

.integration-environment-panel,
.system-panel {
    margin-top: 16px;
}

.connection-form {
    padding: 18px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.form-field {
    display: grid;
    gap: 8px;
}

.form-field-wide {
    grid-column: 1 / -1;
}

.form-field > span,
.login-card label > span {
    color: #a2b9cb;
    font-size: 11px;
    font-weight: 750;
}

.form-field small {
    color: var(--muted);
    font-size: 10px;
    line-height: 1.5;
}

.form-field input,
.form-field select,
.login-card input {
    width: 100%;
    min-height: 46px;
    padding: 0 13px;
    border-radius: 11px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .035);
    color: var(--text);
    outline: none;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.form-field select option {
    color: #111;
}

.form-field input:focus,
.form-field select:focus,
.login-card input:focus {
    border-color: rgba(21, 156, 255, .55);
    background: rgba(255, 255, 255, .05);
    box-shadow: 0 0 0 4px rgba(21, 156, 255, .07);
}

.toggle-field {
    min-height: 46px;
    display: flex;
    align-items: center;
    gap: 9px;
    color: #b8cada;
}

.form-actions {
    margin-top: 20px;
}

.alert {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 11px;
    border: 1px solid var(--border);
    line-height: 1.45;
}

.alert.success {
    color: #75f5c7;
    background: rgba(43, 214, 155, .07);
    border-color: rgba(43, 214, 155, .17);
}

.alert.danger {
    color: #ff9da8;
    background: rgba(255, 100, 116, .07);
    border-color: rgba(255, 100, 116, .17);
}

.system-overall {
    padding: 17px 19px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid var(--border);
}

.system-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.system-meta > div {
    padding: 14px 17px;
    border-right: 1px solid var(--border);
}

.system-meta > div:last-child {
    border-right: 0;
}

.system-meta span {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 10px;
}

.health-grid {
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 13px;
}

.health-card {
    padding: 15px;
    border-radius: 15px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .022);
}

.health-card.ok {
    border-color: rgba(43, 214, 155, .16);
}

.health-card.warning,
.health-card.unknown,
.health-card.degraded {
    border-color: rgba(255, 173, 66, .20);
}

.health-card.error,
.health-card.offline {
    border-color: rgba(255, 100, 116, .22);
}

.health-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.health-title {
    font-weight: 780;
}

.health-code {
    margin-top: 4px;
    color: var(--muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 9px;
}

.health-message {
    margin: 13px 0;
    color: #9fb4c5;
    font-size: 11px;
    line-height: 1.5;
}

.health-details {
    display: grid;
    gap: 7px;
}

.health-details > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 10px;
}

.health-details span {
    color: var(--muted);
}

.health-details strong {
    text-align: right;
}

.metric-grid {
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.metric-card {
    padding: 14px;
    border-radius: 13px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .022);
}

.metric-card span {
    display: block;
    color: var(--muted);
    font-size: 10px;
}

.metric-card strong {
    display: block;
    margin-top: 8px;
    font-size: 22px;
    font-weight: 830;
    letter-spacing: -.03em;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.info-card {
    padding: 17px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: rgba(255, 255, 255, .022);
}

.info-card span {
    display: block;
    color: var(--muted);
    font-size: 10px;
}

.info-card strong {
    display: block;
    margin-top: 6px;
    font-size: 15px;
}

/* Login */
.login-body {
    min-height: 100vh;
    overflow: hidden;
    background:
        radial-gradient(circle at 12% 8%, rgba(0, 210, 255, .10), transparent 28%),
        radial-gradient(circle at 90% 88%, rgba(0, 96, 216, .16), transparent 34%),
        #040d17;
}

.login-shell {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(430px, .92fr);
}

.login-orb {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(4px);
}

.login-orb-one {
    left: -180px;
    top: -220px;
    width: 540px;
    height: 540px;
    background: rgba(0, 210, 255, .045);
}

.login-orb-two {
    right: -170px;
    bottom: -200px;
    width: 520px;
    height: 520px;
    background: rgba(0, 96, 216, .065);
}

.login-visual {
    position: relative;
    overflow: hidden;
    padding: 42px 52px 34px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, .06);
    background:
        linear-gradient(140deg, rgba(8, 36, 62, .95), rgba(5, 22, 39, .92));
}

.login-visual::after {
    content: "";
    position: absolute;
    right: -150px;
    top: 15%;
    width: 560px;
    height: 560px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 133, 255, .13), transparent 66%);
}

.login-brand-row,
.login-copy,
.login-visual-footer {
    position: relative;
    z-index: 2;
}

.login-brand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.login-full-logo {
    width: 180px;
    max-height: 82px;
    object-fit: contain;
    object-position: left center;
    filter: drop-shadow(0 10px 30px rgba(0, 102, 255, .16));
}

.login-product-badge {
    min-height: 31px;
    padding: 0 11px;
    border: 1px solid rgba(86, 184, 255, .16);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    color: #9ed7ff;
    background: rgba(21, 156, 255, .055);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .14em;
}

.login-copy {
    width: min(780px, 100%);
    margin: auto 0;
}

.login-copy h1 {
    max-width: 780px;
    margin: 14px 0 18px;
    font-size: clamp(42px, 5.2vw, 74px);
    line-height: .98;
    font-weight: 880;
    letter-spacing: -.058em;
}

.login-copy > p {
    max-width: 650px;
    margin: 0;
    color: #9ab1c4;
    font-size: 16px;
    line-height: 1.65;
}

.login-feature-grid {
    margin-top: 34px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.login-feature {
    min-height: 128px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, .065);
    border-radius: 15px;
    background: rgba(255, 255, 255, .025);
    backdrop-filter: blur(12px);
}

.login-feature > span {
    color: #4eb5ff;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .10em;
}

.login-feature strong,
.login-feature small {
    display: block;
}

.login-feature strong {
    margin-top: 12px;
    font-size: 13px;
}

.login-feature small {
    margin-top: 6px;
    color: #7895aa;
    font-size: 10px;
    line-height: 1.5;
}

.login-visual-footer {
    color: #58778e;
    font-size: 9px;
    letter-spacing: .11em;
}

.login-panel {
    padding: 34px;
    display: grid;
    place-items: center;
}

.login-card-wrap {
    width: min(430px, 100%);
    padding: 26px;
    border: 1px solid rgba(255, 255, 255, .075);
    border-radius: 22px;
    background:
        linear-gradient(180deg, rgba(11, 31, 50, .88), rgba(7, 22, 36, .88));
    box-shadow: 0 30px 100px rgba(0, 0, 0, .28);
    backdrop-filter: blur(20px);
}

.login-card-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.login-card-mark {
    width: 54px;
    height: 54px;
    object-fit: contain;
    filter: drop-shadow(0 8px 20px rgba(0, 114, 255, .18));
}

.login-card-heading h2 {
    margin: 5px 0 4px;
    font-size: 23px;
    letter-spacing: -.035em;
}

.login-card-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
}

.login-card {
    display: grid;
    gap: 15px;
}

.login-card label {
    display: grid;
    gap: 8px;
}

.login-card input {
    min-height: 50px;
}

.login-submit {
    min-height: 50px;
    margin-top: 2px;
    justify-content: space-between;
    padding: 0 16px;
}

.login-submit span {
    font-size: 18px;
}

.login-security-note {
    margin-top: 20px;
    padding-top: 17px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
    color: #69869d;
    font-size: 10px;
}

.security-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 10px rgba(43, 214, 155, .6);
}

.sidebar-backdrop {
    display: none;
}

@media (max-width: 1200px) {
    .kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .integration-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-grid,
    .details-grid {
        grid-template-columns: 1fr;
    }

    .health-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1000px) {
    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-visual {
        display: none;
    }

    .login-panel {
        min-height: 100vh;
    }
}

@media (max-width: 860px) {
    .app-shell {
        display: block;
    }

    .sidebar {
        transform: translateX(-102%);
        transition: transform .22s ease;
    }

    .sidebar-open .sidebar {
        transform: translateX(0);
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 25;
        background: rgba(0, 0, 0, .45);
        backdrop-filter: blur(3px);
    }

    .sidebar-open .sidebar-backdrop {
        display: block;
    }

    .main {
        grid-column: auto;
    }

    .mobile-menu-button {
        display: grid;
        place-items: center;
    }

    .content {
        padding: 20px 18px 36px;
    }

    .topbar {
        padding: 12px 18px;
    }

    .app-footer {
        padding: 0 18px 24px;
    }

    .system-meta,
    .metric-grid,
    .info-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .topbar h1 {
        max-width: 210px;
        font-size: 19px;
    }

    .topbar-kicker {
        display: none;
    }

    .status-pill {
        min-height: 32px;
        padding: 0 10px;
        font-size: 10px;
    }

    .hero-panel {
        align-items: flex-start;
        flex-direction: column;
        padding: 20px;
    }

    .kpi-grid,
    .integration-grid,
    .health-grid,
    .metric-grid,
    .system-meta,
    .info-grid,
    .form-grid,
    .definition-grid {
        grid-template-columns: 1fr;
    }

    .definition-grid > div,
    .system-meta > div {
        border-right: 0;
    }

    .integration-actions,
    .connection-flags {
        justify-content: flex-end;
    }

    .subpage-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .subpage-context {
        flex-wrap: wrap;
    }

    .setting-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .app-footer {
        flex-direction: column;
        gap: 5px;
    }

    .login-panel {
        padding: 18px;
    }

    .login-card-wrap {
        padding: 21px;
    }
}


/* RCC — prikaz korištenja integracijskih servisa */
.usage-status {
    display: grid;
    gap: 4px;
}

.usage-status > span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-weight: 700;
}

.usage-status small {
    color: var(--muted);
    font-size: 11px;
}

.usage-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex: 0 0 7px;
}

.usage-active {
    color: #75f5c7;
}

.usage-active .usage-dot {
    background: var(--green);
    box-shadow: 0 0 10px rgba(43, 214, 155, .55);
}

.usage-assigned {
    color: #ffd18c;
}

.usage-assigned .usage-dot {
    background: var(--orange);
}

.usage-empty {
    color: var(--muted);
    font-weight: 500 !important;
}

/* RCC Phase 2 - Request Inspector */

.request-filter-grid {
    padding: 16px 18px 18px;

    display: grid;
    grid-template-columns:
        repeat(
            3,
            minmax(0, 1fr)
        )
        auto;

    gap: 14px;

    align-items: end;
}

.request-filter-action {
    display: flex;
    align-items: end;
}

.requests-panel {
    margin-top: 16px;
}

.count-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 26px;
    padding: 0 9px;

    border-radius: 999px;

    border: 1px solid var(--border);

    color: var(--muted);

    background: rgba(255, 255, 255, .035);

    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.clickable-row {
    cursor: pointer;
    transition:
        background .16s ease,
        transform .16s ease;
}

.clickable-row:hover {
    background:
        rgba(
            21,
            156,
            255,
            .045
        );
}

.error-text {
    color: #ff9da8;
}

.empty-table {
    padding: 34px !important;

    color: var(--muted);
    text-align: center;
}

.request-status-banner {
    margin-bottom: 16px;
    padding: 22px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;

    border-radius: 18px;
    border: 1px solid var(--border);

    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, .035),
            rgba(255, 255, 255, .015)
        );
}

.request-status-banner.success {
    border-color:
        rgba(
            43,
            214,
            155,
            .18
        );
}

.request-status-banner.warning {
    border-color:
        rgba(
            255,
            173,
            66,
            .22
        );
}

.request-status-banner.danger {
    border-color:
        rgba(
            255,
            100,
            116,
            .24
        );
}

.request-status-banner h2 {
    margin: 5px 0 4px;

    font-size: 26px;
    letter-spacing: -.03em;
}

.request-status-banner p {
    margin: 0;

    color: var(--muted);
}

.request-status-meta {
    display: grid;
    grid-template-columns:
        repeat(
            3,
            minmax(100px, 1fr)
        );

    gap: 10px;
}

.request-status-meta > div {
    min-width: 120px;
    padding: 11px 13px;

    border-radius: 12px;

    border: 1px solid var(--border);

    background: rgba(255, 255, 255, .025);
}

.request-status-meta span {
    display: block;

    margin-bottom: 4px;

    color: var(--muted);

    font-size: 10px;
}

.request-status-meta strong {
    font-size: 12px;
}

.request-attempts-panel,
.request-technical-panel {
    margin-top: 16px;
}

.attempt-list {
    padding: 16px;

    display: grid;
    gap: 12px;
}

.attempt-card {
    display: grid;
    grid-template-columns: 46px 1fr;
    gap: 14px;

    padding: 15px;

    border-radius: 14px;
    border: 1px solid var(--border);

    background: rgba(255, 255, 255, .022);
}

.attempt-number {
    width: 42px;
    height: 42px;

    display: grid;
    place-items: center;

    border-radius: 12px;

    background:
        rgba(
            21,
            156,
            255,
            .08
        );

    color: #66b8f7;

    font-weight: 800;
}

.attempt-title {
    display: flex;
    align-items: center;
    gap: 9px;

    font-weight: 700;
}

.attempt-meta {
    margin-top: 12px;

    display: grid;
    grid-template-columns:
        repeat(
            4,
            minmax(0, 1fr)
        );

    gap: 8px;
}

.attempt-meta > div {
    padding: 9px 10px;

    border-radius: 10px;

    background: rgba(255, 255, 255, .025);
}

.attempt-meta span {
    display: block;

    margin-bottom: 4px;

    color: var(--muted);

    font-size: 10px;
}

.attempt-meta strong {
    display: block;

    overflow-wrap: anywhere;

    font-size: 11px;
}

.json-details {
    margin-top: 10px;
}

.json-details summary {
    cursor: pointer;

    color: #69bdfd;

    font-size: 11px;
    font-weight: 700;
}

.json-details pre {
    max-height: 420px;
    overflow: auto;

    margin: 10px 0 0;
    padding: 14px;

    border-radius: 11px;

    border: 1px solid var(--border);

    background: #05101c;

    color: #d7e7f2;

    font-size: 11px;
    line-height: 1.55;

    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.technical-data-list {
    padding: 8px 16px 16px;
}

.technical-data-row {
    padding: 11px 2px;

    display: grid;
    grid-template-columns: minmax(170px, .45fr) 1fr;
    gap: 16px;

    border-bottom: 1px solid rgba(255, 255, 255, .05);
}

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

.technical-data-row > span {
    color: var(--muted);

    font-size: 11px;
}

.technical-data-row > strong {
    overflow-wrap: anywhere;

    font-size: 12px;
}

@media (max-width: 1100px) {

    .request-filter-grid {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }

    .request-status-banner {
        align-items: flex-start;
        flex-direction: column;
    }

    .request-status-meta {
        width: 100%;
    }

    .attempt-meta {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }
}

@media (max-width: 700px) {

    .request-filter-grid {
        grid-template-columns: 1fr;
    }

    .request-status-meta {
        grid-template-columns: 1fr;
    }

    .attempt-card {
        grid-template-columns: 1fr;
    }

    .attempt-meta {
        grid-template-columns: 1fr;
    }

    .technical-data-row {
        grid-template-columns: 1fr;
        gap: 5px;
    }
}

/* RCC Phase 2.1 - Queue monitor */

.queue-kpi-grid {
    margin-bottom: 16px;

    display: grid;
    grid-template-columns:
        repeat(
            4,
            minmax(0, 1fr)
        );

    gap: 12px;
}

.queue-kpi-card {
    min-height: 112px;
    padding: 17px;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    border-radius: 16px;
    border: 1px solid var(--border);

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, .035),
            rgba(255, 255, 255, .015)
        );

    transition:
        transform .16s ease,
        border-color .16s ease;
}

.queue-kpi-card:hover {
    transform: translateY(-1px);
    border-color: rgba(21, 156, 255, .28);
}

.queue-kpi-card span {
    color: var(--muted);

    font-size: 11px;
    font-weight: 700;
}

.queue-kpi-card strong {
    font-size: 30px;
    letter-spacing: -.04em;
}

.queue-kpi-card.warning {
    border-color:
        rgba(
            255,
            173,
            66,
            .18
        );
}

.queue-kpi-card.accent {
    border-color:
        rgba(
            21,
            156,
            255,
            .22
        );
}

.queue-panel,
.queue-info-panel {
    margin-top: 16px;
}

.queue-retryable {
    margin-top: 5px;

    color: #ffd18c;

    font-size: 10px;
    font-weight: 700;
}

.queue-error-text {
    max-width: 320px;

    color: #b9cbd9;

    font-size: 11px;

    overflow-wrap: anywhere;
}

.queue-info-grid {
    display: grid;
    grid-template-columns:
        repeat(
            4,
            minmax(0, 1fr)
        );
}

.queue-info-grid > div {
    padding: 16px 18px;

    border-right: 1px solid var(--border);
}

.queue-info-grid > div:last-child {
    border-right: 0;
}

.queue-info-grid span {
    display: block;

    margin-bottom: 6px;

    color: var(--muted);

    font-size: 10px;
}

.queue-info-grid strong {
    font-size: 12px;
}

@media (max-width: 1100px) {

    .queue-kpi-grid {
        grid-template-columns:
            repeat(
                2,
                1fr
            );
    }

    .queue-info-grid {
        grid-template-columns:
            repeat(
                2,
                1fr
            );
    }

    .queue-info-grid > div {
        border-bottom: 1px solid var(--border);
    }
}

@media (max-width: 700px) {

    .queue-kpi-grid,
    .queue-info-grid {
        grid-template-columns: 1fr;
    }
}

/* RCC Phase 2.3 - Manual retry / manual review */

.request-action-bar {
    margin-bottom: 16px;
    padding: 14px 16px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;

    border: 1px solid rgba(21, 156, 255, .22);
    border-radius: 14px;

    background:
        linear-gradient(
            135deg,
            rgba(21, 156, 255, .075),
            rgba(21, 156, 255, .025)
        );
}

.request-action-bar.warning {
    border-color: rgba(255, 173, 66, .26);

    background:
        linear-gradient(
            135deg,
            rgba(255, 173, 66, .08),
            rgba(255, 173, 66, .025)
        );
}

.request-action-bar > div {
    display: grid;
    gap: 4px;
}

.request-action-bar strong {
    font-size: 13px;
}

.request-action-bar span {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
}

.request-action-bar form {
    margin: 0;
    flex: 0 0 auto;
}

.queue-manual-review {
    margin-top: 5px;

    color: #ff9da8;

    font-size: 10px;
    font-weight: 700;
}

.queue-kpi-grid {
    grid-template-columns:
        repeat(
            5,
            minmax(0, 1fr)
        );
}

.queue-kpi-card.danger {
    border-color:
        rgba(
            255,
            100,
            116,
            .22
        );
}

@media (max-width: 1250px) {
    .queue-kpi-grid {
        grid-template-columns:
            repeat(
                3,
                minmax(0, 1fr)
            );
    }
}

@media (max-width: 760px) {
    .request-action-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .request-action-bar .primary-button {
        width: 100%;
    }

    .queue-kpi-grid {
        grid-template-columns: 1fr;
    }
}

/* RCC Phase 2.4 - Provider reconciliation */

.recon-connection-grid {
    padding: 16px;

    display: grid;
    grid-template-columns:
        repeat(
            3,
            minmax(0, 1fr)
        );

    gap: 12px;
}

.recon-connection-card {
    padding: 15px;

    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;

    border: 1px solid var(--border);
    border-radius: 14px;

    background:
        rgba(
            255,
            255,
            255,
            .022
        );
}

.recon-connection-title {
    font-weight: 800;
}

.recon-connection-meta,
.recon-last-run {
    margin-top: 4px;

    color: var(--muted);

    font-size: 11px;
}

.recon-last-run a {
    color: #68bdfd;
}

.reconciliation-results {
    margin-top: 16px;
}

.recon-summary-grid {
    display: grid;
    grid-template-columns:
        repeat(
            4,
            minmax(0, 1fr)
        );

    border-bottom:
        1px solid
        var(--border);
}

.recon-summary-grid > div {
    padding: 15px 18px;

    border-right:
        1px solid
        var(--border);
}

.recon-summary-grid > div:last-child {
    border-right: 0;
}

.recon-summary-grid span {
    display: block;

    color: var(--muted);

    font-size: 10px;
}

.recon-summary-grid strong {
    display: block;

    margin-top: 6px;

    font-size: 22px;
}

@media (max-width: 1100px) {

    .recon-connection-grid {
        grid-template-columns:
            repeat(
                2,
                1fr
            );
    }

    .recon-summary-grid {
        grid-template-columns:
            repeat(
                2,
                1fr
            );
    }
}

@media (max-width: 700px) {

    .recon-connection-grid,
    .recon-summary-grid {
        grid-template-columns:
            1fr;
    }
}

/* RCC Phase 2.4.1 - Full reconciliation */

.recon-run-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.recon-run-form select {
    min-height: 34px;
    padding: 0 30px 0 10px;

    border: 1px solid var(--border);
    border-radius: 9px;

    background: rgba(255,255,255,.03);
    color: var(--text);

    font-size: 11px;
}

.recon-window {
    margin: 5px 0 0;

    color: var(--muted);

    font-size: 10px;
}

.recon-summary-grid {
    grid-template-columns:
        repeat(
            5,
            minmax(0, 1fr)
        );
}

.recon-filter-bar {
    padding: 10px 16px;

    display: flex;
    flex-wrap: wrap;
    gap: 7px;

    border-bottom: 1px solid var(--border);
}

.recon-filter-bar a {
    padding: 7px 10px;

    border: 1px solid var(--border);
    border-radius: 999px;

    color: var(--muted);

    font-size: 10px;
    font-weight: 750;
}

.recon-filter-bar a.active {
    border-color: rgba(21,156,255,.35);

    background: rgba(21,156,255,.10);

    color: #8ed1ff;
}

.recon-actions {
    display: flex;
    justify-content: flex-end;
    gap: 7px;
}

.recon-actions form {
    margin: 0;
}

.recon-auto-refreshed {
    margin-top: 5px;

    color: #75f5c7;
}

@media (max-width: 1250px) {
    .recon-summary-grid {
        grid-template-columns:
            repeat(
                3,
                1fr
            );
    }
}

@media (max-width: 800px) {
    .recon-run-form {
        align-items: stretch;
        flex-direction: column;
    }

    .recon-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .recon-summary-grid {
        grid-template-columns:
            1fr;
    }
}

/* RCC Phase 2.4.2 - alerts / automatic reconciliation */

.rcc-alert-pill {
    min-height: 34px;
    padding: 0 12px;

    display: inline-flex;
    align-items: center;
    gap: 7px;

    border: 1px solid rgba(255, 173, 66, .25);
    border-radius: 999px;

    background: rgba(255, 173, 66, .075);
    color: #ffd18c;

    font-size: 11px;
    font-weight: 800;
}

.rcc-alert-pill:hover {
    border-color: rgba(255, 173, 66, .45);
    background: rgba(255, 173, 66, .11);
}

.rcc-alert-dot {
    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: #ffb34d;

    box-shadow:
        0 0 10px
        rgba(255, 179, 77, .6);
}

.rcc-alert-summary {
    margin-bottom: 14px;

    display: grid;
    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );

    border: 1px solid var(--border);
    border-radius: 14px;

    overflow: hidden;
}

.rcc-alert-summary > div {
    padding: 14px 16px;

    display: grid;
    gap: 5px;

    background: rgba(255,255,255,.02);

    border-right: 1px solid var(--border);
}

.rcc-alert-summary > div:last-child {
    border-right: 0;
}

.rcc-alert-summary span {
    color: var(--muted);
    font-size: 10px;
}

.rcc-alert-summary strong {
    font-size: 19px;
}

.rcc-alert-filters {
    margin-bottom: 14px;

    border: 0;
    padding: 0;
}

@media (max-width: 700px) {
    .rcc-alert-summary {
        grid-template-columns: 1fr;
    }

    .rcc-alert-summary > div {
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .rcc-alert-summary > div:last-child {
        border-bottom: 0;
    }
}

/* RCC 2.4.2a */

.provider-sync-badge {
    display: inline-flex;
    align-items: center;

    margin-top: 5px;
    padding: 3px 7px;

    border: 1px solid rgba(61,182,255,.20);
    border-radius: 999px;

    background: rgba(61,182,255,.075);
    color: #78cfff;

    font-size: 9px;
    font-weight: 800;
    letter-spacing: .02em;
}

/* RCC 2.5 - live monitoring + premium sidebar icons */

.rcc-svg-icon {
    width: 22px;
    height: 22px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 22px;
}

.rcc-svg-icon svg {
    width: 20px;
    height: 20px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nav-item.active .rcc-svg-icon svg {
    stroke-width: 2;
}

.nav-item {
    gap: 12px;
}

.app-footer {
    justify-content: flex-start;
}

.worker-grid {
    padding: 16px;

    display: grid;
    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );

    gap: 14px;
}

.worker-card {
    padding: 16px;

    border: 1px solid var(--border);
    border-radius: 15px;

    background: rgba(255,255,255,.022);
}

.worker-card.success {
    border-color: rgba(40, 211, 154, .18);
}

.worker-card.warning {
    border-color: rgba(255, 179, 77, .22);
}

.worker-card.danger {
    border-color: rgba(255, 91, 109, .24);
}

.worker-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.worker-kicker {
    margin-bottom: 5px;

    color: #5dbdff;

    font-size: 9px;
    font-weight: 800;
    letter-spacing: .12em;
}

.worker-card h4 {
    margin: 0;
    font-size: 16px;
}

.worker-metrics {
    margin-top: 15px;

    display: grid;
    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );

    gap: 8px;
}

.worker-metrics > div {
    padding: 11px 12px;

    border: 1px solid var(--border);
    border-radius: 11px;

    background: rgba(255,255,255,.018);
}

.worker-metrics span {
    display: block;

    color: var(--muted);

    font-size: 9px;
}

.worker-metrics strong {
    display: block;

    margin-top: 5px;

    font-size: 13px;
}

.worker-message {
    margin: 12px 0 0;

    color: var(--muted);

    font-size: 11px;
}

.provider-sync-badge {
    display: inline-flex;
    align-items: center;

    margin-top: 5px;
    padding: 3px 7px;

    border: 1px solid rgba(61,182,255,.20);
    border-radius: 999px;

    background: rgba(61,182,255,.075);
    color: #78cfff;

    font-size: 9px;
    font-weight: 800;
}

@media (max-width: 900px) {
    .worker-grid {
        grid-template-columns: 1fr;
    }

    .app-footer span:not(:first-child) {
        display: none !important;
    }

    .app-footer {
        min-height: 42px;
        padding: 12px 16px;
    }
}

@media (max-width: 640px) {
    .nav-item {
        min-height: 48px;
    }

    .rcc-svg-icon {
        width: 24px;
        height: 24px;
        flex-basis: 24px;
    }

    .rcc-svg-icon svg {
        width: 21px;
        height: 21px;
    }

    .worker-metrics {
        grid-template-columns: 1fr;
    }
}


/* ========================================================================
   RCC 2.6 · Worker live monitoring / operational status / premium selects
   ======================================================================== */

.recon-run-form select,
.form-field select {
    color-scheme: dark;
    color: #edf7ff;
    background-color: #0b2236;
    border-color: rgba(92, 190, 255, .20);
    cursor: pointer;
}

.recon-run-form select {
    appearance: none;
    -webkit-appearance: none;
    min-width: 180px;
    padding-right: 36px;
    background-image:
        linear-gradient(45deg, transparent 50%, #75caff 50%),
        linear-gradient(135deg, #75caff 50%, transparent 50%);
    background-position:
        calc(100% - 15px) 50%,
        calc(100% - 10px) 50%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

.recon-run-form select:hover,
.form-field select:hover {
    border-color: rgba(92, 190, 255, .38);
    background-color: #0d2941;
}

.recon-run-form select:focus,
.form-field select:focus {
    outline: none;
    border-color: rgba(21, 156, 255, .65);
    box-shadow: 0 0 0 3px rgba(21, 156, 255, .10);
}

.recon-run-form select option,
.form-field select option {
    color: #edf7ff;
    background: #0b2236;
}

.operations-panel {
    margin-bottom: 18px;
}

.operations-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    padding: 16px;
}

.operation-item {
    min-height: 74px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: rgba(255, 255, 255, .018);
}

.operation-item > div {
    min-width: 0;
}

.operation-item span:not(.operation-dot):not(.operation-number) {
    display: block;
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
}

.operation-item strong {
    display: block;
    margin-top: 5px;
    overflow: hidden;
    color: #eef8ff;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.operation-dot {
    width: 10px;
    height: 10px;
    flex: 0 0 10px;
    border-radius: 50%;
    background: #73869a;
    box-shadow: 0 0 0 4px rgba(115, 134, 154, .09);
}

.operation-dot.success,
.operation-dot.online {
    background: #33d69f;
    box-shadow: 0 0 0 4px rgba(51, 214, 159, .09);
}

.operation-dot.warning {
    background: #f6bb61;
    box-shadow: 0 0 0 4px rgba(246, 187, 97, .09);
}

.operation-dot.danger,
.operation-dot.offline {
    background: #ff667a;
    box-shadow: 0 0 0 4px rgba(255, 102, 122, .09);
}

.operation-number {
    min-width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    padding: 0 8px;
    border: 1px solid rgba(92, 190, 255, .14);
    border-radius: 9px;
    background: rgba(21, 156, 255, .065);
    color: #76ceff;
    font-size: 12px;
    font-weight: 800;
}

@media (max-width: 1180px) {
    .operations-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .operations-grid {
        grid-template-columns: 1fr 1fr;
        padding: 12px;
    }

    .operation-item {
        min-height: 66px;
        padding: 11px 12px;
    }

    .recon-run-form select {
        width: 100%;
        min-width: 0;
        min-height: 42px;
    }

    body {
        padding-top: env(safe-area-inset-top, 0px);
    }

    .app-footer {
        padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
    }
}

@media (max-width: 460px) {
    .operations-grid {
        grid-template-columns: 1fr;
    }
}

/* RCC 2.7.1 - tenant DB connection */
.tenant-db-panel .tenant-db-actions {padding: 15px 18px; display:flex; gap:10px; flex-wrap:wrap;}
.tenant-db-page {max-width: 950px;}
.tenant-db-page .connection-form {padding: 20px;}
.tenant-db-notice {margin: 12px 0 18px; color: var(--muted); font-size: 12px; line-height: 1.65;}
.tenant-db-help {font-size: 11px; color: var(--muted); margin: 14px 0 0; line-height: 1.6;}
.tenant-db-actions {display:flex; gap:10px; flex-wrap:wrap;}
@media(max-width:640px) {.tenant-db-page .form-grid{grid-template-columns:1fr;}}
