/* macOS Inspired Login Screen */
:root {
    --mac-radius: 12px;
    --mac-shadow: 0 20px 40px rgba(0,0,0,0.3);
    --mac-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.login-mac-body {
    margin: 0;
    padding: 0;
    height: 100vh;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--mac-font);
    background: url('/assets/images/os-wallpaper.png') no-repeat center center fixed;
    background-size: cover;
    overflow: hidden;
}

.login-mac-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 1;
}

.login-mac-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 360px;
    padding: 50px 30px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    text-align: center;
    color: white;
    animation: fadeIn 0.8s ease-out;
}

.login-mac-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.login-mac-avatar i {
    font-size: 44px;
    color: rgba(255, 255, 255, 0.8);
}

.login-mac-username {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 30px;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.login-mac-input-group {
    position: relative;
    background: rgba(255, 255, 255, 0.1); /* شفافية */
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    padding: 2px 2px 2px 15px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.login-mac-input-group:focus-within {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.05);
}

.login-mac-input {
    background-color: transparent !important;
    border: none !important;
    color: #fff !important;
    padding: 12px 0 !important;
    width: 100%;
    font-size: 14px;
    outline: none !important;
    box-shadow: none !important;
    appearance: none;
    -webkit-appearance: none;
}

.login-mac-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}


.login-mac-submit {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    margin-right: 4px;
}

.login-mac-submit:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
}

/* Glassy Checkbox */
.login-autofill-trap {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.login-mac-remember {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
}

.login-mac-remember label {
    cursor: pointer;
    user-select: none;
}

.login-mac-container input[type="checkbox"],
.login-mac-remember input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}

.login-mac-container input[type="checkbox"]:checked,
.login-mac-remember input[type="checkbox"]:checked {
    background: var(--os-primary, #007AFF);
    border-color: var(--os-primary, #007AFF);
}

.login-mac-container input[type="checkbox"]:checked::after,
.login-mac-remember input[type="checkbox"]:checked::after {
    content: '\eb7b'; /* remixicon check mark */
    font-family: 'remixicon';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px;
    color: white;
}

.login-mac-footer {
    position: fixed;
    bottom: 40px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 40px;
    z-index: 2;
}

.login-mac-footer-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s;
    background: none;
    border: none;
}

.login-mac-footer-btn:hover {
    opacity: 0.85;
    transform: translateY(-2px);
}

.login-mac-footer-btn:active {
    transform: translateY(0) scale(0.96);
}

.login-mac-footer-btn:hover .login-mac-footer-icon {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
}

.login-mac-footer-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.login-mac-footer-text {
    font-size: 12px;
    font-weight: 500;
}

.login-mac-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    color: white;
    z-index: 2;
    font-size: 13px;
    font-weight: 500;
}

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

.topbar-left {
    display: flex;
    align-items: center;
    font-size: 16px;
}

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

/* For multi-account view (if needed later) */
.login-mac-users {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
}

.login-mac-user-item {
    cursor: pointer;
    transition: transform 0.2s;
}

.login-mac-user-item:hover {
    transform: translateY(-5px);
}

