:root {
      --apple-blue: #0A84FF;
      --apple-green: #30D158;
      --apple-orange: #FF9F0A;
      --apple-red: #FF453A;
      --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: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", sans-serif;
      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: 1120px;
      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: 23px;
      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: 11px;
      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: 12.5px;
      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: 14.5px;
      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; }
    }

    .metric-mini-box {
      background: rgba(0,0,0,0.25);
      border-radius: 12px;
      padding: 9px 12px;
      position: relative;
      border: 1px solid rgba(255,255,255,0.04);
    }
    .metric-mini-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 3px;
    }
    .metric-mini-label {
      font-size: 10px;
      color: var(--text-secondary);
      text-transform: uppercase;
      font-weight: 600;
      letter-spacing: 0.4px;
    }
    .metric-mini-val {
      font-size: 16.5px;
      font-weight: 700;
      margin-bottom: 5px;
      font-family: var(--font-mono);
      line-height: 1.1;
    }
    .bar-bg {
      width: 100%;
      height: 4px;
      background: rgba(255,255,255,0.1);
      border-radius: 2px;
      overflow: hidden;
    }
    .bar-fill {
      height: 100%;
      border-radius: 2px;
      transition: width 0.8s ease;
    }
    .btn-detalhes-mini {
      background: rgba(255,255,255,0.08);
      font-size: 9px;
      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: 60px;
      background: rgba(0,0,0,0.2);
      border-radius: 12px;
      padding: 3px 6px;
      border: 1px solid rgba(255,255,255,0.03);
    }

    /* 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: 12px;
      text-align: center;
      font-weight: 500;
      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 6px #30D158;
      animation: led-pulse 1.3s infinite ease-in-out;
    }
    .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: 28px;
      height: 28px;
      border-radius: 8px;
      background: rgba(255,255,255,0.06);
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      overflow: hidden;
      font-size: 13px;
    }
    .resource-icon img {
      width: 20px;
      height: 20px;
      object-fit: contain;
    }
    .resource-info {
      min-width: 0;
    }
    .resource-name {
      font-size: 12.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: 10px;
      color: var(--text-secondary);
      margin-top: 1px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    
    /* 3-PILL STATS: CPU, RAM, DISCO */
    .resource-stats-3 {
      display: flex;
      align-items: center;
      gap: 8px;
      text-align: right;
      flex-shrink: 0;
    }
    .stat-pill-mini {
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      min-width: 40px;
    }
    .stat-pill-mini .stat-val {
      font-family: var(--font-mono);
      font-size: 11px;
      font-weight: 700;
      line-height: 1.2;
    }
    .stat-pill-mini .stat-lbl {
      font-size: 8px;
      color: var(--text-secondary);
      text-transform: uppercase;
      letter-spacing: 0.3px;
      margin-top: 1px;
    }

    /* 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: 16px; font-weight: 600; }
    .hero-banner p { font-size: 12.5px; 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: 11.5px;
      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: 12.5px;
      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: 13px;
      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: 11.5px;
    }
    .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);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      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(30, 30, 34, 0.92);
      backdrop-filter: blur(40px);
      -webkit-backdrop-filter: blur(40px);
      border: 1px solid rgba(255,255,255,0.1);
      border-radius: 22px;
      padding: 22px;
      max-width: 520px;
      width: 90%;
      text-align: left;
      box-shadow: 0 20px 50px rgba(0,0,0,0.5);
      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: 13px;
      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: 13.5px;
      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: 12px;
        gap: 5px;
      }
      .dock-icon {
        width: 14px;
        height: 14px;
      }
    }
/* LOGIN PAGE STYLES */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    overflow: hidden;
}

.login-container {
    z-index: 10;
    width: 100%;
    max-width: 380px;
    padding: 20px;
}

.login-card {
    background: var(--card-bg);
    backdrop-filter: blur(40px) saturate(150%);
    -webkit-backdrop-filter: blur(40px) saturate(150%);
    border: 1px solid var(--card-border);
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.06);
    text-align: center;
}

.login-card h1 {
    font-size: 26px;
    margin-bottom: 5px;
    letter-spacing: 2px;
}

.login-card p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 30px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group input {
    width: 100%;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.2);
    color: white;
    font-size: 15px;
    outline: none;
    transition: 0.3s ease;
    box-sizing: border-box;
}

.input-group input:focus {
    border-color: var(--apple-blue);
    background: rgba(0, 0, 0, 0.4);
}

.btn-login {
    width: 100%;
    padding: 15px;
    background: var(--apple-blue);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s ease;
}

.btn-login:hover {
    background: #0070e0;
}

.error-msg {
    color: #ff453a;
    font-size: 13px;
    margin-bottom: 15px;
    min-height: 15px;
}
