/* pharmacy-inventory.css */

/* עיצוב כללי */
#pharmacy-inventory-form {
    max-width: 500px;
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    direction: rtl;
    font-family: Arial, sans-serif;
}

#pharmacy-inventory-form h3 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
    border-bottom: 2px solid #007cba;
    padding-bottom: 10px;
}

/* שדות הטופס */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 5px rgba(0,124,186,0.3);
}

.form-group input.invalid {
    border-color: #dc3545;
    box-shadow: 0 0 5px rgba(220,53,69,0.3);
}

/* אזור מידע התרופה */
#medicine-info {
    background: #e7f3ff;
    padding: 15px;
    border-radius: 4px;
    border-right: 4px solid #007cba;
    margin-bottom: 15px;
}

#medicine-info .medicine-name {
    font-size: 18px;
    margin-bottom: 8px;
    color: #333;
}

#medicine-info .current-stock {
    font-size: 16px;
    color: #666;
}

#medicine-info .current-stock.low-stock {
    color: #dc3545;
    font-weight: bold;
}

/* כפתור שליחה */
#submit-btn {
    background: #007cba;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 100%;
}

#submit-btn:hover:not(:disabled) {
    background: #005a87;
}

#submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* הודעות */
#message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
    font-weight: bold;
    display: none;
}

#message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* עיצוב דפי ניהול */
.pharmacy-admin {
    direction: rtl;
}

.pharmacy-admin h1 {
    color: #333;
    border-bottom: 2px solid #007cba;
    padding-bottom: 10px;
}

/* טבלאות */
.pharmacy-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.pharmacy-table th,
.pharmacy-table td {
    padding: 12px;
    text-align: right;
    border-bottom: 1px solid #ddd;
}

.pharmacy-table th {
    background: #007cba;
    color: white;
    font-weight: bold;
}

.pharmacy-table tr:hover {
    background: #f5f5f5;
}

.pharmacy-table .low-stock {
    color: #dc3545;
    font-weight: bold;
}

/* כפתורים */
.pharmacy-btn {
    background: #007cba;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    margin: 2px;
    transition: background-color 0.3s;
}

.pharmacy-btn:hover {
    background: #005a87;
    color: white;
}

.pharmacy-btn-danger {
    background: #dc3545;
}

.pharmacy-btn-danger:hover {
    background: #c82333;
}

.pharmacy-btn-success {
    background: #28a745;
}

.pharmacy-btn-success:hover {
    background: #218838;
}

/* סטטיסטיקות */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-card h3 {
    margin: 0 0 10px 0;
    color: #333;
}

.stat-card .stat-number {
    font-size: 2em;
    font-weight: bold;
    color: #007cba;
}

.stat-card.warning .stat-number {
    color: #dc3545;
}

/* טופס דוחות */
.reports-form {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.reports-form .form-row {
    display: flex;
    gap: 15px;
    align-items: end;
    flex-wrap: wrap;
}

.reports-form .form-group {
    flex: 1;
    min-width: 200px;
}

/* מודל */
.pharmacy-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.pharmacy-modal-content {
    background: white;
    margin: 5% auto;
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    max-width: 500px;
    direction: rtl;
}

.pharmacy-modal-close {
    color: #aaa;
    float: left;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.pharmacy-modal-close:hover {
    color: #000;
}

/* רספונסיביות */
@media (max-width: 768px) {
    #pharmacy-inventory-form {
        margin: 10px;
        padding: 15px;
    }
    
    .reports-form .form-row {
        flex-direction: column;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .pharmacy-table {
        font-size: 14px;
    }
    
    .pharmacy-table th,
    .pharmacy-table td {
        padding: 8px;
    }
}