:root {
    --primary-color: #0056a6;
    --light-bg: #f0f7ff;
    --border-color: #eaeaea;
    --text-color: #333;
    --light-text: #555;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background-color: var(--primary-color);
    color: white;
    padding: 20px 0;
    text-align: center;
    margin-bottom: 30px;
    border-radius: 5px;
}

header h1 {
    font-size: 28px;
    margin-bottom: 10px;
}

header p {
    font-size: 16px;
    opacity: 0.9;
}

.app-container {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.form-section {
    flex: 1;
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-height: 85vh;
    overflow-y: auto;
}

.preview-section {
    flex: 1;
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.section-title {
    font-size: 20px;
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

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

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary-color);
}

input, select, textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 15px;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

.btn-group {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

button {
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

.btn-generate {
    background-color: var(--primary-color);
    color: white;
}

.btn-generate:hover {
    filter: brightness(0.9);
}

.btn-reset {
    background-color: #f0f0f0;
    color: var(--text-color);
}

.btn-reset:hover {
    background-color: #e0e0e0;
}

.document-type {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.doc-option {
    flex: 1;
    text-align: center;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.doc-option.active {
    border-color: var(--primary-color);
    background-color: var(--light-bg);
}

.doc-option h3 {
    color: var(--primary-color);
    margin-bottom: 5px;
}

.preview-container {
    flex: 1;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 15px;
    overflow: auto;
    background-color: #f9f9f9;
}

.preview-placeholder {
    text-align: center;
    color: var(--light-text);
    padding: 40px 20px;
}

.preview-placeholder i {
    font-size: 48px;
    margin-bottom: 15px;
    color: #ccc;
}

.actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.btn-print {
    background-color: #28a745;
    color: white;
    width: 100%;
}

.btn-print:hover {
    background-color: #218838;
}

footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    color: var(--light-text);
    font-size: 14px;
    border-top: 1px solid var(--border-color);
}

.benefits-list {
    margin-top: 10px;
}

.benefit-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.benefit-item input {
    flex: 1;
    margin-right: 10px;
}

.remove-benefit {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
}

.add-benefit {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 15px;
    cursor: pointer;
    margin-top: 10px;
}

.color-picker {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.color-picker:focus-within {
    border-color: #0056a6;
    box-shadow: 0 0 0 3px rgba(0, 86, 166, 0.1);
}

.color-picker input[type="color"] {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
    border-radius: 4px;
    -webkit-appearance: none;
    appearance: none;
}

/* Hide default color input UI */
.color-picker input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}
.color-picker input[type="color"]::-moz-color-swatch {
    border: none;
    border-radius: 4px;
}

.color-preview {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 1px solid rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.color-value {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
    font-size: 0.875rem;
    color: #555;
    letter-spacing: 0.5px;
    min-width: 70px;
}


/* Print Styles */
@media print {
    body * {
        visibility: hidden;
    }
    
    #printable-document, #printable-document * {
        visibility: visible;
    }
    
    #printable-document {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        padding: 0;
        margin: 0;
    }
    
    .invoice-container, .receipt-container {
        box-shadow: none;
        padding: 0;
        width: 100%;
        height: 100%;
    }
    
    .no-print {
        display: none !important;
    }
}

@media (max-width: 900px) {
    .app-container {
        flex-direction: column;
    }
}
