/* =========================================================
   QRly Policy & Documentation Portal Stylesheet
   Modern, Clean, Glassmorphism, Google Play Compliant
   ========================================================= */

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

:root {
  --primary: #05D6A4;
  --primary-light: #25E88E;
  --primary-dark: #00A880;
  --accent: #4F46E5;
  --bg-dark: #0A0F1D;
  --bg-card: rgba(22, 30, 49, 0.75);
  --bg-card-hover: rgba(30, 41, 67, 0.85);
  --border: rgba(255, 255, 255, 0.1);
  --border-focus: rgba(5, 214, 164, 0.4);
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --badge-bg: rgba(5, 214, 164, 0.12);
  --badge-text: #05D6A4;
  --danger-bg: rgba(239, 68, 68, 0.12);
  --danger-text: #F87171;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.35);
  --glow: 0 0 25px rgba(5, 214, 164, 0.25);
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Ambient Background Glows */
body::before,
body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}

body::before {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(5, 214, 164, 0.15) 0%, transparent 70%);
  top: -150px;
  left: 20%;
}

body::after {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.12) 0%, transparent 70%);
  bottom: -100px;
  right: 15%;
}

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

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

/* Header & Navigation */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(10, 15, 29, 0.82);
  border-bottom: 1px solid var(--border);
}

.navbar {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(5, 214, 164, 0.3);
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.brand-badge {
  background: var(--badge-bg);
  color: var(--badge-text);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-left: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

/* Main Container */
main {
  flex: 1;
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
  padding: 48px 24px 80px;
  position: relative;
  z-index: 1;
}

/* Hero Section */
.hero {
  text-align: center;
  margin-bottom: 48px;
}

.hero-icon {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  box-shadow: var(--glow), var(--shadow-lg);
  margin-bottom: 20px;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #FFFFFF 0%, #94A3B8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 16px;
}

.meta-chip .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--primary);
  box-shadow: 0 0 8px var(--primary);
}

/* Glass Card */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  box-shadow: var(--shadow-lg);
  margin-bottom: 32px;
}

/* Policy Content Formatting */
.policy-content section {
  margin-bottom: 36px;
}

.policy-content h2 {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.policy-content h3 {
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--primary-light);
  margin: 20px 0 10px;
}

.policy-content p {
  color: var(--text-secondary);
  margin-bottom: 14px;
  font-size: 0.98rem;
}

.policy-content ul,
.policy-content ol {
  color: var(--text-secondary);
  padding-left: 24px;
  margin-bottom: 18px;
}

.policy-content li {
  margin-bottom: 8px;
  font-size: 0.96rem;
}

.policy-content strong {
  color: var(--text-primary);
}

/* Callout Box */
.callout {
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin: 20px 0;
  border: 1px solid;
  font-size: 0.94rem;
}

.callout.success {
  background: rgba(5, 214, 164, 0.08);
  border-color: rgba(5, 214, 164, 0.25);
  color: #A7F3D0;
}

.callout.warning {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.25);
  color: #FDE68A;
}

.callout.info {
  background: rgba(79, 70, 229, 0.08);
  border-color: rgba(79, 70, 229, 0.25);
  color: #C7D2FE;
}

/* Grid Cards (for home portal) */
.portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.portal-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
}

.portal-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-focus);
  background: var(--bg-card-hover);
  box-shadow: var(--glow), var(--shadow-lg);
}

.portal-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.icon-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(5, 214, 164, 0.12);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.portal-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.portal-card p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-bottom: 20px;
}

.card-link {
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Step list for deletion */
.step-list {
  counter-reset: steps;
  list-style: none;
  padding: 0;
  margin: 24px 0;
}

.step-item {
  position: relative;
  padding-left: 54px;
  margin-bottom: 24px;
}

.step-item::before {
  counter-increment: steps;
  content: counter(steps);
  position: absolute;
  left: 0;
  top: 0;
  width: 38px;
  height: 38px;
  background: rgba(5, 214, 164, 0.12);
  border: 1px solid rgba(5, 214, 164, 0.3);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
}

.step-item h4 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

/* Action button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #0A0F1D;
  box-shadow: 0 4px 14px rgba(5, 214, 164, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(5, 214, 164, 0.5);
  color: #0A0F1D;
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  background: rgba(10, 15, 29, 0.95);
  padding: 32px 24px;
  text-align: center;
  margin-top: auto;
  position: relative;
  z-index: 1;
}

.footer-content {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.88rem;
}

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

.footer-copy {
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* Responsive */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    gap: 14px;
  }
  
  .glass-card {
    padding: 24px 20px;
  }
  
  .hero h1 {
    font-size: 1.85rem;
  }
}
