/* GTE System Master Stylesheet (Public Form + Modern Admin Panel + VIP e-Badge Pass) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Outfit:wght@500;600;700;800&family=Playfair+Display:wght@600;700;800&display=swap');

:root {
    --pf-bg: #f5f5f7;
    --pf-card-bg: #ffffff;
    --pf-text-dark: #222222;
    --pf-text-muted: #64748b;
    --pf-border-line: #e2e8f0;
    --pf-purple: #843b8b;
    --pf-purple-hover: #702f76;
    --pf-blue-active: #0066cc;
    --pf-choice-bg: #f4f4f5;
    --pf-choice-border: #e4e4e7;
    --pf-radius: 8px;

    /* Admin System Variables */
    --admin-bg: #f8fafc;
    --admin-card: #ffffff;
    --admin-border: #e2e8f0;
    --admin-text-main: #0f172a;
    --admin-text-sub: #475569;
    --admin-primary: #0284c7;
    --admin-primary-hover: #0369a1;
    --admin-dark: #0f172a;
    --admin-danger: #d9232d;
    --admin-success: #166534;
}

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

/* ==========================================================================
   PUBLIC FORM STYLES
   ========================================================================== */
body.pf-exact-theme {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--pf-bg);
    color: var(--pf-text-dark);
    line-height: 1.5;
    min-height: 100vh;
    padding: 40px 16px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow-x: hidden; /* prevent 100vw full-bleed header from causing horizontal scroll */
}

.pf-container {
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
}

.pf-card {
    background: var(--pf-card-bg);
    border-radius: 12px;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05), 0 8px 12px -6px rgba(0, 0, 0, 0.02);
    border: 1px solid #e8e8ed;
    padding: 40px 36px;
    overflow: hidden;
}

.pf-header {
    text-align: center;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--pf-border-line);
}

.pf-logo-wrapper {
    margin-bottom: 12px;
}

.pf-header-logo {
    max-width: 160px;
    max-height: 80px;
    object-fit: contain;
}

.pf-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--pf-text-dark);
}

.pf-subtitle {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--pf-purple);
    margin-top: 4px;
}

.pf-header-meta {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 12px;
}

.pf-meta-pill {
    background: #f1f5f9;
    color: #334155;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 16px;
}

/* ==========================================================================
   FULL-BLEED FORM HEADER (index.php) — purple bar + org band + hero
   ========================================================================== */
.pf-header-full {
    /* Span the full browser width regardless of the centered container */
    position: relative;
    width: 100vw;
    left: 50%;
    transform: translateX(-50%);
    margin-top: -40px;     /* sit flush to the top (cancels body top padding) */
    margin-bottom: 32px;
}

/* Tier 1: Purple contact bar */
.pf-topbar {
    background: linear-gradient(90deg, #6d2877 0%, #843b8b 55%, #9a4aa2 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 16px;
    padding: 12px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}
.pf-topbar-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}
.pf-topbar-item i { font-size: 0.85em; }
.pf-topbar-sep { opacity: 0.45; font-weight: 400; }

/* Tier 2: Organised by / Supported By logo band */
.pf-orgbar {
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    padding: 18px 30px;
}
.pf-org-block { text-align: center; flex: 0 0 auto; }
.pf-org-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 6px;
    font-family: 'Outfit', sans-serif;
}
.pf-org-logo {
    max-height: 58px;
    max-width: 240px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}
