* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4f46e5;
    --primary-dark: #4338ca;
    --secondary-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --success-color: #10b981;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-900: #111827;
    --border-radius: 8px;
    --box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --box-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: var(--gray-900);
}

.container {
    width: 100%;
    max-width: 500px;
}

.card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-lg);
    padding: 40px;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 5px;
}

.header p {
    font-size: 14px;
    color: var(--gray-600);
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--gray-700);
    font-size: 14px;
}

select,
textarea,
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="date"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s, box-shadow 0.3s;
    background-color: white;
}

select:focus,
textarea:focus,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="date"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

textarea {
    resize: vertical;
    min-height: 150px;
    font-family: 'Monaco', 'Courier New', monospace;
}

button {
    width: 100%;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-lg);
}

button:active:not(:disabled) {
    transform: translateY(0);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.button-secondary {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #059669 100%);
}

.button-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #dc2626 100%);
}

.alert {
    padding: 12px 16px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    font-size: 14px;
    animation: slideDown 0.3s ease-out;
}

.alert ul {
    list-style-type: none;
    padding: 0;
}

.alert li {
    padding: 6px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.alert li:last-child {
    border-bottom: none;
}

.alert code {
    background-color: rgba(0, 0, 0, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border-left: 4px solid var(--success-color);
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--danger-color);
}

.alert-warning {
    background-color: #fef3c7;
    color: #92400e;
    border-left: 4px solid var(--warning-color);
}

.alert-info {
    background-color: #dbeafe;
    color: #0c2d6b;
    border-left: 4px solid var(--primary-color);
}

.voucher-display {
    background: var(--gray-50);
    border: 2px dashed var(--primary-color);
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
    margin-bottom: 20px;
    animation: pulse 0.6s ease-out;
}

@keyframes pulse {
    from {
        transform: scale(0.95);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.voucher-label {
    font-size: 12px;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.voucher-code {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'Monaco', 'Courier New', monospace;
    letter-spacing: 2px;
    word-break: break-all;
}

.stats {
    background: var(--gray-50);
    border-radius: var(--border-radius);
    padding: 15px;
    margin-top: 20px;
    font-size: 13px;
    color: var(--gray-600);
}

.stats-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.stats-row:last-child {
    margin-bottom: 0;
}

.stats-label {
    font-weight: 600;
}

.stats-value {
    color: var(--primary-color);
    font-weight: 700;
}

.loading {
    display: inline-block;
    width: 4px;
    height: 4px;
    background: currentColor;
    border-radius: 50%;
    animation: loading 1.4s infinite;
}

.loading:nth-child(2) {
    animation-delay: 0.2s;
}

.loading:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes loading {
    0%, 60%, 100% {
        opacity: 0.3;
    }
    30% {
        opacity: 1;
    }
}

.nav-links {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
}

.nav-btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius);
    background-color: var(--gray-200);
    color: var(--gray-700);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.nav-btn.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow);
}

.link-style {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.3s;
}

.link-style:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Responsive design */
@media (max-width: 600px) {
    .card {
        padding: 30px;
    }

    .header h1 {
        font-size: 24px;
    }

    .voucher-code {
        font-size: 24px;
    }

    button {
        padding: 10px 12px;
        font-size: 14px;
    }
}
