/**
 * RUMREN ID - Main Domain Master Stylesheet
 * File: style.css
 * Crafted for premium aesthetic, responsive UX, micro-interactions & cross-device consistency.
 */

/* ==========================================================================
   1. CSS VARIABLES & DESIGN TOKENS
   ========================================================================== */
:root {
  /* Brand Primary Palette (Amber/Gold) */
  --primary: #f59e0b;
  --primary-hover: #d97706;
  --primary-dark: #b45309;
  --primary-light: #fef3c7;
  --primary-50: #fffbeb;
  --primary-100: #fef3c7;
  --primary-500: #f59e0b;
  --primary-600: #d97706;
  --primary-700: #b45309;
  --primary-ring: rgba(245, 158, 11, 0.25);

  /* Neutrals & Dark Slate */
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #ffffff;

  /* Accent Colors */
  --emerald-500: #10b981;
  --emerald-50: #ecfdf5;
  --emerald-700: #047857;
  --blue-500: #3b82f6;
  --blue-50: #eff6ff;
  --blue-700: #1d4ed8;
  --purple-500: #8b5cf6;
  --purple-50: #f5f3ff;
  --rose-500: #f43f5e;
  --rose-50: #fff1f2;

  /* Typography */
  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* Elevation & Shadows */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px -1px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 12px 24px -4px rgba(15, 23, 42, 0.12), 0 6px 12px -6px rgba(15, 23, 42, 0.08);
  --shadow-amber: 0 8px 20px -4px rgba(245, 158, 11, 0.25);

  /* Transitions */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;
}

/* ==========================================================================
   2. GLOBAL BASE & RESETS
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-main) !important;
  color: var(--slate-800);
  background-color: #f8fafc;
  line-height: 1.5;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--slate-100);
}

::-webkit-scrollbar-thumb {
  background: var(--slate-300);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--slate-400);
}

/* Text Selection */
::selection {
  background: var(--primary-light);
  color: var(--primary-dark);
}

/* ==========================================================================
   3. TYPOGRAPHY & HEADINGS
   ========================================================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-main);
  color: var(--slate-900);
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 0.5rem 0;
  letter-spacing: -0.02em;
}

p {
  margin: 0 0 1rem 0;
  color: var(--slate-600);
}

a {
  color: var(--primary-dark);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-hover);
}

/* ==========================================================================
   4. BUTTONS & INTERACTIVE ELEMENTS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-main);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-normal);
  white-space: nowrap;
  user-select: none;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary-dark) 100%);
  color: var(--white);
  box-shadow: var(--shadow-amber);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--white);
  color: var(--slate-700);
  border-color: var(--slate-200);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
  background: var(--slate-50);
  color: var(--slate-900);
  border-color: var(--slate-300);
  transform: translateY(-1px);
}

.btn-dark {
  background: var(--slate-900);
  color: var(--white);
  border-color: var(--slate-800);
}

.btn-dark:hover {
  background: var(--slate-800);
  color: var(--white);
  transform: translateY(-1px);
}

/* ==========================================================================
   5. CARDS & CONTAINER COMPONENTS
   ========================================================================== */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--slate-200);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  position: relative;
}

.card:hover {
  border-color: var(--slate-300);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

/* Interactive Service Card */
.service-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.service-card:hover {
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.service-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
  transition: background var(--transition-normal);
}

.service-card:hover::after {
  background: linear-gradient(90deg, var(--primary), var(--primary-hover));
}

/* Service Card Icon Box */
.service-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-50);
  border: 1px solid rgba(245, 158, 11, 0.2);
  color: var(--primary-dark);
  font-size: 1.25rem;
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.service-card:hover .service-icon-box {
  transform: scale(1.08);
}

/* ==========================================================================
   6. BADGES, CHIPS & TAGS
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.2;
}

.badge-amber {
  background: var(--primary-light);
  color: var(--primary-dark);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.badge-emerald {
  background: var(--emerald-50);
  color: var(--emerald-700);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-blue {
  background: var(--blue-50);
  color: var(--blue-700);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.badge-slate {
  background: var(--slate-100);
  color: var(--slate-700);
  border: 1px solid var(--slate-200);
}

/* Filter Chips (Like in service.php / hub.php) */
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--slate-600);
  background: var(--white);
  border: 1px solid var(--slate-200);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}

.filter-chip:hover {
  background: var(--slate-50);
  color: var(--slate-900);
  border-color: var(--slate-300);
}

.filter-chip.active {
  background: var(--primary-dark);
  color: var(--white);
  border-color: var(--primary-dark);
  box-shadow: 0 2px 6px rgba(180, 83, 9, 0.25);
}

/* ==========================================================================
   7. GLASSMORPHISM & BLUR EFFECTS
   ========================================================================== */