/* ── Login OS Power Controls ── */
.login-os-sleep-screen,
.login-os-power-overlay,
.login-os-boot-overlay,
.login-os-powered-off {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.login-os-sleep-screen {
    background: #000;
    cursor: none;
    animation: loginFadeIn 0.5s ease;
    transition: opacity 1.2s ease;
}

.login-os-sleep-screen.waking { opacity: 0; }

.login-os-sleep-icon {
    font-size: 72px;
    opacity: 0.25;
    display: block;
    margin-bottom: 18px;
}

.login-os-sleep-content {
    text-align: center;
    animation: loginSleepBreathe 8s ease-in-out infinite;
}

.login-os-sleep-clock-time {
    font-size: 6.5rem;
    font-weight: 200;
    line-height: 1;
    letter-spacing: -2px;
    margin-bottom: 0.5rem;
}

.login-os-sleep-clock-date {
    font-size: 1.2rem;
    opacity: 0.55;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

.login-os-sleep-text {
    font-size: 1rem;
    opacity: 0.4;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.login-os-power-overlay,
.login-os-boot-overlay {
    background: #0a0a0a;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.login-os-power-overlay.active,
.login-os-boot-overlay.active { opacity: 1; }

.login-os-power-content,
.login-os-boot-content {
    text-align: center;
}

.login-os-power-spinner {
    font-size: 42px;
    animation: loginSpin 1s linear infinite;
    display: block;
    margin-bottom: 20px;
    opacity: 0.8;
}

.login-os-power-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.login-os-power-subtitle {
    font-size: 0.95rem;
    opacity: 0.55;
}

.login-os-boot-logo {
    font-size: 64px;
    display: block;
    margin-bottom: 28px;
}

.login-os-boot-logo-img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    margin-bottom: 28px;
}

.login-os-boot-progress {
    width: 200px;
    height: 4px;
    background: #333;
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
}

.login-os-boot-progress-bar {
    width: 0;
    height: 100%;
    background: #fff;
    transition: width 2.6s cubic-bezier(0.1, 0.5, 0.5, 1);
}

.login-os-boot-overlay.fade-out {
    opacity: 0;
    transition: opacity 0.7s ease;
}

/* ── Premium Server Rack (Powered Off) ── */
.login-os-powered-off {
    background: #050608;
    cursor: default;
    overflow: hidden;
    animation: loginPoweredOffIn 0.6s ease;
}

.srv-env {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, #080b10 0%, #030405 60%, #010203 100%);
}

.srv-env-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
}

.srv-env-glow--blue {
    width: 500px;
    height: 300px;
    bottom: 10%;
    left: 20%;
    background: rgba(0, 100, 200, 0.08);
}

.srv-env-glow--cyan {
    width: 400px;
    height: 250px;
    bottom: 5%;
    right: 15%;
    background: rgba(0, 180, 220, 0.06);
}

.srv-env-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 70%, black 20%, transparent 80%);
}

