

<?php $__env->startSection('content'); ?>


<link href="https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,600;0,9..144,700;1,9..144,400&display=swap" rel="stylesheet">

<style>
/* ─────────────────────────────────────────
   TOKENS
───────────────────────────────────────── */
:root {
    --white:       #ffffff;
    --bg:          #f7f7f5;
    --surface:     #ffffff;
    --border:      #e8e6e1;
    --border-soft: #f0ede8;

    --ink-900:  #0c0c0a;
    --ink-700:  #2d2d28;
    --ink-500:  #6b6b60;
    --ink-300:  #a8a89a;
    --ink-100:  #e8e6e1;

    --accent:        #1a1a14;
    --accent-green:  #15803d;
    --accent-red:    #dc2626;
    --accent-amber:  #b45309;
    --accent-blue:   #1d4ed8;
    --accent-violet: #6d28d9;

    --green-bg:  #f0fdf4;
    --green-br:  #bbf7d0;
    --red-bg:    #fef2f2;
    --red-br:    #fecaca;
    --amber-bg:  #fffbeb;
    --amber-br:  #fde68a;
    --blue-bg:   #eff6ff;
    --blue-br:   #bfdbfe;

    --radius-sm:  6px;
    --radius-md:  12px;
    --radius-lg:  20px;
    --radius-xl:  28px;

    --shadow-xs:  0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm:  0 2px 8px rgba(0,0,0,0.06), 0 0 0 1px rgba(0,0,0,0.03);
    --shadow-md:  0 8px 32px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.03);
    --shadow-lg:  0 24px 64px rgba(0,0,0,0.1), 0 0 0 1px rgba(0,0,0,0.04);

    --font-body:    'DM Sans', sans-serif;
    --font-display: 'Fraunces', serif;

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in:  cubic-bezier(0.4, 0, 1, 1);
}

/* ─────────────────────────────────────────
   RESET + BASE
───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

.sd-root {
    font-family: var(--font-body);
    background: var(--bg);
    min-height: 100vh;
    color: var(--ink-700);
    -webkit-font-smoothing: antialiased;
}

/* ─────────────────────────────────────────
   PAGE SHELL
───────────────────────────────────────── */
.sd-page {
    max-width: 960px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4rem;
}

/* ─────────────────────────────────────────
   TOP NAV BAR
───────────────────────────────────────── */
.sd-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2.5rem;
    animation: reveal 0.5s var(--ease-out) both;
}

.sd-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--ink-300);
    letter-spacing: 0.3px;
}
.sd-breadcrumb a {
    color: var(--ink-300);
    text-decoration: none;
    transition: color 0.2s;
}
.sd-breadcrumb a:hover { color: var(--ink-700); }
.sd-breadcrumb span { color: var(--ink-700); font-weight: 600; }
.sd-breadcrumb svg { width: 12px; height: 12px; }

/* ─────────────────────────────────────────
   HERO CARD
───────────────────────────────────────── */
.sd-hero {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 2rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1.75rem;
    align-items: center;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    animation: reveal 0.55s var(--ease-out) 0.05s both;
}

