:root {
    --apple-blue: #0a84ff;
    --apple-green: #30d158;
    --apple-orange: #ff9f0a;
    --apple-red: #ff453a;
    --apple-yellow: #ffd60a;
    --apple-purple: #bf5af2;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.6);
    --card-bg: rgba(20, 20, 24, 0.65);
    --card-border: rgba(255, 255, 255, 0.08);
    --font-mono: "JetBrains Mono", "SF Mono", monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family:
        "Barlow Semi Condensed", "Avenir Next Condensed", "DIN Alternate", "DIN Condensed",
        -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
    letter-spacing: 0.2px;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;

    background-color: #031332;
    background-image:
        radial-gradient(circle at 0% 0%, rgba(40, 110, 255, 0.4) 0%, transparent 60%),
        radial-gradient(circle at 100% 100%, rgba(130, 40, 255, 0.3) 0%, transparent 60%),
        radial-gradient(circle at 100% 0%, rgba(10, 200, 255, 0.2) 0%, transparent 50%),
        linear-gradient(135deg, #020917 0%, #0a1b3f 100%);
    background-attachment: fixed;
}

/* Layout Container */
.container {
    max-width: 1240px;
    margin: 18px auto;
    padding: 0 16px 110px 16px;
}

/* Header */
.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    padding: 2px 2px;
    flex-wrap: wrap;
    gap: 10px;
}
.dash-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}
.dash-title {
    font-size: 30.1px;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(180deg, #ffffff 0%, rgba(255, 255, 255, 0.85) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.dash-badge {
    background: rgba(48, 209, 88, 0.15);
    color: var(--apple-green);
    border: 1px solid rgba(48, 209, 88, 0.3);
    padding: 3px 9px;
    border-radius: 10px;
    font-size: 15.1px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.dash-badge::before {
    content: "";
    width: 5px;
    height: 5px;
    background: var(--apple-green);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--apple-green);
}
.dash-meta {
    font-size: 16.3px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Tab Controls */
.tab-content {
    display: none !important;
    animation: fadeIn 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.tab-content.active {
    display: block !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Glassmorphic Card */
.icloud-card {
    background: var(--card-bg);
    backdrop-filter: blur(40px) saturate(150%);
    -webkit-backdrop-filter: blur(40px) saturate(150%);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    margin-bottom: 14px;
    overflow: hidden;
}

.card-header {
    padding: 11px 18px;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.card-title {
    font-size: 19.3px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ffffff;
}
.header-svg-icon {
    width: 17px;
    height: 17px;
    color: var(--apple-blue);
    flex-shrink: 0;
}

/* ATIVIDADE DO SISTEMA (ULTRA COMPACTA) */
.system-activity-wrap {
    display: grid;
    grid-template-columns: 2.2fr 1fr;
    gap: 12px;
    padding: 10px 18px 12px 18px;
    align-items: center;
}
@media (max-width: 768px) {
    .system-activity-wrap {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 10px 14px;
    }
}

.metrics-inline-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
@media (max-width: 520px) {
    .metrics-inline-grid {
        grid-template-columns: 1fr;
    }
}

/* SERVICES & RESOURCES MASTER SECTION */
.services-header-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 10px;
}
.services-header-title {
    font-size: 16.3px;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
}
.services-header-sub {
    font-size: 13.2px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.docker-limits-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 1fr;
    gap: 10px;
    align-items: stretch;
}
@media (max-width: 1140px) {
    .docker-limits-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 580px) {
    .docker-limits-grid {
        grid-template-columns: 1fr;
    }
}

/* UNIFIED SERVICE RESOURCE CARD */
.service-resource-card {
    background: rgba(255, 255, 255, 0.025);
    border-radius: 14px;
    padding: 12px 14px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 154px;
    height: 100%;
    box-sizing: border-box;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
}

.service-resource-card.is-clickable {
    cursor: pointer;
}

.service-resource-card.is-clickable:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.16);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.service-resource-card.is-clickable:active {
    transform: translateY(0);
}

.service-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 36px;
    height: 36px;
    gap: 6px;
    margin-bottom: 8px;
    box-sizing: border-box;
}

.service-card-identity {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
}

.service-card-icon-wrap {
    position: relative;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: visible;
}

.status-led-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 8.5px;
    height: 8.5px;
    border-radius: 50%;
    border: 1.8px solid #081126;
    z-index: 2;
    display: inline-block;
}

.service-card-icon-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 7px;
}

