/* =============================================
   FREE SAP SD WEBINAR — Stylesheet
   Mobile-first, professional, modern design
   ============================================= */

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

/* ── Variables ── */
:root {
    --primary: #1a73e8;
    --primary-dark: #0d47a1;
    --primary-light: #e8f0fe;
    --accent: #ff6d00;
    --success: #0f9d58;
    --danger: #d93025;
    --text: #202124;
    --text-light: #5f6368;
    --bg: #f8f9fa;
    --white: #ffffff;
    --border: #dadce0;
    --radius: 8px;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
    --max-width: 960px;
    --transition: 0.2s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ── Hero Section ── */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    text-align: center;
    padding: 60px 20px 50px;
}

.hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    color: var(--white);
    font-size: 14px;
    font-weight: 700;
    padding: 6px 18px;
    border-radius: 20px;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.hero-title {
    font-size: 36px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 12px;
}

.hero-subtitle {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 28px;
    font-weight: 400;
}

.hero-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    margin-bottom: 24px;
}

.hero-detail {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    opacity: 0.95;
}

.hero-detail-icon {
    font-size: 20px;
}

.hero-free-tag {
    display: inline-block;
    background: var(--success);
    color: var(--white);
    font-size: 16px;
    font-weight: 700;
    padding: 10px 24px;
    border-radius: 6px;
    margin-bottom: 28px;
}

@media (min-width: 768px) {
    .hero-details {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        gap: 28px;
    }
}

/* ── CTA Button ── */
.cta-btn {
    display: inline-block;
    background: var(--accent);
    color: var(--white);
    font-size: 18px;
    font-weight: 700;
    padding: 16px 40px;
    border-radius: 6px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition);
    letter-spacing: 0.5px;
}

.cta-btn:hover {
    background: #e65100;
    text-decoration: none;
    transform: translateY(-1px);
}

.cta-disabled {
    background: #9e9e9e;
    cursor: not-allowed;
    pointer-events: none;
}

/* ── Topics Section ── */
.topics-section {
    padding: 60px 20px;
    background: var(--white);
}

.section-title {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 36px;
    color: var(--text);
}

.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    max-width: 800px;
    margin: 0 auto;
}

.topic-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: var(--primary-light);
    border-radius: var(--radius);
    border-left: 4px solid var(--primary);
}

.topic-check {
    color: var(--primary);
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
}

.topic-text {
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
}

/* ── Why Section ── */
.why-section {
    padding: 60px 20px;
    background: var(--bg);
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    max-width: 800px;
    margin: 0 auto;
}

.why-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 28px 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform var(--transition);
}

.why-card:hover {
    transform: translateY(-4px);
}

.why-icon {
    font-size: 36px;
    margin-bottom: 12px;
}

.why-card h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
}

.why-card p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.5;
}

/* ── Bottom CTA ── */
.bottom-cta {
    padding: 60px 20px;
    text-align: center;
    background: var(--white);
}

.bottom-cta h2 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 12px;
}

.bottom-cta p {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 28px;
}

/* ── Footer ── */
.footer {
    padding: 24px 20px;
    text-align: center;
    background: var(--bg);
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-light);
}

/* =============================================
   REGISTER PAGE
   ============================================= */

.register-page {
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.register-container {
    width: 100%;
    max-width: 480px;
}

.register-card {
    background: var(--white);
    border-radius: 12px;
    padding: 36px 28px;
    box-shadow: var(--shadow-lg);
}

.register-back {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 20px;
    display: inline-block;
}

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

.register-header {
    text-align: center;
    margin-bottom: 28px;
}

.register-header h1 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
}

.register-header p {
    font-size: 14px;
    color: var(--text-light);
}

/* ── Form ── */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.req {
    color: var(--danger);
}

.form-group input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 16px;
    color: var(--text);
    background: var(--white);
    transition: border-color var(--transition), box-shadow var(--transition);
    -webkit-appearance: none;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,115,232,0.15);
}

.form-group input.input-error {
    border-color: var(--danger);
}

.field-error {
    display: block;
    font-size: 12px;
    color: var(--danger);
    margin-top: 4px;
    min-height: 16px;
}