.glass {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.glass-dark {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   8. UNIFIED COMPACT HERO DESIGN SYSTEM (RUMREN STANDARD)
   Standardized hero banner component across all pages (Service, Accounts, Admin, etc.)
   ========================================================================== */

/* Canonical Container & Legacy Aliases */
.rumren-hero-slim,
.services-hero-slim,
.accounts-hero-slim,
.admin-hero-slim {
  width: 100% !important;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 65%, #312e81 100%) !important;
  border: 1px solid #334155 !important;
  border-radius: 7px !important;
  padding: 10px 14px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  box-sizing: border-box !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

@media (max-width: 680px) {

  .rumren-hero-slim,
  .services-hero-slim,
  .accounts-hero-slim,
  .admin-hero-slim {
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 8px 10px !important;
    gap: 6px !important;
  }
}

/* Left Content Cluster */
.hero-left,
.services-hero-left,
.accounts-hero-left,
.admin-hero-left {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  text-align: left !important;
  gap: 2px !important;
  min-width: 0 !important;
}

/* 1. Top Capsule Badge (Standardized High-Contrast Red Glow) */
.hero-badge-capsule,
.services-badge-capsule,
.accounts-badge-capsule,
.admin-badge-capsule {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  width: fit-content !important;
  background: rgba(169, 68, 56, 0.2) !important;
  border: 1px solid rgba(239, 68, 68, 0.35) !important;
  color: #fca5a5 !important;
  font-size: 0.58rem !important;
  font-weight: 800 !important;
  padding: 2px 7px !important;
  border-radius: 4px !important;
  letter-spacing: 0.4px !important;
  line-height: 1 !important;
  text-transform: uppercase !important;
  margin-bottom: 2px !important;
}

/* Pulsing Red Indicator Dot */
.hero-badge-dot,
.services-badge-dot,
.accounts-badge-dot,
.admin-badge-dot {
  width: 5px !important;
  height: 5px !important;
  border-radius: 50% !important;
  background: #ef4444 !important;
  box-shadow: 0 0 0 1.5px rgba(239, 68, 68, 0.35) !important;
  display: inline-block !important;
  flex-shrink: 0 !important;
}

/* 2. Main Title (H1) */
.hero-title,
.services-hero-title,
.accounts-hero-title,
.admin-hero-title {
  font-size: 1.05rem !important;
  font-weight: 900 !important;
  color: #ffffff !important;
  margin: 0 !important;
  letter-spacing: -0.2px !important;
  line-height: 1.25 !important;
}

@media (min-width: 768px) {

  .hero-title,
  .services-hero-title,
  .accounts-hero-title,
  .admin-hero-title {
    font-size: 1.1rem !important;
  }
}

/* 3. Subtitle / One-Sentence Description */
.hero-subtitle,
.services-hero-subtitle,
.accounts-hero-subtitle,
.admin-hero-subtitle {
  font-size: 0.68rem !important;
  color: #cbd5e1 !important;
  margin: 0 !important;
  line-height: 1.35 !important;
}

/* Right Content / Metadata Chips Bar */
.hero-right,
.services-hero-right,
.accounts-hero-right,
.admin-hero-right {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-wrap: nowrap !important;
  font-size: 0.64rem !important;
  font-weight: 600 !important;
  color: #94a3b8 !important;
  flex-shrink: 0 !important;
}

@media (max-width: 680px) {

  .hero-right,
  .services-hero-right,
  .accounts-hero-right,
  .admin-hero-right {
    width: 100% !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    border-top: 1px dashed rgba(255, 255, 255, 0.12) !important;
    padding-top: 5px !important;
    padding-bottom: 2px !important;
    gap: 6px !important;
  }

  .hero-right::-webkit-scrollbar,
  .services-hero-right::-webkit-scrollbar,
  .accounts-hero-right::-webkit-scrollbar,
  .admin-hero-right::-webkit-scrollbar {
    display: none !important;
  }
}

/* 4. Metadata Chip (Optical Baseline Alignment) */
.hero-chip,
.acc-chip {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  white-space: nowrap !important;
  line-height: 1 !important;
  font-size: 0.64rem !important;
  font-weight: 600 !important;
  color: #94a3b8 !important;
  flex-shrink: 0 !important;
}

/* Precise optical baseline centering: moves icon down to align with Outfit font x-height */
.hero-chip svg,
.hero-chip i,
.acc-chip svg,
.acc-chip i {
  width: 12px !important;
  height: 12px !important;
  color: #38bdf8 !important;
  display: inline-block !important;
  vertical-align: middle !important;
  flex-shrink: 0 !important;
  position: relative !important;
  top: 1.5px !important;
}

/* Bullet Separator between Chips */
.hero-chip-sep,
.acc-chip-sep {
  color: #475569 !important;
  font-size: 0.55rem !important;
  display: inline-flex !important;
  align-items: center !important;
  line-height: 1 !important;
  flex-shrink: 0 !important;
  position: relative !important;
  top: 0.5px !important;
}

/* ==========================================================================
   9. SSO GATEWAY STATUS & PULSE INDICATORS
   ========================================================================== */
.status-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
}

.status-indicator.active {
  background: var(--emerald-500);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}

.status-indicator.maintenance {
  background: var(--primary);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.25);
}

/* ==========================================================================
   10. RESPONSIVE UTILITIES & MICRO ADJUSTMENTS
   ========================================================================== */
@media (max-width: 640px) {
  .card {
    padding: 1.125rem;
  }

  .service-card {
    padding: 1rem;
  }

  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
  }
}