* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ed 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.signup-container,
.admin-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    width: 100%;
    max-width: 440px;
    overflow: hidden;
}

.admin-container {
    max-width: 500px;
}

.header {
    background: #f8f9fb;
    padding: 32px 40px 24px;
    text-align: center;
    border-bottom: 1px solid #eaeef3;
}

.logo {
    max-width: 280px;
    height: auto;
    margin-bottom: 8px;
}

.header h1 {
    color: #1a1a1a;
    font-size: 24px;
    font-weight: 600;
    margin-top: 16px;
    margin-bottom: 8px;
}

.header p {
    color: #6b7280;
    font-size: 14px;
    margin-top: 8px;
}

.form-container {
    padding: 32px 40px 40px;
}

.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.form-group {
    flex: 1;
    margin-bottom: 20px;
}

.form-row .form-group {
    margin-bottom: 0;
}

.admin-container .form-group {
    margin-bottom: 24px;
}

label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.admin-container label {
    margin-bottom: 8px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s;
    background: #ffffff;
}

input:focus,
select:focus {
    outline: none;
    border-color: #0072C6;
    box-shadow: 0 0 0 3px rgba(0, 114, 198, 0.1);
}

.password-requirements {
    font-size: 13px;
    color: #6b7280;
    margin-top: 6px;
}

.legal-checkbox {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    margin: 20px 0;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.legal-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    cursor: pointer;
    margin-top: 2px;
}

.legal-checkbox label {
    font-size: 13px;
    font-weight: normal;
    color: #4b5563;
    line-height: 1.6;
    margin: 0;
    cursor: pointer;
    flex: 1;
}

.legal-checkbox a {
    color: #0072C6;
    text-decoration: none;
}

.legal-checkbox a:hover {
    text-decoration: underline;
}

.captcha-container {
    display: flex;
    justify-content: center;
    margin: 24px 0;
}

.submit-btn,
.generate-btn {
    width: 100%;
    padding: 14px 24px;
    background: #0072C6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
}

.submit-btn:hover:not(:disabled),
.generate-btn:hover:not(:disabled) {
    background: #005a9e;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 114, 198, 0.3);
}

.submit-btn:disabled,
.generate-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.submit-btn.loading,
.generate-btn.loading {
    position: relative;
    color: transparent;
}

.submit-btn.loading::after,
.generate-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    display: none;
}

.message.show {
    display: block;
}

.message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.login-link {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
    font-size: 14px;
    color: #6b7280;
}

.login-link a {
    color: #0072C6;
    text-decoration: none;
    font-weight: 500;
}

.login-link a:hover {
    text-decoration: underline;
}

.footer {
    text-align: center;
    padding: 20px;
    font-size: 12px;
    color: #9ca3af;
}

.footer a {
    color: #6b7280;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

.success-container {
    display: none;
    text-align: center;
    padding: 40px;
}

.success-container.show {
    display: block;
}

.success-icon {
    width: 64px;
    height: 64px;
    background: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.success-icon svg {
    width: 32px;
    height: 32px;
    color: white;
}

.success-container h2 {
    color: #1f2937;
    font-size: 24px;
    margin-bottom: 12px;
}

.success-container p {
    color: #6b7280;
    font-size: 15px;
    line-height: 1.6;
}

.form-container.hidden {
    display: none;
}

.code-result {
    margin-top: 24px;
    padding: 20px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    display: none;
}

.code-result.show {
    display: block;
}

.code-result-label {
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.code-display {
    font-size: 32px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    text-align: center;
    letter-spacing: 4px;
    margin: 8px 0;
    padding: 12px;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
}

.code-display span {
    display: inline-block;
    line-height: 1;
}

.code-display span.number {
    color: #0072C6;
}

.code-display span.letter {
    color: #000000;
}

.code-info {
    font-size: 13px;
    color: #6b7280;
    text-align: center;
    margin-top: 8px;
}

.copy-btn {
    width: 100%;
    padding: 10px;
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 12px;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: #e5e7eb;
}

.copy-btn.copied {
    background: #d1fae5;
    color: #065f46;
    border-color: #6ee7b7;
}

@media (max-width: 480px) {

    .signup-container,
    .admin-container {
        border-radius: 0;
        box-shadow: none;
    }

    .header,
    .form-container {
        padding-left: 24px;
        padding-right: 24px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .form-row .form-group {
        margin-bottom: 20px;
    }

    .legal-checkbox {
        padding: 12px;
    }
}