/* ============================================================
   Shyam Dairy Business Management System — Presentation Styles
   ============================================================ */

/* --- Custom Properties --- */
:root {
  --color-primary: #1e3a5f;
  --color-primary-light: #2d5a8e;
  --color-accent: #f59e0b;
  --color-accent-light: #fbbf24;
  --color-bg: #fafafa;
  --color-card: #ffffff;
  --color-text: #1e293b;
  --color-text-light: #64748b;
  --color-border: #e2e8f0;
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;
  --font-stack: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
  --radius: 12px;
  --max-width: 1200px;
}

/* --- Reset + Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  font-family: var(--font-stack);
  color: var(--color-text);
  line-height: 1.6;
  scroll-behavior: smooth;
}

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

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

h1, h2, h3, h4, h5, h6 {
  margin: 0;
}

p {
  margin: 0;
}

/* --- Navbar --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 64px;
  z-index: 100;
}

.navbar .nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  width: 100%;
  padding: 0 2rem;
}

.navbar .logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
}

.navbar .nav-links {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.navbar .nav-links a {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--color-text-light);
  transition: all 0.2s;
  text-decoration: none;
}

.navbar .nav-links a:hover {
  color: var(--color-primary);
  background: rgba(30, 58, 95, 0.05);
}

.navbar .nav-links a.active {
  color: var(--color-primary);
  font-weight: 600;
  background: rgba(30, 58, 95, 0.08);
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

/* --- Page Container --- */
.page-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 2rem 0;
  padding-top: 96px;
}