.submit-btn {
    width: 100%;
    text-align: center;
    font-size: 16px;
    padding: 14px 20px;
    margin-top: 8px;
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-global-error {
    margin-top: 16px;
    padding: 12px 16px;
    background: #fce8e6;
    color: var(--danger);
    border-radius: var(--radius);
    font-size: 14px;
    text-align: center;
}

/* =============================================
   SUCCESS PAGE
   ============================================= */

.success-page {
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.success-container {
    width: 100%;
    max-width: 520px;
}

.success-card {
    background: var(--white);
    border-radius: 12px;
    padding: 40px 28px;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.success-icon {
    font-size: 56px;
    margin-bottom: 16px;
}

.success-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--success);
    margin-bottom: 16px;
}

.success-thankyou {
    font-size: 18px;
    color: var(--text);
    margin-bottom: 8px;
}

.success-msg {
    font-size: 15px;
    color: var(--text-light);
    margin-bottom: 28px;
}

.success-details {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 28px;
    text-align: left;
}

.success-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

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

.success-label {
    font-size: 14px;
    color: var(--text-light);
}

.success-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.success-value.highlight {
    color: var(--primary);
    font-size: 15px;
}

.meet-btn {
    margin-bottom: 16px;
}

.success-email-note {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 24px;
}

.back-link {
    font-size: 14px;
    color: var(--text-light);
}

/* =============================================
   ADMIN PAGES
   ============================================= */

.admin-login-page {
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.admin-login-card {
    background: var(--white);
    border-radius: 12px;
    padding: 36px 28px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.admin-login-card h1 {
    font-size: 20px;
    margin-bottom: 8px;
}

.admin-login-card p {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 24px;
}

/* ── Admin Layout ── */
.admin-layout {
    min-height: 100vh;
    background: var(--bg);
}

.admin-topbar {
    background: var(--primary-dark);
    color: var(--white);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-topbar h2 {
    font-size: 18px;
    font-weight: 700;
}

.admin-topbar a {
    color: var(--white);
    font-size: 14px;
    opacity: 0.85;
}

.admin-topbar a:hover {
    opacity: 1;
    text-decoration: none;
}

.admin-body {
    padding: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

/* ── Stats Grid ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    text-align: center;
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 13px;
    color: var(--text-light);
    margin-top: 4px;
}

.stat-card.facebook .stat-number { color: #1877f2; }
.stat-card.instagram .stat-number { color: #e4405f; }
.stat-card.qr .stat-number { color: #00c853; }
.stat-card.direct .stat-number { color: #ff6d00; }
.stat-card.today .stat-number { color: var(--success); }

/* ── Table ── */
.table-wrap {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.table-toolbar {
    padding: 16px 20px;
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border);
}

.table-toolbar input,
.table-toolbar select {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
}

.table-toolbar input {
    flex: 1;
    min-width: 200px;
}

.table-toolbar button {
    padding: 8px 16px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

.table-toolbar button:hover {
    background: var(--primary-dark);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th {
    background: var(--bg);
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-light);
    font-size: 13px;
    white-space: nowrap;
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.data-table tr:hover td {
    background: #f8f9fa;
}

.data-table .badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-registered { background: #e6f4ea; color: #0f9d58; }
.badge-cancelled { background: #fce8e6; color: #d93025; }
.badge-sent { background: #e6f4ea; color: #0f9d58; }
.badge-pending { background: #fef7e0; color: #e37400; }
.badge-failed { background: #fce8e6; color: #d93025; }
.badge-facebook { background: #e8f0fe; color: #1877f2; }
.badge-instagram { background: #fce4ec; color: #e4405f; }
.badge-qr { background: #e8f5e9; color: #2e7d32; }
.badge-direct { background: #fff3e0; color: #e65100; }
.badge-other { background: #f3e5f5; color: #7b1fa2; }

.actions-cell {
    display: flex;
    gap: 6px;
}

.action-btn {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.action-btn-view { background: var(--primary-light); color: var(--primary); }
.action-btn-email { background: #e8f5e9; color: #0f9d58; }
.action-btn-cancel { background: #fce8e6; color: #d93025; }

.action-btn:hover { opacity: 0.8; text-decoration: none; }

/* ── Admin Detail View ── */
.detail-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 20px;
}

.detail-card h2 {
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.detail-item label {
    display: block;
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-item span {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

.detail-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.detail-actions .action-btn {
    padding: 10px 20px;
    font-size: 14px;
    border-radius: var(--radius);
}

/* ── Empty State ── */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-light);
}

.empty-state p {
    font-size: 16px;
}

/* =============================================
   MOBILE RESPONSIVE
   ============================================= */

@media (max-width: 640px) {
    .hero-title {
        font-size: 26px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .cta-btn {
        font-size: 16px;
        padding: 14px 28px;
        width: 100%;
    }

    .topics-grid {
        grid-template-columns: 1fr;
    }

    .why-grid {
        grid-template-columns: 1fr 1fr;
    }

    .register-card {
        padding: 28px 20px;
    }

    .success-card {
        padding: 28px 20px;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .data-table {
        font-size: 12px;
    }

    .data-table th,
    .data-table td {
        padding: 8px 10px;
    }

    .table-toolbar {
        flex-direction: column;
    }

    .table-toolbar input {
        min-width: auto;
        width: 100%;
    }
}
