/* ==========================================================================
   E-Book Shop - Modern Design System
   Matches UI Mockups and Assignment Requirements (Vibe Coding E-Book Shop)
   ========================================================================== */

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

:root {
  --primary: #1d5bd8;
  --primary-hover: #154bb3;
  --primary-light: #eff6ff;
  --primary-border: #bfdbfe;
  
  --secondary: #0ea5e9;
  --success: #10b981;
  --success-bg: #ecfdf5;
  --success-border: #a7f3d0;
  --success-text: #047857;

  --warning-bg: #fef3c7;
  --warning-border: #fcd34d;
  --warning-text: #92400e;
  
  --danger: #ef4444;
  --danger-light: #fee2e2;

  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  --border-color: #e2e8f0;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 12px 35px rgba(29, 91, 216, 0.15);

  --font-base: 'Prompt', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --max-w: 1120px;
}

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

body {
  font-family: var(--font-base);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* Base Link & Button Resets */
a {
  color: var(--primary);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  text-decoration: none;
  opacity: 0.85;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
  background: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ==========================================================================
   Header & Navigation (Navbar)
   ========================================================================== */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

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

.nav-link {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 400;
  padding: 0.4rem 0.2rem;
  position: relative;
  cursor: pointer;
  transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  transition: background 0.2s;
  position: relative;
}

.icon-btn:hover {
  background: var(--bg-subtle);
  color: var(--primary);
}

.cart-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--primary);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* ==========================================================================
   Main Container & View Switcher
   ========================================================================== */
.main-content {
  flex: 1;
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.app-view {
  display: none;
  animation: fadeIn 0.25s ease forwards;
}

.app-view.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Screen 1: Hero Banner & Homepage
   ========================================================================== */
.hero-banner {
  background: linear-gradient(135deg, #e8f0fe 0%, #dbeafe 100%);
  border-radius: var(--radius-lg);
  padding: 3rem 3.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.hero-text {
  max-width: 540px;
  z-index: 2;
}

.hero-title {
  font-size: 2.3rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
  margin-bottom: 0.8rem;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 1.8rem;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.75rem 1.8rem;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 14px rgba(29, 91, 216, 0.3);
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(29, 91, 216, 0.4);
}

.hero-graphic {
  max-width: 320px;
  width: 100%;
  position: relative;
  z-index: 2;
}

.hero-graphic img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  filter: drop-shadow(0 15px 25px rgba(29, 91, 216, 0.15));
}

/* Books Grid & Catalog Filters */
.catalog-section-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

@media (min-width: 768px) {
  .catalog-section-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.category-filter-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  -webkit-overflow-scrolling: touch;
}

.cat-pill {
  padding: 0.45rem 1rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  user-select: none;
}

.cat-pill:hover {
  border-color: var(--primary-border);
  color: var(--primary);
  background: var(--bg-subtle);
}

.cat-pill.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 3px 10px rgba(29, 91, 216, 0.25);
}

.section-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.book-category-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--primary);
  background: rgba(29, 91, 216, 0.08);
  padding: 0.22rem 0.6rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.55rem;
  align-self: flex-start;
  letter-spacing: 0.01em;
}

.book-original-price {
  font-size: 0.88rem;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-left: 0.35rem;
}

.btn-sample-preview {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--primary-border);
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-sample-preview:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-1px);
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.book-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
}

.book-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-border);
}

.book-cover-wrap {
  width: 100%;
  aspect-ratio: 3/4;
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.book-cover-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.book-card:hover .book-cover-wrap img {
  transform: scale(1.03);
}

.book-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.book-title {
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.35rem;
  line-height: 1.35;
}

.book-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.4;
  flex: 1;
}

.book-price-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.book-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

.book-price-currency {
  color: var(--text-muted);
  font-weight: 500;
}

.btn-card {
  width: 100%;
  background: var(--primary);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-md);
  text-align: center;
  transition: background 0.2s;
}

.btn-card:hover {
  background: var(--primary-hover);
}

/* ==========================================================================
   Screen 2: Book Details View
   ========================================================================== */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 1.8rem;
  cursor: pointer;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 3.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
}

.detail-gallery {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.detail-main-img {
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: var(--bg-subtle);
}

.detail-main-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0d1117;
}

.detail-thumbnails {
  display: flex;
  gap: 0.6rem;
}

.thumb-item {
  width: 60px;
  height: 80px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.7;
  transition: all 0.2s;
}

.thumb-item.active,
.thumb-item:hover {
  border-color: var(--primary);
  opacity: 1;
}

.thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-info {
  display: flex;
  flex-direction: column;
}

.detail-title {
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.detail-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.detail-price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.8rem;
}

.rating-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.stars {
  color: #f59e0b;
  letter-spacing: 2px;
}

.detail-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.badges-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.feature-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  color: var(--text-main);
}

.feature-badge-icon {
  color: var(--primary);
  font-size: 1rem;
}

.quantity-add-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: auto;
}

.quantity-picker {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  overflow: hidden;
}

.qty-btn {
  width: 40px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--text-main);
  transition: background 0.2s;
}

.qty-btn:hover {
  background: var(--bg-subtle);
}

.qty-input {
  width: 45px;
  height: 44px;
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  outline: none;
  background: transparent;
}

.btn-add-cart {
  flex: 1;
  background: var(--primary);
  color: #fff;
  height: 44px;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 14px rgba(29, 91, 216, 0.3);
  transition: all 0.2s;
}

.btn-add-cart:hover {
  background: var(--primary-hover);
}

/* ==========================================================================
   Screen 3: Cart & Customer Info (Checkout)
   ========================================================================== */
.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2.5rem;
  gap: 1.5rem;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
  color: var(--text-light);
}

.step-number {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.85rem;
}

