<?php
// manage.php — Dabil Manage Orders onboarding screen
// Matches the "Restaurant Operations, Simplified" design (manage.png)
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover">
<title>Manage Orders — Dabil</title>
<style>
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

  :root {
    --primary:        #2563EB;
    --primary-dark:   #1D4ED8;
    --primary-bg:     #EFF6FF;
    --text:           #0F172A;
    --text-muted:     #64748B;
    --text-light:     #94A3B8;
    --bg:             #F0F4FF;
    --card-bg:        #FFFFFF;
    --card-border:    #E8EEFF;
    --radius-card:    18px;
    --radius-icon:    14px;
    --shadow-card:    0 2px 12px rgba(37,99,235,.07);
  }

  html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: var(--bg);
    overflow-x: hidden;
    color: var(--text);
  }

  .page {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    max-width: 430px;
    margin: 0 auto;
    background: var(--bg);
    position: relative;
  }

  /* ── Hero ── */
  .hero {
    position: relative;
    flex-shrink: 0;
    height: 48vw;
    min-height: 230px;
    max-height: 330px;
    overflow: hidden;
    border-radius: 0 0 28px 28px;
    background: linear-gradient(135deg, #D6E4FF 0%, #EEF3FF 50%, #FFE4D6 100%);
    animation: heroIn .5s cubic-bezier(.22,1,.36,1) both;
  }

  @keyframes heroIn {
    from { opacity: 0; transform: translateY(-14px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  .hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
  }

  /* Fallback illustration */
  .hero-fallback {
    position: absolute; inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 20px;
  }

  .phone-mock {
    background: #fff;
    border-radius: 24px;
    width: 110px;
    height: 185px;
    box-shadow: 0 16px 40px rgba(37,99,235,.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
  }

  .pm-header {
    background: var(--primary);
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
  }

  .pm-header span {
    color: #fff;
    font-size: 7px;
    font-weight: 700;
    letter-spacing: .04em;
  }

  .pm-body {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
  }

  .pm-row {
    background: #EFF6FF;
    border-radius: 6px;
    height: 13px;
  }

  .pm-row.accent { background: var(--primary); }
  .pm-row.red    { background: #EF4444; }
  .pm-row.sm     { height: 10px; width: 60%; }
  .pm-row.xs     { height: 8px;  width: 40%; }

  .pm-badge {
    display: flex;
    gap: 4px;
    margin-top: 2px;
  }

  .pm-badge span {
    background: #DBEAFE;
    color: var(--primary);
    font-size: 6px;
    font-weight: 700;
    border-radius: 4px;
    padding: 2px 5px;
  }

  .pm-badge span.red { background: #FEE2E2; color: #EF4444; }

  .pm-stat {
    background: var(--primary);
    border-radius: 10px;
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 2px;
  }

  .pm-stat .big {
    color: #fff;
    font-size: 14px;
    font-weight: 800;
  }

  .pm-stat .label {
    color: rgba(255,255,255,.7);
    font-size: 6px;
    font-weight: 600;
    text-transform: uppercase;
  }

  .phone-mock.tilted  { transform: rotate(-7deg) translateX(-4px); }
  .phone-mock.tilted2 { transform: rotate(5deg)  translateX(4px) translateY(10px); }

  /* ── Content ── */
  .content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0 22px;
    background: var(--bg);
    position: relative;
    z-index: 2;
  }

  /* ── Back link ── */
  .back-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 18px 0 0;
    font-size: .82rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
  }

  /* ── Headline ── */
  .headline {
    text-align: center;
    padding: 26px 8px 22px;
  }

  .headline h1 {
    font-size: 1.72rem;
    font-weight: 800;
    letter-spacing: -.028em;
    line-height: 1.18;
    color: var(--text);
  }

  .headline h1 .accent {
    color: var(--primary);
    display: block;
  }

  .headline p {
    font-size: .875rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin-top: 9px;
  }

  /* ── Feature rows ── */
  .features {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 32px;
  }

  .feature {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: var(--card-bg);
    border-radius: var(--radius-card);
    padding: 16px 18px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--card-border);
  }

  .feature-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-icon);
    background: #EFF6FF;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid #DBEAFE;
  }

  .feature-icon svg { color: var(--primary); }

  .feature-body h3 {
    font-size: .97rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 3px;
  }

  .feature-body p {
    font-size: .795rem;
    color: var(--text-muted);
    line-height: 1.5;
  }

  /* ── CTA ── */
  .cta-wrap {
    margin-top: auto;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 28px);
  }

  .btn-primary {
    display: block;
    width: 100%;
    padding: 17px;
    background: var(--primary);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .01em;
    text-align: center;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(37,99,235,.35);
    transition: background .15s, transform .12s, box-shadow .15s;
    -webkit-tap-highlight-color: transparent;
  }

  .btn-primary:active {
    background: var(--primary-dark);
    transform: scale(.98);
    box-shadow: 0 2px 10px rgba(37,99,235,.25);
  }

  /* ── Animations ── */
  .anim-up {
    animation: slideUp .5s cubic-bezier(.22,1,.36,1) both;
  }
  .anim-up.d1 { animation-delay: .08s; }
  .anim-up.d2 { animation-delay: .16s; }
  .anim-up.d3 { animation-delay: .22s; }
  .anim-up.d4 { animation-delay: .28s; }
  .anim-up.d5 { animation-delay: .34s; }

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

  @media (prefers-reduced-motion: reduce) {
    *, .anim-up, .hero { animation: none !important; }
  }
