/* Receipt Entry Form - Frontend Styles */

.ref-form-wrap {
    max-width: 540px;
    margin: 0 auto;
    background: #fff;
    border-radius: 16px;
    padding: 36px 40px 40px;
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.08);
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Fields */
.ref-field {
    margin-bottom: 20px;
}

.ref-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.ref-field .req {
    color: #e74c3c;
}

.ref-field input[type="text"],
.ref-field input[type="email"],
.ref-field input[type="tel"],
.ref-field input[type="date"] {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    color: #111827;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    outline: none;
}

.ref-field input:focus {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

/* Date field */
.ref-date-wrap {
    position: relative;
}

.ref-calendar-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
    display: flex;
    align-items: center;
}

.ref-date-wrap input[type="date"] {
    padding-left: 38px;
}

/* Upload zone */
.ref-upload-zone {
    position: relative;
    border: 2px dashed #e5e7eb;
    border-radius: 10px;
    background: #fafafa;
    transition: border-color 0.2s, background 0.2s;
    cursor: pointer;
}

.ref-upload-zone:hover,
.ref-upload-zone.ref-drag-over {
    border-color: #e74c3c;
    background: #fff5f5;
}

.ref-upload-zone input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.ref-upload-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
    text-align: center;
    pointer-events: none;
}

.ref-upload-inner p {
    margin: 10px 0 4px;
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.ref-upload-inner small {
    font-size: 12px;
    color: #9ca3af;
}

/* Preview */
.ref-preview {
    padding: 16px;
    text-align: center;
}

.ref-preview img {
    max-height: 200px;
    max-width: 100%;
    border-radius: 8px;
    object-fit: contain;
    margin-bottom: 10px;
    display: block;
    margin: 0 auto 10px;
}

.ref-remove-file {
    background: none;
    border: 1.5px solid #e74c3c;
    color: #e74c3c;
    border-radius: 6px;
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.ref-remove-file:hover {
    background: #e74c3c;
    color: #fff;
}

/* Checkboxes */
.ref-checkbox-field {
    padding: 2px 0;
}

.ref-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 13.5px;
    color: #374151;
    line-height: 1.5;
}

.ref-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    border: 1.5px solid #d1d5db;
    border-radius: 4px;
    margin-top: 1px;
    accent-color: #e74c3c;
    cursor: pointer;
}

.ref-checkbox-label a {
    color: #e74c3c;
    text-decoration: underline;
}

/* Messages */
.ref-messages {
    margin: 12px 0;
    font-size: 13.5px;
}

.ref-msg-error {
    background: #fff0f0;
    border: 1px solid #fecaca;
    color: #dc2626;
    border-radius: 8px;
    padding: 12px 16px;
}

.ref-msg-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
    border-radius: 8px;
    padding: 12px 16px;
}

/* Submit button */
.ref-submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #e74c3c, #e67e22);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity 0.2s, transform 0.15s;
    margin-top: 8px;
}

.ref-submit-btn:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.ref-submit-btn:active {
    transform: translateY(0);
}

.ref-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Spinner */
.ref-spinner {
    animation: ref-spin 0.7s linear infinite;
}

@keyframes ref-spin {
    to { transform: rotate(360deg); }
}

/* Success screen */
.ref-success-screen {
    text-align: center;
    padding: 40px 20px;
}

.ref-success-icon {
    font-size: 56px;
    margin-bottom: 16px;
}

.ref-success-screen h3 {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 12px;
}

.ref-success-screen p {
    color: #6b7280;
    font-size: 15px;
    line-height: 1.6;
    max-width: 360px;
    margin: 0 auto;
}

@media (max-width: 600px) {
    .ref-form-wrap {
        padding: 24px 20px 28px;
        border-radius: 12px;
    }
}