.pf-org-fallback { font-weight: 800; color: #843b8b; font-size: 1.05rem; }
.pf-ministry { line-height: 1.12; color: #1f2937; font-family: 'Outfit', sans-serif; }
.pf-ministry .m-top { display: block; font-size: 0.82rem; font-weight: 600; }
.pf-ministry .m-mid { display: block; font-size: 1.15rem; font-weight: 800; letter-spacing: 0.5px; }
.pf-ministry .m-bot { display: block; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.5px; color: #4b5563; }

/* Single nav row: Organised logo | contact pill | Supported logo */
.pf-navrow {
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    padding: 14px 5%;
}
.pf-navrow .pf-org-block { flex: 0 0 auto; }
.pf-org-logo-sm { max-height: 66px; }
.pf-contact-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 14px;
    background: linear-gradient(90deg, #6d2877 0%, #843b8b 55%, #9a4aa2 100%);
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    padding: 10px 24px;
    border-radius: 30px;
    box-shadow: 0 4px 12px rgba(132, 59, 139, 0.25);
}

/* Tier 3: Hero banner */
.pf-hero {
    position: relative;
    min-height: 210px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 34px 8%;
    background-color: #843b8b; /* fallback if no hero image is uploaded */
    background-image:
        linear-gradient(90deg, rgba(87, 30, 96, 0.95) 0%, rgba(132, 59, 139, 0.72) 45%, rgba(132, 59, 139, 0.22) 100%),
        url('uploads/hero-bg.jpg');
    background-size: cover;
    background-position: center;
}
.pf-hero-inner { flex: 1; min-width: 0; }
.pf-hero-crumb {
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    font-weight: 500;
}
.pf-hero-crumb span { margin: 0 4px; opacity: 0.7; }
.pf-hero-title {
    color: #ffffff;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.1rem;
    font-weight: 700;
    line-height: 1.1;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.pf-hero-download {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.6);
    color: #ffffff;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: 20px;
    transition: background 0.2s ease;
    white-space: nowrap;
}
.pf-hero-download:hover { background: rgba(255, 255, 255, 0.28); }

.pf-row {
    display: grid;
    gap: 24px;
    margin-bottom: 24px;
}

.pf-row-1 {
    grid-template-columns: 1fr;
}

.pf-row-2 {
    grid-template-columns: 1fr 1fr;
}

.pf-field {
    display: flex;
    flex-direction: column;
}

.pf-label {
    font-size: 0.88rem;
    font-weight: 700;
    color: #222222;
    margin-bottom: 4px;
}

.pf-input-line {
    width: 100%;
    padding: 10px 0;
    font-size: 0.95rem;
    font-family: inherit;
    color: #1e293b;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--pf-border-line);
    transition: border-color 0.2s ease;
    outline: none;
    border-radius: 0;
}

.pf-input-line:focus {
    border-bottom: 2px solid var(--pf-blue-active);
}

.pf-other-line {
    border-bottom: 2px solid var(--pf-blue-active);
}

.pf-other-line::placeholder {
    color: #94a3b8;
}

select.pf-input-line.pf-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 4px center;
    background-size: 14px;
    padding-right: 24px;
    cursor: pointer;
}

/* Searchable State Select Dropdown */
.pf-custom-select-wrap {
    position: relative;
    width: 100%;
}

.pf-custom-select-wrap .pf-select-arrow {
    position: absolute;
    right: 4px;
    bottom: 12px;
    color: #64748b;
    font-size: 0.8rem;
    pointer-events: none;
    transition: transform 0.2s ease;
}

.pf-custom-select-wrap.active .pf-select-arrow {
    transform: rotate(180deg);
    color: var(--pf-purple);
}

.pf-searchable-dropdown {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    z-index: 9999;
    max-height: 280px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: pfDropdownFadeIn 0.15s ease-out;
}

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

.pf-dropdown-search-box {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.pf-dropdown-search-box .pf-search-icon {
    color: #94a3b8;
    font-size: 0.85rem;
    margin-right: 8px;
}

.pf-dropdown-search-box input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.88rem;
    color: #1e293b;
}

.pf-dropdown-list {
    overflow-y: auto;
    max-height: 220px;
    padding: 4px 0;
}

.pf-dropdown-option {
    padding: 9px 16px;
    font-size: 0.9rem;
    color: #334155;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pf-dropdown-option:hover,
.pf-dropdown-option.highlighted {
    background: #f1f5f9;
    color: var(--pf-purple);
    font-weight: 600;
}

.pf-dropdown-option.selected {
    background: #f3e8ff;
    color: var(--pf-purple);
    font-weight: 700;
}

.pf-dropdown-option .pf-opt-tag {
    font-size: 0.72rem;
    color: #94a3b8;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
}

.pf-dropdown-empty {
    padding: 16px;
    text-align: center;
    color: #94a3b8;
    font-size: 0.85rem;
}

.pf-section-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #111827;
    margin-top: 28px;
    margin-bottom: 18px;
}

.pf-choices-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.pf-choice-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--pf-choice-bg);
    border: 1px solid var(--pf-choice-border);
    border-radius: var(--pf-radius);
    padding: 14px 16px;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    min-height: 52px;
}

