/* 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&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;
}

.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;
}

.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;
}

.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;
}

.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);
}

/* ==========================================================================
   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);
}

.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;
    }
}
