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

:root {
  --primary: #2161E0;
  --primary-hover: #174cb8;
  --primary-light: #eff6ff;
  --dark: #0f172a;
  --text-main: #334155;
  --text-muted: #64748b;
  --bg-light: #f8fafc;
  --bg-card: #ffffff;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --radius: 12px;
  --radius-lg: 16px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font);
  color: var(--text-main);
  background-color: var(--bg-light);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Header */
.main-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: -0.025em;
}

.header-microcopy {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: -0.01em;
}

.logo-symbol {
  display: flex;
  align-items: center;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  text-decoration: none;
  color: var(--text-main);
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link:hover {
  color: var(--primary);
}

.nav-link svg {
  transition: var(--transition);
}

.nav-link:hover svg {
  transform: translateY(1px);
}

.cta-button {
  background-color: var(--primary);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 9999px;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
  box-shadow: 0 4px 10px rgba(33, 97, 224, 0.2);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.cta-button:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(33, 97, 224, 0.3);
}

/* Dashboard Hero */
.hero-section {
  padding: 5rem 2rem 3rem;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--primary-light);
  color: var(--primary);
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 9999px;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--dark);
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

.hero-description {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto;
}

/* Cards Section */
.cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 2.5rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem 6rem;
}

.layout-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.layout-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(33, 97, 224, 0.2);
}

.card-preview-area {
  height: 200px;
  background: linear-gradient(135deg, #e0f2fe 0%, #dbeafe 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.card-preview-area::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(rgba(33, 97, 224, 0.1) 1.5px, transparent 1.5px);
  background-size: 12px 12px;
}

.card-preview-graphic {
  z-index: 1;
  width: 70%;
  height: 130px;
  background: white;
  border-radius: 8px 8px 0 0;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transform: translateY(20px);
  transition: var(--transition);
}

.layout-card:hover .card-preview-graphic {
  transform: translateY(10px);
}

.graphic-header {
  height: 16px;
  background: #f1f5f9;
  border-bottom: 1px solid var(--border);
  padding: 0 6px;
  display: flex;
  align-items: center;
  gap: 3px;
}

.graphic-dot {
  width: 5px;
  height: 5px;
  background: #cbd5e1;
  border-radius: 50%;
}

.graphic-body {
  flex: 1;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.graphic-line {
  background: #f1f5f9;
  height: 8px;
  border-radius: 4px;
}

.graphic-line.w-full { width: 100%; }
.graphic-line.w-3-4 { width: 75%; }
.graphic-line.w-1-2 { width: 50%; }

.card-content {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.status-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.status-badge.pending {
  background-color: #fef3c7;
  color: #d97706;
}

.status-badge.approved {
  background-color: #dcfce7;
  color: #15803d;
}

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

.card-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.5rem;
}

.card-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  flex: 1;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
  margin-top: auto;
}

.btn-secondary {
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.btn-secondary:hover {
  color: var(--dark);
}

/* Footer */
.main-footer {
  text-align: center;
  padding: 3rem;
  border-top: 1px solid var(--border);
  background-color: white;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ==========================================================================
   Previewer Layout
   ========================================================================== */
.preview-body {
  overflow: hidden;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #0f172a; /* Dark background behind device previewer */
}

.preview-header {
  height: 48px;
  background-color: white;
  border-bottom: 1px solid var(--border);
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.back-link {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 500;
  font-size: 0.8rem;
  transition: var(--transition);
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
}

.back-link:hover {
  background-color: var(--bg-light);
  color: var(--primary);
}

.preview-title-container {
  text-align: center;
}

.preview-subtitle {
  font-size: 0.6rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  line-height: 1.2;
}

.preview-title {
  font-size: 0.85rem;
  color: var(--dark);
  font-weight: 600;
  line-height: 1.2;
}

.preview-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.device-divider {
  color: var(--border);
  font-weight: 300;
  user-select: none;
}

.fullscreen-link {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 500;
  font-size: 0.8rem;
  transition: var(--transition);
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
}

.fullscreen-link:hover {
  background-color: var(--bg-light);
  color: var(--primary);
}

.fullscreen-link svg {
  opacity: 0.8;
}

.device-controls {
  display: flex;
  background-color: var(--bg-light);
  border: 1px solid var(--border);
  padding: 2px;
  border-radius: 6px;
  gap: 2px;
}

.device-btn {
  background: none;
  border: none;
  padding: 0.3rem;
  border-radius: 4px;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.device-btn:hover {
  color: var(--dark);
  background-color: rgba(0, 0, 0, 0.03);
}

.device-btn.active {
  background-color: white;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.device-btn svg {
  width: 14px;
  height: 14px;
}

.iframe-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;
  position: relative;
}

.iframe-wrapper:has(.desktop) {
  padding: 0;
}

.iframe-container {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  background-color: white;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  position: relative;
}

/* Device Widths */
.iframe-container.desktop {
  width: 100%;
  height: 100%;
  border-radius: 0;
}

.iframe-container.tablet {
  width: 768px;
  height: 1024px;
  max-height: 100%;
  border: 10px solid #1e293b;
  border-radius: 20px;
}

.iframe-container.mobile {
  width: 375px;
  height: 667px;
  max-height: 100%;
  border: 10px solid #1e293b;
  border-radius: 28px;
}

.preview-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background-color: white;
}

/* Responsive Overrides */
@media (max-width: 768px) {
  .main-header {
    padding: 1rem;
  }
  .nav-menu {
    display: none; /* Hide header menu on small viewports for simplicity */
  }
  .hero-title {
    font-size: 2rem;
  }
}
