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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f8fafc;
    color: #0f172a;
    line-height: 1.5;
    padding: 2.5rem 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 540px;
    margin: 0 auto;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: -0.025em;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 0.95rem;
    color: #64748b;
}

/* Card Container */
.card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 2.25rem 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.04), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
}

/* Form Controls */
.form-group {
    margin-bottom: 1.35rem;
    display: flex;
    flex-direction: column;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.4rem;
}

.required {
    color: #dc2626;
}

.form-control,
.form-select {
    width: 100%;
    padding: 0.65rem 0.85rem;
    font-size: 0.95rem;
    font-family: inherit;
    color: #0f172a;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2564748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.25em 1.25em;
    padding-right: 2.5rem;
}

.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-control:disabled,
.form-select:disabled {
    background-color: #f1f5f9;
    border-color: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: #dc2626;
}

.form-control.is-invalid:focus,
.form-select.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

.helper-text {
    font-size: 0.775rem;
    color: #64748b;
    margin-top: 0.3rem;
}

.error-text {
    font-size: 0.8rem;
    color: #dc2626;
    font-weight: 500;
    margin-top: 0.3rem;
    display: none;
}

.error-text.visible {
    display: block;
}

/* Actions & Buttons */
.form-actions {
    margin-top: 1.75rem;
}

.btn {
    width: 100%;
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out, transform 0.1s ease-in-out;
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

.btn-primary {
    background-color: #2563eb;
    color: #ffffff;
}

.btn-primary:hover:not(:disabled) {
    background-color: #1d4ed8;
}

.btn-primary:active:not(:disabled) {
    transform: scale(0.99);
}

.btn-secondary {
    background-color: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
    margin-top: 1.25rem;
}

.btn-secondary:hover {
    background-color: #e2e8f0;
}

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

/* Alert Box */
.alert {
    padding: 0.85rem 1.1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.25rem;
}

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

/* Success Card */
.success-card {
    text-align: center;
    padding: 3rem 2rem;
}

.success-icon {
    color: #16a34a;
    margin-bottom: 1.25rem;
}

.success-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #15803d;
    margin-bottom: 0.5rem;
}

.success-message {
    font-size: 0.95rem;
    color: #475569;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Responsive Scaling */
@media (max-width: 480px) {
    body {
        padding: 1.5rem 0.75rem;
    }

    .card {
        padding: 1.5rem 1.25rem;
    }

    .title {
        font-size: 1.5rem;
    }
}