.srv-scene {
    position: relative;
    z-index: 1;
    perspective: 1200px;
    animation: srvSceneIn 1s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

.srv-rack {
    position: relative;
    width: min(820px, 94vw);
    margin: 0 auto;
    padding: 0 28px;
}

.srv-rack-rail {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 18px;
    background: linear-gradient(90deg, #1a1e24, #2d333d 30%, #1a1e24 70%, #12151a);
    border: 1px solid #3d4550;
    border-radius: 2px;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.srv-rack-rail--left { left: 0; }
.srv-rack-rail--right { right: 0; }

.srv-rack-rail::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 8%;
    bottom: 8%;
    width: 6px;
    transform: translateX(-50%);
    background: repeating-linear-gradient(180deg, #0a0c0f 0 14px, #3a424f 14px 16px);
    border-radius: 1px;
}

.srv-stack {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 0;
}

.srv-unit--dim .srv-unit-face {
    height: 28px;
    background: linear-gradient(180deg, #161a20 0%, #0e1115 100%);
    border: 1px solid #2a3038;
    border-radius: 3px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    opacity: 0.45;
}

.srv-unit-led {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #1a2a1a;
    flex-shrink: 0;
}

.srv-unit-led--on {
    background: #22c55e;
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
}

.srv-unit-label {
    font-size: 0.55rem;
    color: rgba(255, 255, 255, 0.25);
    font-family: 'SF Mono', Consolas, monospace;
    letter-spacing: 0.08em;
}

.srv-unit-vents {
    flex: 1;
    height: 8px;
    background: repeating-linear-gradient(90deg, #1a1f26 0 3px, transparent 3px 5px);
    opacity: 0.5;
}

.srv-unit--active {
    position: relative;
    transform: rotateX(2deg);
    transform-style: preserve-3d;
}

.srv-ear {
    position: absolute;
    top: 12px;
    bottom: 12px;
    width: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    z-index: 2;
}

.srv-ear--left { left: -22px; }
.srv-ear--right { right: -22px; }

.srv-ear span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1.5px solid #4a5568;
    background: radial-gradient(circle at 35% 35%, #3d4550, #1a1e24);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.6);
}

.srv-chassis {
    position: relative;
    background:
        linear-gradient(180deg,
            #3a424f 0%, #2a3038 2%,
            #1e2329 8%, #161a20 50%,
            #12151a 92%, #0a0c0f 100%);
    border: 1px solid #4a5568;
    border-radius: 4px;
    box-shadow:
        0 2px 0 #5a6575,
        0 30px 80px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.srv-chassis-shine {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, transparent 100%);
    pointer-events: none;
}

.srv-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    background: linear-gradient(180deg, #252b33 0%, #1a1f26 100%);
    border-bottom: 1px solid #333a45;
}

.srv-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.srv-brand-logo {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: linear-gradient(145deg, #ff6b5b, #cc2e24);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #fff;
    box-shadow: 0 2px 8px rgba(255, 69, 58, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.srv-brand-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.92);
    letter-spacing: 0.02em;
}

.srv-brand-model {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.38);
    letter-spacing: 0.06em;
    margin-top: 1px;
}

.srv-top-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.srv-tag {
    font-size: 0.55rem;
    color: rgba(255, 255, 255, 0.3);
    font-family: 'SF Mono', Consolas, monospace;
    letter-spacing: 0.06em;
}

.srv-tag--express {
    color: rgba(0, 180, 220, 0.5);
}

.srv-front {
    padding: 14px 18px 12px;
}

.srv-drives {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 5px;
    margin-bottom: 12px;
}

.srv-drive {
    position: relative;
    height: 22px;
    background: linear-gradient(180deg, #0a0c0f 0%, #161a20 40%, #0a0c0f 100%);
    border: 1px solid #2a3038;
    border-radius: 2px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    padding: 0 4px;
    gap: 3px;
}

.srv-drive-handle {
    width: 3px;
    height: 12px;
    background: linear-gradient(90deg, #3d4550, #5a6575, #3d4550);
    border-radius: 1px;
    flex-shrink: 0;
}

.srv-drive-led {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #1a1a1a;
    flex-shrink: 0;
}

.srv-drive-num {
    flex: 1;
    text-align: center;
    font-size: 0.45rem;
    color: rgba(255, 255, 255, 0.15);
    font-family: 'SF Mono', Consolas, monospace;
}

.srv-mid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.srv-lcd-panel {
    flex: 0 0 auto;
    width: 168px;
    max-width: 168px;
}

.srv-controls-group {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-left: auto;
    flex-shrink: 0;
}

.srv-lcd-bezel {
    position: relative;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.07) 0%, transparent 42%),
        repeating-linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.015) 0px,
            rgba(255, 255, 255, 0.015) 1px,
            transparent 1px,
            transparent 3px
        ),
        linear-gradient(180deg, #2c323b 0%, #1e242c 48%, #12161c 100%);
    border: 1px solid #3d4654;
    border-radius: 5px;
    padding: 8px 9px 11px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.09),
        inset 0 -2px 5px rgba(0, 0, 0, 0.65),
        0 2px 8px rgba(0, 0, 0, 0.45);
}

.srv-lcd-screw {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 28%, #6a7380, #2e3540 58%, #171c22);
    box-shadow:
        inset 0 0 1px rgba(0, 0, 0, 0.9),
        0 0 0 0.5px rgba(255, 255, 255, 0.06);
    z-index: 4;
}

.srv-lcd-screw--tl { top: 3px; left: 3px; }
.srv-lcd-screw--tr { top: 3px; right: 3px; }
.srv-lcd-screw--bl { bottom: 3px; left: 3px; }
.srv-lcd-screw--br { bottom: 3px; right: 3px; }

.srv-lcd-screen {
    position: relative;
    background: #010601;
    border-radius: 3px;
    padding: 7px 8px;
    min-height: 50px;
    overflow: hidden;
    border: 1px solid #0a140a;
    box-shadow:
        inset 0 3px 10px rgba(0, 0, 0, 0.95),
        inset 0 0 0 1px #0d180d,
        inset 0 0 0 2px #152515,
        0 0 0 1px rgba(0, 0, 0, 0.6);
}

.srv-lcd-screen::before {
    content: '';
    position: absolute;
    inset: 3px;
    border: 1px solid rgba(55, 210, 55, 0.42);
    border-radius: 1px;
    box-shadow:
        0 0 5px rgba(55, 210, 55, 0.22),
        inset 0 0 10px rgba(55, 210, 55, 0.06);
    pointer-events: none;
    z-index: 4;
}

.srv-lcd-backlight {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 85% 75% at 48% 42%, rgba(25, 130, 25, 0.2) 0%, transparent 68%),
        radial-gradient(ellipse 110% 100% at 50% 50%, rgba(0, 70, 0, 0.14) 0%, rgba(0, 0, 0, 0.45) 100%);
    pointer-events: none;
    animation: srvLcdBacklight 5s ease-in-out infinite alternate;
}

.srv-lcd-pixel-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 50, 0, 0.18) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 50, 0, 0.18) 1px, transparent 1px);
    background-size: 2px 2px;
    opacity: 0.35;
    pointer-events: none;
    z-index: 1;
}