.service-card-text {
    min-width: 0;
    line-height: 1.2;
}

.service-card-name {
    font-size: 16.3px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.service-card-name span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.service-link-icon {
    font-size: 11.4px;
    color: var(--apple-blue);
    opacity: 0.75;
    transition: transform 0.2s, opacity 0.2s;
}

.service-resource-card.is-clickable:hover .service-link-icon {
    transform: translate(2px, -2px);
    opacity: 1;
}

.service-card-cat {
    font-size: 13.2px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}

.service-card-badge-wrap {
    flex-shrink: 0;
}

.service-ram-section {
    margin-bottom: 8px;
}

.service-ram-values {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 4px;
    font-family: var(--font-mono);
}

.service-ram-label {
    font-size: 11.4px;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.service-ram-meta {
    display: flex;
    align-items: baseline;
    gap: 3px;
    font-size: 13.9px;
}

.service-ram-used {
    font-weight: 700;
}

.service-ram-limit {
    color: var(--text-secondary);
    font-size: 12.7px;
    font-weight: 500;
}

.service-bottom-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding-top: 7px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.service-stat-pill {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 6px;
    padding: 2.5px 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12.1px;
}

.service-stat-pill .pill-label {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 10.8px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.service-stat-pill .pill-val {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 12.7px;
}

/* Pool Total Docker Specific */
.pool-docker-card {
    background: rgba(10, 132, 255, 0.035) !important;
    border: 1px solid rgba(10, 132, 255, 0.18) !important;
}
.pool-docker-card:hover {
    background: rgba(10, 132, 255, 0.065) !important;
    border-color: rgba(10, 132, 255, 0.35) !important;
}

.metric-mini-box {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 13px;
    padding: 8px 12px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 72px;
    max-height: 72px;
    box-sizing: border-box;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.metric-mini-box:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.metric-mini-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}
.metric-mini-label {
    font-size: 13.2px;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.metric-mini-val {
    font-size: 17.5px;
    font-weight: 600;
    margin-bottom: 7px;
    font-family: var(--font-mono);
    line-height: 1.2;
    display: flex;
    align-items: baseline;
    gap: 4px;
}
.bar-bg {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
}
.bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-detalhes-mini {
    background: rgba(255, 255, 255, 0.08);
    font-size: 10.8px;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-secondary);
    border: none;
    font-weight: 600;
    transition: 0.2s;
}
.btn-detalhes-mini:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.chart-zone-mini {
    height: 72px;
    max-height: 72px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 13px;
    padding: 4px 8px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.chart-zone-mini canvas {
    width: 100% !important;
    height: 62px !important;
    max-height: 62px !important;
}

/* OVERVIEW 2-COLUMN SIDE-BY-SIDE GRID */
.overview-split-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 16px !important;
    margin-bottom: 14px !important;
    align-items: stretch !important;
    width: 100% !important;
}
.overview-split-grid > .icloud-card {
    min-width: 0 !important;
    margin-bottom: 0 !important;
}
@media (max-width: 850px) {
    .overview-split-grid {
        grid-template-columns: 1fr !important;
    }
    .overview-split-grid > .icloud-card {
        margin-bottom: 14px !important;
    }
}

/* APPS GRID (LEFT COLUMN) */
.apps-grid-compact {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 34px 10px;
    padding: 30px 12px;
    justify-content: center;
    align-content: center;
    flex: 1;
}

.app-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    text-decoration: none;
    color: white;
    padding: 8px 4px;
    border-radius: 14px;
    transition:
        transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1),
        background 0.2s;
}
.app-wrap:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.04);
}