.pf-choice-card:hover {
    border-color: #cbd5e1;
    background-color: #ffffff;
}

.pf-choice-card.selected {
    background-color: var(--pf-blue-active);
    border-color: var(--pf-blue-active);
    color: #ffffff;
}

.pf-choice-text {
    font-size: 0.84rem;
    font-weight: 500;
    color: #333333;
    line-height: 1.35;
    padding-right: 8px;
}

.pf-choice-card.selected .pf-choice-text {
    color: #ffffff;
    font-weight: 600;
}

.pf-choice-input {
    display: none;
}

.pf-choice-box {
    width: 14px;
    height: 14px;
    border: 1.5px solid #a1a1aa;
    border-radius: 2px;
    display: inline-block;
    position: relative;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.pf-choice-card.selected .pf-choice-box {
    background-color: #ffffff;
    border-color: #ffffff;
}

.pf-choice-card.selected .pf-choice-box::after {
    content: '';
    position: absolute;
    left: 3px;
    top: 0px;
    width: 3px;
    height: 6px;
    border: solid var(--pf-blue-active);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.pf-submit-wrapper {
    margin-top: 36px;
}

.pf-purple-btn {
    width: 100%;
    padding: 14px 24px;
    font-size: 0.98rem;
    font-weight: 700;
    font-family: inherit;
    color: #ffffff;
    background-color: var(--pf-purple);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(132, 59, 139, 0.25);
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.pf-purple-btn:hover {
    background-color: var(--pf-purple-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 12px -2px rgba(132, 59, 139, 0.35);
}

.pf-purple-btn:disabled {
    opacity: 0.8;
    cursor: not-allowed;
    transform: none;
}

/* Submit button loading spinner */
.spinner {
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255, 255, 255, 0.4);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: pf-spin 0.6s linear infinite;
    flex-shrink: 0;
}

@keyframes pf-spin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   NEW WORLD-CLASS E-BADGE VIP PASS CARD DESIGN
   ========================================================================== */
.badge-vip-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 40px -15px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.05);
    overflow: hidden;
    margin: 0 auto;
    font-family: 'Inter', sans-serif;
    animation: fadeInScale 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.badge-card-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    padding: 32px 28px 24px 28px;
    text-align: center;
    position: relative;
}

.badge-lanyard-slot {
    width: 64px;
    height: 10px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    margin: 0 auto 16px auto;
    border: 1px dashed rgba(255, 255, 255, 0.3);
}

.badge-header-logo {
    max-width: 140px;
    max-height: 60px;
    object-fit: contain;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.95);
    padding: 6px 12px;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    display: inline-block;
}

.badge-type-tag {
    background: #843b8b;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 4px 14px;
    border-radius: 20px;
    display: inline-block;
}

.badge-success-heading {
    font-family: 'Outfit', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    color: #ffffff;
    margin-top: 12px;
    letter-spacing: -0.3px;
}

.badge-event-sub {
    color: #cbd5e1;
    font-size: 0.9rem;
    margin-top: 4px;
}

.badge-header-meta {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 14px;
    font-size: 0.8rem;
    color: #94a3b8;
}

.badge-main-grid {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 28px;
    padding: 32px 28px;
    background: #ffffff;
    align-items: start;
}

.badge-info-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.badge-info-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.badge-info-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f0f9ff;
    color: #0284c7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.badge-info-content {
    display: flex;
    flex-direction: column;
}

.badge-info-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
}

.badge-info-val {
    font-size: 0.92rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.35;
}

.badge-qr-box {
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 14px;
    padding: 20px 16px;
    text-align: center;
}

.badge-code-display {
    font-family: monospace;
    font-size: 0.92rem;
    font-weight: 800;
    color: #d9232d;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: #fef2f2;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #fecaca;
}