.srv-lcd-scanline {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent 0px,
        transparent 2px,
        rgba(0, 0, 0, 0.1) 2px,
        rgba(0, 0, 0, 0.1) 4px
    );
    pointer-events: none;
    z-index: 2;
    animation: srvLcdScan 10s linear infinite;
}

.srv-lcd-vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 35%, rgba(0, 0, 0, 0.6) 100%);
    pointer-events: none;
    z-index: 3;
}

.srv-lcd-glass {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(128deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.03) 20%, transparent 42%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, transparent 38%);
    pointer-events: none;
    z-index: 5;
}

.srv-lcd-screen--booting {
    background: #060501;
}

.srv-lcd-screen--booting::before {
    border-color: rgba(220, 170, 40, 0.45);
    box-shadow:
        0 0 5px rgba(220, 170, 40, 0.25),
        inset 0 0 10px rgba(220, 170, 40, 0.08);
}

.srv-lcd-screen--booting .srv-lcd-backlight {
    background:
        radial-gradient(ellipse 85% 75% at 48% 42%, rgba(180, 120, 20, 0.18) 0%, transparent 68%),
        radial-gradient(ellipse 110% 100% at 50% 50%, rgba(80, 50, 0, 0.14) 0%, rgba(0, 0, 0, 0.45) 100%);
}

.srv-lcd-display {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-family: 'Share Tech Mono', 'SF Mono', Consolas, 'Courier New', monospace;
    font-size: 0.54rem;
    line-height: 1.35;
    letter-spacing: 0.05em;
    color: #38d838;
    text-shadow:
        0 0 3px rgba(56, 216, 56, 0.85),
        0 0 9px rgba(56, 216, 56, 0.35);
    filter: contrast(1.08) brightness(1.02);
}

.srv-lcd-line {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.srv-lcd-line--halt {
    color: #ff2d22;
    font-weight: 700;
    text-shadow:
        0 0 4px rgba(255, 45, 34, 0.95),
        0 0 12px rgba(255, 45, 34, 0.45);
}

.srv-lcd-line--node {
    color: #3ee03e;
}

.srv-lcd-line--status {
    color: #36c836;
}

.srv-lcd-line--boot {
    color: #f0b429;
    text-shadow:
        0 0 4px rgba(240, 180, 41, 0.8),
        0 0 10px rgba(240, 180, 41, 0.3);
}

.srv-lcd-line--ok {
    color: #4dff4d;
    font-weight: 700;
    text-shadow:
        0 0 4px rgba(77, 255, 77, 0.85),
        0 0 12px rgba(77, 255, 77, 0.35);
}

.srv-lcd-off {
    color: #9a4038;
    font-style: normal;
    text-shadow: 0 0 3px rgba(154, 64, 56, 0.35);
    animation: srvLcdDimBlink 2.2s step-end infinite;
}

.srv-lcd-content {
    position: relative;
    z-index: 2;
    font-family: 'Share Tech Mono', 'SF Mono', Consolas, 'Courier New', monospace;
    font-size: 0.62rem;
    line-height: 1.75;
    color: #2d8a2d;
    text-shadow: 0 0 8px rgba(45, 138, 45, 0.35);
}

.srv-lcd-row--alert {
    color: #ff453a;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(255, 69, 58, 0.5);
    margin-bottom: 2px;
}

.srv-lcd-offline {
    color: #ff453a;
    font-style: normal;
    animation: srvBlink 1.5s step-end infinite;
}

.srv-lcd-cursor {
    animation: srvCursor 1s step-end infinite;
}

.srv-lcd-label {
    position: absolute;
    bottom: 1px;
    right: 7px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.4rem;
    color: rgba(175, 185, 195, 0.38);
    letter-spacing: 0.2em;
    font-weight: 600;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.85);
    z-index: 4;
}

.srv-io-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-shrink: 0;
}

.srv-ports {
    display: flex;
    gap: 6px;
    align-items: flex-end;
}

.srv-port {
    border-radius: 2px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.7);
}

