/* FUMC Invoice Generator Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    min-height: 100vh;
}

/* Header Styles */
header {
    text-align: center;
    padding: 30px 0;
    border-bottom: 3px solid #818181;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 10px;
    font-weight: 600;
    letter-spacing: 1px;
}

.tagline {
    font-size: 1.1rem;
    color: #818181;
    font-style: italic;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.church-info {
    color: #666;
    font-size: 0.9rem;
}

.church-info p {
    margin-bottom: 5px;
}

/* Authentication Section */
.auth-section {
    text-align: center;
    margin: 40px 0;
    padding: 30px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.auth-section h2 {
    color: #333;
    margin-bottom: 20px;
}

/* Button Styles */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.btn-primary:hover {
    background-color: #666;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: #e0e0e0;
    color: #333;
}

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

.btn-danger {
    background-color: #dc3545;
    color: white;
    font-size: 0.8rem;
    padding: 8px 12px;
}

.btn-danger:hover {
    background-color: #c82333;
}

/* Form Styles */
main {
    margin-top: 30px;
}

main h2 {
    color: #333;
    margin-bottom: 30px;
    text-align: center;
    font-size: 2rem;
}

main h3 {
    color: #333;
    margin: 30px 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
    font-size: 1.3rem;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.form-group {
    flex: 1;
    min-width: 200px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #818181;
    box-shadow: 0 0 0 3px rgba(129, 129, 129, 0.1);
}

.form-group input[readonly] {
    background-color: #f8f9fa;
    color: #666;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Invoice Items Styles */
#invoice-items {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    background: #fafafa;
}

.item-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    align-items: end;
    padding: 15px;
    background: white;
    border-radius: 5px;
    border: 1px solid #e0e0e0;
}

.item-row .form-group:nth-child(1) {
    flex: 3;
}

.item-row .form-group:nth-child(2),
.item-row .form-group:nth-child(3),
.item-row .form-group:nth-child(4) {
    flex: 1;
    min-width: 100px;
}

.remove-item {
    margin-left: 10px;
    align-self: end;
}

/* Invoice Totals */
.invoice-totals {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin: 30px 0;
    border: 2px solid #e0e0e0;
}

.invoice-totals .form-group input.total {
    font-weight: bold;
    font-size: 1.2rem;
    background-color: #fff;
    border-color: #818181;
}

/* Form Actions */
.form-actions {
    text-align: center;
    margin-top: 40px;
    padding: 30px;
    background: #f9f9f9;
    border-radius: 8px;
}

.form-actions .btn {
    margin: 0 10px;
    padding: 15px 30px;
    font-size: 1.1rem;
}

/* Status Message */
#status-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    font-weight: 500;
}

.status-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Invoice List */
#invoice-list {
    margin-top: 40px;
}

#invoices-container {
    display: grid;
    gap: 15px;
    margin-top: 20px;
}

.invoice-item {
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    transition: box-shadow 0.3s ease;
}

.invoice-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.invoice-item h4 {
    color: #333;
    margin-bottom: 10px;
}

.invoice-item p {
    margin-bottom: 5px;
    color: #666;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .item-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-actions .btn {
        display: block;
        width: 100%;
        margin: 10px 0;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }
    
    .tagline {
        font-size: 0.9rem;
    }
    
    .church-info {
        font-size: 0.8rem;
    }
}

/* Print Styles */
@media print {
    .auth-section,
    .form-actions,
    #status-message {
        display: none;
    }
    
    .container {
        box-shadow: none;
        max-width: none;
    }
    
    body {
        background: white;
    }
}