  * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
  }

  #os {
    width: 100%;
    height: 100vh;
    min-height: 700px;
    position: relative;
    overflow: hidden;
    background: #1c2333;
  }

  .phase {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity .5s;
  }

  .phase.off {
    opacity: 0;
    pointer-events: none;
  }

  #login {
    background: #1c2333;
  }

  .login-card {
    background: #252d3d;
    border: 1px solid #3a4460;
    border-radius: 12px;
    width: 360px;
    overflow: hidden;
    position: relative;
    z-index: 2;
  }

  .lc-top {
    background: #1e2638;
    padding: 28px 24px 20px;
    text-align: center;
    border-bottom: 1px solid #3a4460;
  }

  .lc-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #2d3a55;
    border: 2px solid #4a6fa5;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #7aa2d4;
  }

  .lc-inst {
    font-size: 13px;
    font-weight: 600;
    color: #c8d8f0;
    letter-spacing: .5px;
    margin-bottom: 2px;
  }

  .lc-sub {
    font-size: 11px;
    color: #6a7d9a;
    letter-spacing: .5px;
  }

  .lc-body {
    padding: 24px;
  }

  .lc-label {
    font-size: 11px;
    color: #6a7d9a;
    letter-spacing: .5px;
    margin-bottom: 5px;
    display: block;
  }

  .lc-input {
    width: 100%;
    background: #1c2333;
    border: 1px solid #3a4460;
    border-radius: 6px;
    color: #c8d8f0;
    font-size: 13px;
    padding: 9px 12px;
    outline: none;
    margin-bottom: 14px;
    font-family: inherit;
  }

  .lc-input:focus {
    border-color: #4a6fa5;
  }

  .lc-btn {
    width: 100%;
    background: #2d5a9e;
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    padding: 10px;
    cursor: pointer;
  }

  .lc-btn:hover {
    background: #3668b0;
  }

  .lc-err {
    font-size: 11px;
    color: #e57373;
    text-align: center;
    margin-top: 8px;
    min-height: 16px;
  }

  .lc-foot {
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #2a3550;
  }

  .lc-fi {
    font-size: 10px;
    color: #3a4d6a;
  }

  .login-org {
    position: absolute;
    bottom: 28px;
    color: #3a4460;
    font-size: 11px;
    letter-spacing: 2px;
  }

  #boot {
    background: #000;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 24px 32px;
    font-family: 'Courier New', monospace;
  }

  .bl {
    font-size: 12px;
    line-height: 1.9;
    color: #aaa;
  }

  .bl.g {
    color: #4caf50;
  }

  .bl.y {
    color: #ffc107;
  }

  .boot-track {
    background: #111;
    border: 1px solid #2a2a2a;
    height: 6px;
    border-radius: 2px;
    width: 340px;
    overflow: hidden;
    margin-top: 12px;
  }

  .boot-fill {
    height: 100%;
    background: #4a6fa5;
    transition: width .15s;
  }

  .boot-pct {
    font-size: 10px;
    color: #444;
    margin-top: 3px;
    font-family: 'Courier New', monospace;
  }

  #desktop {
    background: #1c2333;
    align-items: flex-start;
    justify-content: flex-start;
  }

  .wallpaper {
    position: absolute;
    inset: 0;
    background: #1c2333;
    background-image: repeating-linear-gradient(0deg, transparent, transparent 39px, rgba(255, 255, 255, .018) 39px, rgba(255, 255, 255, .018) 40px), repeating-linear-gradient(90deg, transparent, transparent 39px, rgba(255, 255, 255, .018) 39px, rgba(255, 255, 255, .018) 40px);
  }

  .topbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 28px;
    background: #151d2e;
    border-bottom: 1px solid #2a3550;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    z-index: 200;
  }

  .tb-left {
    display: flex;
    align-items: center;
    gap: 16px;
  }

  .tb-logo {
    font-size: 12px;
    font-weight: 600;
    color: #7aa2d4;
    letter-spacing: .5px;
  }

  .tb-menu-item {
    font-size: 12px;
    color: #8a9ab5;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 3px;
  }

  .tb-menu-item:hover {
    background: #2a3550;
    color: #c8d8f0;
  }

  .tb-right {
    display: flex;
    align-items: center;
    gap: 14px;
  }

  .tb-info {
    font-size: 11px;
    color: #5a6d8a;
  }

  .tb-time {
    font-size: 12px;
    color: #8a9ab5;
    font-variant-numeric: tabular-nums;
  }

  .desktop-area {
    position: absolute;
    top: 28px;
    left: 0;
    right: 0;
    bottom: 40px;
  }

  .icon-grid {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    gap: 8px;
    padding: 14px;
    max-height: calc(100vh - 90px);
  }

  .dicon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    padding: 8px 6px;
    border-radius: 8px;
    width: 82px;
    transition: background .12s;
  }

  .dicon:hover {
    background: rgba(255, 255, 255, .08);
  }

  .dicon.sel {
    background: rgba(74, 111, 165, .35);
  }

  .dicon-img {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    position: relative;
  }

  .dicon-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #e05050;
    color: #fff;
    font-size: 9px;
    border-radius: 8px;
    padding: 1px 5px;
    min-width: 16px;
    text-align: center;
  }

  .dicon-label {
    font-size: 11px;
    color: #c0cfe8;
    text-align: center;
    line-height: 1.3;
    max-width: 78px;
  }

  .taskbar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: #151d2e;
    border-top: 1px solid #2a3550;
    display: flex;
    align-items: center;
    padding: 0 10px;
    gap: 6px;
    z-index: 200;
  }

  .tb-task {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 11px;
    color: #8a9ab5;
    background: transparent;
    border: none;
    transition: background .12s;
  }

  .tb-task:hover {
    background: #2a3550;
    color: #c8d8f0;
  }

  .tb-task.active {
    background: #2a3d5e;
    color: #c8d8f0;
  }

  .tb-sep {
    width: 1px;
    height: 20px;
    background: #2a3550;
    margin: 0 2px;
  }

  .tb-clock-bar {
    margin-left: auto;
    font-size: 11px;
    color: #6a7d9a;
    font-variant-numeric: tabular-nums;
  }

  .win {
    position: absolute;
    background: #1e2638;
    border: 1px solid #3a4460;
    border-radius: 10px;
    overflow: hidden;
    min-width: 300px;
    min-height: 200px;
    z-index: 100;
    display: flex;
    flex-direction: column;
  }

  .win.focused {
    z-index: 150;
    border-color: #4a6fa5;
  }

  .win-titlebar {
    background: #16202f;
    height: 34px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 8px;
    cursor: move;
    flex-shrink: 0;
  }

  .win-btns {
    display: flex;
    gap: 6px;
  }

  .win-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
    border: none;
  }

  .btn-close {
    background: #e05050;
  }

  .btn-min {
    background: #e0a040;
  }

  .btn-max {
    background: #40b040;
  }

  .win-title {
    font-size: 12px;
    color: #8a9ab5;
    margin-left: 4px;
    font-weight: 500;
  }

  .win-body {
    flex: 1;
    overflow: auto;
    font-size: 13px;
    color: #c0cfe8;
    line-height: 1.6;
  }

  .mail-layout {
    display: flex;
    height: 100%;
    gap: 0;
  }

  .mail-sidebar {
    width: 190px;
    background: #1a2235;
    border-right: 1px solid #2a3550;
    padding: 12px 0;
    flex-shrink: 0;
  }

  .mail-folder {
    padding: 7px 16px;
    font-size: 12px;
    color: #8a9ab5;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .mail-folder:hover {
    background: #222d42;
    color: #c0cfe8;
  }

  .mail-folder.active {
    background: #2a3d5e;
    color: #c0cfe8;
  }

  .mail-badge {
    background: #e05050;
    color: #fff;
    font-size: 9px;
    border-radius: 8px;
    padding: 1px 5px;
    margin-left: auto;
  }

  .mail-list {
    width: 240px;
    overflow-y: auto;
    border-right: 1px solid #2a3550;
    flex-shrink: 0;
  }

  .mail-item {
    padding: 12px 14px;
    border-bottom: 1px solid #1a2235;
    cursor: pointer;
    transition: background .1s;
  }

  .mail-item:hover {
    background: #222d42;
  }

  .mail-item.selected {
    background: #2a3d5e;
  }

  .mail-item.unread .mail-from {
    font-weight: 600;
    color: #c8d8f0;
  }

  .mail-from {
    font-size: 12px;
    color: #8a9ab5;
    margin-bottom: 3px;
  }

  .mail-subject {
    font-size: 12px;
    color: #c0cfe8;
    margin-bottom: 2px;
  }

  .mail-preview {
    font-size: 11px;
    color: #4a5d78;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mail-date {
    font-size: 10px;
    color: #3a4d6a;
    float: right;
  }

  .mail-unread-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4a6fa5;
    display: inline-block;
    margin-right: 6px;
    flex-shrink: 0;
  }

  .mail-content {
    flex: 1;
    overflow-y: auto;
  }

  .mail-c-subject {
    font-size: 15px;
    font-weight: 600;
    color: #c8d8f0;
    margin-bottom: 12px;
  }

  .mail-c-body {
    font-size: 13px;
    color: #a0b4cc;
    line-height: 1.8;
  }

  .files-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid #2a3550;
    background: #1a2235;
  }

  .files-path {
    font-size: 11px;
    color: #6a7d9a;
    background: #151d2e;
    border: 1px solid #2a3550;
    border-radius: 4px;
    padding: 4px 10px;
    flex: 1;
  }

  .files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 12px;
    padding: 14px;
  }

  .fitem {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
  }

  .fitem:hover {
    background: rgba(255, 255, 255, .06);
  }

  .fitem-icon {
    font-size: 28px;
  }

  .fitem-name {
    font-size: 10px;
    color: #a0b4cc;
    text-align: center;
    line-height: 1.3;
  }

  .text-body {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #c0cfe8;
    line-height: 1.8;
    white-space: pre-wrap;
  }

  .term-body {
    background: #0d1117;
    height: 100%;
    padding: 12px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #58d68d;
    line-height: 1.8;
    overflow-y: auto;
  }

  .term-line .p {
    color: #4a6fa5;
  }

  .term-line .c {
    color: #58d68d;
  }

  .term-line .o {
    color: #2a7a4a;
  }

  .term-cursor {
    display: inline-block;
    width: 7px;
    height: 13px;
    background: #58d68d;
    vertical-align: middle;
    animation: bl 1s step-end infinite;
  }

  @keyframes bl {

    0%,
    100% {
      opacity: 1
    }

    50% {
      opacity: 0
    }
  }

  .resize-handle {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 14px;
    height: 14px;
    cursor: se-resize;
  }

  /* NOTIF TOAST */
  .notif-toast {
    position: absolute;
    bottom: 52px;
    right: 16px;
    background: #1e2e48;
    border: 1px solid #4a6fa5;
    border-radius: 10px;
    padding: 14px 16px;
    width: 320px;
    z-index: 500;
    cursor: pointer;
    transition: opacity .4s, transform .4s;
  }

  .notif-toast.hide {
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
  }

  .notif-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
  }

  .notif-icon {
    font-size: 16px;
  }

  .notif-app {
    font-size: 11px;
    color: #7aa2d4;
    font-weight: 600;
  }

  .notif-time {
    font-size: 10px;
    color: #3a4d6a;
    margin-left: auto;
  }

  .notif-title {
    font-size: 12px;
    font-weight: 600;
    color: #c8d8f0;
    margin-bottom: 3px;
  }

  .notif-body {
    font-size: 11px;
    color: #6a7d9a;
    line-height: 1.5;
  }

  /* NEW MAIL ANIMATION */
  @keyframes mailPulse {

    0%,
    100% {
      box-shadow: 0 0 0 0 rgba(74, 111, 165, .5)
    }

    50% {
      box-shadow: 0 0 0 6px rgba(74, 111, 165, 0)
    }
  }

  .mail-item.new-anim {
    animation: mailPulse .8s ease 3;
  }