*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    height: 100%;
    overflow: hidden;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --secondary: #7c3aed;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --bg-light: #f8fafc;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-main);
    line-height: 1.5;
    background-color: var(--bg-light);
    height: 100%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.main-header {
    background: var(--white) !important;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-brand {
    flex-shrink: 0;
}

.nav-menu {
    display: flex;
    align-items: center;
}

.nav-brand a {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -1px;
}

.header-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.nav-menu a {
    margin-left: 1.5rem;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    transition: color 0.2s;
    white-space: nowrap;
}

.nav-menu a:hover {
    color: var(--primary);
}

/* Main Content */
main {
    flex: 1;
}

/* Hero Section */
.hero {
    padding: 120px 0;
    text-align: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

/* Admin Specific Styles */
.admin-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    border: 1px solid #e2e8f0;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e2e8f0;
}

.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 1rem;
}

.admin-table th {
    background: #f8fafc;
    padding: 1rem;
    font-weight: 600;
    text-align: left;
    border-bottom: 2px solid #e2e8f0;
    color: var(--text-muted);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.admin-table td {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}

.admin-table tr:hover td {
    background-color: #f8fafc;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    font-size: 0.875rem;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }

.btn-secondary { background: var(--secondary); color: white; }
.btn-secondary:hover { opacity: 0.9; transform: translateY(-1px); }

.btn-danger { background: #ef4444; color: white; }
.btn-danger:hover { background: #dc2626; }

.btn-ghost { background: transparent; color: var(--text-muted); border: 1px solid #e2e8f0; }
.btn-ghost:hover { background: #f1f5f9; color: var(--text-main); }

.form-group { margin-bottom: 1.5rem; }
.form-label { display: block; margin-bottom: 0.5rem; font-weight: 500; color: var(--text-main); }
.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-size: 1rem;
}
.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}
.badge-success { background: #dcfce7; color: #166534; }
.badge-danger { background: #fee2e2; color: #991b1b; }

.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}
.alert-success { background: #dcfce7; border: 1px solid #bbf7d0; color: #15803d; }
.alert-error { background: #fee2e2; border: 1px solid #fecaca; color: #b91c1c; }

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.25rem;
    color: #cbd5e1;
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* Card Style for Uploads */
.card-wrapper {
    display: flex;
    justify-content: center;
    padding: 40px 0;
}

.card {
    background: var(--white);
    border-radius: 24px;
    padding: 40px 36px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.1);
    text-align: center;
}

/* How It Works Section */
.info-section {
    padding: 100px 0;
    background-color: #fcfdfe;
    background-image: radial-gradient(#e2e8f0 0.5px, transparent 0.5px);
    background-size: 24px 24px;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-main);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    position: relative;
}

.step {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0,0,0,0.03);
    position: relative;
    overflow: hidden;
}

.step:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px -15px rgba(0,0,0,0.1);
}

.step::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
    opacity: 0;
    transition: opacity 0.3s;
}

.step:hover::before {
    opacity: 1;
}

.step-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--bg-light) 0%, #e2e8f0 100%);
    color: var(--primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    position: relative;
    z-index: 1;
}

.step-number {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 3rem;
    font-weight: 900;
    color: var(--bg-light);
    line-height: 1;
    z-index: 0;
    user-select: none;
}

.step h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
    position: relative;
    z-index: 1;
}

.step p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

/* Footer */
.main-footer {
    background: linear-gradient(180deg, #0f172a 0%, #090d16 100%);
    color: #94a3b8;
    padding: 70px 0 30px;
    margin-top: auto;
    border-top: 1px solid #1e293b;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.footer-section h3 {
    color: var(--white);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    position: relative;
}

.footer-section p {
    margin-bottom: 0.75rem;
    font-size: 0.92rem;
    line-height: 1.6;
}

.footer-section a {
    color: #94a3b8;
    transition: color 0.25s ease, transform 0.25s ease;
    display: inline-block;
}

.footer-section a:hover {
    color: var(--primary);
    transform: translateX(4px);
}

.footer-bottom {
    border-top: 1px solid #1e293b;
    padding-top: 25px;
    text-align: center;
    font-size: 0.85rem;
    color: #64748b;
}

.footer-bottom p {
    margin-bottom: 0.5rem;
}

.footer-bottom p:last-child {
    margin-bottom: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
        padding: 0 1rem;
    }
    
    .hero p {
        font-size: 1.1rem;
        padding: 0 1rem;
    }

    .info-section {
        padding: 60px 0;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .nav-menu {
        flex-direction: column;
        align-items: flex-start !important;
        padding: 1rem 0;
        width: 100%;
        gap: 8px;
    }

    .nav-menu a {
        margin-left: 0 !important;
        padding: 8px 12px !important;
        width: 100%;
        display: block;
        border-radius: 8px;
        transition: background-color 0.2s;
    }

    .nav-menu a:hover {
        background-color: var(--bg-light);
    }
}

/* Legacy styles compatibility */
.logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: block;
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.drop-zone {
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
    padding: 32px 20px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    position: relative;
    margin-bottom: 20px;
}
.drop-zone:hover, .drop-zone.dragover { border-color: #2563eb; background: #eff6ff; }
.drop-zone input[type=file] {
    position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.drop-icon { font-size: 2.4rem; margin-bottom: 10px; }
.drop-text { color: #475569; font-size: 0.95rem; line-height: 1.5; }
.btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
}
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 99px;
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 16px;
}
.badge-online { background: #dcfce7; color: #16a34a; }
.badge-offline { background: #fee2e2; color: #dc2626; }
.file-name {
    background: #f1f5f9;
    font-size: 0.9rem;
    color: #334155;
    font-weight: 600;
    word-break: break-all;
    margin-bottom: 5px;
}

/* Stats Section */
.stats-section {
    padding: 80px 0;
    background: var(--white);
    border-top: 1px solid #e2e8f0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 30px;
    text-align: center;
}

.stat-card {
    padding: 20px;
}

.stat-value {
    font-size: 2.8rem;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
}

.stat-label {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Payment Flow Horizontal Arrows */
.payment-flow-line {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 30px;
    margin-top: 3rem;
    padding: 20px 0;
}

.payment-flow-line .flow-item {
    flex: 1;
    text-align: center;
    position: relative;
}

.payment-flow-line .flow-item:not(:last-child)::after {
    content: "→";
    position: absolute;
    top: 30px;
    right: -25px;
    font-size: 1.8rem;
    color: var(--primary);
    font-weight: bold;
    opacity: 0.6;
}

.payment-flow-line .flow-icon {
    width: 70px;
    height: 70px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    border: 3px solid var(--primary);
    color: var(--primary);
    box-shadow: 0 10px 20px -5px rgba(37, 99, 235, 0.2);
    transition: transform 0.3s ease;
}

.payment-flow-line .flow-item:hover .flow-icon {
    transform: scale(1.1);
}

.payment-flow-line h3 {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    color: var(--text-main);
    font-weight: 800;
}

.payment-flow-line p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

@media (max-width: 900px) {
    .payment-flow-line {
        flex-direction: column;
        align-items: center;
        gap: 40px;
    }
    .payment-flow-line .flow-item:not(:last-child)::after {
        content: "↓";
        position: static;
        display: block;
        margin-top: 20px;
    }
}
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.impact-link {
    color: var(--primary) !important;
    font-weight: 700 !important;
}

.impact-link::after {
    content: ' ✨';
}
