/* ==========================================================================
   PT Sukses Bersama Konsultan - Digital Service Portal
   Design: Modern Squircle Application Launcher (Bizagi Style)
   ========================================================================== */

/* --------------------------------------------------------------------------
   Design Tokens & CSS Variables
   -------------------------------------------------------------------------- */
:root {
  /* Corporate Core Palette */
  --color-brand-navy: #0A1E38;
  --color-brand-navy-light: #162B4D;
  --color-brand-gold: #C99320;

  /* Bizagi-Style Gradient Badges */
  --grad-teal: linear-gradient(135deg, #00CBA7 0%, #009E86 100%);
  --shadow-teal: 0 10px 24px rgba(0, 203, 167, 0.35);

  --grad-indigo: linear-gradient(135deg, #5B6BF9 0%, #764BA2 100%);
  --shadow-indigo: 0 10px 24px rgba(91, 107, 249, 0.35);

  --grad-emerald: linear-gradient(135deg, #05D678 0%, #0BB568 100%);
  --shadow-emerald: 0 10px 24px rgba(5, 214, 120, 0.35);

  --grad-amber: linear-gradient(135deg, #FFA900 0%, #FF7700 100%);
  --shadow-amber: 0 10px 24px rgba(255, 169, 0, 0.35);

  --grad-rose: linear-gradient(135deg, #FF5B8A 0%, #E11D48 100%);
  --shadow-rose: 0 10px 24px rgba(255, 91, 138, 0.32);

  /* Surface & Canvas */
  --bg-canvas: #F4F6FB;
  --bg-card: #FFFFFF;
  --border-card: #EEF2F6;
  --border-card-hover: #CBD5E1;

  /* Typography */
  --text-primary: #1E293B;
  --text-secondary: #64748B;
  --text-muted: #94A3B8;

  /* Radii */
  --radius-canvas: 28px;
  --radius-card: 24px;
  --radius-squircle: 20px;
  --radius-pill: 9999px;

  /* Shadows */
  --shadow-floating-canvas: 0 20px 50px -12px rgba(15, 23, 42, 0.07), 0 2px 6px rgba(15, 23, 42, 0.03);
  --shadow-app-card: 0 4px 16px rgba(15, 23, 42, 0.03);
  --shadow-app-card-hover: 0 16px 36px -4px rgba(15, 23, 42, 0.09), 0 4px 12px rgba(15, 23, 42, 0.03);

  /* Transitions */
  --transition-smooth: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html, body {
  min-height: 100%;
}

body {
  font-family: var(--font-family);
  /* Elegant ambient pastel gradient backdrop */
  background-color: var(--bg-canvas);
  background-image: 
    radial-gradient(circle at 8% 18%, #DCE5FA 0%, transparent 42%),
    radial-gradient(circle at 92% 12%, #FDE9E4 0%, transparent 40%),
    radial-gradient(circle at 50% 95%, #E9EEFA 0%, transparent 48%);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  padding: 2.5rem 1.5rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

/* --------------------------------------------------------------------------
   Floating White Workspace Card (Bizagi Container)
   -------------------------------------------------------------------------- */
.workspace-wrapper {
  max-width: 1140px;
  width: 100%;
  margin: 0 auto;
  background-color: var(--bg-card);
  border-radius: var(--radius-canvas);
  box-shadow: var(--shadow-floating-canvas);
  padding: 2.75rem 3.5rem 2.5rem;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 5rem);
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

/* --------------------------------------------------------------------------
   Header Inside Workspace (Centered Logo)
   -------------------------------------------------------------------------- */
.workspace-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 2rem;
  border-bottom: 1px solid #F1F5F9;
}

.brand-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity var(--transition-smooth);
}

.brand-logo-link:hover {
  opacity: 0.9;
}

.brand-logo-img {
  height: 48px;
  width: auto;
  object-fit: contain;
  display: block;
}

/* --------------------------------------------------------------------------
   Greeting & Welcome Section
   -------------------------------------------------------------------------- */
.greeting-section {
  padding: 2.5rem 0 2rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.greeting-text-wrap {
  flex: 1;
  min-width: 260px;
}

.greeting-title {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.greeting-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 400;
}

/* Instant Search Input */
.search-box-wrap {
  position: relative;
  width: 100%;
  max-width: 320px;
}

.search-box-input {
  width: 100%;
  padding: 0.65rem 2.5rem 0.65rem 2.4rem;
  font-size: 0.875rem;
  color: var(--text-primary);
  background-color: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-pill);
  outline: none;
  transition: all var(--transition-smooth);
}

.search-box-input:focus {
  background-color: #FFFFFF;
  border-color: var(--color-brand-navy);
  box-shadow: 0 0 0 3px rgba(10, 30, 56, 0.08);
}

.search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-shortcut {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.6875rem;
  color: var(--text-muted);
  background-color: #FFFFFF;
  border: 1px solid #E2E8F0;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   App Cards Grid (Bizagi Squircle Style - 5 Cards)
   -------------------------------------------------------------------------- */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

/* Card Base */
.app-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 2.25rem 1rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: var(--shadow-app-card);
  transition: all var(--transition-smooth);
  position: relative;
  user-select: none;
  min-height: 195px;
}

/* Active Cards Interaction */
a.app-card {
  cursor: pointer;
  text-decoration: none;
}

a.app-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-app-card-hover);
  border-color: var(--border-card-hover);
}

a.app-card:hover .squircle-icon-badge {
  transform: scale(1.06);
}

a.app-card:focus-visible {
  outline: 2px solid var(--color-brand-navy);
  outline-offset: 4px;
}

/* Disabled Cards (Coming Soon) */
.app-card.is-disabled {
  cursor: default;
  background-color: #FCFDFE;
  opacity: 0.75;
}

.app-card.is-disabled:hover {
  transform: none;
  box-shadow: var(--shadow-app-card);
}

/* --------------------------------------------------------------------------
   Squircle Gradient Icon Badges (Bizagi Signature)
   -------------------------------------------------------------------------- */
.squircle-icon-badge {
  width: 66px;
  height: 66px;
  border-radius: var(--radius-squircle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  margin-bottom: 1.25rem;
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
  flex-shrink: 0;
}

/* Gradient Themes */
.badge-teal {
  background: var(--grad-teal);
  box-shadow: var(--shadow-teal);
}

.badge-indigo {
  background: var(--grad-indigo);
  box-shadow: var(--shadow-indigo);
}

.badge-emerald {
  background: var(--grad-emerald);
  box-shadow: var(--shadow-emerald);
}

.badge-amber {
  background: var(--grad-amber);
  box-shadow: var(--shadow-amber);
}

.badge-rose {
  background: var(--grad-rose);
  box-shadow: var(--shadow-rose);
}

/* Disabled Squircle Icon (Subtle desaturation) */
.app-card.is-disabled .squircle-icon-badge {
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
  filter: saturate(0.85);
}

/* --------------------------------------------------------------------------
   App Card Typography & Status
   -------------------------------------------------------------------------- */
.app-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

/* Status Indicator Pill for Coming Soon */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.71875rem;
  font-weight: 500;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  letter-spacing: 0.01em;
  margin-top: 0.65rem;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.status-comingsoon {
  background-color: #F1F5F9;
  color: #64748B;
  border: 1px solid #E2E8F0;
}

.status-comingsoon .status-dot {
  background-color: #94A3B8;
}

/* --------------------------------------------------------------------------
   Footer Inside Workspace
   -------------------------------------------------------------------------- */
.workspace-footer {
  margin-top: auto;
  padding-top: 2.25rem;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Empty Filter Message
   -------------------------------------------------------------------------- */
.no-results-message {
  display: none;
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1.5rem;
  background-color: #F8FAFC;
  border: 1px dashed #E2E8F0;
  border-radius: var(--radius-card);
  color: var(--text-muted);
}

.no-results-message.is-visible {
  display: block;
}

/* --------------------------------------------------------------------------
   Responsive Breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .workspace-wrapper {
    padding: 2rem 2.25rem;
  }

  .apps-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.125rem;
  }
}

@media (max-width: 768px) {
  .apps-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

@media (max-width: 640px) {
  body {
    padding: 1rem 0.75rem;
  }

  .workspace-wrapper {
    padding: 1.5rem 1.25rem 2rem;
    border-radius: 20px;
  }

  .workspace-header {
    padding-bottom: 1.25rem;
  }

  .brand-logo-img {
    height: 38px;
  }

  .greeting-title {
    font-size: 1.5rem;
  }

  .apps-grid {
    grid-template-columns: 1fr;
    gap: 0.875rem;
  }

  .app-card {
    flex-direction: row;
    align-items: center;
    text-align: left;
    padding: 1.25rem 1.5rem;
    min-height: auto;
    gap: 1.25rem;
    justify-content: flex-start;
  }

  .squircle-icon-badge {
    margin-bottom: 0;
    width: 56px;
    height: 56px;
    border-radius: 16px;
  }

  .app-card-title {
    margin-bottom: 0;
  }

  .status-pill {
    margin-top: 0.25rem;
  }
}