.srv-port--eth {
    width: 14px;
    height: 12px;
    background: linear-gradient(180deg, #c8a84e 0%, #8a7030 50%, #6a5520 100%);
    border: 1px solid #5a4a18;
    position: relative;
}

.srv-port--eth::after {
    content: '';
    position: absolute;
    bottom: 1px;
    left: 2px;
    right: 2px;
    height: 4px;
    background: #1a1408;
    border-radius: 0 0 1px 1px;
}

.srv-port--mgmt {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, #4a5568, #1a1e24);
    border: 1px solid #3d4550;
}

.srv-io-labels {
    display: flex;
    gap: 6px;
    font-size: 0.42rem;
    color: rgba(255, 255, 255, 0.2);
    font-family: 'SF Mono', Consolas, monospace;
    letter-spacing: 0.04em;
}

.srv-io-labels span {
    width: 14px;
    text-align: center;
}

.srv-io-labels span:last-child {
    width: 10px;
}

.srv-power-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex-shrink: 0;
    padding: 0 4px;
}

.srv-led-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.srv-led-item {
    display: flex;
    align-items: center;
    gap: 4px;
    min-height: 10px;
}

.srv-led-item em {
    font-size: 0.38rem;
    font-style: normal;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 0.05em;
    font-family: 'SF Mono', Consolas, monospace;
    line-height: 1;
    min-width: 16px;
}

.srv-sled {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #141414;
    border: 1px solid #2a2a2a;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.6);
    flex-shrink: 0;
    transition: background 0.05s ease, box-shadow 0.05s ease;
}

.srv-sled--red {
    background: #ff453a;
    border-color: #cc2e24;
    box-shadow: 0 0 6px rgba(255, 69, 58, 0.65);
    animation: srvPwrPulse 2s ease-in-out infinite;
}

.srv-sled--green {
    background: #22c55e;
    border-color: #16a34a;
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.65);
    animation: none;
}

.srv-sled--amber {
    background: #f59e0b;
    border-color: #d97706;
    box-shadow: 0 0 5px rgba(245, 158, 11, 0.55);
    animation: srvHddFlicker 0.25s step-end infinite;
}

.srv-power-btn {
    position: relative;
    width: 56px;
    height: 56px;
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
}

.srv-power-btn-glow {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 69, 58, 0.12) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.srv-power-btn:hover .srv-power-btn-glow {
    opacity: 1;
    animation: srvPowerGlow 2s ease-in-out infinite;
}

.srv-power-btn-surface {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(145deg, #4a5568 0%, #2d3540 30%, #1a1f26 70%, #0f1216 100%);
    border: 2px solid #5a6575;
    color: rgba(255, 255, 255, 0.65);
    font-size: 1.4rem;
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.5),
        inset 0 2px 0 rgba(255, 255, 255, 0.1),
        inset 0 -3px 6px rgba(0, 0, 0, 0.4);
    transition: all 0.2s ease;
}

.srv-power-btn:hover .srv-power-btn-surface {
    border-color: #4ade80;
    color: #4ade80;
    box-shadow:
        0 4px 20px rgba(74, 222, 128, 0.2),
        inset 0 2px 0 rgba(255, 255, 255, 0.12),
        inset 0 -3px 6px rgba(0, 0, 0, 0.4);
}

.srv-power-btn:active .srv-power-btn-surface {
    transform: scale(0.93);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.5),
        inset 0 3px 8px rgba(0, 0, 0, 0.5);
}

.srv-power-label {
    font-size: 0.5rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: rgba(255, 255, 255, 0.3);
}

.srv-usb-ports {
    display: flex;
    gap: 4px;
    margin-top: 2px;
}

.srv-usb-ports span {
    width: 8px;
    height: 4px;
    background: #1a1e24;
    border: 1px solid #3d4550;
    border-radius: 1px;
}

.srv-bottom-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 20px;
    background: linear-gradient(180deg, #0f1216, #0a0c0f);
    border-top: 1px solid #2a3038;
    font-size: 0.5rem;
    color: rgba(255, 255, 255, 0.22);
    letter-spacing: 0.1em;
    font-family: 'SF Mono', Consolas, monospace;
}

.srv-boot-hint {
    color: rgba(0, 180, 220, 0.45);
    animation: srvHintPulse 3s ease-in-out infinite;
}

