/* SmartUPI Demo - Styles */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --success: #16a34a;
    --danger: #dc2626;
    --warning: #f59e0b;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-500: #6b7280;
    --gray-700: #374151;
    --gray-900: #111827;
    --radius: 8px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    background: var(--primary);
    color: white;
    padding: 16px 0;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.header h1 { font-size: 20px; font-weight: 600; }
.header nav a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    margin-left: 20px;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}
.header nav a:hover { color: white; }
.header nav a.active { color: white; border-bottom: 2px solid white; padding-bottom: 2px; }

/* Cards */
.card {
    background: white;
    border-radius: var(--radius);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border: 1px solid var(--gray-200);
    padding: 24px;
    margin-bottom: 20px;
}
.card h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-100);
}

/* Forms */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 4px;
}
.form-group input, .form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #15803d; }
.btn-danger { background: var(--danger); color: white; }
.btn-block { display: block; width: 100%; }

/* Method Toggle */
.method-toggle {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid var(--primary);
}
.method-toggle label {
    flex: 1;
    text-align: center;
    padding: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    background: white;
    color: var(--primary);
    transition: all 0.2s;
}
.method-toggle input[type="radio"] { display: none; }
.method-toggle input[type="radio"]:checked + label {
    background: var(--primary);
    color: white;
}

/* Payment Page */
.payment-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 16px;
}
.payment-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--gray-900);
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}
.payment-option:hover {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.03);
}
.payment-option img { width: 32px; height: 32px; }
.payment-option .icon {
    width: 40px; height: 40px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 700;
}

.qr-section {
    text-align: center;
    padding: 20px;
    background: var(--gray-50);
    border-radius: var(--radius);
    margin-bottom: 16px;
}
.qr-section img { max-width: 200px; margin: 12px auto; }

.redirect-section { text-align: center; margin: 20px 0; }

/* Status Badges */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-success { background: #dcfce7; color: #166534; }
.badge-failed { background: #fee2e2; color: #991b1b; }

/* Status Page */
.status-card { text-align: center; padding: 40px 24px; }
.status-icon { font-size: 60px; margin-bottom: 12px; }
.status-card h2 { border: none; padding: 0; margin-bottom: 8px; }
.status-details {
    text-align: left;
    max-width: 400px;
    margin: 20px auto 0;
    background: var(--gray-50);
    border-radius: 6px;
    padding: 16px;
}
.status-details .row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--gray-100);
}
.status-details .row:last-child { border: none; }
.status-details .label { color: var(--gray-500); }

/* Table */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--gray-100); }
th { background: var(--gray-50); font-weight: 600; color: var(--gray-700); font-size: 12px; text-transform: uppercase; }
td { color: var(--gray-700); }

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}
.alert-danger { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-info { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }
.alert-warning { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }

/* Collect info */
.collect-info {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 6px;
    padding: 16px;
    margin: 16px 0;
}

/* Spinner */
.spinner {
    width: 40px; height: 40px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Responsive */
@media (max-width: 640px) {
    .form-row { grid-template-columns: 1fr; }
    .payment-options { grid-template-columns: 1fr; }
    .header .container { flex-direction: column; gap: 10px; }
}