/* subtle dot grid background */
.sd-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, #d1cfc9 1px, transparent 1px);
    background-size: 22px 22px;
    opacity: 0.35;
    pointer-events: none;
}
/* top-right corner accent */
.sd-hero::after {
    content: '';
    position: absolute;
    top: -48px; right: -48px;
    width: 180px; height: 180px;
    background: radial-gradient(circle, rgba(21,128,61,0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* ─── Avatar ─── */
.sd-avatar-shell {
    position: relative;
    flex-shrink: 0;
}
.sd-avatar {
    width: 96px; height: 96px;
    border-radius: var(--radius-lg);
    object-fit: cover;
    border: 3px solid var(--white);
    box-shadow: var(--shadow-md);
    display: block;
    position: relative; z-index: 1;
    transition: transform 0.4s var(--ease-out);
}
.sd-avatar:hover { transform: scale(1.04) rotate(-1deg); }
.sd-avatar-fallback {
    width: 96px; height: 96px;
    border-radius: var(--radius-lg);
    background: var(--ink-900);
    color: var(--white);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 600;
    border: 3px solid var(--white);
    box-shadow: var(--shadow-md);
    position: relative; z-index: 1;
    letter-spacing: -1px;
}
/* ring halo */
.sd-avatar-halo {
    position: absolute;
    inset: -6px;
    border-radius: 24px;
    border: 1.5px dashed var(--border);
    animation: spin-slow 18s linear infinite;
    z-index: 0;
}

/* ─── Hero Info ─── */
.sd-hero-info { position: relative; z-index: 1; }
.sd-hero-name {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--ink-900);
    letter-spacing: -0.5px;
    line-height: 1.1;
}
.sd-hero-appno {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 3px 10px;
    font-size: 0.73rem;
    font-weight: 600;
    color: var(--ink-500);
    letter-spacing: 1px;
    text-transform: uppercase;
}
.sd-hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 14px;
}
.sd-hero-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 5px 12px;
    font-size: 0.74rem;
    font-weight: 500;
    color: var(--ink-500);
    box-shadow: var(--shadow-xs);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.sd-hero-chip:hover {
    border-color: var(--ink-300);
    box-shadow: var(--shadow-sm);
}
.sd-hero-chip svg { width: 12px; height: 12px; color: var(--ink-300); flex-shrink: 0; }

/* ─── Status Badge ─── */
.sd-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 18px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    align-self: flex-start;
    position: relative; z-index: 1;
    flex-shrink: 0;
}
.sd-status.pending  { background: var(--amber-bg);  color: var(--accent-amber);  border: 1px solid var(--amber-br); }
.sd-status.approved { background: var(--green-bg);  color: var(--accent-green);  border: 1px solid var(--green-br); }
.sd-status.rejected { background: var(--red-bg);    color: var(--accent-red);    border: 1px solid var(--red-br);   }

.sd-status-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}
.sd-status.pending  .sd-status-dot { animation: blink 2s ease-in-out infinite; }
.sd-status.approved .sd-status-dot { animation: none; }
.sd-status.rejected .sd-status-dot { animation: none; }

/* ─────────────────────────────────────────
   SECTION CARDS
───────────────────────────────────────── */
.sd-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow 0.3s var(--ease-out), border-color 0.3s;
}
.sd-section:hover {
    box-shadow: var(--shadow-md);
    border-color: #d4d0ca;
}

.sd-section-head {
    padding: 1.1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border-soft);
    background: #fafaf8;
}
.sd-section-icon {
    width: 30px; height: 30px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    background: var(--ink-900);
    flex-shrink: 0;
}
.sd-section-icon svg { width: 15px; height: 15px; color: var(--white); }
.sd-section-icon.green  { background: #15803d; }
.sd-section-icon.red    { background: #dc2626; }
.sd-section-icon.blue   { background: #1d4ed8; }
.sd-section-icon.amber  { background: #b45309; }
.sd-section-icon.violet { background: #6d28d9; }

.sd-section-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--ink-900);
    letter-spacing: 0.3px;
    text-transform: uppercase;
}
.sd-section-body { padding: 1.5rem; }

/* ─────────────────────────────────────────
   FIELD GRID
───────────────────────────────────────── */
.sd-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0;
}
.sd-grid.cols-2 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.sd-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }

.sd-field {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-soft);
    border-right: 1px solid var(--border-soft);
    transition: background 0.2s;
    position: relative;
}
.sd-field:hover { background: #fafaf8; }

.sd-field-label {
    font-size: 0.66rem;
    font-weight: 700;
    color: var(--ink-300);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.sd-field-value {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--ink-900);
    line-height: 1.4;
}
.sd-field-value.empty {
    color: var(--ink-100);
    font-weight: 400;
    font-style: italic;
}

/* Pill for boolean values */
.sd-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.sd-pill-yes { background: var(--green-bg);  color: var(--accent-green); border: 1px solid var(--green-br); }
.sd-pill-no  { background: var(--bg);         color: var(--ink-300);      border: 1px solid var(--border);   }

/* ─────────────────────────────────────────
   DATE RIBBON
───────────────────────────────────────── */
.sd-dates {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
}
.sd-date-tile {
    border-radius: var(--radius-md);
    padding: 1rem 1.1rem;
    border: 1px solid transparent;
}
.sd-date-tile.approval { background: var(--green-bg);  border-color: var(--green-br); }
.sd-date-tile.expiry   { background: var(--amber-bg);  border-color: var(--amber-br); }
.sd-date-tile.payment  { background: var(--blue-bg);   border-color: var(--blue-br);  }

.sd-date-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 6px;
    opacity: 0.7;
}
.sd-date-tile.approval .sd-date-label { color: var(--accent-green); }
.sd-date-tile.expiry   .sd-date-label { color: var(--accent-amber); }
.sd-date-tile.payment  .sd-date-label { color: var(--accent-blue);  }

