/**
 * Manage Materials page – styled, responsive, accessible.
 * Proconix – Materials management landing.
 */

:root {
  --mm-bg: #f1f5f9;
  --mm-card: #ffffff;
  --mm-text: #0f172a;
  --mm-text-muted: #475569;
  --mm-border: #e2e8f0;
  --mm-primary: #1e3a5f;
  --mm-primary-hover: #152a47;
  --mm-accent: #2563eb;
  --mm-accent-hover: #1d4ed8;
  --mm-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  --mm-shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.08);
  --mm-radius: 12px;
  --mm-radius-sm: 8px;
}

/* Skip link (a11y) */
.skip-link {
  position: absolute;
  top: -3rem;
  left: 1rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: var(--mm-primary);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--mm-radius-sm);
  transition: top 0.2s;
}
.skip-link:focus {
  top: 1rem;
  outline: 2px solid var(--mm-accent);
  outline-offset: 2px;
}

.manage-materials-page {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--mm-bg);
  color: var(--mm-text);
  min-height: 100vh;
  margin: 0;
  line-height: 1.5;
}

/* Header */
.mm-header {
  background: var(--mm-card);
  box-shadow: var(--mm-shadow);
  padding: 0.875rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 50;
}
.mm-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.mm-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--mm-text);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.mm-logo:hover {
  color: var(--mm-primary);
}
.mm-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.mm-nav a {
  color: var(--mm-text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
}
.mm-nav a:hover {
  color: var(--mm-primary);
}

/* Main */
.mm-main {
  flex: 1;
}

/* Hero */
.mm-hero {
  background: linear-gradient(135deg, var(--mm-primary) 0%, #2d4a6f 100%);
  color: #fff;
  padding: 3rem 1.5rem 4rem;
  text-align: center;
}
.mm-hero-inner {
  max-width: 640px;
  margin: 0 auto;
}
.mm-hero-title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  margin: 0 0 1rem 0;
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.mm-hero-lead {
  font-size: 1.125rem;
  opacity: 0.95;
  margin: 0 0 1.75rem 0;
  line-height: 1.6;
}
.mm-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--mm-radius-sm);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  border: none;
}
.mm-btn:focus {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 2px;
}
.mm-btn-primary {
  background: #fff;
  color: var(--mm-primary);
}
.mm-btn-primary:hover {
  background: #f1f5f9;
  color: var(--mm-primary-hover);
}

/* Section */
.mm-section {
  padding: 3rem 1.5rem;
}
.mm-container {
  max-width: 1100px;
  margin: 0 auto;
}
.mm-section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 1.5rem 0;
  color: var(--mm-text);
  text-align: center;
}

/* Feature grid */
.mm-feature-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}
.mm-feature-card {
  background: var(--mm-card);
  border-radius: var(--mm-radius);
  padding: 1.5rem;
  box-shadow: var(--mm-shadow);
  border: 1px solid var(--mm-border);
  transition: box-shadow 0.2s, border-color 0.2s;
}
.mm-feature-card:hover {
  box-shadow: var(--mm-shadow-lg);
  border-color: #cbd5e1;
}
.mm-feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: rgba(30, 58, 95, 0.08);
  color: var(--mm-primary);
  border-radius: var(--mm-radius-sm);
  font-size: 1.25rem;
  margin-bottom: 1rem;
}
.mm-feature-title {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  color: var(--mm-text);
}
.mm-feature-desc {
  font-size: 0.9375rem;
  color: var(--mm-text-muted);
  margin: 0;
  line-height: 1.5;
}

/* CTA section */
.mm-cta {
  background: var(--mm-card);
  border-top: 1px solid var(--mm-border);
}
.mm-cta-inner {
  text-align: center;
}
.mm-cta-title {
  font-size: 1.375rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  color: var(--mm-text);
}
.mm-cta-text {
  color: var(--mm-text-muted);
  margin: 0 auto 1.5rem auto;
  max-width: 480px;
}
.mm-btn-secondary {
  background: var(--mm-accent);
  color: #fff;
}
.mm-btn-secondary:hover {
  background: var(--mm-accent-hover);
  color: #fff;
}

/* Footer */
.mm-footer {
  background: var(--mm-text);
  color: #94a3b8;
  padding: 2rem 1.5rem;
  margin-top: 0;
}
.mm-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}
.mm-footer-brand {
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
}
.mm-footer-copy {
  font-size: 0.875rem;
  margin: 0 0 1rem 0;
}
.mm-footer-links {
  margin: 0;
  font-size: 0.875rem;
}
.mm-footer-links a {
  color: #94a3b8;
  text-decoration: none;
  margin: 0 0.75rem;
}
.mm-footer-links a:hover {
  color: #fff;
}

/* Responsive */
@media (max-width: 640px) {
  .mm-hero {
    padding: 2rem 1rem 3rem;
  }
  .mm-nav {
    width: 100%;
    justify-content: flex-end;
  }
  .mm-section {
    padding: 2rem 1rem;
  }
  .mm-feature-grid {
    grid-template-columns: 1fr;
  }
}
