/* UI Enhancements */

body {
    font-family: 'Montserrat', sans-serif;
    background-color: #f0f2f5; /* Softer background */
    margin: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.sidebar {
    width: 350px;
    background: #fff;
    padding: 25px;
    border-right: 1px solid #e0e0e0;
    overflow-y: auto;
    box-shadow: 4px 0 15px rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
}

.sidebar h2 {
    margin-top: 0;
    color: #1f5d39;
    font-size: 24px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
    margin-bottom: 25px;
}

.preview-area {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #e5e5e5;
    background-image: 
        linear-gradient(45deg, #ddd 25%, transparent 25%), 
        linear-gradient(-45deg, #ddd 25%, transparent 25%), 
        linear-gradient(45deg, transparent 75%, #ddd 75%), 
        linear-gradient(-45deg, transparent 75%, #ddd 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    padding: 20px;
    overflow: auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: #555;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input[type="text"], select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px; /* Rounded corners */
    box-sizing: border-box;
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.3s;
}

input[type="text"]:focus, select:focus {
    outline: none;
    border-color: #1f5d39;
}

/* Actions Section */
.actions {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

.btn-primary, .btn-action {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.1s, opacity 0.2s;
}

.btn-primary {
    background-color: #1f5d39;
    color: white;
}

.btn-action {
    background-color: #2c3e50;
    color: white;
}

.btn-primary:hover, .btn-action:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: #71aa50;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    margin-top: 5px;
    font-weight: 600;
}

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

.phone-row {
    margin-bottom: 10px;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #eee;
    border-radius: 8px;
    display: grid;
    grid-template-columns: 1fr 1fr; /* 2 columns */
    gap: 8px;
}

.phone-row select, .phone-row input {
    margin-bottom: 0;
    width: 100%;
}

/* Make number input span full width */
.phone-row input[placeholder*="Number"] {
    grid-column: span 2;
}

.phone-row .remove-btn {
    grid-column: span 2;
    background-color: transparent;
    color: #d9534f;
    border: 1px dashed #d9534f;
    padding: 5px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin-top: 5px;
}
.phone-row .remove-btn:hover {
    background-color: #ffeeee;
}

#signaturePreview {
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    background: white; /* Ensure bg is white for capture */
    transition: box-shadow 0.3s;
}

#signatureWrapper {
    /* Padding for capture area if needed */
}
