:root {
    --primary-color: #1B5E20; /* أخضر غامق */
    --primary-dark: #0D3E12; /* أخضر أغمق */
    --primary-light: #4CAF50; /* أخضر فاتح */
    --secondary-color: #388E3C; /* أخضر متوسط */
    --text-color: #333;
    --light-bg: #f8f9fa;
    --white: #FFFFFF;
    --shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s ease;
    --border-radius: 10px;
    --border: 1px solid rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Tajawal', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
    background: linear-gradient(135deg, #f8fff8 0%, #f0f7f0 100%);
    min-height: 100vh;
    padding: 30px 20px;
    color: var(--text-color);
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

.container {
    max-width: 850px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: var(--border);
    transition: transform 0.3s ease;
}

.container:hover {
    transform: translateY(-5px);
}

.header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    color: var(--white);
    padding: 35px 25px;
    text-align: center;
    position: relative;
    border-bottom: var(--border);
}

.header h1 {
    font-size: 2.1rem;
    margin-bottom: 12px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.header p {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.85);
    max-width: 600px;
    margin: 0 auto;
}

.content {
    padding: 30px;
    background: var(--white);
}

.form-section {
    margin-bottom: 30px;
    padding: 20px;
    background: var(--light-bg);
    border-radius: var(--border-radius);
    border: var(--border);
    transition: all 0.3s ease;
}

.form-section:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.3rem;
    color: var(--primary-dark);
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-light);
    font-weight: 700;
}

.section-title i {
    color: var(--primary-color);
    font-size: 1.4rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--primary-dark);
    font-size: 0.97rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

input, textarea, select {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: var(--transition);
    background: var(--white);
    color: var(--text-color);
    -webkit-appearance: none;
    font-family: 'Tajawal', sans-serif;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.03);
}

input:focus, textarea:focus, select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(27, 94, 32, 0.15);
}

textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.7;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px 20px;
    background: #f0f7f0;
    border-radius: 8px;
    border: 1px solid #d0e8d0;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

.checkbox-group:hover {
    border-color: var(--primary-color);
    background: #e8f5e9;
    transform: translateY(-2px);
}

.checkbox-group input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 22px;
    height: 22px;
    cursor: pointer;
    z-index: 1;
}

.checkbox-custom {
    position: relative;
    display: inline-block;
    width: 22px;
    height: 22px;
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 5px;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.checkbox-group input[type="checkbox"]:checked + .checkbox-custom {
    background-color: var(--primary-color);
    border-color: var(--primary-dark);
}

.checkbox-group input[type="checkbox"]:checked + .checkbox-custom::after {
    content: "\f00c";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 13px;
}

.checkbox-group label {
    margin: 0;
    font-size: 1rem;
    color: var(--text-color);
    cursor: pointer;
    flex: 1;
    font-weight: 600;
    padding-right: 5px;
}

.date-time-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 30px 0 20px;
}

button {
    padding: 16px;
    border: none;
    border-radius: 8px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: var(--shadow);
    letter-spacing: 0.3px;
}

.btn-generate {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

.btn-clear {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #2e7d32 100%);
}

button:hover {
    opacity: 0.92;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

button:active {
    transform: scale(0.98);
}

.output-section {
    margin-top: 25px;
    padding: 25px;
    background: var(--light-bg);
    border-radius: var(--border-radius);
    border: 1px solid #d0e8d0;
    display: none;
}

.output-section.show {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.status-indicator {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.status-initial {
    background: #e8f5e9;
    color: var(--primary-dark);
    border: 1px solid var(--primary-light);
}

.status-final {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
}

.output-text {
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    font-family: 'Tajawal', sans-serif;
    line-height: 1.7;
    white-space: pre-wrap;
    direction: rtl;
    text-align: right;
    color: var(--text-color);
    font-size: 16px;
    max-height: 350px;
    overflow-y: auto;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.03);
}

.copy-btn {
    margin-top: 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 14px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    transition: var(--transition);
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    box-shadow: var(--shadow);
}

.copy-btn:hover {
    opacity: 0.92;
    transform: translateY(-2px);
}

.auto-fill-indicator {
    font-size: 13px;
    color: #666;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f0f7f0;
    border-radius: 6px;
    border-left: 3px solid var(--primary-color);
}

.statement-note {
    font-size: 14px;
    color: #555;
    margin-top: 12px;
    background: #f0f7f0;
    padding: 14px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    line-height: 1.6;
}

.notification {
    position: fixed;
    top: 25px;
    right: 20px;
    left: 20px;
    max-width: 500px;
    margin: 0 auto;
    padding: 16px 20px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transform: translateY(-120px);
    transition: transform 0.4s ease;
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: center;
    font-weight: 600;
    font-size: 16px;
}

.notification.show {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .container {
        border-radius: 0;
    }
    
    .date-time-group {
        grid-template-columns: 1fr;
    }
    
    .header {
        padding: 30px 20px;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .content {
        padding: 25px;
    }
    
    .form-section {
        padding: 18px;
    }
    
    .section-title {
        font-size: 1.2rem;
    }
    
    button {
        padding: 15px;
        font-size: 16px;
    }
}