/* ==========================================================================
   HARRIS POP! FESTIVAL CITYLINK BANDUNG - CENTRAL PORTAL DASHBOARD
   4 Web Side-by-Side Desktop Grid & Full Responsive Handphone Layout
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  /* Brand Palette */
  --brand-navy: #0A2540;
  --brand-navy-light: #1E3A8A;
  --brand-navy-glow: rgba(10, 37, 64, 0.12);
  
  --brand-harris: #F37023;
  --brand-harris-hover: #E05D10;
  --brand-harris-glow: rgba(243, 112, 35, 0.3);

  --brand-pop-purple: #6C62B0;
  --brand-pop-purple-glow: rgba(108, 98, 176, 0.2);
  --brand-pop-pink: #ED3278;

  /* Status Colors */
  --status-online: #10B981;
  --status-online-glow: rgba(16, 185, 129, 0.25);

  /* Light Theme Default (Clean White Background) */
  --bg-main: #F8FAFC;
  --bg-gradient: radial-gradient(circle at 10% 10%, rgba(243, 112, 35, 0.06) 0%, transparent 40%),
                 radial-gradient(circle at 90% 90%, rgba(10, 37, 64, 0.07) 0%, transparent 45%),
                 #F8FAFC;

  --header-bg: rgba(255, 255, 255, 0.95);
  --card-bg: #FFFFFF;
  --card-bg-hover: #FFFFFF;
  --card-border: rgba(10, 37, 64, 0.1);
  --card-border-hover: var(--brand-harris);
  
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  
  --input-bg: #F1F5F9;
  --input-border: #CBD5E1;
  --shadow-lg: 0 15px 35px -10px rgba(10, 37, 64, 0.08);
  --shadow-card: 0 6px 18px -4px rgba(10, 37, 64, 0.05), 0 2px 6px -2px rgba(10, 37, 64, 0.03);
  
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 6px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode Override */
[data-theme="dark"] {
  --bg-main: #0B132B;
  --bg-gradient: radial-gradient(circle at 15% 15%, rgba(243, 112, 35, 0.1) 0%, transparent 40%),
                 radial-gradient(circle at 85% 85%, rgba(30, 58, 138, 0.25) 0%, transparent 45%),
                 #0B132B;
  --header-bg: rgba(15, 23, 42, 0.9);
  --card-bg: rgba(30, 41, 59, 0.8);
  --card-bg-hover: rgba(30, 41, 59, 0.98);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-border-hover: var(--brand-harris);
  
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  
  --input-bg: rgba(15, 23, 42, 0.9);
  --input-border: rgba(255, 255, 255, 0.15);
  --shadow-lg: 0 20px 40px -15px rgba(0, 0, 0, 0.6);
  --shadow-card: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  max-width: 100vw;
  min-height: 100vh;
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-primary);
  overflow-x: hidden;
  overflow-y: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* Layout Container */
.app-container {
  width: 100%;
  max-width: 1440px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 16px 24px 48px 24px;
  overflow-x: hidden;
}

/* Top Navbar Header */
.navbar {
  position: sticky;
  top: 12px;
  z-index: 100;
  margin-bottom: 24px;
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-top: 3px solid var(--brand-harris);
  border-radius: var(--radius-lg);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 6px 20px rgba(10, 37, 64, 0.05);
  width: 100%;
  box-sizing: border-box;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.brand-logo {
  height: 40px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-divider {
  width: 2px;
  height: 30px;
  background: linear-gradient(to bottom, var(--brand-harris), var(--brand-navy));
  opacity: 0.3;
  flex-shrink: 0;
}

.brand-title-badge {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.portal-badge {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.3px;
  color: var(--brand-navy);
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-theme="dark"] .portal-badge {
  color: #FFFFFF;
}

.portal-subtitle {
  font-size: 0.75rem;
  color: var(--brand-harris);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.time-widget {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--brand-navy);
  white-space: nowrap;
}

[data-theme="dark"] .time-widget {
  color: var(--text-primary);
}

.time-widget svg {
  color: var(--brand-harris);
  flex-shrink: 0;
}

.btn-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  color: var(--brand-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}

[data-theme="dark"] .btn-icon {
  color: var(--text-primary);
}

.btn-icon:hover {
  background: var(--brand-navy);
  color: #FFF;
  border-color: var(--brand-navy);
}

/* Hero Section */
.hero-section {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-left: 4px solid var(--brand-harris);
  border-radius: var(--radius-lg);
  padding: 24px 30px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-card);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  width: 100%;
  box-sizing: border-box;
}

.hero-text {
  min-width: 0;
}

.hero-text h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 6px;
  color: var(--brand-navy);
  word-break: break-word;
}

[data-theme="dark"] .hero-text h1 {
  color: var(--text-primary);
}

.hero-text h1 span.gradient-text {
  background: linear-gradient(135deg, var(--brand-harris), #E85F10);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-text p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 650px;
  line-height: 1.5;
  word-break: break-word;
}

.search-wrapper {
  position: relative;
  width: 320px;
  max-width: 100%;
  flex-shrink: 0;
}

.search-input {
  width: 100%;
  padding: 12px 18px 12px 44px;
  background: var(--input-bg);
  border: 1.5px solid var(--input-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
  outline: none;
  box-sizing: border-box;
}

.search-input:focus {
  border-color: var(--brand-navy);
  box-shadow: 0 0 0 3px var(--brand-navy-glow);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--brand-harris);
  pointer-events: none;
}

/* Stats Overview Bar */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
  width: 100%;
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-card);
  min-width: 0;
}

