:root {
      --bg: #06111d;
      --panel: #0b1a2a;
      --panel-2: #0d2135;
      --line: rgba(148, 163, 184, .18);
      --text: #f4f7fb;
      --muted: #9aa7b8;
      --green: #29e85d;
      --red: #ff4f5e;
      --cyan: #28e8f2;
      --purple: #9a55ff;
      --yellow: #ffd24a;
      --blue: #5c8fe8;
      --shadow: 0 22px 50px rgba(0, 0, 0, .25);
    }

    * {
      box-sizing: border-box;
    }

    body {
      margin: 0;
      min-height: 100vh;
      background:
        radial-gradient(circle at top right, rgba(154, 85, 255, .13), transparent 32rem),
        radial-gradient(circle at top left, rgba(40, 232, 242, .08), transparent 26rem),
        var(--bg);
      color: var(--text);
      font-family: Inter, Segoe UI, Arial, sans-serif;
      font-size: 14px;
      letter-spacing: 0;
    }

    button,
    input,
    select {
      font: inherit;
    }

    button {
      cursor: pointer;
    }

    .app {
      min-height: 100vh;
      display: grid;
      grid-template-columns: 260px 1fr;
    }

    .sidebar {
      border-right: 1px solid var(--line);
      background: rgba(5, 15, 27, .88);
      padding: 22px 16px;
      display: flex;
      flex-direction: column;
      gap: 24px;
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 12px;
      min-height: 52px;
    }

    .logo {
      width: 48px;
      height: 48px;
      display: grid;
      place-items: center;
      border-radius: 14px;
      background: linear-gradient(135deg, #34e4ff, #a34cff 55%, #ff65d8);
      color: white;
      font-size: 27px;
      font-weight: 900;
      box-shadow: 0 12px 28px rgba(154, 85, 255, .35);
    }

    .brand strong {
      display: block;
      font-size: 20px;
      letter-spacing: 1px;
    }

    .brand span {
      color: #b965ff;
      font-size: 13px;
      font-weight: 800;
      letter-spacing: 4px;
    }

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

    .nav button {
      min-height: 46px;
      border: 1px solid transparent;
      border-radius: 8px;
      color: #dfe8f5;
      background: transparent;
      display: grid;
      grid-template-columns: 28px 1fr;
      align-items: center;
      gap: 8px;
      padding: 9px 12px;
      text-align: left;
    }

    .nav button.active,
    .nav button:hover {
      color: white;
      background: linear-gradient(135deg, #7f44ff, #a44fff);
      box-shadow: 0 12px 24px rgba(127, 68, 255, .24);
    }

    .sidebar-section {
      border-top: 1px solid var(--line);
      padding-top: 18px;
    }

    .sidebar-label {
      color: var(--muted);
      font-size: 12px;
      text-transform: uppercase;
      margin: 0 0 10px;
    }

    .pill-list {
      display: grid;
      gap: 8px;
      max-height: 320px;
      overflow: auto;
      padding-right: 3px;
    }

    .pill-list button {
      min-height: 34px;
      border: 1px solid rgba(148, 163, 184, .14);
      border-radius: 8px;
      background: rgba(255, 255, 255, .03);
      color: #dce6f4;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      padding: 7px 9px;
      text-align: left;
    }

    .pill-list button.active {
      border-color: rgba(154, 85, 255, .7);
      background: rgba(154, 85, 255, .18);
    }

    .sidebar-foot {
      margin-top: auto;
      border: 1px solid var(--line);
      border-radius: 18px;
      padding: 13px;
      background: rgba(255, 255, 255, .03);
      color: var(--muted);
      line-height: 1.4;
      font-size: 12px;
    }

    main {
      min-width: 0;
    }

    .topbar {
      min-height: 76px;
      border-bottom: 1px solid var(--line);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 18px;
      padding: 0 24px;
      background: rgba(6, 17, 29, .72);
      backdrop-filter: blur(16px);
    }

    h1,
    h2,
    h3,
    p {
      margin-top: 0;
    }

    h1 {
      margin-bottom: 3px;
      font-size: 24px;
    }

    .subtitle {
      margin: 0;
      color: var(--muted);
    }

    .top-actions {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
      justify-content: flex-end;
    }

    .button {
      min-height: 38px;
      border: 1px solid rgba(148, 163, 184, .24);
      border-radius: 8px;
      background: rgba(255, 255, 255, .05);
      color: var(--text);
      padding: 8px 12px;
      display: inline-flex;
      align-items: center;
      gap: 8px;
    }

    .button:hover {
      border-color: rgba(154, 85, 255, .78);
    }

    .button.primary {
      border-color: transparent;
      background: linear-gradient(135deg, #7b47ff, #a64fff);
      box-shadow: 0 12px 28px rgba(127, 68, 255, .22);
    }

    .button.green {
      border-color: rgba(41, 232, 93, .3);
      background: rgba(41, 232, 93, .12);
      color: #a8ffbd;
    }

    .button.red {
      border-color: rgba(255, 79, 94, .32);
      background: rgba(255, 79, 94, .11);
      color: #ffb2b9;
    }

    .content {
      padding: 18px 22px;
      display: grid;
      gap: 18px;
    }

    .metrics {
      display: grid;
      grid-template-columns: repeat(5, minmax(155px, 1fr));
      gap: 14px;
    }

    .metric {
      min-height: 112px;
      width: 100%;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: linear-gradient(145deg, rgba(17, 37, 58, .94), rgba(9, 23, 38, .94));
      box-shadow: var(--shadow);
      padding: 16px;
      display: grid;
      grid-template-columns: 58px 1fr;
      align-items: center;
      gap: 14px;
      color: var(--text);
      text-align: left;
    }

    .metric:hover {
      border-color: rgba(154, 85, 255, .62);
      transform: translateY(-1px);
    }

    .metric-icon {
      width: 58px;
      height: 58px;
      border-radius: 14px;
      display: grid;
      place-items: center;
      font-size: 28px;
      font-weight: 900;
    }

    .metric small {
      display: block;
      color: #d5dde9;
      text-transform: uppercase;
      font-size: 12px;
      margin-bottom: 5px;
    }

    .metric strong {
      display: block;
      font-size: 28px;
      line-height: 1;
    }

    .metric span {
      display: block;
      color: var(--muted);
      margin-top: 7px;
      font-size: 12px;
    }

    .green-bg {
      color: #9ffdb4;
      background: linear-gradient(135deg, rgba(41, 232, 93, .15), rgba(41, 232, 93, .34));
      border: 1px solid rgba(41, 232, 93, .35);
    }

    .red-bg {
      color: #ff9aa5;
      background: linear-gradient(135deg, rgba(255, 79, 94, .15), rgba(255, 79, 94, .32));
      border: 1px solid rgba(255, 79, 94, .35);
    }

    .cyan-bg {
      color: #95faff;
      background: linear-gradient(135deg, rgba(40, 232, 242, .15), rgba(40, 232, 242, .32));
      border: 1px solid rgba(40, 232, 242, .35);
    }

    .purple-bg {
      color: #d7bdff;
      background: linear-gradient(135deg, rgba(154, 85, 255, .18), rgba(154, 85, 255, .35));
      border: 1px solid rgba(154, 85, 255, .35);
    }

    .yellow-bg {
      color: #ffe898;
      background: linear-gradient(135deg, rgba(255, 210, 74, .15), rgba(255, 210, 74, .32));
      border: 1px solid rgba(255, 210, 74, .34);
    }

    .dashboard-grid {
      display: grid;
      grid-template-columns: minmax(520px, 1.35fr) minmax(320px, .65fr);
      gap: 14px;
      align-items: start;
    }

    .panel {
      border: 1px solid var(--line);
      border-radius: 12px;
      background: linear-gradient(145deg, rgba(12, 30, 49, .94), rgba(8, 22, 36, .94));
      box-shadow: var(--shadow);
      overflow: hidden;
    }

    .panel-head {
      min-height: 58px;
      padding: 13px 16px;
      border-bottom: 1px solid var(--line);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
    }

    .panel-head h2 {
      margin: 0;
      font-size: 15px;
      text-transform: uppercase;
    }

    .tools {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
      justify-content: flex-end;
    }

    input,
    select {
      min-height: 38px;
      border: 1px solid rgba(148, 163, 184, .24);
      border-radius: 8px;
      color: var(--text);
      background: rgba(4, 14, 25, .8);
      padding: 8px 10px;
      outline: none;
    }

    input:focus,
    select:focus {
      border-color: rgba(154, 85, 255, .8);
      box-shadow: 0 0 0 3px rgba(154, 85, 255, .12);
    }

    .table-wrap {
      width: 100%;
      overflow: auto;
    }

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

    th,
    td {
      border-bottom: 1px solid rgba(148, 163, 184, .12);
      padding: 11px 14px;
      text-align: left;
      white-space: nowrap;
    }

    th {
      color: #c9d4e4;
      font-size: 12px;
      font-weight: 700;
      text-transform: uppercase;
      background: rgba(6, 17, 29, .35);
    }

    td {
      color: #e8eef7;
    }

    tr:hover td {
      background: rgba(255, 255, 255, .025);
    }

    .product-cell {
      display: flex;
      align-items: center;
      gap: 11px;
      font-weight: 700;
    }

    .product-logo {
      width: 28px;
      height: 28px;
      border-radius: 8px;
      display: grid;
      place-items: center;
      color: white;
      font-weight: 900;
      background: linear-gradient(135deg, #2563eb, #9333ea);
    }

    .count {
      min-width: 30px;
      display: inline-grid;
      place-items: center;
      border-radius: 6px;
      padding: 4px 7px;
      font-weight: 800;
    }

    .count.green {
      color: #a8ffbd;
      background: rgba(41, 232, 93, .18);
    }

    .count.red {
      color: #ffabb4;
      background: rgba(255, 79, 94, .2);
    }

    .count.cyan {
      color: #9afaff;
      background: rgba(40, 232, 242, .18);
    }

    .count.purple {
      color: #d5b8ff;
      background: rgba(154, 85, 255, .2);
    }

    .inventory-board {
      padding: 14px;
    }

    .product-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
      gap: 12px;
    }

    .inventory-card {
      border: 1px solid rgba(148, 163, 184, .15);
      border-radius: 12px;
      background: rgba(255, 255, 255, .035);
      color: var(--text);
      padding: 13px;
      text-align: left;
      display: grid;
      gap: 12px;
      min-height: 154px;
    }

    .inventory-card:hover {
      border-color: rgba(154, 85, 255, .58);
      background: rgba(154, 85, 255, .08);
    }

    .inventory-card-top {
      display: grid;
      grid-template-columns: 42px 1fr auto;
      align-items: center;
      gap: 10px;
    }

    .inventory-card .product-logo {
      width: 42px;
      height: 42px;
      border-radius: 12px;
      font-size: 17px;
    }

    .product-name {
      display: block;
      font-weight: 800;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .product-meta {
      display: block;
      color: var(--muted);
      font-size: 12px;
      margin-top: 3px;
    }

    .license-total {
      min-width: 48px;
      border: 1px solid rgba(255, 210, 74, .28);
      border-radius: 10px;
      color: var(--yellow);
      background: rgba(255, 210, 74, .09);
      text-align: center;
      padding: 7px 8px;
      font-weight: 900;
    }

    .license-total span {
      display: block;
      color: var(--muted);
      font-size: 10px;
      font-weight: 700;
      text-transform: uppercase;
      margin-bottom: 2px;
    }

    .inventory-stats {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 7px;
    }

    .inventory-stat {
      min-width: 0;
      border: 1px solid rgba(148, 163, 184, .12);
      border-radius: 9px;
      background: rgba(4, 14, 25, .44);
      padding: 8px 6px;
      text-align: center;
    }

    .inventory-stat span {
      display: block;
      color: var(--muted);
      font-size: 10px;
      text-transform: uppercase;
      margin-bottom: 5px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .inventory-stat strong {
      font-size: 18px;
      line-height: 1;
    }

    .stock-bar {
      display: grid;
      grid-template-columns: var(--sold, 1fr) var(--expired, 1fr) var(--available, 1fr) var(--store, 1fr);
      height: 7px;
      overflow: hidden;
      border-radius: 999px;
      background: rgba(255, 255, 255, .07);
    }

    .stock-bar i:nth-child(1) {
      background: var(--green);
    }

    .stock-bar i:nth-child(2) {
      background: var(--red);
    }

    .stock-bar i:nth-child(3) {
      background: var(--cyan);
    }

    .stock-bar i:nth-child(4) {
      background: var(--purple);
    }

    .mini-summary {
      display: grid;
      gap: 12px;
      padding: 14px;
    }

    .mini-card {
      border: 1px solid var(--line);
      border-radius: 10px;
      padding: 13px;
      background: rgba(255, 255, 255, .035);
      color: var(--text);
      text-align: left;
      width: 100%;
    }

    .mini-card:hover {
      border-color: rgba(154, 85, 255, .62);
      background: rgba(154, 85, 255, .08);
    }

    .mini-card span {
      display: block;
      color: var(--muted);
      text-transform: uppercase;
      font-size: 12px;
      margin-bottom: 8px;
    }

    .mini-card strong {
      font-size: 28px;
    }

    .chart-card {
      border: 1px solid rgba(148, 163, 184, .15);
      border-radius: 12px;
      background: rgba(255, 255, 255, .035);
      padding: 14px;
    }

    .donut-wrap {
      display: grid;
      grid-template-columns: 148px 1fr;
      align-items: center;
      gap: 14px;
    }

    .donut {
      width: 138px;
      aspect-ratio: 1;
      border-radius: 50%;
      background: conic-gradient(
        var(--green) 0 var(--soldDeg),
        var(--red) var(--soldDeg) var(--expiredDeg),
        var(--cyan) var(--expiredDeg) var(--availableDeg),
        var(--purple) var(--availableDeg) 360deg
      );
      display: grid;
      place-items: center;
      box-shadow: inset 0 0 28px rgba(0, 0, 0, .28), 0 16px 35px rgba(0, 0, 0, .2);
      border: 0;
      color: var(--text);
    }

    .donut-center {
      width: 82px;
      aspect-ratio: 1;
      border-radius: 50%;
      background: #0b1a2a;
      display: grid;
      place-items: center;
      text-align: center;
      border: 1px solid rgba(148, 163, 184, .16);
      color: var(--text);
    }

    .donut-center strong {
      display: block;
      font-size: 22px;
      line-height: 1;
      color: #ffffff;
    }

    .donut-center span {
      display: block;
      color: var(--muted);
      font-size: 11px;
      margin-top: 4px;
    }

    .chart-legend {
      display: grid;
      gap: 9px;
    }

    .legend-item {
      width: 100%;
      min-height: 32px;
      border: 0;
      background: transparent;
      color: var(--text);
      display: grid;
      grid-template-columns: 10px 1fr auto;
      align-items: center;
      gap: 8px;
      padding: 4px;
      text-align: left;
      border-radius: 7px;
    }

    .legend-item:hover {
      background: rgba(255, 255, 255, .045);
    }

    .legend-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--dot);
    }

    .legend-item span {
      color: #d9e2ef;
      font-size: 12px;
    }

    .legend-item strong {
      font-size: 12px;
      color: var(--muted);
    }

    .side-block {
      display: grid;
      gap: 10px;
    }

    .side-block h3 {
      margin: 0;
      font-size: 13px;
      text-transform: uppercase;
      color: #e8eef7;
    }

    .category-row,
    .alert-row {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 10px;
      align-items: center;
      color: #d8e1ef;
      font-size: 12px;
    }

    .category-bar {
      grid-column: 1 / -1;
      height: 5px;
      border-radius: 999px;
      background: rgba(255, 255, 255, .07);
      overflow: hidden;
    }

    .category-bar i {
      display: block;
      width: var(--width);
      height: 100%;
      background: var(--bar);
    }

    .alert-row {
      border: 1px solid rgba(148, 163, 184, .12);
      border-radius: 9px;
      padding: 9px;
      background: rgba(4, 14, 25, .34);
    }

    .alert-row strong {
      color: var(--alert);
    }

    .accounts-layout {
      display: grid;
      grid-template-columns: 360px 1fr;
      gap: 14px;
      align-items: start;
    }

    .account-list {
      display: grid;
      gap: 10px;
      padding: 14px;
      max-height: calc(100vh - 240px);
      overflow: auto;
    }

    .account-card {
      width: 100%;
      border: 1px solid rgba(148, 163, 184, .16);
      border-radius: 10px;
      background: rgba(255, 255, 255, .035);
      color: var(--text);
      text-align: left;
      padding: 12px;
      display: grid;
      gap: 7px;
    }

    .account-card.active {
      border-color: rgba(154, 85, 255, .82);
      background: rgba(154, 85, 255, .12);
    }

    .account-card strong {
      overflow-wrap: anywhere;
    }

    .account-card span {
      color: var(--muted);
      font-size: 12px;
    }

    .form {
      padding: 16px;
      display: grid;
      gap: 14px;
    }

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

    label {
      display: grid;
      gap: 6px;
      color: #c9d4e4;
      font-size: 12px;
      font-weight: 700;
      text-transform: uppercase;
    }

    label input,
    label select {
      width: 100%;
    }

    .profiles {
      display: grid;
      gap: 10px;
    }

    .profile-row {
      border: 1px solid rgba(148, 163, 184, .15);
      border-radius: 10px;
      background: rgba(255, 255, 255, .03);
      padding: 10px;
      display: grid;
      grid-template-columns: 48px minmax(110px, 1.2fr) 115px 64px 120px 54px 120px 84px 110px;
      gap: 8px;
      align-items: end;
    }

    .readonly-status {
      background: rgba(4, 14, 25, 0.5) !important;
      border-color: rgba(148, 163, 184, 0.12) !important;
      cursor: default;
      font-weight: 800;
      text-align: center;
      text-transform: uppercase;
      transition: all 0.2s ease;
    }
    .readonly-status.status-green {
      color: var(--green) !important;
      border-color: rgba(41, 232, 93, 0.3) !important;
      background: rgba(41, 232, 93, 0.08) !important;
    }
    .readonly-status.status-red {
      color: var(--red) !important;
      border-color: rgba(255, 79, 94, 0.3) !important;
      background: rgba(255, 79, 94, 0.08) !important;
    }
    .readonly-status.status-cyan {
      color: var(--cyan) !important;
      border-color: rgba(40, 232, 242, 0.3) !important;
      background: rgba(40, 232, 242, 0.08) !important;
    }
    .readonly-status.status-purple {
      color: var(--purple) !important;
      border-color: rgba(154, 85, 255, 0.3) !important;
      background: rgba(154, 85, 255, 0.08) !important;
    }

    .profile-row label {
      min-width: 0;
    }

    .profile-row input,
    .profile-row select {
      min-width: 0;
      padding-left: 8px;
      padding-right: 8px;
    }

    .hidden {
      display: none !important;
    }

    .login-screen {
      min-height: 100vh;
      display: grid;
      place-items: center;
      padding: 24px;
      background:
        radial-gradient(circle at 70% 20%, rgba(154, 85, 255, .22), transparent 28rem),
        radial-gradient(circle at 20% 10%, rgba(40, 232, 242, .12), transparent 24rem),
        var(--bg);
    }

    .login-box {
      width: min(400px, 100%);
      border: 1px solid rgba(148, 163, 184, 0.12);
      border-radius: 20px;
      background: rgba(11, 26, 42, 0.75);
      backdrop-filter: blur(20px);
      box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
      padding: 40px 36px 32px 36px;
      display: grid;
      gap: 28px;
    }

    .login-header {
      text-align: center;
    }

    .login-logo {
      font-size: 52px;
      font-weight: 900;
      background: linear-gradient(135deg, #34e4ff, #a34cff 50%, #ff65d8);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      margin-bottom: 12px;
      display: inline-block;
      line-height: 1;
      filter: drop-shadow(0 4px 12px rgba(163, 76, 255, 0.25));
    }

    .login-header h1 {
      margin: 0 0 6px 0;
      font-size: 24px;
      font-weight: 600;
      color: #ffffff;
      letter-spacing: -0.5px;
    }

    .login-header p {
      margin: 0;
      color: var(--muted);
      font-size: 13px;
    }

    .login-form {
      display: grid;
      gap: 18px;
    }

    .login-input-wrapper {
      position: relative;
      display: flex;
      align-items: center;
      width: 100%;
      background: rgba(4, 14, 25, 0.55);
      border: 1px solid rgba(148, 163, 184, 0.15);
      border-radius: 10px;
      margin-top: 6px;
      transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .login-input-wrapper:focus-within {
      border-color: rgba(163, 76, 255, 0.7);
      background: rgba(4, 14, 25, 0.85);
      box-shadow: 0 0 0 3px rgba(163, 76, 255, 0.16);
    }

    .login-input-icon {
      position: absolute;
      left: 14px;
      width: 18px;
      height: 18px;
      color: var(--muted);
      pointer-events: none;
    }

    .login-input-wrapper input {
      width: 100% !important;
      background: transparent !important;
      border: none !important;
      padding: 12px 14px 12px 44px !important;
      color: var(--text) !important;
      font-size: 14px !important;
      outline: none !important;
      box-shadow: none !important;
    }

    .login-input-wrapper input::placeholder {
      color: rgba(148, 163, 184, 0.45);
    }

    .login-password-toggle {
      position: absolute !important;
      right: 8px !important;
      top: 50% !important;
      transform: translateY(-50%) !important;
      background: transparent !important;
      border: none !important;
      color: var(--muted) !important;
      display: flex !important;
      align-items: center !important;
      justify-content: center !important;
      padding: 6px !important;
      cursor: pointer !important;
      border-radius: 4px !important;
      transition: color 0.2s !important;
    }

    .login-password-toggle:hover {
      color: var(--text) !important;
    }

    .login-password-toggle svg {
      width: 18px !important;
      height: 18px !important;
      pointer-events: none !important;
    }

    .login-submit-btn {
      width: 100% !important;
      min-height: 44px !important;
      background: linear-gradient(135deg, #7b47ff, #a64fff) !important;
      border: none !important;
      border-radius: 10px !important;
      color: #ffffff !important;
      font-weight: 600 !important;
      font-size: 14px !important;
      display: flex !important;
      align-items: center !important;
      justify-content: center !important;
      gap: 8px !important;
      cursor: pointer !important;
      transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
      box-shadow: 0 10px 24px rgba(127, 68, 255, 0.25) !important;
      margin-top: 6px;
    }

    .login-submit-arrow {
      width: 16px;
      height: 16px;
      transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .login-submit-btn:hover {
      transform: translateY(-1px) !important;
      box-shadow: 0 12px 28px rgba(127, 68, 255, 0.4) !important;
      background: linear-gradient(135deg, #8755ff, #b05eff) !important;
    }

    .login-submit-btn:hover .login-submit-arrow {
      transform: translateX(3px);
    }

    .login-error {
      min-height: 18px;
      color: var(--red);
      font-size: 13px;
      text-align: center;
    }

    .login-footer {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      color: var(--muted);
      font-size: 12px;
      border-top: 1px solid rgba(148, 163, 184, 0.08);
      padding-top: 20px;
    }

    .login-footer-lock {
      width: 14px;
      height: 14px;
      color: rgba(148, 163, 184, 0.4);
    }

    .status-grid {
      padding: 14px;
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      gap: 12px;
    }

    .status-card {
      border: 1px solid rgba(148, 163, 184, .15);
      border-radius: 12px;
      background: rgba(255, 255, 255, .035);
      padding: 13px;
      display: grid;
      gap: 10px;
    }

    .status-card-top {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }

    .status-card strong {
      overflow-wrap: anywhere;
    }

    .status-card span,
    .status-card small {
      color: var(--muted);
    }

    .empty {
      padding: 18px;
      color: var(--muted);
      line-height: 1.5;
    }

    .modal {
      position: fixed;
      inset: 0;
      z-index: 10;
      display: none;
      place-items: center;
      padding: 20px;
      background: rgba(0, 0, 0, .58);
    }

    .modal.open {
      display: grid;
    }

    .modal-box {
      width: min(560px, 100%);
      border: 1px solid var(--line);
      border-radius: 14px;
      background: #0b1a2a;
      box-shadow: var(--shadow);
      overflow: hidden;
    }

    .modal-body {
      padding: 16px;
      display: grid;
      gap: 13px;
    }

    .modal-actions {
      border-top: 1px solid var(--line);
      padding: 12px 16px;
      display: flex;
      justify-content: flex-end;
      gap: 10px;
    }

    .file-input {
      display: none;
    }

    /* Sidebar Logout button */
    .nav button.nav-logout {
      color: #ff9aa5;
      margin-top: 16px;
      border-top: 1px solid var(--line);
      padding-top: 16px;
      border-radius: 0;
    }

    .nav button.nav-logout:hover {
      color: #ff4f5e;
      background: rgba(255, 79, 94, 0.08);
      box-shadow: 0 8px 24px rgba(255, 79, 94, 0.12);
      border-radius: 8px;
      border-color: transparent;
    }

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

      .menu-toggle {
        display: flex;
      }

      .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 280px;
        z-index: 999;
        background: rgba(5, 15, 27, 0.96);
        backdrop-filter: blur(20px);
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 10px 0 40px rgba(0, 0, 0, 0.5);
      }

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

      .pill-list {
        max-height: 240px;
      }

      .account-list {
        max-height: none;
      }

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

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

    @media (max-width: 760px) {
      .topbar {
        align-items: flex-start;
        flex-direction: column;
        padding: 16px;
      }

      .content {
        padding: 14px;
      }

      .metrics,
      .mini-summary,
      .form-grid {
        grid-template-columns: 1fr;
      }

      .profile-row {
        grid-template-columns: 1fr;
      }
    }

    /* Settings panel styling */
    .settings-container {
      max-width: 600px;
      margin: 20px auto;
      width: 100%;
    }

    .password-wrapper {
      position: relative;
      display: flex;
      align-items: center;
      width: 100%;
    }

    .password-wrapper input {
      padding-right: 44px !important;
      width: 100%;
    }

    .password-toggle {
      position: absolute;
      right: 8px;
      top: 50%;
      transform: translateY(-50%);
      background: transparent;
      border: none;
      color: var(--muted);
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 6px;
      cursor: pointer;
      border-radius: 4px;
      transition: color 0.2s, background 0.2s;
    }

    .password-toggle:hover {
      color: var(--text);
      background: rgba(255, 255, 255, 0.08);
    }

    .password-toggle svg {
      width: 20px;
      height: 20px;
      pointer-events: none;
    }

    .settings-actions {
      display: flex;
      justify-content: flex-end;
      margin-top: 12px;
    }

    .settings-message {
      min-height: 20px;
      font-size: 13px;
      margin: 8px 0;
      transition: all 0.3s ease;
    }

    .settings-message.success {
      color: var(--green);
    }

    .settings-message.error {
      color: var(--red);
    }

    /* Undo button disabled and active styles */
    .button:disabled {
      opacity: 0.5;
      cursor: not-allowed;
      border-color: rgba(148, 163, 184, 0.12) !important;
      background: rgba(255, 255, 255, 0.02) !important;
      color: var(--muted) !important;
      box-shadow: none !important;
    }
    
    #undoButton:not(:disabled) {
      color: var(--yellow) !important;
      border-color: rgba(255, 210, 74, 0.3) !important;
      background: rgba(255, 210, 74, 0.05) !important;
    }
    
    #undoButton:not(:disabled):hover {
      background: rgba(255, 210, 74, 0.15) !important;
      border-color: var(--yellow) !important;
      box-shadow: 0 0 12px rgba(255, 210, 74, 0.25) !important;
    }

    /* Toast Notification styles */
    .toast-container {
      position: fixed;
      bottom: 24px;
      right: 24px;
      z-index: 9999;
      display: flex;
      flex-direction: column;
      gap: 10px;
      pointer-events: none;
    }
    
    .toast {
      background: rgba(11, 26, 42, 0.95);
      border: 1px solid var(--line);
      border-left: 4px solid var(--yellow);
      color: var(--text);
      padding: 12px 20px;
      border-radius: 8px;
      font-weight: 600;
      box-shadow: var(--shadow);
      display: flex;
      align-items: center;
      gap: 10px;
      min-width: 260px;
      transform: translateY(20px);
      opacity: 0;
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .toast.show {
      transform: translateY(0);
      opacity: 1;
    }

    /* Hide mobile-only components on PC (desktop) by default */
    .mobile-header,
    .sidebar-overlay {
      display: none;
    }

    /* PC Sidebar drawer collapsing / toggling styles */
    .sidebar {
      position: relative;
    }

    .sidebar-close-btn {
      position: absolute;
      top: 18px;
      right: 16px;
      background: transparent;
      border: none;
      color: var(--muted);
      font-size: 20px;
      cursor: pointer;
      padding: 4px 8px;
      border-radius: 6px;
      transition: all 0.2s ease;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .sidebar-close-btn:hover {
      color: var(--text);
      background: rgba(255, 255, 255, 0.08);
    }

    #pcMenuToggleBtn {
      display: none; /* Hidden by default on PC when sidebar is open */
      background: transparent;
      border: none;
      color: var(--text);
      font-size: 24px;
      cursor: pointer;
      padding: 6px;
      border-radius: 6px;
      align-items: center;
      justify-content: center;
      transition: background 0.2s;
    }

    #pcMenuToggleBtn:hover {
      background: rgba(255, 255, 255, 0.08);
    }

    .sidebar-closed #pcMenuToggleBtn {
      display: flex; /* Shown when sidebar is closed */
    }

    .sidebar-closed .sidebar {
      display: none !important;
    }

    .sidebar-closed.app {
      grid-template-columns: 1fr !important;
    }