.app-icon-img {
    width: 62px;
    height: 62px;
    object-fit: contain;
    border-radius: 15px;
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.45));
    transition:
        transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1),
        filter 0.22s;
}
.app-wrap:hover .app-icon-img {
    transform: scale(1.06);
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.6));
}

.app-label {
    font-size: 16.3px;
    text-align: center;
    font-weight: 600;
    line-height: 1.3;
}

/* COMPACT VERTICAL RESOURCE LIST (RIGHT COLUMN) */
.resource-grid-vertical {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 20px 14px;
    max-height: 600px;
    overflow-y: auto;
}
.resource-card-compact {
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    transition:
        background 0.2s,
        transform 0.15s,
        border-color 0.2s;
}
.resource-card-compact:hover {
    background: rgba(0, 0, 0, 0.34);
    border-color: rgba(255, 255, 255, 0.09);
    transform: translateX(2px);
}
.resource-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

/* STATUS LEDS (PULSE / STATIC / WARN / OFFLINE) */
.status-led {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}
.led-working {
    background: #30d158;
    box-shadow: 0 0 8px rgba(48, 209, 88, 0.9);
    animation: led-pulse 1.1s infinite ease-in-out;
}
@keyframes led-pulse {
    0% {
        transform: scale(0.8);
        opacity: 0.45;
        box-shadow: 0 0 2px rgba(48, 209, 88, 0.4);
    }
    50% {
        transform: scale(1.35);
        opacity: 1;
        box-shadow: 0 0 10px rgba(48, 209, 88, 1);
    }
    100% {
        transform: scale(0.8);
        opacity: 0.45;
        box-shadow: 0 0 2px rgba(48, 209, 88, 0.4);
    }
}
.led-idle {
    background: #30d158;
    box-shadow: 0 0 3px rgba(48, 209, 88, 0.6);
    opacity: 0.85;
}
.led-warning {
    background: #ff9f0a;
    box-shadow: 0 0 6px #ff9f0a;
    animation: led-pulse 1.3s infinite ease-in-out;
}
.led-offline {
    background: #ff453a;
    box-shadow: 0 0 5px #ff453a;
}

@keyframes led-pulse {
    0% {
        transform: scale(0.9);
        opacity: 0.65;
        box-shadow: 0 0 2px currentColor;
    }
    50% {
        transform: scale(1.3);
        opacity: 1;
        box-shadow: 0 0 8px currentColor;
    }
    100% {
        transform: scale(0.9);
        opacity: 0.65;
        box-shadow: 0 0 2px currentColor;
    }
}

.resource-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    font-size: 15.6px;
}
.resource-icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: 5px;
}
.resource-info {
    min-width: 0;
}
.resource-name {
    font-size: 17.5px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 6px;
}
.resource-cat {
    font-size: 14.5px;
    color: var(--text-secondary);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* RESOURCE HEADER STATS (COLUMN TITLES DIRECTLY ABOVE PILLS) */
.resource-header-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 14px;
    flex-shrink: 0;
}
.header-stat-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 74px;
    text-align: center;
}
.header-stat-title {
    font-size: 13.2px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.7px;
    margin-bottom: 2px;
}
.header-stat-total {
    font-family: var(--font-mono);
    font-size: 16.3px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

/* 3-PILL STATS: CPU, RAM, DISCO (PERFECTLY ALIGNED RESPECTIVELY) */
.resource-stats-3 {
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: center;
    flex-shrink: 0;
}
.stat-pill-mini {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 74px;
    height: 36px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 9px;
    padding: 0 4px;
}
.stat-pill-mini .stat-val {
    font-family: var(--font-mono);
    font-size: 15.1px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
}

/* UPDATES, VAULT & TERMINAL */
.hero-banner {
    display: flex;
    justify-content: space-between;
    padding: 16px 18px;
    background: linear-gradient(135deg, rgba(48, 209, 88, 0.1) 0%, rgba(10, 132, 255, 0.1) 100%);
    border-bottom: 1px solid var(--card-border);
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.hero-banner h3 {
    font-size: 19.3px;
    font-weight: 600;
}
.hero-banner p {
    font-size: 15.1px;
    color: var(--text-secondary);
    margin-top: 3px;
    line-height: 1.4;
}
.hero-pill {
    background: rgba(255, 255, 255, 0.15);
    padding: 5px 12px;
    border-radius: 14px;
    font-size: 13.9px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.list-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 18px;
    border-bottom: 1px solid var(--card-border);
    align-items: center;
}
.list-item:last-child {
    border-bottom: none;
}
.list-icon {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    overflow: hidden;
}
.list-icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}
.maint-action {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--card-border);
}
.maint-action:last-child {
    border-bottom: none;
}