.stat-icon-wrapper {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.stat-icon-wrapper.orange { background: rgba(243, 112, 35, 0.1); color: var(--brand-harris); }
.stat-icon-wrapper.navy   { background: rgba(10, 37, 64, 0.08); color: var(--brand-navy); }
.stat-icon-wrapper.purple { background: rgba(108, 98, 176, 0.1); color: var(--brand-pop-purple); }
.stat-icon-wrapper.green  { background: rgba(16, 185, 129, 0.1); color: var(--status-online); }
.stat-icon-wrapper.pink   { background: rgba(237, 50, 120, 0.1); color: var(--brand-pop-pink); }

.stat-info {
  min-width: 0;
}

.stat-info .stat-value {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--brand-navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-theme="dark"] .stat-info .stat-value {
  color: var(--text-primary);
}

.stat-info .stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--brand-navy);
}

[data-theme="dark"] .section-title {
  color: var(--text-primary);
}

.section-title svg {
  color: var(--brand-harris);
  flex-shrink: 0;
}

.category-pills {
  display: flex;
  gap: 8px;
  max-width: 100%;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.category-pills::-webkit-scrollbar {
  display: none;
}

.pill-btn {
  padding: 6px 16px;
  border-radius: 16px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  transition: var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.pill-btn.active, .pill-btn:hover {
  background: var(--brand-navy);
  color: #FFF;
  border-color: var(--brand-navy);
}

/* 4 WEBSITES SIDE-BY-SIDE GRID (DESKTOP) */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 32px;
  width: 100%;
}

.app-card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
  box-shadow: var(--shadow-card);
  min-height: 240px;
  min-width: 0;
  box-sizing: border-box;
}

.app-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--card-accent, var(--brand-harris));
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
}

.app-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand-harris);
  box-shadow: 0 12px 25px rgba(10, 37, 64, 0.08);
}

.app-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  width: 100%;
}

.app-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  background: var(--icon-bg, rgba(243, 112, 35, 0.1));
  color: var(--icon-color, var(--brand-harris));
  flex-shrink: 0;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(16, 185, 129, 0.1);
  color: var(--status-online);
  border: 1px solid rgba(16, 185, 129, 0.25);
  flex-shrink: 0;
}

.status-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--status-online);
  flex-shrink: 0;
}

.app-card-body {
  margin-bottom: 14px;
  flex-grow: 1;
  min-width: 0;
}

.app-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 4px;
  color: var(--brand-navy);
  line-height: 1.25;
  word-break: break-word;
}

[data-theme="dark"] .app-title {
  color: var(--text-primary);
}

.app-subdomain {
  display: inline-block;
  font-family: monospace;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand-harris);
  background: rgba(243, 112, 35, 0.08);
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
  word-break: break-all;
  max-width: 100%;
}

.app-description {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.45;
  word-break: break-word;
}

.app-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--card-border);
  gap: 8px;
  width: 100%;
}

.btn-launch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  width: 100%;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.85rem;
  background: var(--card-accent, var(--brand-harris));
  color: #FFFFFF;
  transition: var(--transition);
  box-sizing: border-box;
}

.btn-launch:hover {
  filter: brightness(1.08);
}

.quick-links-trigger {
  color: var(--text-muted);
  padding: 8px;
  border-radius: 8px;
  flex-shrink: 0;
}

.quick-links-trigger:hover {
  color: var(--brand-navy);
  background: var(--input-bg);
}