/* --- Breadcrumb --- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-text-light);
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: var(--color-text-light);
}

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

.breadcrumb .separator {
  margin: 0 0.25rem;
}

/* --- Hero Section --- */
.hero {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem;
  background: linear-gradient(135deg, #f0f4f8 0%, #e8edf5 50%, #fef9f0 100%);
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: 1rem;
  max-width: 800px;
  line-height: 1.2;
}

.hero .tagline {
  font-size: 1.25rem;
  color: var(--color-text-light);
  max-width: 600px;
  margin-bottom: 3rem;
  line-height: 1.6;
}

.hero .role-cards {
  display: flex;
  gap: 2rem;
  margin-top: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* --- Cards --- */
.card {
  background: var(--color-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 2rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  color: var(--color-accent);
}

.card-icon svg {
  width: 100%;
  height: 100%;
}

.card h3 {
  color: var(--color-primary);
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.card p {
  color: var(--color-text-light);
  font-size: 0.95rem;
  line-height: 1.6;
}

.card ul {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
}

.card ul li {
  padding: 0.3rem 0;
  padding-left: 1.25rem;
  position: relative;
  color: var(--color-text-light);
  font-size: 0.9rem;
}

.card ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
}

/* --- Role Cards (Hero) --- */
.role-card {
  background: var(--color-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 2rem;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  text-align: center;
  min-width: 260px;
  max-width: 300px;
  text-decoration: none;
  display: block;
  color: inherit;
}

.role-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  color: inherit;
}

.role-card .role-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  color: var(--color-accent);
}

.role-card .role-icon svg {
  width: 100%;
  height: 100%;
}

.role-card h3 {
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
  color: var(--color-primary);
}

.role-card p {
  font-size: 0.95rem;
  color: var(--color-text-light);
}

/* --- Section Layouts --- */
.section {
  padding: 4rem 0;
}

.section + .section {
  border-top: 1px solid var(--color-border);
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: 2rem;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.section-header p {
  color: var(--color-text-light);
  max-width: 700px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.6;
}

/* --- Page Header (Inner Pages) --- */
.page-header {
  padding: 2rem 0 3rem;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 2rem;
}

.page-header h1 {
  font-size: 2.5rem;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
  font-weight: 800;
}

.page-header p {
  color: var(--color-text-light);
  font-size: 1.1rem;
  max-width: 700px;
  line-height: 1.6;
}

/* --- Module Grids --- */
.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

/* --- Stat Cards --- */
.stat-grid {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.stat-card {
  background: var(--color-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem 2rem;
  text-align: center;
  min-width: 160px;
}

.stat-card .stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-accent);
  display: block;
}

.stat-card .stat-label {
  color: var(--color-text-light);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}

/* --- Flow Diagrams --- */
.flow-diagram {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  padding: 2rem 0;
  flex-wrap: nowrap;
}

.flow-step {
  background: var(--color-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  min-width: 120px;
  max-width: 160px;
  text-align: center;
  padding: 1rem;
  position: relative;
  flex-shrink: 0;
}

.flow-step .step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-accent);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.flow-step h4 {
  font-size: 0.9rem;
  color: var(--color-primary);
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.flow-step p {
  font-size: 0.8rem;
  color: var(--color-text-light);
}

.flow-arrow {
  width: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--color-accent);
  font-size: 1.1rem;
  font-weight: 700;
}

/* --- Journey Section --- */
.journey {
  margin-bottom: 3rem;
}

.journey h3 {
  font-size: 1.25rem;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.journey > p {
  color: var(--color-text-light);
  margin-bottom: 1rem;
  font-style: italic;
}

/* --- Callout Box --- */
.callout {
  background: #fffbeb;
  border-left: 4px solid var(--color-accent);
  padding: 1.5rem 2rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 2rem;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--color-text);
}

.callout.info {
  background: #eff6ff;
  border-left-color: var(--color-primary-light);
}

.callout code {
  background: rgba(0, 0, 0, 0.06);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

/* --- Dashboard Preview --- */
.dashboard-preview {
  background: var(--color-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 2rem;
  margin-bottom: 2rem;
}

.dashboard-preview .kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.kpi-card {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
}

.kpi-card .kpi-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  display: block;
}

.kpi-card .kpi-label {
  font-size: 0.75rem;
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.dashboard-preview .dashboard-description {
  color: var(--color-text-light);
  font-size: 0.95rem;
}

.quick-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.quick-action-btn {
  background: var(--color-primary);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: default;
  opacity: 0.85;
}

/* --- Badge --- */
.badge {
  display: inline-block;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  vertical-align: middle;
  margin-left: 0.5rem;
}

.badge-functional {
  background: #d1fae5;
  color: #065f46;
}

.badge-demo {
  background: #fef3c7;
  color: #92400e;
}

/* --- Navigation Footer --- */
.page-nav {
  display: flex;
  justify-content: space-between;
  padding: 3rem 0;
  border-top: 1px solid var(--color-border);
  margin-top: 4rem;
}

.page-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  background: var(--color-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--color-primary);
  font-weight: 600;
  transition: all 0.2s;
}

.page-nav a:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  color: var(--color-primary);
}

.page-nav a .arrow {
  transition: transform 0.2s;
}

.page-nav a:hover .arrow-left {
  transform: translateX(-4px);
}

.page-nav a:hover .arrow-right {
  transform: translateX(4px);
}

/* --- Entity Diagram (Flows Page) --- */
.entity-diagram {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  padding: 2rem 0;
}

.entity-node {
  background: var(--color-card);
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  text-align: center;
  min-width: 140px;
}

.entity-node.primary {
  border-color: var(--color-primary);
}

.entity-node h4 {
  color: var(--color-primary);
  font-size: 0.95rem;
}

.entity-node p {
  color: var(--color-text-light);
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

.entity-connector {
  display: flex;
  align-items: center;
  color: var(--color-text-light);
  font-size: 0.85rem;
}

/* --- Feature List (Flows Page) --- */
.feature-list {
  list-style: none;
  padding: 0;
}

.feature-list li {
  display: flex;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--color-border);
  align-items: flex-start;
}

.feature-list li:last-child {
  border-bottom: none;
}

.feature-list .feature-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  color: var(--color-accent);
}

.feature-list .feature-icon svg {
  width: 100%;
  height: 100%;
}

.feature-list .feature-content h3 {
  font-size: 1.1rem;
  color: var(--color-primary);
  margin-bottom: 0.25rem;
}

.feature-list .feature-content p {
  color: var(--color-text-light);
  font-size: 0.95rem;
}

/* --- Closing Section --- */
.closing {
  text-align: center;
  padding: 4rem 0;
}

.closing h2 {
  font-size: 2rem;
  color: var(--color-primary);
  margin-bottom: 1rem;
}

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

.closing .cta-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background: var(--color-primary);
  color: white;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.closing .cta-link:hover {
  background: var(--color-primary-light);
  color: white;
  transform: translateY(-2px);
}

/* --- Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Architecture Diagram --- */
.arch-diagram {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  padding: 2rem;
  flex-wrap: wrap;
}

.arch-box {
  background: var(--color-card);
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  min-width: 200px;
}

.arch-box h4 {
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.arch-box p {
  font-size: 0.85rem;
  color: var(--color-text-light);
}

.arch-box.highlight {
  border-color: var(--color-accent);
}

.arch-connector {
  font-size: 1.5rem;
  color: var(--color-text-light);
}

/* --- Responsive (max-width: 768px) --- */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }

  .hero .role-cards {
    flex-direction: column;
    align-items: center;
  }

  .module-grid {
    grid-template-columns: 1fr;
  }

  .flow-diagram {
    justify-content: flex-start;
  }

  .flow-step {
    min-width: 140px;
  }

  .stat-grid {
    flex-direction: column;
    align-items: center;
  }

  .navbar .nav-links {
    display: none;
  }

  .navbar.nav-open .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: white;
    box-shadow: var(--shadow-md);
    padding: 1rem;
  }

  .hamburger {
    display: block;
  }

  .dashboard-preview .kpi-row {
    grid-template-columns: 1fr 1fr;
  }

  .page-nav {
    flex-direction: column;
    gap: 1rem;
  }

  .page-header h1 {
    font-size: 1.75rem;
  }

  .section-header h2 {
    font-size: 1.5rem;
  }
}
