  
    :root {
      --gold: #FCD535;
      --gold-light: #FDE068;
      --gold-dark: #D4B22B;
      --bg: #0b0e11;
      --bg2: #181A20;
      --bg3: #1e2329;
      --card: #1e2329;
      --border: #2B3139;
      --text: #EAECEF;
      --muted: #848E9C;
      --green: #0ECB81;
      --red: #F6465D;
      --radius: 20px;
    }

    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
      -webkit-tap-highlight-color: transparent;
    }

    body {
      font-family: 'Cairo', sans-serif;
      background: var(--bg);
      color: var(--text);
      min-height: 100dvh;
      overflow-x: hidden;
    }

    /* ───── SCREENS ───── */
    .screen {
      display: none;
      min-height: 100dvh;
    }

    .screen.active {
      display: flex;
      flex-direction: column;
    }

    /* ───── LOGIN ───── */
    #loginScreen {
      align-items: center;
      justify-content: center;
      background: radial-gradient(ellipse at 50% 0%, rgba(212, 175, 55, 0.15) 0%, var(--bg) 70%);
      padding: 24px;
    }

    .login-box {
      width: 100%;
      max-width: 380px;
      background: var(--card);
      border: 1px solid rgba(212, 175, 55, 0.25);
      border-radius: 24px;
      padding: 40px 32px;
      box-shadow: 0 0 60px rgba(212, 175, 55, 0.08);
    }

    .login-logo {
      text-align: center;
      margin-bottom: 32px;
    }

    .login-logo .coin {
      width: 80px;
      height: 80px;
      background: linear-gradient(145deg, var(--gold-light), var(--gold-dark));
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 36px;
      margin: 0 auto 16px;
      box-shadow: 0 0 30px rgba(212, 175, 55, 0.4);
      animation: pulse-glow 2.5s ease-in-out infinite;
    }

    @keyframes pulse-glow {

      0%,
      100% {
        box-shadow: 0 0 30px rgba(212, 175, 55, 0.4);
      }

      50% {
        box-shadow: 0 0 50px rgba(212, 175, 55, 0.7);
      }
    }

    .login-logo h1 {
      font-size: 22px;
      color: var(--gold);
      font-weight: 900;
    }

    .login-logo p {
      font-size: 13px;
      color: var(--muted);
      margin-top: 4px;
    }

    .form-group {
      margin-bottom: 16px;
    }

    .form-group label {
      display: block;
      font-size: 13px;
      color: var(--muted);
      margin-bottom: 8px;
      font-weight: 600;
    }

    .form-group input {
      width: 100%;
      background: var(--bg3);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 14px 16px;
      color: var(--text);
      font-family: 'Cairo', sans-serif;
      font-size: 15px;
      outline: none;
      transition: border-color 0.2s;
    }

    .form-group input:focus {
      border-color: var(--gold);
    }

    .btn-login {
      width: 100%;
      background: linear-gradient(135deg, var(--gold), var(--gold-dark));
      color: #000;
      border: none;
      border-radius: 12px;
      padding: 15px;
      font-family: 'Cairo', sans-serif;
      font-size: 16px;
      font-weight: 700;
      cursor: pointer;
      margin-top: 8px;
      transition: all 0.2s;
      position: relative;
      overflow: hidden;
    }

    .btn-login:active {
      transform: scale(0.98);
    }

    .btn-login:disabled {
      opacity: 0.6;
      cursor: not-allowed;
    }

    .login-error {
      background: rgba(239, 68, 68, 0.1);
      border: 1px solid rgba(239, 68, 68, 0.3);
      border-radius: 10px;
      padding: 12px;
      color: var(--red);
      font-size: 13px;
      text-align: center;
      margin-top: 12px;
      display: none;
    }

    /* ─── Premium Install Banner ─── */
    .install-banner {
      display: none;
      position: fixed;
      top: 20px;
      left: 15px;
      right: 15px;
      background: rgba(20, 20, 20, 0.85);
      -webkit-backdrop-filter: blur(20px);
      backdrop-filter: blur(20px);
      border: 1px solid rgba(212, 175, 55, 0.5);
      border-radius: 20px;
      padding: 16px;
      align-items: center;
      gap: 15px;
      box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 20px rgba(212, 175, 55, 0.1);
      z-index: 10001;
      animation: install-slide-down 0.6s cubic-bezier(0.19, 1, 0.22, 1) forwards;
    }

    @keyframes install-slide-down {
      from {
        transform: translateY(-100px);
        opacity: 0;
      }

      to {
        transform: translateY(0);
        opacity: 1;
      }
    }

    .install-banner .install-icon {
      font-size: 32px;
      filter: drop-shadow(0 0 10px var(--gold));
    }

    .install-banner .install-text {
      flex: 1;
    }

    .install-banner .install-text .title {
      font-size: 15px;
      font-weight: 900;
      color: #fff;
      margin-bottom: 2px;
    }

    .install-banner .install-text .sub {
      font-size: 11px;
      color: rgba(255, 255, 255, 0.6);
      line-height: 1.3;
      font-family: 'Cairo', sans-serif;
    }

    .btn-install-banner {
      background: linear-gradient(135deg, var(--gold-light), var(--gold));
      color: #000;
      border: none;
      padding: 10px 16px;
      border-radius: 12px;
      font-weight: 900;
      font-size: 13px;
      cursor: pointer;
      font-family: 'Cairo', sans-serif;
      box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
    }

    /* ─── iOS Install Modal ─── */
    .ios-modal {
      display: none;
      position: fixed;
      left: 20px;
      right: 20px;
      bottom: 30px;
      background: #1c1c1e;
      border: 1px solid var(--border);
      border-radius: 24px;
      padding: 24px;
      z-index: 10000;
      box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
      animation: slideUp 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    }

    @keyframes slideUp {
      from {
        transform: translateY(100px);
        opacity: 0;
      }

      to {
        transform: translateY(0);
        opacity: 1;
      }
    }

    .ios-modal h4 {
      font-size: 18px;
      font-weight: 900;
      color: var(--gold);
      margin-bottom: 12px;
      text-align: center;
    }

    .ios-step {
      display: flex;
      align-items: center;
      gap: 15px;
      margin-bottom: 16px;
      font-size: 14px;
    }

    .ios-step .step-icon {
      width: 36px;
      height: 36px;
      background: var(--bg3);
      border-radius: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 18px;
      flex-shrink: 0;
    }

    /* ───── MAIN APP ───── */
    #appScreen {
      background: var(--bg);
    }

    /* Top Bar */
    .topbar {
      background: var(--card);
      border-bottom: 1px solid var(--border);
      padding: 12px 16px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      position: sticky;
      top: 0;
      z-index: 100;
    }

    .topbar-brand {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .topbar-brand .mini-coin {
      width: 36px;
      height: 36px;
      background: linear-gradient(145deg, var(--gold-light), var(--gold-dark));
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 18px;
    }

    .topbar-brand .brand-text h2 {
      font-size: 15px;
      font-weight: 700;
      color: var(--gold);
    }

    .topbar-brand .brand-text p {
      font-size: 11px;
      color: var(--muted);
    }

    .topbar-actions {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .live-dot {
      width: 8px;
      height: 8px;
      background: var(--green);
      border-radius: 50%;
      animation: blink 1.5s infinite;
    }

    @keyframes blink {

      0%,
      100% {
        opacity: 1;
      }

      50% {
        opacity: 0.2;
      }
    }

    .live-label {
      font-size: 11px;
      color: var(--green);
      font-weight: 700;
    }

    .btn-icon {
      width: 36px;
      height: 36px;
      background: var(--bg3);
      border: 1px solid var(--border);
      border-radius: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      font-size: 16px;
      transition: all 0.2s;
    }

    .btn-icon:active {
      transform: scale(0.92);
      background: var(--border);
    }

    /* Content */
    .app-content {
      flex: 1;
      padding: 16px;
      overflow-y: auto;
      padding-bottom: 80px;
    }

    /* Welcome Banner */
    .welcome-banner {
      background: linear-gradient(135deg, rgba(212, 175, 55, 0.12), rgba(212, 175, 55, 0.04));
      border: 1px solid rgba(212, 175, 55, 0.2);
      border-radius: var(--radius);
      padding: 16px 20px;
      margin-bottom: 20px;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .welcome-banner .welcome-text h3 {
      font-size: 16px;
      font-weight: 700;
      color: var(--text);
    }

    .welcome-banner .welcome-text p {
      font-size: 12px;
      color: var(--muted);
      margin-top: 2px;
    }

    .welcome-banner .time-display {
      text-align: left;
    }

    .welcome-banner .time-display .time {
      font-size: 20px;
      font-weight: 700;
      color: var(--gold);
      font-variant-numeric: tabular-nums;
    }

    .welcome-banner .time-display .date {
      font-size: 11px;
      color: var(--muted);
    }

    /* Stats Grid */
    .stats-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
      margin-bottom: 20px;
    }

    .stat-card {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 18px 16px;
      position: relative;
      overflow: hidden;
      transition: transform 0.2s;
    }

    .stat-card:active {
      transform: scale(0.97);
    }

    .stat-card.gold {
      border-color: rgba(212, 175, 55, 0.3);
      background: linear-gradient(145deg, rgba(212, 175, 55, 0.08), var(--card));
    }

    .stat-card.green {
      border-color: rgba(16, 185, 129, 0.25);
    }

    .stat-card.red {
      border-color: rgba(239, 68, 68, 0.25);
    }

    .stat-card.blue {
      border-color: rgba(59, 130, 246, 0.25);
    }

    .stat-card .icon {
      width: 40px;
      height: 40px;
      border-radius: 12px;
      display: flex;
      align-items: center;
      justify-content: center;
      margin-bottom: 12px;
    }

    .stat-card .icon svg {
      width: 20px;
      height: 20px;
      stroke-width: 2;
    }

    .stat-card.gold .icon {
      background: rgba(212, 175, 55, 0.15);
    }

    .stat-card.gold .icon svg {
      stroke: var(--gold);
    }

    .stat-card.green .icon {
      background: rgba(16, 185, 129, 0.15);
    }

    .stat-card.green .icon svg {
      stroke: var(--green);
    }

    .stat-card.red .icon {
      background: rgba(239, 68, 68, 0.15);
    }

    .stat-card.red .icon svg {
      stroke: var(--red);
    }

    .stat-card.blue .icon {
      background: rgba(59, 130, 246, 0.15);
    }

    .stat-card.blue .icon svg {
      stroke: #3b82f6;
    }

    .stat-card .label {
      font-size: 11px;
      color: var(--muted);
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .stat-card .value {
      font-size: 22px;
      font-weight: 900;
      color: var(--text);
      margin: 4px 0 6px;
      line-height: 1;
    }

    .stat-card.gold .value {
      color: var(--gold);
    }

    .stat-card.green .value {
      color: var(--green);
    }

    .stat-card.red .value {
      color: var(--red);
    }

    .stat-card .sub {
      font-size: 11px;
      color: var(--muted);
    }

    .stat-card .glow-bg {
      position: absolute;
      top: -20px;
      left: -20px;
      width: 80px;
      height: 80px;
      border-radius: 50%;
      filter: blur(30px);
      opacity: 0.15;
    }

    .stat-card.gold .glow-bg {
      background: var(--gold);
    }

    .stat-card.green .glow-bg {
      background: var(--green);
    }

    .stat-card.red .glow-bg {
      background: var(--red);
    }

    .stat-card.blue .glow-bg {
      background: #3b82f6;
    }

    /* Section Header */
    .section-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 12px;
    }

    .section-header h3 {
      font-size: 15px;
      font-weight: 700;
      color: var(--text);
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .section-header .badge-count {
      background: rgba(212, 175, 55, 0.15);
      color: var(--gold);
      border-radius: 20px;
      padding: 2px 10px;
      font-size: 12px;
      font-weight: 700;
    }

    .see-all {
      font-size: 12px;
      color: var(--gold);
      cursor: pointer;
    }

    /* Transactions List */
    .trans-list {
      display: flex;
      flex-direction: column;
      gap: 8px;
      margin-bottom: 20px;
    }

    .trans-item {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 14px 16px;
      display: flex;
      align-items: center;
      gap: 14px;
      animation: slideIn 0.3s ease;
    }

    @keyframes slideIn {
      from {
        opacity: 0;
        transform: translateY(8px);
      }

      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .trans-badge {
      width: 40px;
      height: 40px;
      border-radius: 12px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 18px;
      flex-shrink: 0;
    }

    .trans-badge.buy {
      background: rgba(16, 185, 129, 0.15);
      border: 1px solid rgba(16, 185, 129, 0.25);
    }

    .trans-badge.sell {
      background: rgba(239, 68, 68, 0.15);
      border: 1px solid rgba(239, 68, 68, 0.25);
    }

    .trans-info {
      flex: 1;
      min-width: 0;
    }

    .trans-info .name {
      font-size: 14px;
      font-weight: 700;
      color: var(--text);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .trans-info .meta {
      font-size: 11px;
      color: var(--muted);
      margin-top: 2px;
    }

    .trans-amount {
      text-align: left;
      flex-shrink: 0;
    }

    .trans-amount .amount {
      font-size: 15px;
      font-weight: 700;
    }

    .trans-amount .amount.buy {
      color: var(--green);
    }

    .trans-amount .amount.sell {
      color: var(--red);
    }

    .trans-amount .habbat {
      font-size: 11px;
      color: var(--muted);
    }

    /* Branches */
    .branches-list {
      display: flex;
      flex-direction: column;
      gap: 10px;
      margin-bottom: 20px;
    }

    .branch-item {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 14px 16px;
    }

    .branch-item .branch-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 10px;
    }

    .branch-item .branch-name {
      font-size: 14px;
      font-weight: 700;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .branch-item .branch-ops {
      font-size: 12px;
      color: var(--muted);
      background: var(--bg3);
      padding: 2px 10px;
      border-radius: 20px;
    }

    .branch-nums {
      display: flex;
      gap: 12px;
    }

    .branch-num {
      flex: 1;
      text-align: center;
    }

    .branch-num .bn-val {
      font-size: 14px;
      font-weight: 700;
    }

    .branch-num .bn-label {
      font-size: 10px;
      color: var(--muted);
      margin-top: 1px;
    }

    .branch-num.deposit .bn-val {
      color: var(--green);
    }

    .branch-num.withdraw .bn-val {
      color: var(--red);
    }

    .branch-num.net .bn-val {
      color: var(--gold);
    }

    .branch-progress {
      margin-top: 10px;
    }

    .branch-progress-bar {
      height: 4px;
      background: var(--bg3);
      border-radius: 2px;
      overflow: hidden;
    }

    .branch-progress-fill {
      height: 100%;
      background: linear-gradient(90deg, var(--green), var(--gold));
      border-radius: 2px;
      transition: width 0.5s ease;
    }

    /* ───── Bottom Nav ───── */
    .bottom-nav {
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      background: rgba(14, 14, 14, 0.92);
      -webkit-backdrop-filter: blur(20px);
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
      border-top: 1px solid rgba(212, 175, 55, 0.12);
      display: flex;
      z-index: 100;
      padding-bottom: env(safe-area-inset-bottom);
      overflow-x: auto;
      scrollbar-width: none;
      -webkit-overflow-scrolling: touch;
      box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.4);
    }

    .bottom-nav::-webkit-scrollbar {
      display: none;
    }

    .nav-item {
      flex: 0 0 72px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 10px 4px 8px;
      cursor: pointer;
      transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
      position: relative;
      -webkit-tap-highlight-color: transparent;
    }

    .nav-item:active {
      transform: scale(0.88);
    }

    .nav-item .nav-icon-wrap {
      width: 42px;
      height: 42px;
      border-radius: 14px;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
      background: transparent;
      position: relative;
    }

    .nav-item .nav-icon-wrap svg {
      width: 22px;
      height: 22px;
      stroke: var(--muted);
      transition: all 0.25s ease;
      stroke-width: 1.8;
    }

    .nav-item .nav-label {
      font-size: 10px;
      margin-top: 3px;
      color: var(--muted);
      font-weight: 600;
      white-space: nowrap;
      transition: color 0.2s;
    }

    .nav-item.active .nav-icon-wrap {
      background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(212, 175, 55, 0.08));
      box-shadow: 0 4px 16px rgba(212, 175, 55, 0.25), inset 0 1px 0 rgba(212, 175, 55, 0.2);
    }

    .nav-item.active .nav-icon-wrap svg {
      stroke: var(--gold);
      filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.6));
    }

    .nav-item.active .nav-label {
      color: var(--gold);
    }

    .nav-badge {
      position: absolute;
      top: -3px;
      right: -3px;
      background: var(--red);
      color: #fff;
      border-radius: 50%;
      min-width: 16px;
      height: 16px;
      font-size: 9px;
      font-weight: 900;
      line-height: 16px;
      text-align: center;
      border: 2px solid rgba(14, 14, 14, 0.92);
      display: none;
      padding: 0 2px;
    }

    .nav-badge.gold-badge {
      background: var(--gold);
      color: #000;
    }

    /* Pages */
    .page {
      display: none;
    }

    .page.active {
      display: block;
    }

    /* Investors Page */
    .investor-item {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 14px 16px;
      display: flex;
      align-items: center;
      gap: 14px;
      margin-bottom: 8px;
    }

    .investor-rank {
      width: 32px;
      height: 32px;
      border-radius: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 14px;
      font-weight: 700;
      flex-shrink: 0;
    }

    .rank-1 {
      background: linear-gradient(135deg, #FFD700, #FFA500);
      color: #000;
    }

    .rank-2 {
      background: linear-gradient(135deg, #C0C0C0, #808080);
      color: #000;
    }

    .rank-3 {
      background: linear-gradient(135deg, #CD7F32, #8B4513);
      color: #fff;
    }

    .rank-n {
      background: var(--bg3);
      color: var(--muted);
    }

    .investor-info {
      flex: 1;
    }

    .investor-info .inv-name {
      font-size: 14px;
      font-weight: 700;
    }

    .investor-info .inv-branch {
      font-size: 11px;
      color: var(--muted);
    }

    .investor-balance {
      font-size: 16px;
      font-weight: 900;
      color: var(--gold);
    }

    /* Settings Page */
    .settings-section {
      margin-bottom: 24px;
    }

    .settings-section h4 {
      font-size: 13px;
      color: var(--muted);
      font-weight: 600;
      text-transform: uppercase;
      margin-bottom: 12px;
    }

    .settings-item {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 16px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 8px;
      cursor: pointer;
    }

    .settings-item:active {
      background: var(--bg3);
    }

    .settings-item .si-left {
      display: flex;
      align-items: center;
      gap: 14px;
    }

    .settings-item .si-icon {
      font-size: 22px;
    }

    .settings-item .si-text .title {
      font-size: 14px;
      font-weight: 600;
    }

    .settings-item .si-text .sub {
      font-size: 12px;
      color: var(--muted);
    }

    .settings-item .si-arrow {
      color: var(--muted);
      font-size: 12px;
    }

    .btn-logout {
      width: 100%;
      background: rgba(239, 68, 68, 0.1);
      border: 1px solid rgba(239, 68, 68, 0.3);
      color: var(--red);
      border-radius: 12px;
      padding: 15px;
      font-family: 'Cairo', sans-serif;
      font-size: 15px;
      font-weight: 700;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      transition: all 0.2s;
    }

    .btn-logout:active {
      background: rgba(239, 68, 68, 0.2);
    }

    /* Loading Spinner */
    .spinner {
      width: 36px;
      height: 36px;
      border: 3px solid var(--border);
      border-top-color: var(--gold);
      border-radius: 50%;
      animation: spin 0.7s linear infinite;
      margin: 40px auto;
    }

    @keyframes spin {
      to {
        transform: rotate(360deg);
      }
    }

    /* Empty State */
    .empty-state {
      text-align: center;
      padding: 40px 20px;
      color: var(--muted);
    }

    .empty-state .empty-icon {
      font-size: 48px;
      margin-bottom: 12px;
      opacity: 0.4;
    }

    .empty-state p {
      font-size: 14px;
    }

    /* ══════════════════════════════════
       Toast Notification — Al Wadi
    ══════════════════════════════════ */
    .toast-container {
      position: fixed;
      top: 20px;
      left: 50%;
      transform: translateX(-50%);
      z-index: 999999;
      display: flex;
      flex-direction: column;
      gap: 10px;
      min-width: 280px;
      max-width: 92vw;
      pointer-events: none;
    }

    .hasad-toast {
      pointer-events: all;
      position: relative;
      background: linear-gradient(145deg, #1e2329, #181A20);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 13px 42px 13px 16px;
      font-size: 13px;
      font-weight: 600;
      font-family: 'Cairo', 'Segoe UI', sans-serif;
      direction: rtl;
      box-shadow: 0 12px 36px rgba(0,0,0,0.55), 0 0 0 1px rgba(212,175,55,0.06);
      animation: hasadToastIn 0.32s cubic-bezier(0.34,1.56,0.64,1);
      display: flex;
      align-items: center;
      gap: 10px;
      overflow: hidden;
      cursor: pointer;
      transition: filter 0.15s, transform 0.15s;
    }
    .hasad-toast:hover { filter: brightness(1.08); transform: translateY(-1px); }
    .hasad-toast:active { transform: scale(0.97); }

    /* accent left bar */
    .hasad-toast::before {
      content: '';
      position: absolute;
      left: 0; top: 0; bottom: 0;
      width: 4px;
      border-radius: 14px 0 0 14px;
    }

    /* progress bar */
    .hasad-toast-progress {
      position: absolute;
      bottom: 0; left: 0;
      height: 3px;
      border-radius: 0 0 14px 14px;
      width: 100%;
      transform-origin: left;
      animation: hasadToastProgress var(--toast-duration, 4s) linear forwards;
    }

    /* dismiss button */
    .hasad-toast-close {
      position: absolute;
      top: 7px; left: 8px;
      width: 22px; height: 22px;
      display: flex; align-items: center; justify-content: center;
      background: rgba(255,255,255,0.06);
      border: 1px solid rgba(255,255,255,0.1);
      border-radius: 50%;
      cursor: pointer;
      font-size: 11px;
      line-height: 1;
      color: #888;
      transition: background 0.15s, color 0.15s;
      flex-shrink: 0;
    }
    .hasad-toast-close:hover { background: rgba(255,255,255,0.14); color: #eee; }

    .hasad-toast-icon {
      font-size: 18px;
      flex-shrink: 0;
    }
    .hasad-toast-msg {
      flex: 1;
      color: var(--text);
      line-height: 1.45;
    }

    /* ── Type variants ── */
    .hasad-toast.success { border-color: rgba(14, 203, 129, 0.35); }
    .hasad-toast.success::before { background: var(--green); }
    .hasad-toast.success .hasad-toast-icon { color: var(--green); filter: drop-shadow(0 0 6px rgba(14,203,129,0.5)); }
    .hasad-toast.success .hasad-toast-progress { background: linear-gradient(90deg, var(--green), #0ecb8188); }

    .hasad-toast.error { border-color: rgba(246, 70, 93, 0.35); }
    .hasad-toast.error::before { background: var(--red); }
    .hasad-toast.error .hasad-toast-icon { color: var(--red); filter: drop-shadow(0 0 6px rgba(246,70,93,0.5)); }
    .hasad-toast.error .hasad-toast-progress { background: linear-gradient(90deg, var(--red), #f6465d88); }

    .hasad-toast.info {
      border-color: rgba(212,175,55,0.35);
      background: linear-gradient(145deg, #1e2124, #181a14);
    }
    .hasad-toast.info::before { background: linear-gradient(180deg, var(--gold), var(--gold-dark)); }
    .hasad-toast.info .hasad-toast-icon { color: var(--gold); filter: drop-shadow(0 0 6px rgba(212,175,55,0.5)); }
    .hasad-toast.info .hasad-toast-progress { background: linear-gradient(90deg, var(--gold), var(--gold-dark)); }

    .hasad-toast.warning { border-color: rgba(245,158,11,0.35); }
    .hasad-toast.warning::before { background: #f59e0b; }
    .hasad-toast.warning .hasad-toast-icon { color: #f59e0b; filter: drop-shadow(0 0 6px rgba(245,158,11,0.5)); }
    .hasad-toast.warning .hasad-toast-progress { background: linear-gradient(90deg, #f59e0b, #fbbf24); }

    /* ── Animations ── */
    @keyframes hasadToastIn {
      from { opacity: 0; transform: translateY(-18px) scale(0.92); }
      to   { opacity: 1; transform: translateY(0)    scale(1);    }
    }
    @keyframes hasadToastOut {
      from { opacity: 1; transform: translateY(0) scale(1); max-height: 80px; margin-bottom: 10px; }
      to   { opacity: 0; transform: translateY(-10px) scale(0.94); max-height: 0; margin-bottom: 0; padding: 0; }
    }
    @keyframes hasadToastProgress {
      from { transform: scaleX(1); }
      to   { transform: scaleX(0); }
    }

    /* Install Banner */
    .install-banner {
      background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(212, 175, 55, 0.05));
      border: 1px solid rgba(212, 175, 55, 0.3);
      border-radius: 12px;
      padding: 14px 16px;
      margin-bottom: 16px;
      display: flex;
      align-items: center;
      gap: 12px;
      display: none;
    }

    .install-banner .install-text {
      flex: 1;
    }

    .install-banner .install-text .title {
      font-size: 13px;
      font-weight: 700;
      color: var(--gold);
    }

    .install-banner .install-text .sub {
      font-size: 11px;
      color: var(--muted);
    }

    .install-banner .btn-install {
      background: var(--gold);
      color: #000;
      border: none;
      border-radius: 8px;
      padding: 8px 14px;
      font-family: 'Cairo', sans-serif;
      font-size: 12px;
      font-weight: 700;
      cursor: pointer;
      flex-shrink: 0;
    }

    /* Pull to Refresh visual */
    .ptr-indicator {
      text-align: center;
      padding: 12px;
      color: var(--muted);
      font-size: 12px;
      display: none;
    }

    /* Responsive tweaks */
    @media (max-width: 360px) {
      .stats-grid {
        gap: 8px;
      }

      .stat-card {
        padding: 12px 10px;
      }

      .stat-card .icon {
        font-size: 22px;
        margin-bottom: 6px;
      }

      .stat-card .value {
        font-size: 15px;
      }

      .stat-card .label {
        font-size: 10px;
      }

      .trans-item {
        padding: 12px 10px;
        gap: 10px;
      }

      .trans-badge {
        width: 32px;
        height: 32px;
        font-size: 16px;
      }

      .trans-info .name {
        font-size: 13px;
      }

      .trans-amount .amount {
        font-size: 13px;
      }
    }

    /* Shimmer loading */
    .shimmer {
      background: linear-gradient(90deg, var(--card) 25%, var(--bg3) 50%, var(--card) 75%);
      background-size: 200% 100%;
      animation: shimmer 1.2s infinite;
      border-radius: 8px;
      height: 14px;
    }

    @keyframes shimmer {
      from {
        background-position: 200% 0;
      }

      to {
        background-position: -200% 0;
      }
    }

    /* Quick Actions */
    .quick-actions {
      display: flex;
      flex-wrap: wrap;
      /* Allow wrapping on very small screens */
      gap: 12px;
      margin-bottom: 20px;
    }

    .action-btn {
      flex: 1 1 calc(50% - 12px);
      /* 2 items per row minimum on small screens */
      min-width: 140px;
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 14px;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      font-size: 14px;
      font-weight: 700;
      color: var(--text);
      cursor: pointer;
      transition: all 0.2s;
    }

    .action-btn:active {
      background: var(--bg3);
      transform: scale(0.98);
    }

    .action-btn.red .icon {
      color: var(--red);
    }

    .action-btn.gold .icon {
      color: var(--gold);
    }

    /* 👁️ Silent Watch Room Styles */
    .status-pulse-dot {
      width: 8px;
      height: 8px;
      background-color: var(--green);
      border-radius: 50%;
      display: inline-block;
      box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
      animation: pulse-green 1.5s infinite;
    }
    .status-idle-dot {
      width: 8px;
      height: 8px;
      background-color: var(--orange);
      border-radius: 50%;
      display: inline-block;
    }
    .status-offline-dot {
      width: 8px;
      height: 8px;
      background-color: var(--muted);
      border-radius: 50%;
      display: inline-block;
    }
    @keyframes pulse-green {
      0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
      }
      70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
      }
      100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
      }
    }
    .employee-watch-card {
      transition: all 0.3s ease;
    }
    .employee-watch-card:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    }

    /* 🚨 Pulse Red Animation */
    @keyframes pulse-red {
      0% { transform: scale(0.95); opacity: 0.8; }
      50% { transform: scale(1.15); opacity: 1; }
      100% { transform: scale(0.95); opacity: 0.8; }
    }

    /* Modals */
    .modal-overlay {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0, 0, 0, 0.8);
      z-index: 9000;
      display: none;
      align-items: flex-end;
      justify-content: center;
      padding: 0;
      opacity: 0;
      transition: opacity 0.3s;
      -webkit-backdrop-filter: blur(5px);
      backdrop-filter: blur(5px);
    }

    .modal-overlay.show {
      display: flex;
      opacity: 1;
    }

    .modal-content {
      background: var(--bg3);
      border-top: 1px solid var(--border);
      border-radius: 24px 24px 0 0;
      width: 100%;
      max-width: 600px;
      max-height: 90vh;
      overflow-y: auto;
      padding: 24px 20px;
      padding-bottom: calc(24px + env(safe-area-inset-bottom));
      margin: 0 auto;
      transform: translateY(100%);
      transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
      box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6);
    }

    .modal-overlay.show .modal-content {
      transform: translateY(0);
    }

    .modal-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 20px;
    }

    .modal-header h3 {
      font-size: 16px;
      margin: 0;
    }

    .btn-close {
      background: none;
      border: none;
      font-size: 24px;
      color: var(--muted);
      cursor: pointer;
    }

    .btn-submit {
      display: block;
      width: 100%;
      border: none;
      padding: 14px;
      border-radius: 12px;
      font-weight: bold;
      background: var(--gold);
      color: #000;
      font-family: inherit;
      font-size: 15px;
      cursor: pointer;
      margin-top: 20px;
    }

    .btn-submit:disabled {
      opacity: 0.5;
    }

    /* ─── Premium Chat Page Styling ─── */
    .chat-contact-item {
      display: flex;
      align-items: center;
      gap: 14px;
      background: linear-gradient(145deg, var(--card), var(--bg2));
      border: 1px solid rgba(212, 175, 55, 0.1);
      border-radius: 16px;
      padding: 16px;
      margin-bottom: 12px;
      cursor: pointer;
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
      position: relative;
      overflow: hidden;
    }

    .chat-contact-item::before {
      content: '';
      position: absolute;
      top: 0; left: 0; right: 0; bottom: 0;
      background: radial-gradient(circle at center, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
      opacity: 0;
      transition: opacity 0.3s;
    }

    .chat-contact-item:hover {
      border-color: rgba(212, 175, 55, 0.4);
      transform: translateY(-2px);
      box-shadow: 0 8px 25px rgba(212, 175, 55, 0.15);
    }
    
    .chat-contact-item:hover::before {
      opacity: 1;
    }

    .chat-contact-item:active {
      transform: translateY(1px) scale(0.98);
    }

    .chat-avatar {
      width: 48px;
      height: 48px;
      border-radius: 14px;
      background: linear-gradient(135deg, var(--bg3), var(--bg2));
      border: 1px solid rgba(255, 255, 255, 0.05);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 22px;
      font-weight: 900;
      color: #fff;
      flex-shrink: 0;
      position: relative;
      box-shadow: inset 0 2px 4px rgba(255,255,255,0.05), 0 4px 10px rgba(0,0,0,0.3);
    }

    .chat-contact-info {
      flex: 1;
      z-index: 1;
    }

    .chat-contact-name {
      font-weight: 800;
      font-size: 15px;
      color: #fff;
      letter-spacing: 0.3px;
    }

    .chat-contact-sub {
      font-size: 12px;
      color: var(--muted);
      margin-top: 4px;
      display: flex;
      align-items: center;
      gap: 4px;
    }

    .chat-unread-badge {
      background: linear-gradient(135deg, #ff4b4b, #d91c1c);
      color: #fff;
      border-radius: 20px;
      min-width: 22px;
      height: 22px;
      font-size: 11px;
      font-weight: 900;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 0 6px;
      box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
      z-index: 1;
      animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    @keyframes popIn {
      0% { transform: scale(0); }
      80% { transform: scale(1.1); }
      100% { transform: scale(1); }
    }

    .chat-msg-bubble {
      max-width: 85%;
      margin-bottom: 12px;
      padding: 12px 16px;
      font-size: 14px;
      line-height: 1.6;
      word-break: break-word;
      position: relative;
      animation: slideUpFade 0.3s ease-out forwards;
      opacity: 0;
      transform: translateY(10px);
    }

    @keyframes slideUpFade {
      to { opacity: 1; transform: translateY(0); }
    }

    .chat-msg-sent {
      background: linear-gradient(135deg, rgba(212, 175, 55, 0.25), rgba(212, 175, 55, 0.1));
      border: 1px solid rgba(212, 175, 55, 0.3);
      color: #fff;
      margin-right: auto;
      border-radius: 18px 18px 4px 18px;
      box-shadow: 0 4px 15px rgba(212, 175, 55, 0.08);
      backdrop-filter: blur(10px);
    }

    .chat-msg-received {
      background: var(--card);
      border: 1px solid var(--border);
      color: #eaeaea;
      margin-left: auto;
      border-radius: 18px 18px 18px 4px;
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }

    .chat-msg-time {
      font-size: 10px;
      color: rgba(255, 255, 255, 0.5);
      margin-top: 6px;
      display: flex;
      align-items: center;
      gap: 4px;
    }
    
    .chat-msg-sent .chat-msg-time {
      justify-content: flex-end;
      color: rgba(212, 175, 55, 0.8);
    }

    .chat-msg-sender {
      font-size: 11px;
      font-weight: 800;
      margin-bottom: 6px;
      color: var(--gold-light);
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }
    
    .chat-msg-received .chat-msg-sender {
      color: #3b82f6; /* Distinguish sender names */
    }

    .chat-msg-divider {
      text-align: center;
      margin: 20px 0;
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .chat-msg-divider::before {
      content: '';
      position: absolute;
      top: 50%;
      left: 0;
      right: 0;
      height: 1px;
      background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    }

    .chat-msg-divider span {
      background: var(--bg2);
      padding: 4px 12px;
      border-radius: 12px;
      font-size: 10px;
      font-weight: 700;
      color: var(--muted);
      border: 1px solid rgba(255,255,255,0.05);
      position: relative;
      z-index: 1;
      text-transform: uppercase;
      letter-spacing: 1px;
    }

    .chat-online-dot {
      width: 12px;
      height: 12px;
      background: #10b981;
      border-radius: 50%;
      position: absolute;
      bottom: -2px;
      right: -2px;
      border: 2px solid var(--card);
      box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
      animation: pulse-online 2s infinite;
    }

    @keyframes pulse-online {
      0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
      70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
      100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
    }
    
    /* Input Area Premium Styling */
    #chatMsgInput {
      transition: all 0.3s;
      box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
    }
    #chatMsgInput:focus {
      border-color: var(--gold);
      box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2), inset 0 2px 4px rgba(0,0,0,0.2);
    }
    #chatSendBtn {
      background: linear-gradient(135deg, var(--gold), var(--gold-dark));
      box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
      transition: transform 0.2s, box-shadow 0.2s;
    }
    #chatSendBtn:active {
      transform: scale(0.9);
      box-shadow: 0 2px 8px rgba(212, 175, 55, 0.2);
    }
    /* ─── Binance Style Redesign ─── */
    .binance-hero {
      background: var(--bg3);
      border-radius: 24px;
      padding: 24px 20px;
      margin-bottom: 24px;
      box-shadow: 0 10px 30px rgba(0,0,0,0.5);
      position: relative;
      overflow: hidden;
    }
    .binance-hero::after {
      content: '';
      position: absolute;
      top: -50px;
      right: -50px;
      width: 150px;
      height: 150px;
      background: radial-gradient(circle, rgba(252,213,53,0.15) 0%, transparent 70%);
      border-radius: 50%;
    }
    .hero-top-bar {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 20px;
      position: relative;
      z-index: 2;
    }
    .hero-user {
      display: flex;
      align-items: center;
      gap: 12px;
    }
    .hero-avatar {
      width: 40px;
      height: 40px;
      background: rgba(252,213,53,0.1);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--gold);
    }
    .hero-greeting h3 {
      font-size: 15px;
      color: var(--text);
      font-weight: 700;
    }
    .hero-greeting p {
      font-size: 12px;
      color: var(--muted);
      margin-top: 2px;
    }
    .hero-balance-wrapper {
      margin-bottom: 20px;
      position: relative;
      z-index: 2;
    }
    .hero-balance-label {
      font-size: 13px;
      color: var(--muted);
      margin-bottom: 8px;
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .hero-balance-value {
      font-size: 32px;
      font-weight: 900;
      color: var(--text);
      font-variant-numeric: tabular-nums;
      display: flex;
      align-items: baseline;
      gap: 6px;
    }
    .hero-balance-value span {
      font-size: 14px;
      color: var(--gold);
    }
    .binance-quick-actions {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      margin-top: 16px;
      padding-top: 16px;
      border-top: 1px solid var(--border);
      position: relative;
      z-index: 2;
    }
    .b-action-item {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 8px;
      cursor: pointer;
      flex: 1;
      transition: transform 0.2s;
    }
    .b-action-item:active {
      transform: scale(0.9);
    }
    .b-icon-wrapper {
      width: 44px;
      height: 44px;
      border-radius: 14px;
      display: flex;
      align-items: center;
      justify-content: center;
      margin-bottom: 4px;
    }
    .b-icon-wrapper svg {
      width: 20px;
      height: 20px;
    }
    .bg-green-glow { background: rgba(14,203,129,0.15); color: var(--green); }
    .bg-red-glow { background: rgba(246,70,93,0.15); color: var(--red); }
    .bg-gold-glow { background: rgba(252,213,53,0.15); color: var(--gold); }
    .bg-blue-glow { background: rgba(59,130,246,0.15); color: #3b82f6; }
    
    .b-action-item span {
      font-size: 12px;
      color: var(--text);
      font-weight: 600;
    }
    
    .market-overview {
      display: flex;
      gap: 12px;
      margin-bottom: 24px;
    }
    .market-card {
      flex: 1;
      background: var(--bg3);
      border-radius: 16px;
      padding: 16px;
      position: relative;
    }
    .market-card::before {
      content: '';
      position: absolute;
      right: 0;
      top: 16px;
      bottom: 16px;
      width: 3px;
      border-radius: 4px 0 0 4px;
    }
    .market-card.green-line::before { background: var(--green); }
    .market-card.red-line::before { background: var(--red); }
    .m-label {
      font-size: 12px;
      color: var(--muted);
      display: block;
      margin-bottom: 6px;
    }
    .m-value {
      font-size: 18px;
      font-weight: 700;
      font-variant-numeric: tabular-nums;
    }
    .m-value.green { color: var(--green); }
    .m-value.red { color: var(--red); }

    .stats-mini-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
      margin-bottom: 24px;
    }
    .s-mini-card {
      background: var(--bg2);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 12px 16px;
    }
    .s-label {
      font-size: 11px;
      color: var(--muted);
      margin-bottom: 4px;
      display: block;
    }
    .s-value {
      font-size: 16px;
      font-weight: 700;
      color: var(--text);
      font-variant-numeric: tabular-nums;
    }

    .b-trans-list {
      background: var(--bg3);
      border-radius: 20px;
      overflow: hidden;
      margin-bottom: 20px;
    }
    .b-trans-item {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 16px 20px;
      border-bottom: 1px solid var(--border);
    }
    .b-trans-item:last-child {
      border-bottom: none;
    }
    .b-trans-left {
      display: flex;
      align-items: center;
      gap: 12px;
    }
    .b-trans-icon {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .b-trans-icon.green { background: rgba(14,203,129,0.1); color: var(--green); }
    .b-trans-icon.red { background: rgba(246,70,93,0.1); color: var(--red); }
    
    .b-trans-details h4 {
      font-size: 14px;
      color: var(--text);
      font-weight: 600;
      margin: 0;
    }
    .b-trans-details p {
      font-size: 11px;
      color: var(--muted);
      margin: 4px 0 0 0;
    }
    .b-trans-right {
      text-align: left;
    }
    .b-trans-amount {
      font-size: 15px;
      font-weight: 700;
      font-variant-numeric: tabular-nums;
    }
    .b-trans-amount.green { color: var(--green); }
    .b-trans-amount.red { color: var(--red); }
    .b-trans-status {
      font-size: 11px;
      color: var(--muted);
      margin-top: 4px;
    }
    
    /* Bottom Navigation Glassmorphism Override */
    .bottom-nav {
      background: rgba(24, 26, 32, 0.85) !important;
      -webkit-backdrop-filter: blur(20px);
      backdrop-filter: blur(20px);
      border-top: 1px solid rgba(255,255,255,0.05) !important;
    }
    .nav-item.active {
      color: var(--gold) !important;
    }
    /* ─── End Binance Style Redesign ─── */

    /* ──── PWA PIN SCREEN ──── */
    #pwaPinScreen {
      align-items: center;
      justify-content: center;
      background: radial-gradient(ellipse at 50% 0%, rgba(212, 175, 55, 0.15) 0%, var(--bg) 70%);
      padding: 24px 16px;
    }
    .pwa-pin-box { width: 100%; max-width: 320px; text-align: center; }
    .pwa-pin-box h2 { font-size: 20px; font-weight: 800; color: var(--text); margin-bottom: 6px; }
    .pwa-pin-box p  { font-size: 13px; color: var(--muted); margin-bottom: 32px; }
    .pwa-pin-dots { display: flex; justify-content: center; gap: 16px; margin-bottom: 40px; }
    .pwa-pin-dot {
      width: 12px; height: 12px; border: 2px solid var(--border); border-radius: 50%;
      transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }
    .pwa-pin-dot.filled {
      background: var(--gold); border-color: var(--gold);
      box-shadow: 0 0 10px rgba(212, 175, 55, 0.5); transform: scale(1.2);
    }
    .pwa-pin-numpad {
      display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
      max-width: 280px; margin: 0 auto 24px;
    }
    .pwa-pin-key {
      background: var(--card); border: 1px solid var(--border);
      border-radius: 50%; aspect-ratio: 1; font-size: 22px; font-weight: 700;
      color: var(--text); cursor: pointer;
      display: flex; align-items: center; justify-content: center;
      transition: all 0.15s; outline: none;
    }
    .pwa-pin-key:active { background: rgba(255,255,255,0.05); border-color: var(--gold); transform: scale(0.9); }
    .pwa-pin-key.del   { font-size: 18px; color: var(--muted); }
    .pwa-pin-key.empty { background: transparent; border-color: transparent; cursor: default; }
    .pwa-pin-key.empty:active { transform: none; }
    #pwaPinError { color: var(--red); font-size: 13px; margin-top: 10px; min-height: 20px; }
  