.code-box {
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 14px;
    border-radius: 10px;
    font-family: var(--font-mono);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 15.1px;
    word-break: break-all;
}

/* VAULT CREDENTIALS */
.vault-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
    padding: 16px 18px;
}
.vault-card {
    background: rgba(0, 0, 0, 0.24);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 13px;
    display: flex;
    flex-direction: column;
    gap: 9px;
}
.vault-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.vault-item-name {
    font-size: 15.6px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}
.vault-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    padding: 6px 9px;
    border-radius: 8px;
    font-size: 13.9px;
}
.vault-val {
    font-family: var(--font-mono);
    color: #64d2ff;
    font-weight: 600;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s;
}
.modal-overlay.active {
    display: flex;
    opacity: 1;
}
.modal-content {
    background: rgba(22, 24, 30, 0.94);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 22px;
    padding: 24px 26px;
    max-width: 640px;
    width: 92%;
    text-align: left;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
    position: relative;
}
.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15.6px;
    transition: 0.2s;
}
.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.disk-segment {
    height: 16px;
    border-radius: 8px;
    margin: 12px 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    overflow: hidden;
    width: 100%;
}

/* BOTTOM FLOATING DOCK */
.bottom-dock {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    display: flex;
    gap: 6px;
    background: rgba(18, 18, 24, 0.88);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow:
        0 14px 40px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    padding: 5px 8px;
    border-radius: 22px;
    max-width: 95vw;
}

.dock-btn {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    padding: 8px 16px;
    border-radius: 16px;
    font-size: 16.3px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 7px;
    outline: none;
    user-select: none;
    white-space: nowrap;
}

.dock-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.dock-btn.active {
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
    box-shadow:
        0 3px 10px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
    font-weight: 600;
}

.dock-icon {
    width: 16px;
    height: 16px;
    pointer-events: none;
}
.dock-btn span {
    pointer-events: none;
}

@media (max-width: 600px) {
    .bottom-dock {
        bottom: 14px;
        padding: 4px 6px;
        gap: 3px;
    }
    .dock-btn {
        padding: 7px 10px;
        font-size: 14.5px;
        gap: 5px;
    }
    .dock-icon {
        width: 14px;
        height: 14px;
    }
}

/* Login Page Only */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #031332;
    background-image:
        radial-gradient(circle at 0% 0%, rgba(40, 110, 255, 0.4) 0%, transparent 60%),
        radial-gradient(circle at 100% 100%, rgba(130, 40, 255, 0.3) 0%, transparent 60%),
        radial-gradient(circle at 100% 0%, rgba(10, 200, 255, 0.2) 0%, transparent 50%),
        linear-gradient(135deg, #020917 0%, #0a1b3f 100%);
}
.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
    z-index: 2;
}
.login-card {
    background: rgba(20, 20, 24, 0.65);
    backdrop-filter: blur(40px) saturate(150%);
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}
.login-card h1 {
    margin-bottom: 10px;
    font-weight: 700;
    color: white;
    font-family: "Outfit", sans-serif;
    letter-spacing: -1px;
}
.login-card h1 .accent {
    background: linear-gradient(135deg, #0a84ff, #bf5af2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.login-card p {
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.14rem;
    font-weight: 500;
}
.input-group {
    margin-bottom: 20px;
}
.input-group input {
    width: 100%;
    padding: 14px 18px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: white;
    font-size: 16.9px;
    outline: none;
    transition:
        border-color 0.2s,
        background 0.2s;
}
.input-group input:focus {
    border-color: #0a84ff;
    background: rgba(0, 0, 0, 0.35);
}
.btn-login {
    width: 100%;
    padding: 14px;
    background: #0a84ff;
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition:
        transform 0.2s,
        filter 0.2s;
    font-size: 18.1px;
}
.btn-login:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}
.error-msg {
    color: #ff453a;
    margin-bottom: 15px;
    font-size: 1.03rem;
    min-height: 20px;
    font-weight: 500;
}
.background-orbs {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

/* UPDATES TAB: 3-COLUMN SERVICE ROWS & ACTION BUTTONS */
.updates-list-wrapper {
    display: flex;
    flex-direction: column;
}

.update-service-row {
    display: grid;
    grid-template-columns: 270px 1fr 85px;
    align-items: center;
    gap: 14px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--card-border);
    transition: background 0.2s ease;
}
.update-service-row:hover {
    background: rgba(255, 255, 255, 0.02);
}
.update-service-row:last-child {
    border-bottom: none;
}

