/**
 * Modern form styles
 */

div.form {
    margin: 0;
}

div.form input,
div.form textarea,
div.form select {
    margin: 4px 0 8px 0;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #334155;
    background: #ffffff;
    transition: all 0.2s ease;
    outline: none;
    width: 100%;
    max-width: 500px;
    box-sizing: border-box;
}

div.form input:focus,
div.form textarea:focus,
div.form select:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

div.form fieldset {
    border: 1px solid #e2e8f0;
    padding: 24px;
    margin: 0 0 20px 0;
    border-radius: 14px;
    background: #f8fafc;
}

div.form label {
    font-weight: 600;
    font-size: 14px;
    display: block;
    color: #475569;
    margin-bottom: 4px;
}

div.form .row {
    margin: 8px 0;
}

div.form .hint {
    margin: 4px 0 0;
    padding: 0;
    color: #94a3b8;
    font-size: 13px;
}

div.form .note {
    font-style: italic;
    color: #64748b;
    font-size: 13px;
}

div.form span.required {
    color: #ef4444;
    font-weight: 600;
}

div.form div.error label,
div.form label.error,
div.form span.error {
    color: #dc2626;
}

div.form div.error input,
div.form div.error textarea,
div.form div.error select,
div.form input.error,
div.form textarea.error,
div.form select.error {
    background: #fef2f2;
    border-color: #ef4444;
}

div.form div.error input:focus,
div.form div.error textarea:focus,
div.form div.error select:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

div.form div.success input,
div.form div.success textarea,
div.form div.success select,
div.form input.success,
div.form textarea.success,
div.form select.success {
    background: #f0fdf4;
    border-color: #22c55e;
}

div.form .errorSummary {
    border: none;
    padding: 16px 20px;
    margin: 0 0 24px 0;
    background: #fef2f2;
    border-radius: 12px;
    border-left: 4px solid #ef4444;
    font-size: 14px;
}

div.form .errorMessage {
    color: #dc2626;
    font-size: 13px;
    font-weight: 500;
    margin-top: 2px;
}

div.form .errorSummary p {
    margin: 0;
    padding: 0;
    font-weight: 600;
    color: #991b1b;
}

div.form .errorSummary ul {
    margin: 8px 0 0;
    padding: 0 0 0 20px;
}

div.form .errorSummary ul li {
    color: #991b1b;
    margin-bottom: 4px;
}

div.wide form label {
    float: left;
    margin-right: 12px;
    position: relative;
    text-align: right;
    width: 120px;
    padding-top: 10px;
}

div.wide form .row {
    clear: left;
}

div.wide form .buttons {
    clear: left;
    padding-left: 132px;
}

div.wide form .errorMessage {
    margin: 2px 0 0 132px;
}

/* Submit buttons in forms */
div.form input[type="submit"],
div.form input[type="button"],
div.form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 28px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.25);
    width: auto;
    max-width: none;
}

div.form input[type="submit"]:hover,
div.form input[type="button"]:hover,
div.form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.35);
}

div.form input[type="submit"]:active,
div.form input[type="button"]:active,
div.form button:active {
    transform: translateY(0);
}