/* Quick Utilities Section */
.quick-access-section {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  box-shadow: var(--shadow-card);
  width: 100%;
  box-sizing: border-box;
}

.quick-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 14px;
  width: 100%;
}

.quick-link-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  transition: var(--transition);
  min-width: 0;
  box-sizing: border-box;
}

.quick-link-item:hover {
  background: #FFFFFF;
  border-color: var(--brand-harris);
  transform: translateY(-2px);
}

[data-theme="dark"] .quick-link-item:hover {
  background: var(--card-bg-hover);
}

.quick-link-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(243, 112, 35, 0.1);
  color: var(--brand-harris);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.quick-link-text {
  min-width: 0;
}

.quick-link-text h4 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--brand-navy);
  word-break: break-word;
}

[data-theme="dark"] .quick-link-text h4 {
  color: var(--text-primary);
}

.quick-link-text p {
  font-size: 0.76rem;
  color: var(--text-secondary);
  word-break: break-word;
}

/* Footer Copyright */
.footer {
  margin-top: 32px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.82rem;
  padding-top: 20px;
  border-top: 1px solid var(--card-border);
  width: 100%;
  box-sizing: border-box;
  word-break: break-word;
}

.footer strong {
  color: var(--brand-navy);
}

[data-theme="dark"] .footer strong {
  color: var(--brand-harris);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 90vw;
}

.toast {
  background: var(--brand-navy);
  border: 1px solid var(--brand-harris);
  color: #FFFFFF;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(10, 37, 64, 0.25);
}

/* ==========================================================================
   HANDPHONE & TABLET RESPONSIVE OVERRIDES
   ========================================================================== */

@media (max-width: 1024px) {
  .hero-section {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .search-wrapper {
    width: 100%;
  }

  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 640px) {
  .app-container {
    padding: 8px 10px 24px 10px;
  }

  .navbar {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
  }

  .brand-wrapper {
    gap: 8px;
  }

  .brand-logo {
    height: 26px;
    max-width: 120px;
  }

  .brand-divider {
    height: 18px;
  }

  .portal-badge {
    font-size: 0.78rem;
  }

  .portal-subtitle {
    font-size: 0.6rem;
  }

  .time-widget {
    font-size: 0.7rem;
    padding: 3px 6px;
  }

  .btn-icon {
    width: 30px;
    height: 30px;
  }

  .hero-section {
    padding: 12px 14px;
    border-left-width: 3px;
    gap: 10px;
  }

  .hero-text h1 {
    font-size: 1.15rem;
  }

  .hero-text p {
    font-size: 0.78rem;
    line-height: 1.35;
  }

  .search-wrapper {
    width: 100%;
  }

  .search-input {
    padding: 8px 12px 8px 34px;
    font-size: 0.8rem;
  }

  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .stat-card {
    padding: 8px 10px;
    gap: 6px;
  }

  .stat-icon-wrapper {
    width: 28px;
    height: 28px;
    font-size: 0.9rem;
  }

  .stat-info .stat-value {
    font-size: 0.82rem;
  }

  .stat-info .stat-label {
    font-size: 0.62rem;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
  }

  .section-title {
    font-size: 1.05rem;
  }

  .category-pills {
    display: flex;
    flex-wrap: nowrap; /* Keeps all buttons in 1 single row */
    gap: 4px;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .pill-btn {
    padding: 5px 8px;
    font-size: 0.68rem; /* Compact font size to fit on mobile */
    font-weight: 700;
    white-space: nowrap;
    text-align: center;
    flex: 1; /* Distribute evenly across the screen width */
    min-width: 0;
  }

  .apps-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .app-card {
    padding: 12px 14px;
    min-height: auto;
  }

  .app-icon {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
  }

  .app-title {
    font-size: 1rem;
  }

  .app-subdomain {
    font-size: 0.7rem;
    padding: 2px 6px;
  }

  .app-description {
    font-size: 0.76rem;
    line-height: 1.35;
  }

  .btn-launch {
    padding: 8px 10px;
    font-size: 0.78rem;
  }

  .quick-access-section {
    padding: 14px;
  }

  .quick-links-grid {
    grid-template-columns: 1fr;
  }

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

  .quick-link-icon {
    width: 30px;
    height: 30px;
    font-size: 0.9rem;
  }

  .quick-link-text h4 {
    font-size: 0.8rem;
  }

  .quick-link-text p {
    font-size: 0.68rem;
  }

  .footer {
    margin-top: 20px;
    padding-top: 12px;
    font-size: 0.72rem;
  }
}