.badge-qr-img-wrapper {
    background: #ffffff;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    display: inline-block;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.badge-qr-img-wrapper img {
    display: block;
    width: 160px;
    height: 160px;
    margin: 0 auto;
}

.badge-qr-caption {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    margin-top: 8px;
}

.badge-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    padding: 20px 28px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

/* Print Only Styling */
@media print {
    body * {
        visibility: hidden;
    }
    #successCard, #successCard * {
        visibility: visible;
    }
    #successCard {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
    .badge-actions {
        display: none !important;
    }
}

/* ==========================================================================
   ADMIN PANEL STYLES
   ========================================================================== */
body.admin-body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--admin-bg);
    color: var(--admin-text-main);
    line-height: 1.5;
    min-height: 100vh;
    padding: 30px 20px;
}

.admin-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

.admin-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--admin-dark);
    padding: 16px 28px;
    border-radius: 12px;
    color: #ffffff;
    margin-bottom: 28px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

.admin-brand {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.3px;
}

.admin-brand-dot {
    width: 10px;
    height: 10px;
    background-color: var(--admin-danger);
    border-radius: 50%;
    display: inline-block;
}

.nav-links {
    display: flex;
    gap: 12px;
}

.nav-links a {
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 8px 16px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.nav-links a.active {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.nav-links a.logout-link {
    color: #f87171;
}

.nav-links a.logout-link:hover {
    background: rgba(248, 113, 113, 0.15);
    color: #fca5a5;
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

.admin-stat-card {
    background: var(--admin-card);
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.admin-stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.admin-stat-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--admin-text-sub);
}

.admin-stat-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    background: #f1f5f9;
    color: #0f172a;
}

.admin-stat-value {
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--admin-text-main);
    line-height: 1;
}

.admin-card {
    background: var(--admin-card);
    border: 1px solid var(--admin-border);
    border-radius: 14px;
    padding: 28px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    margin-bottom: 28px;
}

.admin-card-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--admin-text-main);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

.admin-full-width {
    grid-column: span 2;
}

.admin-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
}

.admin-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #334155;
}

.admin-input, .admin-select {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--admin-text-main);
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    outline: none;
    transition: all 0.15s ease;
}

.admin-btn {
    padding: 10px 18px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    color: #ffffff;
    transition: all 0.2s ease;
}

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