.sd-date-value {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--ink-900);
}

/* ─────────────────────────────────────────
   ADMISSION PANEL
───────────────────────────────────────── */
.sd-admission-panel {
    padding: 1.5rem;
    border-top: 1px solid var(--border-soft);
}
.sd-admission-label {
    font-size: 0.66rem;
    font-weight: 700;
    color: var(--ink-300);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 14px;
}
.sd-admission-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 1.25rem;
}
.sd-adm-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: var(--radius-md);
    border: 1.5px solid transparent;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.18s var(--ease-out), box-shadow 0.18s, background 0.18s;
    letter-spacing: 0.2px;
}
.sd-adm-btn:hover  { transform: translateY(-2px); }
.sd-adm-btn:active { transform: translateY(0); }
.sd-adm-btn svg { width: 15px; height: 15px; flex-shrink: 0; }

.sd-adm-btn.free     { background: #f0fdf4; color: #15803d; border-color: #86efac; box-shadow: 0 2px 8px rgba(21,128,61,0.1); }
.sd-adm-btn.free:hover     { background: #dcfce7; box-shadow: 0 6px 20px rgba(21,128,61,0.2); }
.sd-adm-btn.next-day  { background: #eff6ff; color: #1d4ed8; border-color: #93c5fd; box-shadow: 0 2px 8px rgba(29,78,216,0.1); }
.sd-adm-btn.next-day:hover  { background: #dbeafe; box-shadow: 0 6px 20px rgba(29,78,216,0.2); }
.sd-adm-btn.next-week { background: #fffbeb; color: #b45309; border-color: #fcd34d; box-shadow: 0 2px 8px rgba(180,83,9,0.1); }
.sd-adm-btn.next-week:hover { background: #fef3c7; box-shadow: 0 6px 20px rgba(180,83,9,0.2); }

/* Admission status chip */
.sd-adm-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
}
.sd-adm-status.free     { background: #f0fdf4; color: #15803d; border: 1px solid #86efac; }
.sd-adm-status.next_day { background: #eff6ff; color: #1d4ed8; border: 1px solid #93c5fd; }
.sd-adm-status.next_week{ background: #fffbeb; color: #b45309; border: 1px solid #fcd34d; }
.sd-adm-status.none     { background: var(--bg); color: var(--ink-300); border: 1px solid var(--border); }

.sd-adm-status svg { width: 13px; height: 13px; }

.sd-due-date {
    margin-top: 10px;
    font-size: 0.78rem;
    color: var(--ink-500);
    display: flex;
    align-items: center;
    gap: 5px;
}
.sd-due-date svg { width: 13px; height: 13px; color: var(--ink-300); }

/* ─────────────────────────────────────────
   FINANCE SUMMARY BAR
───────────────────────────────────────── */
.sd-finance-bar {
    background: var(--ink-900);
    border-radius: var(--radius-lg);
    padding: 1.75rem 2rem;
    display: flex;
    align-items: center;
    margin-bottom: 1.25rem;
    position: relative;
    overflow: hidden;
    animation: reveal 0.55s var(--ease-out) 0.15s both;
}
.sd-finance-bar::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        -45deg,
        rgba(255,255,255,0.015) 0px,
        rgba(255,255,255,0.015) 1px,
        transparent 1px,
        transparent 12px
    );
    pointer-events: none;
}
.sd-finance-item {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
    padding: 0 2rem;
}
.sd-finance-item:first-child { padding-left: 0; }
.sd-finance-item:last-child  { padding-right: 0; }
.sd-finance-sep {
    flex-shrink: 0;
    width: 1px;
    height: 44px;
    background: rgba(255,255,255,0.14);
    position: relative;
    z-index: 1;
}
.sd-finance-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: rgba(255,255,255,0.45);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
    white-space: nowrap;
}
.sd-finance-amount {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--white);
    letter-spacing: -0.5px;
    white-space: nowrap;
}
.sd-finance-amount.accent { color: #86efac; }
.sd-finance-sub {
    font-size: 0.68rem;
    color: rgba(255,255,255,0.35);
    margin-top: 4px;
    white-space: nowrap;
}

/* ─────────────────────────────────────────
   ACTION BUTTONS
───────────────────────────────────────── */
.sd-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 2rem;
    animation: reveal 0.55s var(--ease-out) 0.3s both;
}

.sd-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.75rem 1.6rem;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.83rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s var(--ease-out), box-shadow 0.2s;
    letter-spacing: 0.2px;
}
.sd-btn:hover  { transform: translateY(-2px); }
.sd-btn:active { transform: translateY(0); }
.sd-btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.sd-btn-back {
    background: var(--surface);
    color: var(--ink-500);
    border: 1.5px solid var(--border);
    box-shadow: var(--shadow-xs);
}
.sd-btn-back:hover { border-color: var(--ink-300); box-shadow: var(--shadow-sm); color: var(--ink-700); }

.sd-btn-approve {
    background: #15803d;
    color: #fff;
    box-shadow: 0 4px 16px rgba(21,128,61,0.3);
}
.sd-btn-approve:hover { box-shadow: 0 8px 28px rgba(21,128,61,0.4); background: #166534; }

.sd-btn-reject {
    background: #dc2626;
    color: #fff;
    box-shadow: 0 4px 16px rgba(220,38,38,0.25);
}
.sd-btn-reject:hover { box-shadow: 0 8px 28px rgba(220,38,38,0.35); background: #b91c1c; }

/* spacer */
.sd-btn-spacer { flex: 1; }

/* ─────────────────────────────────────────
   ANIMATIONS
───────────────────────────────────────── */
@keyframes reveal {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes blink {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.4; transform: scale(1.5); }
}
@keyframes spin-slow {
    to { transform: rotate(360deg); }
}

/* stagger sections */
.sd-section:nth-child(1) { animation: reveal 0.55s var(--ease-out) 0.1s both; }
.sd-section:nth-child(2) { animation: reveal 0.55s var(--ease-out) 0.18s both; }
.sd-section:nth-child(3) { animation: reveal 0.55s var(--ease-out) 0.24s both; }
.sd-section:nth-child(4) { animation: reveal 0.55s var(--ease-out) 0.30s both; }

/* ─────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────── */
@media (max-width: 640px) {
    .sd-page { padding: 1.25rem 1rem 3rem; }
    .sd-hero  { grid-template-columns: 1fr; text-align: center; justify-items: center; }
    .sd-hero-chips { justify-content: center; }
    .sd-finance-bar { grid-template-columns: 1fr; gap: 1rem; }
    .sd-finance-sep { display: none; }
    .sd-finance-item { padding: 0 !important; }
    .sd-grid.cols-3 { grid-template-columns: 1fr 1fr; }
    .sd-actions { flex-direction: column; }
    .sd-btn { width: 100%; justify-content: center; }
    .sd-btn-spacer { display: none; }
}
</style>

<div class="sd-root">
<div class="sd-page">


<nav class="sd-nav">
    <div class="sd-breadcrumb">
        <a href="<?php echo e(route('submissions.index')); ?>">Submissions</a>
        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M9 5l7 7-7 7"/></svg>
        <span><?php echo e($submission->first_name); ?> <?php echo e($submission->surname); ?></span>
    </div>

    <?php $status = strtolower($submission->status ?? 'pending'); ?>
    <div class="sd-status <?php echo e($status); ?>">
        <span class="sd-status-dot"></span>
        <?php echo e(ucfirst($status)); ?>

    </div>
</nav>


<div class="sd-hero">
    
    <div class="sd-avatar-shell">
        <div class="sd-avatar-halo"></div>
        <?php if(!empty($submission->profile_pic)): ?>
            <img src="<?php echo e(asset('storage/' . $submission->profile_pic)); ?>" alt="Profile" class="sd-avatar">
        <?php else: ?>
            <div class="sd-avatar-fallback"><?php echo e(strtoupper(substr($submission->first_name ?? 'U', 0, 1))); ?></div>
        <?php endif; ?>
    </div>

    
    <div class="sd-hero-info">
        <div class="sd-hero-name"><?php echo e($submission->first_name); ?> <?php echo e($submission->surname); ?></div>
        <div class="sd-hero-appno">
            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" style="width:11px;height:11px"><rect x="2" y="2" width="20" height="20" rx="3"/><path stroke-linecap="round" d="M8 7h8M8 12h5"/></svg>
            <?php echo e($submission->application_number ?? '—'); ?>

        </div>
        <div class="sd-hero-chips">
            <?php if($submission->email): ?>
            <span class="sd-hero-chip">
                <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" d="M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"/></svg>
                <?php echo e($submission->email); ?>

            </span>
            <?php endif; ?>
            <?php if($submission->mobile): ?>
            <span class="sd-hero-chip">
                <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" d="M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z"/></svg>
                <?php echo e($submission->mobile); ?>

            </span>
            <?php endif; ?>
            <?php if($submission->gender): ?>
            <span class="sd-hero-chip">
                <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"/></svg>
                <?php echo e($submission->gender); ?>

            </span>
            <?php endif; ?>
            <?php if($submission->dob): ?>
            <span class="sd-hero-chip">
                <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"/></svg>
                <?php echo e(\Carbon\Carbon::parse($submission->dob)->format('d M, Y')); ?>

            </span>
            <?php endif; ?>
        </div>
    </div>
</div>


<?php
    $price = \App\Models\MembershipPrice::where('membership_type', $submission->membership_type)
        ->where('package', $submission->package)
        ->where('is_active', 1)
        ->first();
    $membershipFee = $price->membership_fee ?? 0;
    $admissionFee  = $price->admission_fee ?? 0;
    if (($submission->admission_status ?? null) === 'free') { $admissionFee = 0; }
    $totalAmount = $membershipFee + $admissionFee;
?>

<div class="sd-finance-bar">
    <div class="sd-finance-item">
        <div class="sd-finance-label">Membership Fee</div>
        <div class="sd-finance-amount">LKR <?php echo e(number_format($membershipFee)); ?></div>
        <div class="sd-finance-sub"><?php echo e($submission->membership_type ?? 'Standard'); ?> · <?php echo e($submission->package ?? '—'); ?></div>
    </div>
    <div class="sd-finance-sep"></div>
    <div class="sd-finance-item">
        <div class="sd-finance-label">Admission Fee</div>
        <div class="sd-finance-amount">LKR <?php echo e(number_format($admissionFee)); ?></div>
        <div class="sd-finance-sub"><?php echo e(($submission->admission_status ?? null) === 'free' ? 'Waived' : 'One-time'); ?></div>
    </div>
    <div class="sd-finance-sep"></div>
    <div class="sd-finance-item">
        <div class="sd-finance-label">Total Due</div>
        <div class="sd-finance-amount accent">LKR <?php echo e(number_format($totalAmount)); ?></div>
        <div class="sd-finance-sub">Payable upon approval</div>
    </div>
</div>


<div class="sd-section">
    <div class="sd-section-head">
        <div class="sd-section-icon">
            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"/></svg>
        </div>
        <span class="sd-section-title">Personal Information</span>
    </div>
    <div class="sd-grid">
        <div class="sd-field">
            <div class="sd-field-label">Address</div>
            <div class="sd-field-value <?php echo e(empty($submission->address) ? 'empty' : ''); ?>">
                <?php echo e($submission->address ?? 'Not provided'); ?>

            </div>
        </div>
        <div class="sd-field">
            <div class="sd-field-label">Disability</div>
            <div class="sd-field-value">
                <span class="sd-pill <?php echo e($submission->disability ? 'sd-pill-yes' : 'sd-pill-no'); ?>">
                    <?php echo e($submission->disability ? '✓ Yes' : '— No'); ?>

                </span>
            </div>
        </div>
        <?php if($submission->disability): ?>
        <div class="sd-field">
            <div class="sd-field-label">Disability Details</div>
            <div class="sd-field-value <?php echo e(empty($submission->disability_details) ? 'empty' : ''); ?>">
                <?php echo e($submission->disability_details ?? 'Not provided'); ?>

            </div>
        </div>
        <?php endif; ?>
        <div class="sd-field">
            <div class="sd-field-label">Referral Source</div>
            <div class="sd-field-value <?php echo e(empty($submission->referral_source) ? 'empty' : ''); ?>">
                <?php echo e($submission->referral_source ?? 'Not provided'); ?>

            </div>
        </div>
    </div>
</div>


<div class="sd-section">
    <div class="sd-section-head">
        <div class="sd-section-icon violet">
            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" d="M15 5v2m0 4v2m0 4v2M5 5a2 2 0 00-2 2v3a2 2 0 110 4v3a2 2 0 002 2h14a2 2 0 002-2v-3a2 2 0 110-4V7a2 2 0 00-2-2H5z"/></svg>
        </div>
        <span class="sd-section-title">Membership Details</span>
    </div>
    <div class="sd-section-body" style="padding-bottom:0;">
        <div class="sd-grid cols-3">
            <div class="sd-field">
                <div class="sd-field-label">Membership Type</div>
                <div class="sd-field-value <?php echo e(empty(optional($member)->membership_type ?? $submission->membership_type) ? 'empty' : ''); ?>">
                    <?php echo e(optional($member)->membership_type ?? $submission->membership_type ?? 'Not assigned'); ?>

                </div>
            </div>
            <div class="sd-field">
                <div class="sd-field-label">Package</div>
                <div class="sd-field-value <?php echo e(empty(optional($member)->package_type ?? $submission->package) ? 'empty' : ''); ?>">
                    <?php echo e(optional($member)->package_type ?? $submission->package ?? 'Not assigned'); ?>

                </div>
            </div>
            <div class="sd-field">
                <div class="sd-field-label">Finger ID</div>
                <div class="sd-field-value <?php echo e(empty(optional($member)->finger_id) ? 'empty' : ''); ?>">
                    <?php echo e(optional($member)->finger_id ?? 'Not assigned'); ?>

                </div>
            </div>
        </div>
        <div class="sd-dates" style="padding: 0 1.5rem 1.5rem; margin-top: 0; padding-top: 1.25rem; border-top: 1px solid var(--border-soft);">
            <div class="sd-date-tile approval">
                <div class="sd-date-label">Approval Date</div>
                <div class="sd-date-value">
                    <?php echo e(optional($member)->approval_date ? \Carbon\Carbon::parse($member->approval_date)->format('d M, Y') : '—'); ?>

                </div>
            </div>
            <div class="sd-date-tile expiry">
                <div class="sd-date-label">Expiry Date</div>
                <div class="sd-date-value">
                    <?php echo e(optional($member)->expiry_date ? \Carbon\Carbon::parse($member->expiry_date)->format('d M, Y') : '—'); ?>

                </div>
            </div>
            <div class="sd-date-tile payment">
                <div class="sd-date-label">Next Payment</div>
                <div class="sd-date-value">
                    <?php echo e(optional($member)->next_payment_date ? \Carbon\Carbon::parse($member->next_payment_date)->format('d M, Y') : '—'); ?>

                </div>
            </div>
        </div>
    </div>
</div>


<div class="sd-section">
    <div class="sd-section-head">
        <div class="sd-section-icon blue">
            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" d="M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z"/></svg>
        </div>
        <span class="sd-section-title">Admission Payment</span>
    </div>
    <div class="sd-admission-panel">
        <div class="sd-admission-label">Select Payment Option</div>
        <div class="sd-admission-btns">
            
            <form action="<?php echo e(route('submissions.admissionStatus', $submission->id)); ?>" method="POST" style="display:contents">
                <?php echo csrf_field(); ?>
                <input type="hidden" name="admission_status" value="free">
                <button type="submit" class="sd-adm-btn free">
                    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" d="M5 13l4 4L19 7"/></svg>
                    Free Admission
                </button>
            </form>

            
            <form action="<?php echo e(route('submissions.admissionStatus', $submission->id)); ?>" method="POST" style="display:contents">
                <?php echo csrf_field(); ?>
                <input type="hidden" name="admission_status" value="next_day">
                <button type="submit" class="sd-adm-btn next-day">
                    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"/></svg>
                    Pay Next Day
                </button>
            </form>

            
            <form action="<?php echo e(route('submissions.admissionStatus', $submission->id)); ?>" method="POST" style="display:contents">
                <?php echo csrf_field(); ?>
                <input type="hidden" name="admission_status" value="next_week">
                <button type="submit" class="sd-adm-btn next-week">
                    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"/></svg>
                    Pay Next Week
                </button>
            </form>
        </div>

        
        <div style="display:flex; align-items:center; gap:10px; flex-wrap:wrap;">
            <span style="font-size:0.72rem; font-weight:700; color:var(--ink-300); text-transform:uppercase; letter-spacing:0.6px;">Current Status</span>

            <?php if($submission->admission_status == 'free'): ?>
                <span class="sd-adm-status free">
                    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" d="M5 13l4 4L19 7"/></svg>
                    Free Admission
                </span>
            <?php elseif($submission->admission_status == 'next_day'): ?>
                <span class="sd-adm-status next_day">
                    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"/></svg>
                    Scheduled · Next Day
                </span>
            <?php elseif($submission->admission_status == 'next_week'): ?>
                <span class="sd-adm-status next_week">
                    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"/></svg>
                    Scheduled · Next Week
                </span>
            <?php else: ?>
                <span class="sd-adm-status none">Not selected</span>
            <?php endif; ?>

            <?php if($submission->admission_due_date): ?>
                <div class="sd-due-date">
                    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"/></svg>
                    Due: <strong><?php echo e(\Carbon\Carbon::parse($submission->admission_due_date)->format('d M Y')); ?></strong>
                </div>
            <?php endif; ?>
        </div>
    </div>
</div>


<div class="sd-section">
    <div class="sd-section-head">
        <div class="sd-section-icon red">
            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" d="M18.364 5.636l-3.536 3.536m0 5.656l3.536 3.536M9.172 9.172L5.636 5.636m3.536 9.192l-3.536 3.536M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-5 0a4 4 0 11-8 0 4 4 0 018 0z"/></svg>
        </div>
        <span class="sd-section-title">Emergency Contact</span>
    </div>
    <div class="sd-grid">
        <div class="sd-field">
            <div class="sd-field-label">Contact Name</div>
            <div class="sd-field-value <?php echo e(empty($submission->emergency_name) ? 'empty' : ''); ?>">
                <?php echo e($submission->emergency_name ?? 'Not provided'); ?>

            </div>
        </div>
        <div class="sd-field">
            <div class="sd-field-label">Relationship</div>
            <div class="sd-field-value <?php echo e(empty($submission->relationship) ? 'empty' : ''); ?>">
                <?php echo e($submission->relationship ?? 'Not provided'); ?>

            </div>
        </div>
        <div class="sd-field">
            <div class="sd-field-label">Phone Number</div>
            <div class="sd-field-value <?php echo e(empty($submission->emergency_phone) ? 'empty' : ''); ?>">
                <?php echo e($submission->emergency_phone ?? 'Not provided'); ?>

            </div>
        </div>
    </div>
</div>


<div class="sd-actions">
    <a href="<?php echo e(route('submissions.index')); ?>" class="sd-btn sd-btn-back">
        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" d="M10 19l-7-7m0 0l7-7m-7 7h18"/></svg>
        Back to List
    </a>

    <span class="sd-btn-spacer"></span>

    <form action="<?php echo e(route('submissions.approve', $submission->id)); ?>" method="POST"
          onsubmit="return confirm('Approve this submission?')" style="display:contents">
        <?php echo csrf_field(); ?>
        <button type="submit" class="sd-btn sd-btn-approve">
            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" d="M5 13l4 4L19 7"/></svg>
            Approve Submission
        </button>
    </form>

    <form action="<?php echo e(route('submissions.reject', $submission->id)); ?>" method="POST"
          onsubmit="return confirm('Reject this submission?')" style="display:contents">
        <?php echo csrf_field(); ?>
        <input type="hidden" name="reason" value="Incomplete details">
        <button type="submit" class="sd-btn sd-btn-reject">
            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" d="M6 18L18 6M6 6l12 12"/></svg>
            Reject
        </button>
    </form>
</div>

</div>
</div>

<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH D:\Iron Ground Fitness Docs\Digital Gym Management System\gymerpsystem\resources\views/submissions/show.blade.php ENDPATH**/ ?>