.service-meta-col {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.service-titles {
    min-width: 0;
}
.service-name-text {
    font-weight: 600;
    font-size: 16.3px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.service-cat-text {
    font-size: 13.2px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.service-versions-col {
    display: flex;
    align-items: center;
    min-width: 0;
}
.version-badges-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.version-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 3px 9px;
    font-size: 13.2px;
    transition: all 0.2s;
}
.version-pill.current {
    background: rgba(48, 209, 88, 0.08);
    border-color: rgba(48, 209, 88, 0.25);
}
.version-pill.current .v-tag {
    color: var(--apple-green);
    font-weight: 700;
}
.version-pill.current .v-num {
    color: var(--text-primary);
    font-weight: 600;
    font-family: var(--font-mono);
}
.version-pill.prev {
    background: rgba(255, 255, 255, 0.03);
}
.version-pill.prev .v-tag {
    color: var(--text-secondary);
    font-weight: 600;
}
.version-pill.prev .v-num {
    color: var(--text-secondary);
    font-family: var(--font-mono);
}
.version-pill.older {
    background: rgba(255, 255, 255, 0.02);
    opacity: 0.8;
}
.version-pill.older .v-tag {
    color: var(--text-secondary);
}
.version-pill.older .v-num {
    color: var(--text-secondary);
    font-family: var(--font-mono);
}
.version-pill .v-desc {
    color: var(--text-secondary);
    font-size: 12.7px;
    max-width: 135px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.service-status-col {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
}
.service-status-col .status-text {
    font-size: 14.5px;
    font-weight: 600;
}

/* ACTION BUTTONS IN MAINTENANCE (APPLE GLASS STYLE) */
.action-btn {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.16);
    padding: 8px 16px;
    border-radius: 9px;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
    min-width: 160px;
    height: 38px;
    box-sizing: border-box;
}
.action-btn svg {
    flex-shrink: 0;
}
@keyframes spin { 100% { transform: rotate(360deg); } }
.spin-icon { animation: spin 1s linear infinite; }
.action-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.28);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}
.action-btn:active {
    transform: translateY(0);
}
.action-btn.btn-working {
    opacity: 0.75;
    pointer-events: none;
    border-color: var(--apple-blue);
    color: var(--apple-blue);
}
.action-btn.btn-success {
    background: rgba(48, 209, 88, 0.16);
    border-color: rgba(48, 209, 88, 0.4);
    color: var(--apple-green);
}

@media (max-width: 960px) {
    .update-service-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .service-status-col {
        justify-content: flex-start;
    }
}

.widget-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(10, 132, 255, 0.12);
    border: 1px solid rgba(10, 132, 255, 0.25);
    color: var(--apple-blue);
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 13.9px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.18s ease;
}
.widget-action-btn:hover {
    background: rgba(10, 132, 255, 0.22);
    border-color: rgba(10, 132, 255, 0.45);
    transform: translateY(-1px);
}
.widget-action-btn.cloud-btn {
    background: rgba(191, 90, 242, 0.12);
    border-color: rgba(191, 90, 242, 0.25);
    color: var(--apple-purple);
}
.widget-action-btn.cloud-btn:hover {
    background: rgba(191, 90, 242, 0.22);
    border-color: rgba(191, 90, 242, 0.45);
}