.srv-reflection {
    width: min(820px, 94vw);
    height: 60px;
    margin: -8px auto 0;
    background: linear-gradient(180deg, rgba(30, 40, 55, 0.15), transparent);
    transform: scaleY(-0.3) perspective(200px) rotateX(20deg);
    filter: blur(2px);
    opacity: 0.4;
    pointer-events: none;
}

@media (max-width: 640px) {
    .srv-mid {
        flex-wrap: wrap;
    }

    .srv-io-block {
        display: none;
    }

    .srv-drives {
        grid-template-columns: repeat(4, 1fr);
    }

    .srv-top-meta,
    .srv-boot-hint {
        display: none;
    }

    .srv-unit--dim {
        display: none;
    }
}

body.login-powered-off-active .login-mac-container,
body.login-powered-off-active .login-mac-footer,
body.login-powered-off-active .login-mac-topbar,
body.login-powered-off-active .login-mac-overlay {
    visibility: hidden;
}

body.login-powered-off-active .login-os-powered-off {
    z-index: 11000;
}

body.login-black-active {
    background: #000 !important;
    background-image: none !important;
}

body.login-black-active .login-mac-container,
body.login-black-active .login-mac-footer,
body.login-black-active .login-mac-topbar,
body.login-black-active .login-mac-overlay {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.45s ease;
}

.login-os-black-screen {
    position: fixed;
    inset: 0;
    z-index: 10950;
    background: #000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.login-os-black-screen.is-visible {
    opacity: 1;
    pointer-events: all;
}

.login-os-black-screen.is-instant {
    transition: none;
    opacity: 1;
}

body.login-black-active .login-os-power-overlay,
body.login-black-active .login-os-boot-overlay {
    background: transparent;
    z-index: 11050;
}

.login-os-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 11000;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: loginFadeIn 0.2s ease;
}

.login-os-modal {
    width: 320px;
    background: rgba(40, 40, 40, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 24px 22px 18px;
    text-align: center;
    color: #fff;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

.login-os-modal-icon {
    font-size: 40px;
    color: #ff9f0a;
    margin-bottom: 12px;
}

.login-os-modal-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.login-os-modal-text {
    font-size: 0.82rem;
    opacity: 0.75;
    line-height: 1.5;
    margin-bottom: 20px;
}

.login-os-modal-actions {
    display: flex;
    gap: 10px;
}

.login-os-modal-btn {
    flex: 1;
    border: none;
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.login-os-modal-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.login-os-modal-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.18);
}

.login-os-modal-btn-danger {
    background: #ff453a;
    color: #fff;
}

.login-os-modal-btn-danger:hover {
    background: #ff6961;
}

@keyframes loginFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes loginSleepBreathe {
    0%, 100% { opacity: 0.85; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.02); }
}

@keyframes loginSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes loginPoweredOffIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes loginPoweredOffContentIn {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes loginServerSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes srvSceneIn {
    from {
        opacity: 0;
        transform: translateY(40px) rotateX(8deg);
    }
    to {
        opacity: 1;
        transform: translateY(0) rotateX(0);
    }
}

@keyframes srvBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.25; }
}

@keyframes srvLcdBacklight {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.9; }
}

@keyframes srvLcdScan {
    0% { transform: translateY(0); }
    100% { transform: translateY(4px); }
}

@keyframes srvLcdDimBlink {
    0%, 68%, 100% { opacity: 1; }
    69%, 99% { opacity: 0.45; }
}

@keyframes srvCursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes srvSlideIn {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes srvFadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes srvPwrPulse {
    0%, 100% { opacity: 0.75; box-shadow: 0 0 8px rgba(255, 69, 58, 0.6); }
    50% { opacity: 1; box-shadow: 0 0 12px rgba(255, 69, 58, 0.85); }
}

@keyframes srvHddFlicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.2; }
}

@keyframes srvPowerGlow {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.08); opacity: 1; }
}

@keyframes srvHintPulse {
    0%, 100% { opacity: 0.45; }
    50% { opacity: 0.75; }
}

@keyframes loginPowerRingPulse {
    0% {
        transform: scale(0.85);
        opacity: 0.6;
    }
    70%, 100% {
        transform: scale(1.35);
        opacity: 0;
    }
}

@keyframes loginPoweredOffHint {
    0%, 100% { opacity: 0.38; }
    50% { opacity: 0.62; }
}
