
    :root {
      --bg-dark: #041c17;
      --bg-panel: #072a20;
      --primary: #0E4B43;
      --gold: #e5c158;
      --gold-hover: #f3d478;
      --text-white: #FFFFFF;
      --text-muted: #B8D5CB;
      --border-light: rgba(255, 255, 255, 0.1);
      --green-accent: #10b981;
    }
    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }
    body {
      font-family: 'Outfit', sans-serif;
      background: radial-gradient(circle at 50% 25%, #08382c 0%, #041c17 50%, #02120e 100%);
      color: var(--text-white);
      min-height: 100vh;
      min-height: 100dvh;
      display: flex;
      flex-direction: column;
      justify-content: flex-start;
      align-items: center;
      padding: 24px 16px 64px;
      overflow-x: hidden;
      overflow-y: auto;
      position: relative;
    }
    .hidden {
      display: none !important;
    }

    /* Zero-FOUC View Preboot Synchronization */
    html:not([data-initial-view]) #masjidSelectorView,
    html[data-initial-view="form"] #masjidSelectorView {
      display: none !important;
    }
    html:not([data-initial-view]) #loginFormView,
    html[data-initial-view="selector"] #loginFormView {
      display: none !important;
    }
    html[data-initial-view="form"] #loginFormView {
      display: block !important;
    }
    html[data-initial-view="selector"] #masjidSelectorView {
      display: block !important;
    }

    /* Asmaul Husna 99 Names Rotating Background */
    .islamic-asmaul-husna-rotating {
      opacity: 0.12;
      contain: layout paint;
      backface-visibility: hidden;
    }
    .islamic-allah-center-static {
      opacity: 0.18;
    }

    /* PORTAL CONTAINER & RESPONSIVENESS */
    .portal-container {
      width: 100%;
      max-width: 1080px;
      margin: 0 auto;
      position: relative;
      z-index: 10;
      text-align: center;
      display: flex;
      flex-direction: column;
      align-items: center;
    }

    .login-selector-top-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      width: 100%;
      max-width: 900px;
      margin: 0 auto 12px;
      gap: 12px;
      flex-wrap: wrap;
    }

    .home-nav-btn {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      color: var(--gold);
      font-size: 0.84rem;
      font-weight: 700;
      background: rgba(229, 193, 88, 0.12);
      border: 1px solid rgba(229, 193, 88, 0.3);
      border-radius: 20px;
      padding: 6px 16px;
      cursor: pointer;
      text-decoration: none;
      transition: all 0.25s ease;
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    }
    .home-nav-btn:hover {
      background: rgba(229, 193, 88, 0.25);
      border-color: var(--gold);
      color: #ffffff;
      transform: translateY(-2px);
      box-shadow: 0 4px 16px rgba(229, 193, 88, 0.25);
    }
    .home-nav-btn-compact {
      text-decoration: none;
    }
    .login-left-nav-group {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }

    .admin-badge-pill {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      background: rgba(229, 193, 88, 0.16);
      border: 1px solid rgba(229, 193, 88, 0.35);
      color: var(--gold);
      padding: 5px 14px;
      border-radius: 20px;
      font-size: 0.8rem;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 1px;
      margin-bottom: 0;
      box-shadow: 0 0 16px rgba(229, 193, 88, 0.2);
    }

    .tv-masjid-title {
      font-size: clamp(1.4rem, 4vw, 2.3rem);
      font-weight: 800;
      letter-spacing: -0.5px;
      margin: 0 0 6px;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      flex-wrap: wrap;
    }

    .tv-masjid-subtitle {
      color: var(--text-muted);
      font-size: clamp(0.85rem, 2vw, 1.05rem);
      margin-bottom: 20px;
      padding: 0 10px;
    }

    .tv-masjid-bismillah {
      font-family: 'Amiri', 'Scheherazade New', serif;
      font-size: clamp(1.3rem, 3.5vw, 2.2rem);
      color: #e5c158;
      margin-bottom: 6px;
      text-shadow: 0 0 20px rgba(229, 193, 88, 0.4);
    }

    .login-box-wrapper {
      width: 100%;
      max-width: 460px;
      margin: 0 auto;
      padding: clamp(24px, 5vw, 36px) clamp(18px, 4vw, 30px);
      background: rgba(7, 42, 32, 0.96);
      border: 1.5px solid rgba(229, 193, 88, 0.35);
      border-radius: 24px;
      box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
      text-align: center;
      transform: translateZ(0);
    }

    .logo-badge {
      width: 72px;
      height: 72px;
      border: 2px solid var(--gold);
      border-radius: 50%;
      display: flex;
      justify-content: center;
      align-items: center;
      margin: 0 auto 16px;
      background: radial-gradient(circle, rgba(229, 193, 88, 0.15) 0%, rgba(0, 0, 0, 0.35) 100%);
      box-shadow: 0 0 20px rgba(229, 193, 88, 0.25);
      overflow: hidden;
      flex-shrink: 0;
    }
    .logo-badge svg {
      width: 60%;
      height: 60%;
      fill: none;
      stroke: var(--gold);
      stroke-width: 2.5;
    }

    .login-heading {
      font-size: clamp(1.3rem, 3.5vw, 1.7rem);
      font-weight: 800;
      margin-bottom: 6px;
      color: var(--text-white);
      letter-spacing: -0.5px;
    }
    .login-sub-title {
      color: var(--text-muted);
      font-size: 0.9rem;
      line-height: 1.45;
      margin-bottom: 22px;
    }

    .login-top-nav-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      margin-bottom: 20px;
      flex-wrap: wrap;
    }

    .back-btn {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      color: var(--gold);
      font-size: 0.84rem;
      font-weight: 700;
      background: rgba(229, 193, 88, 0.12);
      border: 1px solid rgba(229, 193, 88, 0.28);
      border-radius: 20px;
      padding: 6px 14px;
      cursor: pointer;
      margin-bottom: 0;
      text-decoration: none;
      transition: all 0.2s ease;
    }
    .back-btn:hover {
      background: rgba(229, 193, 88, 0.24);
      border-color: var(--gold);
      color: #ffffff;
      transform: translateX(-2px);
    }

    .login-quick-links {
      display: inline-flex;
      align-items: center;
      gap: 8px;
    }

    .login-action-pill {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      font-size: 0.8rem;
      font-weight: 700;
      padding: 6px 12px;
      border-radius: 20px;
      text-decoration: none;
      transition: all 0.2s ease;
      white-space: nowrap;
    }

    .login-action-pill.tv-link {
      background: rgba(16, 185, 129, 0.15);
      border: 1px solid rgba(16, 185, 129, 0.45);
      color: #34d399;
    }
    .login-action-pill.tv-link:hover {
      background: rgba(16, 185, 129, 0.3);
      border-color: #10b981;
      color: #ffffff;
      box-shadow: 0 0 12px rgba(16, 185, 129, 0.35);
      transform: translateY(-1px);
    }

    .login-action-pill.mobile-link {
      background: rgba(56, 189, 248, 0.15);
      border: 1px solid rgba(56, 189, 248, 0.45);
      color: #38bdf8;
    }
    .login-action-pill.mobile-link:hover {
      background: rgba(56, 189, 248, 0.3);
      border-color: #38bdf8;
      color: #ffffff;
      box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
      transform: translateY(-1px);
    }

    .form-group {
      margin-bottom: 16px;
      text-align: left;
    }
    label {
      display: block;
      margin-bottom: 6px;
      font-size: 0.78rem;
      font-weight: 700;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 0.8px;
    }
    input[type="text"],
    input[type="password"] {
      width: 100%;
      padding: 13px 16px;
      border: 1.5px solid rgba(255, 255, 255, 0.16);
      background: var(--tenant-bg-input, #081E1D);
      color: var(--text-white);
      border-radius: 12px;
      font-size: 0.98rem;
      outline: none;
      font-family: inherit;
      box-sizing: border-box;
      transition: border-color 0.12s ease;
    }
    input[type="text"]:focus,
    input[type="password"]:focus {
      border-color: var(--gold);
      box-shadow: 0 0 10px rgba(229, 193, 88, 0.3);
      background: #032018;
    }

    .btn-login {
      width: 100%;
      padding: 14px;
      margin-top: 6px;
      background: linear-gradient(135deg, #064e3b 0%, #047857 100%);
      color: #ffffff;
      border: 1px solid rgba(229, 193, 88, 0.35);
      border-radius: 12px;
      font-size: 1rem;
      font-weight: 800;
      cursor: pointer;
      transition: all 0.3s ease;
      text-transform: uppercase;
      letter-spacing: 1px;
      box-shadow: 0 6px 20px rgba(6, 78, 59, 0.45);
    }
    .btn-login:hover {
      background: linear-gradient(135deg, #047857 0%, #059669 100%);
      border-color: var(--gold);
      box-shadow: 0 0 24px rgba(229, 193, 88, 0.45);
      transform: translateY(-2px);
    }
    .btn-login:active {
      transform: translateY(0);
    }

    .error-msg {
      margin-top: 14px;
      color: #fca5a5;
      font-size: 0.88rem;
      font-weight: 600;
      display: none;
      background: rgba(239, 68, 68, 0.15);
      border: 1px solid rgba(239, 68, 68, 0.35);
      padding: 10px 14px;
      border-radius: 10px;
    }
    
    .super-link-box {
      margin-top: 22px;
      padding-top: 16px;
      border-top: 1px solid rgba(255, 255, 255, 0.1);
      font-size: 0.85rem;
      color: var(--text-muted);
    }
    .super-link-box a {
      color: var(--gold);
      text-decoration: none;
      font-weight: 700;
      transition: color 0.2s;
    }
    .super-link-box a:hover {
      color: var(--gold-hover);
      text-decoration: underline;
    }

    .admin-selector-wrap {
      width: 100%;
      animation: fadeInScale 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .admin-card-badge {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      font-size: 0.72rem;
      font-weight: 700;
      color: var(--gold);
      background: rgba(229, 193, 88, 0.14);
      border: 1px solid rgba(229, 193, 88, 0.25);
      padding: 3px 8px;
      border-radius: 6px;
      margin-top: 4px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    /* Filter Control Bar (Glassmorphic) */
    .masjid-filter-bar {
      background: rgba(7, 42, 32, 0.8);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
      border: 1.5px solid rgba(229, 193, 88, 0.28);
      box-shadow: 0 12px 35px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
      border-radius: 18px;
      padding: 14px 18px;
      margin: 18px auto 14px;
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      width: 100%;
      max-width: 900px;
    }
    .masjid-filter-controls {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 12px;
      width: 100%;
    }
    .masjid-filter-field {
      display: flex;
      align-items: center;
      gap: 8px;
      background: rgba(2, 24, 18, 0.75);
      border: 1px solid rgba(255, 255, 255, 0.14);
      border-radius: 12px;
      padding: 8px 14px;
      flex: 1 1 180px;
      transition: all 0.2s ease;
    }
    .masjid-filter-field:focus-within {
      border-color: var(--gold);
      box-shadow: 0 0 14px rgba(229, 193, 88, 0.35);
      background: rgba(2, 24, 18, 0.95);
    }
    .masjid-filter-icon {
      font-size: 1.1rem;
      line-height: 1;
      flex-shrink: 0;
    }
    .masjid-filter-select {
      background: transparent;
      border: none;
      color: #f8fafc;
      font-size: 0.92rem;
      font-family: inherit;
      font-weight: 600;
      width: 100%;
      outline: none;
      cursor: pointer;
    }
    .masjid-filter-select option {
      background: #072a20;
      color: #f8fafc;
      padding: 10px;
    }
    .masjid-search-field {
      flex: 2 1 260px;
    }
    .masjid-search-input {
      background: transparent;
      border: none;
      color: #f8fafc;
      font-size: 0.95rem;
      font-family: inherit;
      font-weight: 500;
      width: 100%;
      outline: none;
    }
    .masjid-search-input::placeholder {
      color: #799d91;
    }
    .masjid-search-clear {
      background: none;
      border: none;
      color: #94b4a8;
      font-size: 1.1rem;
      cursor: pointer;
      padding: 2px 6px;
      display: none;
      transition: color 0.2s ease;
      line-height: 1;
    }
    .masjid-search-clear:hover {
      color: #fca5a5;
    }
    .masjid-filter-summary {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      font-size: 0.88rem;
      color: var(--text-muted);
      padding: 0 6px;
      margin: 0 auto 20px;
      width: 100%;
      max-width: 900px;
    }
    .masjid-count-pill {
      background: rgba(229, 193, 88, 0.15);
      color: var(--gold);
      border: 1px solid rgba(229, 193, 88, 0.35);
      padding: 4px 14px;
      border-radius: 20px;
      font-weight: 700;
      font-size: 0.82rem;
    }
    .masjid-reset-btn {
      background: rgba(255, 255, 255, 0.08);
      border: 1px solid rgba(255, 255, 255, 0.18);
      color: #e2e8f0;
      padding: 5px 14px;
      border-radius: 10px;
      font-size: 0.82rem;
      font-family: inherit;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s ease;
    }
    .masjid-reset-btn:hover {
      background: rgba(229, 193, 88, 0.2);
      border-color: var(--gold);
      color: #ffffff;
    }

    /* Masjid Cards Grid */
    .tv-masjid-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
      gap: 16px;
      justify-content: center;
      width: 100%;
      margin-bottom: 24px;
    }
    .tv-masjid-card {
      position: relative;
      background: rgba(7, 42, 32, 0.85);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      border: 1.5px solid rgba(229, 193, 88, 0.25);
      border-radius: 18px;
      padding: 18px 18px;
      cursor: pointer;
      transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
      display: flex;
      align-items: center;
      gap: 14px;
      text-align: left;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
      outline: none;
      user-select: none;
      overflow: hidden;
      content-visibility: auto;
      contain-intrinsic-size: auto 90px;
      -webkit-tap-highlight-color: transparent;
    }
    .tv-masjid-card:hover,
    .tv-masjid-card:focus-visible {
      transform: translateY(-3px);
      border-color: var(--gold);
      background: rgba(11, 56, 43, 0.95);
      box-shadow: 0 14px 32px rgba(0, 0, 0, 0.5), 0 0 18px rgba(229, 193, 88, 0.25);
    }
    .tv-masjid-card:active {
      transform: scale(0.98);
    }
    .tv-masjid-card-logo-wrap {
      width: 54px;
      height: 54px;
      flex-shrink: 0;
      border-radius: 50%;
      border: 2px solid rgba(229, 193, 88, 0.5);
      background: #ffffff;
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: hidden;
      padding: 3px;
      box-sizing: border-box;
    }
    .tv-masjid-card-logo-img {
      width: 100%;
      height: 100%;
      object-fit: contain;
      border-radius: 50%;
    }
    .tv-masjid-card-info {
      flex: 1 1 auto;
      min-width: 0;
    }
    .tv-masjid-card-name {
      font-size: 1rem;
      font-weight: 700;
      color: #ffffff;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      margin-bottom: 3px;
    }
    .tv-masjid-card-meta {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 0.76rem;
      color: var(--text-muted);
      flex-wrap: wrap;
      margin-bottom: 4px;
    }
    .tv-masjid-location-pill {
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 140px;
    }
    .tv-masjid-card-action {
      color: var(--gold);
      font-size: 1.15rem;
      flex-shrink: 0;
      transition: transform 0.2s ease;
    }
    .tv-masjid-card:hover .tv-masjid-card-action {
      transform: translateX(4px);
    }

    /* MOBILE SPECIFIC ENHANCEMENTS */
    @media (max-width: 640px) {
      body {
        padding: 16px 10px 48px;
        justify-content: flex-start;
      }
      .login-selector-top-row {
        justify-content: space-between;
        gap: 8px;
      }
      .masjid-filter-bar {
        padding: 12px;
        gap: 10px;
        border-radius: 14px;
      }
      .masjid-filter-controls {
        flex-direction: column;
        width: 100%;
        gap: 10px;
      }
      .masjid-filter-field {
        width: 100%;
        flex: 1 1 100%;
      }
      .tv-masjid-grid {
        grid-template-columns: 1fr;
        gap: 12px;
      }
      .tv-masjid-card {
        padding: 14px 12px;
        border-radius: 14px;
      }
      .login-box-wrapper {
        border-radius: 18px;
        margin-top: 16px;
      }
    }

 .islamic-asmaul-husna-wrapper {
  width: 75vw;
  height: 75vw;
  position: fixed;
  top: 75%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.islamic-asmaul-husna-rotating {
  width: 100%;
  height: 100%;
}