</style>
</head>
<body>

<div class="page">

  <!-- ── Hero ── -->
  <div class="hero">
    <img class="hero-img"
         src="assets/img/manage-hero.png"
         alt="Kitchen portal and order management screens"
         onerror="this.style.display='none'">

    <!-- Fallback illustration -->
    <div class="hero-fallback">
      <!-- Phone 1: Start portal / orders list -->
      <div class="phone-mock tilted">
        <div class="pm-header">
          <span>Start Portal</span>
        </div>
        <div class="pm-body">
          <div class="pm-row sm"></div>
          <div class="pm-badge">
            <span>Table 4</span>
            <span class="red">Urgent</span>
          </div>
          <div class="pm-row"></div>
          <div class="pm-row sm" style="width:75%"></div>
          <div class="pm-row xs"></div>
          <div class="pm-row accent" style="height:18px;border-radius:8px;margin-top:4px"></div>
        </div>
      </div>

      <!-- Phone 2: Kitchen portal with 94% stat -->
      <div class="phone-mock tilted2">
        <div class="pm-header">
          <span>Kitchen Portal</span>
        </div>
        <div class="pm-body">
          <div class="pm-row xs"></div>
          <div class="pm-stat">
            <span class="big">94%</span>
            <span class="label">On-time rate</span>
          </div>
          <div class="pm-row sm" style="margin-top:4px"></div>
          <div class="pm-row xs"></div>
          <div class="pm-badge">
            <span>Accept</span>
            <span>Done</span>
          </div>
        </div>
      </div>
    </div>
  </div>

  <!-- ── Content ── -->
  <div class="content">

    <a href="welcome.php" class="back-link">
      <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round">
        <polyline points="15 18 9 12 15 6"/>
      </svg>
      Back
    </a>

    <!-- Headline -->
    <div class="headline anim-up d1">
      <h1>Restaurant Operations,<span class="accent">Simplified</span></h1>
      <p>Manage kitchen queues, deliveries, and orders in real time.</p>
    </div>

    <!-- Feature list -->
    <div class="features">

      <div class="feature anim-up d2">
        <div class="feature-icon">
          <!-- Clock / queue icon -->
          <svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
            <circle cx="12" cy="12" r="10"/>
            <polyline points="12 6 12 12 16 14"/>
          </svg>
        </div>
        <div class="feature-body">
          <h3>Live Order Queue</h3>
          <p>Track incoming orders instantly.</p>
        </div>
      </div>

      <div class="feature anim-up d3">
        <div class="feature-icon">
          <!-- Fork & knife -->
          <svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
            <path d="M3 2v7c0 1.1.9 2 2 2h4a2 2 0 002-2V2"/>
            <path d="M7 2v20"/>
            <path d="M21 15V2s-5 2-5 9v4"/>
            <path d="M16 22v-3"/>
          </svg>
        </div>
        <div class="feature-body">
          <h3>Kitchen Workflow</h3>
          <p>Monitor preparation from start to finish.</p>
        </div>
      </div>

      <div class="feature anim-up d4">
        <div class="feature-icon">
          <!-- Truck / delivery icon -->
          <svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
            <rect x="1" y="3" width="15" height="13" rx="1"/>
            <path d="M16 8h4l3 6v3h-7V8z"/>
            <circle cx="5.5" cy="18.5" r="2.5"/>
            <circle cx="18.5" cy="18.5" r="2.5"/>
          </svg>
        </div>
        <div class="feature-body">
          <h3>Smart Fulfillment</h3>
          <p>Coordinate waiters, runners, and deliveries.</p>
        </div>
      </div>

    </div>

    <!-- CTA -->
    <div class="cta-wrap anim-up d5">
      <a href="signup.php" class="btn-primary">Continue</a>
    </div>

  </div><!-- /.content -->

</div><!-- /.page -->

</body>
</html>