/* Toast Notification System */
.toast-container {
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}
.toast-notification {
    background: rgba(28, 28, 30, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #fff;
    padding: 11px 16px;
    border-radius: 12px;
    font-size: 15.1px;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: auto;
    display: flex;
    align-items: center;
    max-width: 380px;
}
.toast-notification.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Clean Status Badge without ::before dot (prevents double LED) */
.status-badge-clean {
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 13.2px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* 3-BAR METRICS STACK FOR ALL SERVICE CARDS */
.service-metrics-stack {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 4px;
}

.service-metric-row {
    display: flex;
    flex-direction: column;
    gap: 2.5px;
}

.service-metric-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-family: var(--font-mono);
}

.metric-row-label {
    font-size: 11.4px;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-row-val {
    font-size: 13.9px;
    font-weight: 600;
    color: var(--text-primary);
}

.metric-row-sub {
    font-size: 12.7px;
    color: var(--text-secondary);
    font-weight: 500;
}

.metric-bar-bg {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
}

.metric-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.bar-fill-cpu {
    background: var(--apple-blue);
}

.bar-fill-ram {
    background: var(--apple-green);
}

.bar-fill-disk {
    background: var(--apple-orange);
}

.version-pill .v-date {
    font-size: 12.1px;
    color: var(--apple-blue);
    font-weight: 600;
    font-family: var(--font-mono);
    opacity: 0.9;
    padding: 0 2px;
}

.metric-row-label {
    font-size: 12.7px !important;
    letter-spacing: 0.5px;
}

.metric-row-val {
    font-size: 15.1px !important;
}

.metric-row-sub {
    font-size: 13.2px !important;
}

/* Compact Syncthing Card Live Speeds Badge */
.sync-card-speeds {
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 700;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 2px 6px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    letter-spacing: 0.2px;
    white-space: nowrap;
    height: 20px;
    box-sizing: border-box;
}
.sync-card-speeds .speed-up {
    color: var(--apple-blue);
}
.sync-card-speeds .speed-down {
    color: var(--apple-green);
}

/* Service Versions Column full width */
.service-versions-col {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
}

/* Symmetric 3-column Grid for Updates Tab */
.version-badges-wrapper {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 12px !important;
    width: 100% !important;
    align-items: center !important;
}

.version-pill {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 6px !important;
    min-width: 0 !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    padding: 4px 10px !important;
    border-radius: 8px !important;
    box-sizing: border-box !important;
    width: 100% !important;
}

.version-pill .v-tag {
    flex-shrink: 0 !important;
    font-size: 10.5px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
}
.version-pill .v-num {
    flex: 1 !important;
    text-align: center !important;
    font-size: 12.2px !important;
    font-family: var(--font-mono) !important;
    font-weight: 600 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    padding: 0 4px !important;
}
.version-pill .v-date {
    flex-shrink: 0 !important;
    font-size: 11.5px !important;
    color: var(--apple-blue) !important;
    font-weight: 600 !important;
    font-family: var(--font-mono) !important;
    opacity: 0.95 !important;
}

/* Mobile & Tablet Fine-tuning */
@media (max-width: 1140px) {
    .docker-limits-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 960px) {
    .update-service-row {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 12px 10px;
    }
    .version-badges-wrapper {
        grid-template-columns: 1fr !important;
        gap: 6px !important;
    }
    .service-status-col {
        justify-content: flex-start;
    }
}

@media (max-width: 600px) {
    .docker-limits-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .service-resource-card {
        padding: 12px 14px;
    }
    .maint-action > div {
        flex-direction: column;
        align-items: stretch !important;
        gap: 12px !important;
    }
    .action-btn {
        width: 100%;
        min-width: 100%;
    }
}