.step-item.active {
  color: var(--primary);
  font-weight: 600;
}

.step-item.active .step-number {
  background: var(--primary);
  color: #fff;
}

.step-divider {
  width: 60px;
  height: 2px;
  background: var(--border-color);
}

.checkout-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  box-shadow: var(--shadow-sm);
}

.checkout-box-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.cart-items-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
}

.cart-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color);
}

.cart-item-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.cart-item-img {
  width: 50px;
  height: 68px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.cart-item-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.cart-item-price {
  font-weight: 600;
  font-size: 1rem;
  min-width: 80px;
  text-align: right;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0;
  font-size: 1.15rem;
  font-weight: 700;
  border-bottom: 2px dashed var(--border-color);
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 0.45rem;
  color: var(--text-main);
}

.form-label span {
  color: var(--danger);
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
  background: #fff;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(29, 91, 216, 0.1);
}

.btn-checkout {
  width: 100%;
  background: var(--primary);
  color: #fff;
  padding: 0.9rem;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(29, 91, 216, 0.3);
  transition: all 0.2s;
  margin-top: 1rem;
}

.btn-checkout:hover {
  background: var(--primary-hover);
}

/* ==========================================================================
   Screen 4: Mock Payment (DEMO ONLY)
   ========================================================================== */
.payment-card {
  max-width: 520px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  box-shadow: var(--shadow-md);
}

.demo-warning-banner {
  background: var(--warning-bg);
  border: 1.5px solid var(--warning-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
  margin-bottom: 1.8rem;
}

.demo-warning-title {
  color: var(--warning-text);
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.demo-warning-text {
  color: var(--warning-text);
  font-size: 0.92rem;
  font-weight: 500;
}

.order-summary-box {
  margin-bottom: 2rem;
}

.order-summary-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
}

.order-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.95rem;
}

.order-detail-row:last-child {
  border-bottom: none;
}

.order-detail-label {
  color: var(--text-muted);
}

.order-detail-value {
  font-weight: 600;
  color: var(--text-main);
}

.btn-mock-pay {
  width: 100%;
  background: var(--primary);
  color: #fff;
  padding: 1rem;
  border-radius: var(--radius-md);
  font-size: 1.05rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  box-shadow: 0 4px 14px rgba(29, 91, 216, 0.35);
  transition: all 0.2s;
  margin-bottom: 1.25rem;
}

.btn-mock-pay:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.back-edit-link {
  display: block;
  text-align: center;
  color: var(--primary);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
}

/* ==========================================================================
   Screen 5: Order Status / Tracking
   ========================================================================== */
.tracking-card {
  max-width: 540px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  box-shadow: var(--shadow-sm);
}

.tracking-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.tracking-form {
  margin-bottom: 1.8rem;
}

.btn-search {
  width: 100%;
  background: var(--primary);
  color: #fff;
  padding: 0.85rem;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  margin-top: 0.75rem;
}

.btn-search:hover {
  background: var(--primary-hover);
}

.status-result-box {
  margin-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
}

.status-badge-card {
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.status-check-circle {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--success);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.status-text-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--success-text);
  line-height: 1.3;
}

.status-date {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Screen 6: Email Sent & Delivery Success
   ========================================================================== */
.success-card {
  max-width: 540px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  box-shadow: var(--shadow-md);
  text-align: center;
}

.envelope-icon-wrap {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background: #f0fdf4;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.envelope-icon {
  font-size: 2.4rem;
}

.envelope-check {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 26px;
  height: 26px;
  background: var(--success);
  color: #fff;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  border: 2px solid #fff;
}

.success-title {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.6rem;
}

.success-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* Mock Email Inbox Preview */
.mock-email-container {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-top: 1.25rem;
  margin-bottom: 1.75rem;
  text-align: left;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.mock-email-header {
  background: #f8fafc;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.mock-email-meta-row {
  display: flex;
  gap: 0.5rem;
  font-size: 0.88rem;
  margin-bottom: 0.35rem;
  color: #334155;
}

.mock-email-meta-label {
  font-weight: 600;
  min-width: 55px;
  color: #64748b;
}

.mock-email-body {
  padding: 1.4rem 1.25rem;
  font-size: 0.92rem;
  line-height: 1.65;
  color: #1e293b;
}

.mock-email-items-list {
  background: #f1f5f9;
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  margin: 1rem 0;
}

.mock-email-item-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  padding: 0.35rem 0;
  border-bottom: 1px dashed #cbd5e1;
}

.mock-email-item-row:last-child {
  border-bottom: none;
  font-weight: 700;
  padding-top: 0.5rem;
}

.download-link-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 2rem;
  text-align: left;
}

.download-link-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.download-url {
  font-family: monospace;
  font-size: 0.85rem;
  color: var(--primary);
  word-break: break-all;
  display: block;
  margin-bottom: 0.6rem;
}

.download-expiry-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-test-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: #fff;
  border: 1px solid var(--primary-border);
  color: var(--primary);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  margin-top: 0.8rem;
  transition: all 0.2s;
}

.btn-test-download:hover {
  background: var(--primary-light);
}

.btn-return-home {
  width: 100%;
  background: var(--primary);
  color: #fff;
  padding: 0.85rem;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  transition: background 0.2s;
}

.btn-return-home:hover {
  background: var(--primary-hover);
}

/* ==========================================================================
   Modals & Notifications (Toasts)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1.5rem;
}

.modal-backdrop.open {
  display: flex;
}

.modal-card {
  background: #fff;
  border-radius: var(--radius-lg);
  max-width: 500px;
  width: 100%;
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  position: relative;
  animation: modalPop 0.2s ease forwards;
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  font-size: 1.4rem;
  color: var(--text-light);
  cursor: pointer;
}

.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #1e293b;
  color: #fff;
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
  z-index: 150;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}