.admin-btn-dark { background-color: var(--admin-dark); }
.admin-btn-dark:hover { background-color: #1e293b; }

.admin-btn-success { background-color: var(--admin-success); }
.admin-btn-success:hover { background-color: #14532d; }

.admin-btn-danger { background-color: var(--admin-danger); }
.admin-btn-danger:hover { background-color: #b81720; }

.admin-btn-secondary { background-color: #64748b; }
.admin-btn-secondary:hover { background-color: #475569; }

.alert-banner {
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 24px;
    display: none;
}

.alert-banner.error {
    display: block;
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-banner.success {
    display: block;
    background-color: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* ==========================================================================
   ADMIN LOGIN & PASSWORD TOGGLE STYLES
   ========================================================================== */
body.login-bg {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    margin: 0;
}

.login-card {
    background: #ffffff;
    width: 100%;
    max-width: 440px;
    border-radius: 16px;
    padding: 36px 32px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===== Branded split login (dynamic header logos) ===== */
.login-shell {
    display: flex;
    width: 100%;
    max-width: 940px;
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.5);
}

.login-brand-panel {
    position: relative;
    flex: 1 1 46%;
    min-width: 0;
    background: linear-gradient(160deg, #571e60 0%, #843b8b 100%);
    background-size: cover;
    background-position: center;
    color: #ffffff;
    display: flex;
}

.login-brand-overlay {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 32px;
    padding: 44px 36px;
    width: 100%;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.15), rgba(15, 23, 42, 0.5));
}

.login-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.login-logo-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.login-logo-label {
    font-size: 0.66rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    opacity: 0.85;
    font-weight: 600;
}

.login-logo-chip {
    background: rgba(255, 255, 255, 0.96);
    border-radius: 10px;
    padding: 8px 12px;
    display: inline-flex;
    align-items: center;
    max-width: 170px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

.login-logo-chip img {
    max-height: 48px;
    max-width: 100%;
    display: block;
}

.login-brand-fallback {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.15rem;
}

.login-brand-info h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 14px;
}

.login-brand-meta {
    display: flex;
    flex-direction: column;
    gap: 9px;
    font-size: 0.9rem;
    opacity: 0.96;
}

.login-brand-meta span {
    display: flex;
    align-items: center;
    gap: 9px;
}

.login-form-panel {
    flex: 1 1 54%;
    min-width: 0;
    padding: 46px 42px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #ffffff;
}

.login-shell .login-card {
    box-shadow: none;
    border: none;
    padding: 0;
    max-width: none;
    width: 100%;
}

@media (max-width: 780px) {
    .login-shell {
        flex-direction: column;
        max-width: 460px;
    }
    .login-brand-panel { flex-basis: auto; }
    .login-brand-overlay {
        padding: 30px 26px;
        gap: 22px;
    }
    .login-form-panel { padding: 34px 28px; }
}

.pass-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.pass-wrapper .admin-input {
    padding-right: 42px;
}

.pass-toggle-btn {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: #64748b;
    font-size: 1rem;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.pass-toggle-btn:hover {
    color: #0284c7;
}

@media (max-width: 640px) {
    .pf-card {
        padding: 24px 20px;
    }
    .pf-row-2, .pf-choices-grid, .badge-main-grid {
        grid-template-columns: 1fr;
    }
    .pf-topbar { font-size: 0.8rem; gap: 6px 12px; }
    .pf-orgbar { padding: 16px 18px; gap: 16px; }
    .pf-navrow { justify-content: center; gap: 14px; padding: 14px 16px; }
    .pf-contact-pill { order: 3; width: 100%; font-size: 0.8rem; padding: 9px 16px; }
    .pf-org-logo { max-height: 48px; }
    .pf-org-logo-sm { max-height: 52px; }
    .pf-hero {
        flex-direction: column;
        align-items: flex-start;
        min-height: auto;
        padding: 24px 22px;
    }
    .pf-hero-title { font-size: 1.6rem; }
}

/* ==========================================================================
   RESPONSIVE ADMIN PANEL ENHANCEMENTS
   ========================================================================== */

.admin-table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: #ffffff;
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
    margin-bottom: 24px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 960px;
    text-align: left;
    font-size: 0.88rem;
}

.admin-table th {
    background: #f8fafc;
    color: #475569;
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--admin-border);
    white-space: nowrap;
}

.admin-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    color: var(--admin-text-main);
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

.admin-table tbody tr:hover {
    background-color: #f8fafc;
}

.pos-grid-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 1024px) {
    .admin-stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .badge-designer-layout {
        grid-template-columns: 1fr !important;
    }
    .settings-layout-2col {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 768px) {
    body.admin-body {
        padding: 16px 12px;
    }
    .admin-nav {
        flex-direction: column;
        align-items: center;
        gap: 14px;
        padding: 16px 20px;
        text-align: center;
    }
    .admin-brand {
        justify-content: center;
    }
    .nav-links {
        justify-content: center;
        flex-wrap: wrap;
        width: 100%;
        gap: 8px;
    }
    .nav-links a {
        padding: 8px 14px;
        font-size: 0.82rem;
        flex: 1 1 calc(33% - 8px);
        justify-content: center;
    }
    .toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .toolbar-search-form {
        flex-direction: column;
        width: 100% !important;
    }
    .toolbar-search-form input {
        width: 100%;
    }
    .toolbar-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        width: 100%;
    }
    .toolbar-actions .admin-btn {
        width: 100%;
        font-size: 0.82rem;
        padding: 9px 12px;
    }
    .edit-grid {
        grid-template-columns: 1fr !important;
    }
    .modal-card {
        padding: 24px 18px;
        width: 95%;
        max-height: 92vh;
    }
    .admin-card {
        padding: 20px 16px;
    }
    .settings-tabs {
        gap: 8px;
    }
    .settings-tab {
        padding: 9px 14px;
        font-size: 0.82rem;
        flex: 1 1 calc(50% - 8px);
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .admin-stats-grid {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }
    .admin-stat-card {
        padding: 18px;
    }
    .admin-stat-value {
        font-size: 1.8rem;
    }
    .toolbar-actions {
        grid-template-columns: 1fr;
    }
    .nav-links a {
        flex: 1 1 100%;
    }
    .settings-tab {
        flex: 1 1 100%;
    }
}

/* ==========================================================================
   REDESIGNED VISITOR REGISTRATION TABLE STYLES
   ========================================================================== */

.reg-table-card {
    background: #ffffff;
    border: 1px solid var(--admin-border);
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    margin-bottom: 28px;
}

.reg-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
    flex-wrap: wrap;
    gap: 12px;
}

.reg-table-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 10px;
}

.reg-count-badge {
    background: #e0f2fe;
    color: #0369a1;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
}

.reg-table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.reg-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 100%;
    table-layout: auto;
}

.reg-table th {
    background: #f8fafc;
    color: #475569;
    font-weight: 700;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 14px;
    border-bottom: 2px solid #e2e8f0;
    text-align: left;
    white-space: nowrap;
}

.reg-table td {
    padding: 14px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: top;
    font-size: 0.84rem;
    line-height: 1.4;
}

.reg-table tbody tr:hover {
    background-color: #f8fafc;
}

/* Column Specific Widths */
.col-id-badge { width: 110px; }
.col-visitor { width: 25%; }
.col-contact { width: 22%; }
.col-company { width: 22%; }
.col-status { width: 145px; }
.col-actions { width: 230px; }

/* Stacked Content Formats */
.visitor-stack .v-name {
    font-weight: 700;
    color: #0f172a;
    font-size: 0.92rem;
    display: block;
    margin-bottom: 2px;
}
.visitor-stack .v-desig {
    font-size: 0.78rem;
    color: #64748b;
    display: block;
}

.contact-stack .c-email {
    font-size: 0.82rem;
    color: #0284c7;
    word-break: break-all;
    display: block;
    margin-bottom: 4px;
    text-decoration: none;
}
.contact-stack .c-email:hover {
    text-decoration: underline;
}
.contact-stack .c-phone {
    font-size: 0.82rem;
    color: #334155;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.company-stack .c-name {
    font-weight: 700;
    color: #0f172a;
    display: block;
    margin-bottom: 3px;
}
.company-stack .c-addr {
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.35;
    display: block;
}

.cat-pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.cat-pill {
    background: #f1f5f9;
    color: #475569;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    line-height: 1.3;
    border: 1px solid #e2e8f0;
}

/* Pagination Styles */
.table-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: #fafafa;
    border-top: 1px solid #e2e8f0;
    flex-wrap: wrap;
    gap: 12px;
}
.pagination-info {
    font-size: 0.82rem;
    color: #64748b;
}
.pagination-links {
    display: flex;
    gap: 6px;
}
.page-link-btn {
    padding: 6px 12px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #475569;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.15s ease;
}
.page-link-btn:hover {
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
}
.page-link-btn.active {
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
}
.page-link-btn.disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* ==========================================================================
   MODAL OVERLAY & POPUP DIALOG STYLES
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    display: none; /* Controlled via JS */
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 20px;
    box-sizing: border-box;
}

.modal-card {
    background: #ffffff;
    border-radius: 16px;
    width: 100%;
    max-width: 640px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px 28px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    animation: modalPopIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPopIn {
    from { opacity: 0; transform: scale(0.94) translateY(12px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.edit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.edit-grid .full-width {
    grid-column: span 2;
}

.cat-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    max-height: 180px;
    overflow-y: auto;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 12px;
    background: #f8fafc;
}

.cat-checkbox-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.8rem;
    color: #334155;
    cursor: pointer;
    line-height: 1.3;
}

.action-btn-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}

.action-btn-group .admin-btn {
    padding: 6px 10px;
    font-size: 0.78rem;
    white-space: nowrap;
}



