:root {
      --primary: #16a34a;
      --primary-dark: #15803d;
      --bg: #f3f4f6;
      --surface: #ffffff;
      --text: #1f2937;
      --text-light: #6b7280;
      --border: #e5e7eb;
      --danger: #ef4444;
      --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
      --radius: 16px;
    }

    * {
      box-sizing: border-box;
      -webkit-tap-highlight-color: transparent;
    }

    body {
      font-family: 'Outfit', sans-serif;
      background-color: var(--bg);
      color: var(--text);
      margin: 0;
      padding: 0;
      min-height: 100vh;
      padding-bottom: 70px;
      overflow: hidden;
    }

    /* --- Views --- */
    .view {
      display: none;
      padding: 20px;
      animation: fadeIn 0.3s ease;
    }

    .view.active {
      display: block;
    }

    @keyframes fadeIn {
      from {
        opacity: 0;
        transform: translateY(10px);
      }

      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    /* --- Login View --- */
    .login-container {
      height: 100vh;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      background: white;
      text-align: center;
      padding: 40px;
    }

    .logo {
      font-size: 3rem;
      margin-bottom: 20px;
    }

    .hero-title {
      font-size: 1.8rem;
      font-weight: 700;
      color: var(--text);
      margin-bottom: 10px;
    }

    .hero-sub {
      color: var(--text-light);
      margin-bottom: 40px;
    }

    .auth-input {
      width: 100%;
      padding: 16px;
      font-size: 1.1rem;
      border: 2px solid var(--border);
      border-radius: var(--radius);
      margin-bottom: 16px;
      outline: none;
      transition: border-color 0.2s;
      text-align: center;
      letter-spacing: 1px;
    }

    .auth-input:focus {
      border-color: var(--primary);
    }

    .btn-main {
      width: 100%;
      padding: 16px;
      background: var(--primary);
      color: white;
      font-weight: 700;
      font-size: 1.1rem;
      border: none;
      border-radius: var(--radius);
      cursor: pointer;
      box-shadow: 0 10px 20px rgba(22, 163, 74, 0.2);
      transition: transform 0.1s;
    }

    .btn-main:active {
      transform: scale(0.98);
    }

    /* --- Shop View --- */
    .shop-header {
      background: rgba(255, 255, 255, 0.95);
      backdrop-filter: blur(10px);
      padding: 16px 20px;
      height: 60px;
      /* Explicit height for calculation */
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-shrink: 0;
      z-index: 100;
    }

    .user-welcome {
      font-weight: 700;
      font-size: 1.1rem;
      color: var(--primary-dark);
    }

    .logout-btn {
      background: none;
      border: none;
      font-size: 1.2rem;
      cursor: pointer;
      color: var(--text-light);
    }

    /* Top Category Bar */
    .top-cat-bar {
      background: rgba(255, 255, 255, 0.95);
      backdrop-filter: blur(10px);
      padding: 12px 16px;
      display: flex;
      gap: 16px;
      overflow-x: auto;
      scrollbar-width: none;
      border-bottom: 1px solid var(--border);
      flex-shrink: 0;
      z-index: 90;
    }

    .top-cat-bar::-webkit-scrollbar {
      display: none;
    }

    .top-cat-item {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 6px;
      cursor: pointer;
      min-width: 64px;
      transition: transform 0.15s;
    }

    .top-cat-item:active {
      transform: scale(0.95);
    }

    .top-cat-img {
      width: 52px;
      height: 52px;
      border-radius: 50%;
      object-fit: cover;
      background: #f1f5f9;
      border: 2.5px solid transparent;
      transition: border-color 0.2s, box-shadow 0.2s;
    }

    .top-cat-item.active .top-cat-img {
      border-color: var(--primary);
      box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
    }

    .top-cat-name {
      font-size: 0.72rem;
      font-weight: 600;
      color: var(--text-light);
      text-align: center;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 64px;
    }

    /* Global Search Bar (Home) */
    .home-search-container {
      padding: 0 20px 20px 20px;
      background: #111827;
      border-radius: 0 0 24px 24px;
      margin-bottom: 20px;
      position: relative;
    }

    .home-search-input {
      width: 100%;
      padding: 14px 16px 14px 44px;
      border: none;
      border-radius: 12px;
      font-size: 1rem;
      font-family: inherit;
      background: white url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%239ca3af" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>') no-repeat 16px center;
      box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
      color: var(--text);
    }

    /* Shop Search Bar */
    .shop-search-container {
      background: var(--bg);
      padding: 10px 16px;
      height: 60px;
      /* Explicit height */
      border-bottom: 1px solid var(--border);
      flex-shrink: 0;
      z-index: 95;
    }

    .shop-search-input {
      width: 100%;
      padding: 12px 16px 12px 40px;
      border: 1px solid #d1d5db;
      border-radius: 20px;
      font-size: 0.95rem;
      font-family: inherit;
      background: white url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%236b7280" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>') no-repeat 14px center;
      box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
      transition: all 0.2s;
    }

    .shop-search-input:focus {
      outline: none;
      border-color: var(--primary);
      box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15), inset 0 1px 2px rgba(0, 0, 0, 0.05);
    }

    .top-cat-item.active .top-cat-name {
      color: var(--primary-dark);
      font-weight: 700;
    }

    #viewShop.active {
      display: flex;
      flex-direction: column;
      height: 100vh;
      overflow: hidden;
      padding: 0;
    }

    /* Shop Body: Sidebar + Grid */
    .shop-body {
      flex: 1;
      min-height: 0;
      display: flex;
      align-items: stretch;
      overflow: hidden;
    }

    /* Left Sub-Category Sidebar */
    .sub-sidebar {
      width: 105px;
      min-width: 105px;
      flex-shrink: 0;
      background: #f8fafc;
      border-right: 1px solid var(--border);
      display: flex;
      flex-direction: column;
      padding: 8px 0 120px 0;
      /* Space for bottom nav */
      height: 100%;
      overflow-y: auto;
      scrollbar-width: none;
    }

    .sub-sidebar::-webkit-scrollbar {
      display: none;
    }

    .sub-item {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 6px;
      padding: 12px 6px;
      cursor: pointer;
      border-left: 3px solid transparent;
      transition: all 0.15s;
      text-align: center;
    }

    .sub-item:active {
      background: #e2e8f0;
    }

    .sub-item.active {
      background: white;
      border-left-color: var(--primary);
    }

    .sub-item-img {
      width: 55px;
      height: 55px;
      border-radius: 12px;
      object-fit: cover;
      background: #e2e8f0;
    }

    .sub-item-name {
      font-size: 0.8rem;
      font-weight: 700;
      color: var(--text-light);
      line-height: 1.2;
      word-break: break-word;
    }

    .sub-item.active .sub-item-name {
      color: var(--primary-dark);
      font-weight: 700;
    }

    /* Product Grid */
    .grid {
      flex: 1;
      height: 100%;
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 12px;
      padding: 12px;
      align-content: start;
      overflow-y: auto;
      padding-bottom: 120px;
      /* Extra space to clear the Bottom Nav */
    }

    .item-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 12px;
      display: flex;
      flex-direction: column;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }

    .item-card:active {
      transform: scale(0.98);
    }

    .img-box {
      width: 100%;
      height: 120px;
      background: #f1f5f9;
      border-radius: 12px 12px 0 0;
      overflow: hidden;
      position: relative;
    }

    .item-tag-badge {
      position: absolute;
      top: 6px;
      left: 6px;
      background: var(--primary);
      color: white;
      font-size: 0.65rem;
      font-weight: 700;
      padding: 3px 6px;
      border-radius: 6px;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
      z-index: 5;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .item-img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }

    .item-body {
      padding: 8px 10px 10px;
    }

    .item-title {
      font-weight: 600;
      font-size: 0.82rem;
      line-height: 1.3;
      margin-bottom: 2px;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

    .item-price {
      font-size: 0.78rem;
      color: var(--text-light);
      margin-bottom: 6px;
    }

    .price-bold {
      color: var(--text);
      font-weight: 700;
      font-size: 0.82rem;
    }

    .item-footer {
      margin-top: auto;
    }

    .qty-control {
      display: flex;
      align-items: center;
      justify-content: space-between;
      background: #f0fdf4;
      border: 1px solid #bbf7d0;
      border-radius: 8px;
      padding: 4px 6px;
    }

    .qty-controls-initial {
      display: block;
      width: 100%;
      text-align: center;
      background: white;
      border: 1.5px solid var(--primary);
      border-radius: 8px;
      padding: 7px 0;
      color: var(--primary);
      font-weight: 700;
      font-size: 0.85rem;
      cursor: pointer;
      transition: background 0.15s;
    }

    .qty-controls-initial:active {
      background: #f0fdf4;
    }

    .qty-btn {
      width: 28px;
      height: 28px;
      display: flex;
      align-items: center;
      justify-content: center;
      background: var(--primary);
      color: white;
      border-radius: 6px;
      border: none;
      font-weight: 700;
      font-size: 1rem;
      cursor: pointer;
    }

    .qty-val {
      font-weight: 700;
      font-size: 0.95rem;
      min-width: 24px;
      text-align: center;
    }

    /* Floating Cart */
    .cart-float {
      position: fixed;
      bottom: 85px;
      /* Stay above bottom nav */
      left: 20px;
      right: 20px;
      background: #111827;
      color: white;
      padding: 16px 24px;
      border-radius: 16px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
      z-index: 10000;
      cursor: pointer;
      transform: translateY(150%);
      transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .cart-float.visible {
      transform: translateY(0);
    }

    .cart-info {
      display: flex;
      flex-direction: column;
    }

    .cart-count {
      font-size: 0.8rem;
      opacity: 0.8;
    }

    .cart-total {
      font-weight: 700;
      font-size: 1.1rem;
    }

    .cart-action {
      font-weight: 600;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    /* Cart View */
    .cart-list {
      margin-top: 20px;
    }

    .cart-item {
      display: flex;
      justify-content: space-between;
      align-items: center;
      background: white;
      padding: 16px;
      border-bottom: 1px solid var(--border);
    }

    .bill-summary {
      background: white;
      padding: 20px;
      margin-top: 20px;
      border-radius: var(--radius);
    }

    .bill-row {
      display: flex;
      justify-content: space-between;
      margin-bottom: 10px;
      font-size: 0.95rem;
    }

    .bill-row.total {
      font-weight: 700;
      font-size: 1.2rem;
      border-top: 1px dashed var(--border);
      padding-top: 10px;
      margin-top: 10px;
    }

    /* Success View */
    .success-icon {
      font-size: 4rem;
      margin-bottom: 20px;
      animation: bounce 0.5s;
    }

    @keyframes bounce {

      0%,
      100% {
        transform: scale(1);
      }

      50% {
        transform: scale(1.2);
      }
    }

    /* --- Homepage --- */
    .home-container {
      padding-bottom: 40px;
    }

    .home-header {
      padding: 20px 20px 12px;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .home-greeting {
      font-size: 1.3rem;
      font-weight: 700;
      color: var(--text);
    }

    .home-sub {
      font-size: 0.85rem;
      color: var(--text-light);
      margin-top: 2px;
    }

    /* Banner Carousel */
    .banner-section {
      padding: 0 16px;
      margin-bottom: 24px;
    }

    .banner-carousel {
      position: relative;
      border-radius: 16px;
      overflow: hidden;
      background: #e2e8f0;
      aspect-ratio: 16 / 7;
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }

    .banner-track {
      display: flex;
      transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
      height: 100%;
    }

    .banner-slide {
      min-width: 100%;
      height: 100%;
      position: relative;
    }

    .banner-slide img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }

    .banner-title-overlay {
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      padding: 12px 16px;
      background: linear-gradient(transparent, rgba(0, 0, 0, 0.55));
      color: white;
      font-weight: 700;
      font-size: 0.95rem;
    }

    .banner-dots {
      display: flex;
      justify-content: center;
      gap: 6px;
      margin-top: 10px;
    }

    .banner-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: #cbd5e1;
      transition: all 0.3s;
    }

    .banner-dot.active {
      background: var(--primary);
      width: 20px;
      border-radius: 4px;
    }

    .no-banner-placeholder {
      width: 100%;
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      background: linear-gradient(135deg, #dcfce7, #d1fae5);
      color: var(--primary-dark);
      font-weight: 700;
      font-size: 1.2rem;
    }

    /* Home Category Grid */
    .home-section-title {
      font-size: 1.05rem;
      font-weight: 700;
      color: var(--text);
      padding: 0 20px;
      margin-bottom: 14px;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .see-all-btn {
      font-size: 0.82rem;
      color: var(--primary);
      font-weight: 600;
      background: none;
      border: none;
      cursor: pointer;
    }

    .home-cat-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 12px;
      padding: 0 16px;
      margin-bottom: 24px;
    }

    .home-cat-card {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 8px;
      cursor: pointer;
      transition: transform 0.15s;
      padding: 8px 4px;
    }

    .home-cat-card:active {
      transform: scale(0.93);
    }

    .home-cat-img {
      width: 60px;
      height: 60px;
      border-radius: 50%;
      object-fit: cover;
      background: #f1f5f9;
      border: 2.5px solid #e2e8f0;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
      transition: border-color 0.2s, box-shadow 0.2s;
    }

    .home-cat-card:active .home-cat-img {
      border-color: var(--primary);
      box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
    }

    .home-cat-name {
      font-size: 0.72rem;
      font-weight: 600;
      color: var(--text);
      text-align: center;
      line-height: 1.2;
      max-width: 70px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .shop-all-btn {
      display: block;
      width: calc(100% - 32px);
      margin: 0 16px 20px;
      padding: 14px;
      background: var(--primary);
      color: white;
      font-weight: 700;
      font-size: 1rem;
      border: none;
      border-radius: var(--radius);
      cursor: pointer;
      box-shadow: 0 6px 20px rgba(22, 163, 74, 0.2);
      transition: transform 0.1s;
    }

    .shop-all-btn:active {
      transform: scale(0.98);
    }

    /* --- Bottom Nav --- */
    .bottom-nav {
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      background: white;
      display: none;
      justify-content: space-around;
      align-items: center;
      padding: 6px 0 env(safe-area-inset-bottom, 8px);
      box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
      z-index: 2000;
      border-top: 1px solid var(--border);
    }

    .bottom-nav.visible {
      display: flex;
    }

    .nav-item {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 2px;
      cursor: pointer;
      padding: 4px 12px;
      border-radius: 10px;
      transition: all 0.2s;
      -webkit-tap-highlight-color: transparent;
    }

    .nav-item:active {
      transform: scale(0.9);
    }

    .nav-icon {
      font-size: 1.3rem;
      line-height: 1;
    }

    .nav-label {
      font-size: 0.65rem;
      font-weight: 600;
      color: var(--text-light);
    }

    .nav-item.active .nav-label {
      color: var(--primary-dark);
    }

    .nav-item.active .nav-icon {
      transform: scale(1.1);
    }

    /* --- Orders View --- */
    .orders-container {
      padding: 0 16px 20px;
      overflow-y: auto;
      height: calc(100vh - 130px);
    }

    .order-card {
      background: white;
      border-radius: 14px;
      padding: 16px;
      margin-bottom: 12px;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
      border: 1px solid var(--border);
    }

    .order-card-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 10px;
    }

    .order-date {
      font-weight: 700;
      font-size: 0.9rem;
      color: var(--text);
    }

    .order-status {
      padding: 3px 10px;
      border-radius: 20px;
      font-size: 0.72rem;
      font-weight: 700;
      text-transform: uppercase;
    }

    .order-status.pending { background: #fef9c3; color: #a16207; }
    .order-status.accepted { background: #dcfce7; color: #166534; }
    .order-status.delivered { background: #e0f2fe; color: #0369a1; }
    .order-status.cancelled { background: #fee2e2; color: #991b1b; }

    .order-items-list {
      font-size: 0.85rem;
      color: var(--text-light);
      line-height: 1.6;
    }

    .order-total {
      margin-top: 10px;
      padding-top: 10px;
      border-top: 1px dashed var(--border);
      display: flex;
      justify-content: space-between;
      font-weight: 700;
      font-size: 0.95rem;
    }

    /* --- Profile View --- */
    .profile-container {
      padding: 30px 20px;
      text-align: center;
    }

    .profile-avatar {
      width: 80px;
      height: 80px;
      border-radius: 50%;
      background: linear-gradient(135deg, #dcfce7, #bbf7d0);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 2.5rem;
      margin: 0 auto 16px;
      box-shadow: 0 4px 15px rgba(22, 163, 74, 0.15);
    }

    .profile-name {
      font-size: 1.4rem;
      font-weight: 700;
      color: var(--text);
      margin-bottom: 4px;
    }

    .profile-phone {
      font-size: 0.9rem;
      color: var(--text-light);
      margin-bottom: 24px;
    }

    .profile-info-card {
      background: white;
      border-radius: 14px;
      padding: 16px;
      margin-bottom: 12px;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
      border: 1px solid var(--border);
      text-align: left;
    }

    .profile-row {
      display: flex;
      justify-content: space-between;
      padding: 12px 0;
      border-bottom: 1px solid #f1f5f9;
      font-size: 0.9rem;
    }

    .profile-row:last-child {
      border-bottom: none;
    }

    .profile-key {
      color: var(--text-light);
    }

    .profile-val {
      font-weight: 600;
      color: var(--text);
    }

    .logout-btn-big {
      width: 100%;
      padding: 14px;
      background: #fee2e2;
      color: #ef4444;
      font-weight: 700;
      font-size: 1rem;
      border: none;
      border-radius: var(--radius);
      cursor: pointer;
      margin-top: 20px;
    }

    /* ===== BOTTOM NAVIGATION ===== */
    .bottom-nav {
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      background: #ffffff;
      display: none;
      justify-content: space-around;
      align-items: center;
      padding: 8px 0 12px;
      border-top: 1px solid var(--border);
      box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.06);
      z-index: 9999 !important;
    }

    .bottom-nav.visible {
      display: flex !important;
      opacity: 1 !important;
      visibility: visible !important;
    }

    .nav-item {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 2px;
      cursor: pointer;
      padding: 4px 12px;
      border-radius: 12px;
      transition: all 0.2s;
      -webkit-tap-highlight-color: transparent;
    }

    .nav-item.active {
      background: #f0fdf4;
    }

    .nav-item.active .nav-icon {
      transform: scale(1.15);
    }

    .nav-item.active .nav-label {
      color: var(--primary);
      font-weight: 700;
    }

    .nav-icon {
      font-size: 1.3rem;
      transition: transform 0.2s;
    }

    .nav-label {
      font-size: 0.68rem;
      font-weight: 500;
      color: var(--text-light);
      transition: color 0.2s;
    }

    /* ===== ORDERS VIEW ===== */
    .orders-container {
      padding: 80px 16px 80px;
      overflow-y: auto;
      height: 100vh;
    }

    .order-card {
      background: var(--surface);
      border-radius: var(--radius);
      padding: 16px;
      margin-bottom: 12px;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    }

    .order-card-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 10px;
    }

    .order-date {
      font-weight: 600;
      font-size: 0.9rem;
      color: var(--text);
    }

    .order-status {
      padding: 3px 10px;
      border-radius: 20px;
      font-size: 0.72rem;
      font-weight: 700;
      text-transform: uppercase;
    }

    .order-status.delivered {
      background: #dcfce7;
      color: #16a34a;
    }

    .order-status.pending {
      background: #fef3c7;
      color: #d97706;
    }

    .order-items-list {
      font-size: 0.85rem;
      color: var(--text-light);
      line-height: 1.6;
      margin-bottom: 8px;
    }

    .order-total {
      display: flex;
      justify-content: space-between;
      font-weight: 700;
      font-size: 0.95rem;
      border-top: 1px dashed var(--border);
      padding-top: 8px;
      margin-top: 8px;
    }

    /* ===== PROFILE VIEW ===== */
    .profile-container {
      padding: 80px 20px 80px;
      text-align: center;
    }

    .profile-avatar {
      font-size: 4rem;
      margin-bottom: 10px;
    }

    .profile-name {
      font-size: 1.4rem;
      font-weight: 700;
      color: var(--text);
    }

    .profile-phone {
      font-size: 0.95rem;
      color: var(--text-light);
      margin-bottom: 24px;
    }

    .profile-info-card {
      background: var(--surface);
      border-radius: var(--radius);
      padding: 16px 20px;
      text-align: left;
      box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
      margin-bottom: 24px;
    }

    .profile-row {
      display: flex;
      justify-content: space-between;
      padding: 12px 0;
      border-bottom: 1px solid var(--border);
    }

    .profile-row:last-child {
      border-bottom: none;
    }

    .profile-key {
      font-weight: 600;
      color: var(--text-light);
      font-size: 0.9rem;
    }

    .profile-val {
      font-weight: 500;
      color: var(--text);
      font-size: 0.9rem;
    }

    .logout-btn-big {
      width: 100%;
      padding: 14px;
      background: #fee2e2;
      color: #ef4444;
      font-weight: 700;
      font-size: 1rem;
      border: none;
      border-radius: var(--radius);
      cursor: pointer;
    }

    /* ===== LOGIN MODAL OVERLAY ===== */
    .login-modal-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.55);
      backdrop-filter: blur(6px);
      -webkit-backdrop-filter: blur(6px);
      z-index: 99999;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 20px;
      animation: fadeIn 0.25s ease;
    }

    @keyframes fadeIn {
      from { opacity: 0; }
      to { opacity: 1; }
    }

    .login-modal {
      background: var(--surface);
      border-radius: 20px;
      padding: 28px 24px 24px;
      width: 100%;
      max-width: 380px;
      max-height: 90vh;
      overflow-y: auto;
      position: relative;
      text-align: center;
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
      animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    @keyframes slideUp {
      from { transform: translateY(40px); opacity: 0; }
      to { transform: translateY(0); opacity: 1; }
    }

    .login-modal-close {
      position: absolute;
      top: 12px;
      right: 14px;
      background: none;
      border: none;
      font-size: 1.3rem;
      color: var(--text-light);
      cursor: pointer;
      padding: 4px 8px;
      border-radius: 8px;
      transition: background 0.15s;
    }

    .login-modal-close:active {
      background: #f1f5f9;
    }

    .login-modal .auth-input {
      margin-bottom: 10px;
    }

    .login-modal .btn-main {
      margin-top: 6px;
    }
