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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8fafc;
    color: #1e293b;
    line-height: 1.6;
    min-height: 100vh;
}

/* Language Switcher */
.lang-switcher {
    position: fixed;
    top: 16px;
    right: 16px;
    display: flex;
    gap: 4px;
    z-index: 100;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.lang-switcher a {
    padding: 6px 12px;
    text-decoration: none;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

.lang-switcher a.active {
    background: #4f46e5;
    color: white;
}

.lang-switcher a:hover:not(.active) {
    background: #f1f5f9;
    color: #1e293b;
}

/* Layout */
.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 48px 16px;
}

.container-wide {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 16px;
}

/* Card */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    padding: 32px;
}

/* Header */
.page-header {
    text-align: center;
    margin-bottom: 32px;
}

.page-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
}

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

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 6px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="password"],
.form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    color: #0f172a;
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input::placeholder {
    color: #9ca3af;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}

.form-group .error-text {
    color: #dc2626;
    font-size: 13px;
    margin-top: 4px;
    display: none;
}

.form-group.has-error input {
    border-color: #dc2626;
}

.form-group.has-error .error-text {
    display: block;
}

/* Radio Buttons */
.radio-group {
    display: flex;
    gap: 16px;
    margin-top: 6px;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
    color: #0f172a;
}

.radio-group input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #4f46e5;
}

/* Checkboxes */
.checkbox-group {
    margin-bottom: 12px;
}

.checkbox-group label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #0f172a;
    font-weight: 400;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: #4f46e5;
    flex-shrink: 0;
}

.checkbox-group a {
    color: #4f46e5;
    text-decoration: underline;
}

.checkbox-group .error-text {
    color: #dc2626;
    font-size: 13px;
    margin-top: 4px;
    margin-left: 28px;
    display: none;
}

.checkbox-group.has-error .error-text {
    display: block;
}

/* Payment Buttons */
.payment-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 24px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

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

.btn-paypal {
    background: #0070ba;
    color: white;
}

.btn-paypal:hover:not(:disabled) {
    background: #005ea6;
}

.btn-invoice {
    background: #0f172a;
    color: white;
}

.btn-invoice:hover:not(:disabled) {
    background: #1e293b;
}

.btn-sm {
    padding: 4px 10px !important;
    font-size: 12px !important;
    min-width: auto;
}

.btn-danger {
    background: #dc2626;
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #b91c1c;
}

.btn-primary {
    background: #4f46e5;
    color: white;
    width: 100%;
}

.btn-primary:hover:not(:disabled) {
    background: #4338ca;
}

.btn-success {
    background: #16a34a;
    color: white;
}

.btn-success:hover {
    background: #15803d;
}

/* Success Page */
.success-icon {
    font-size: 48px;
    color: #16a34a;
    margin-bottom: 16px;
}

.success-text {
    color: #334155;
    margin-bottom: 24px;
}

.back-link {
    color: #4f46e5;
    text-decoration: none;
    font-size: 14px;
}

.back-link:hover {
    text-decoration: underline;
}

/* Alert */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

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

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

/* Admin Dashboard */
.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.admin-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
}

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

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #0f172a;
}

.stat-label {
    font-size: 13px;
    color: #64748b;
    margin-top: 4px;
}

/* Filters */
.filters {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.filters select {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    color: #0f172a;
    background: white;
}

.filters .btn {
    margin-left: auto;
    padding: 8px 16px;
    font-size: 14px;
}

/* Table */
.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: #f8fafc;
}

th {
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #e5e7eb;
}

td {
    padding: 12px 16px;
    font-size: 14px;
    color: #1e293b;
    border-bottom: 1px solid #f1f5f9;
}

tr:hover {
    background: #f8fafc;
}

/* Status Badge */
.status-select {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid;
    cursor: pointer;
}

.status-paid {
    background: #f0fdf4;
    color: #166534;
    border-color: #86efac;
}

.status-pending {
    background: #fefce8;
    color: #854d0e;
    border-color: #fde047;
}

.no-results {
    text-align: center;
    padding: 32px;
    color: #64748b;
}

/* Legal Pages */
.legal-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 48px 16px;
}

.legal-content h1 {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 24px;
}

.legal-content h2 {
    font-size: 18px;
    font-weight: 600;
    color: #0f172a;
    margin-top: 24px;
    margin-bottom: 8px;
}

.legal-content p {
    color: #334155;
    margin-bottom: 12px;
}

.legal-content ul {
    color: #334155;
    margin: 8px 0 12px 24px;
}

.legal-content li {
    margin-bottom: 4px;
}

.legal-date {
    color: #94a3b8;
    font-size: 14px;
    margin-top: 32px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

/* Responsive */
@media (max-width: 640px) {
    .payment-buttons {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .filters {
        flex-direction: column;
    }

    .filters .btn {
        margin-left: 0;
    }
}
