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

body {
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #1e293b;
    line-height: 1.6;
    min-height: 100vh;
}

/* התחברות */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    width: 90%;
    max-width: 400px;
    text-align: center;
}

.login-box h1 {
    color: #4c1d95;
    margin-bottom: 10px;
    font-size: 1.8em;
}

.login-box p {
    color: #64748b;
    margin-bottom: 25px;
}

.error-text {
    color: #ef4444;
    margin-top: 15px;
    font-weight: 600;
}

.app-content.hidden {
    display: none;
}

/* תוכן אפליקציה */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

.app-header {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    color: white;
    padding: 25px 30px;
    border-radius: 16px;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.3);
}

.app-header h1 {
    font-size: 1.9em;
    margin-bottom: 5px;
}

.app-header p {
    opacity: 0.95;
    font-size: 1.05em;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.tab-btn {
    flex: 1;
    min-width: 120px;
    padding: 14px;
    border: none;
    background: white;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.05em;
    font-weight: 700;
    color: #64748b;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.tab-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.tab-btn.active {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.card {
    background: white;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border-right: 4px solid #7c3aed;
}

.card h2 {
    color: #4c1d95;
    margin-bottom: 20px;
    font-size: 1.4em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

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

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
    color: #334155;
}

input, textarea, select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1em;
    font-family: inherit;
    transition: border-color 0.2s;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 700;
    transition: all 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-info {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.btn-purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
}

.list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.list-item {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.list-item:hover {
    border-color: #7c3aed;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.1);
}

.list-item h3 {
    color: #1e293b;
    font-size: 1.15em;
    margin-bottom: 6px;
}

.list-item p {
    color: #64748b;
    font-size: 0.9em;
}

.list-item-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 700;
    margin-right: 8px;
}

.status-planned { background: #dbeafe; color: #1e40af; }
.status-active { background: #d1fae5; color: #065f46; }
.status-completed { background: #fef3c7; color: #92400e; }
.status-cancelled { background: #fee2e2; color: #991b1b; }

.empty {
    text-align: center;
    color: #64748b;
    padding: 30px;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: white;
    margin: 3% auto;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.close {
    color: #64748b;
    float: left;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #1e293b;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    border-radius: 10px;
    overflow: hidden;
}

.report-table th, .report-table td {
    border: 1px solid #e2e8f0;
    padding: 12px;
    text-align: right;
}

.report-table th {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    color: white;
    font-weight: 700;
}

.report-table tr:nth-child(even) {
    background: #f8fafc;
}

.summary-box {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px solid #3b82f6;
    border-radius: 12px;
    padding: 20px;
    margin-top: 15px;
}

.summary-box h3 {
    color: #1d4ed8;
    margin-bottom: 12px;
}

.summary-box p {
    margin-bottom: 6px;
    font-size: 1.05em;
}

.add-product-form {
    display: grid;
    grid-template-columns: 2fr 1fr auto;
    gap: 10px;
    align-items: end;
    margin-bottom: 20px;
}

.inventory-item {
    background: #f0fdf4;
    border: 2px solid #86efac;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
}

/* Calendar */
.calendar-grid {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    color: white;
    text-align: center;
    font-weight: 700;
    padding: 10px 0;
}

.calendar-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: white;
}

.calendar-day {
    min-height: 100px;
    border: 1px solid #e2e8f0;
    padding: 8px;
    background: #f8fafc;
}

.calendar-day.empty {
    background: #f1f5f9;
}

.calendar-day .day-number {
    font-weight: 700;
    color: #475569;
    margin-bottom: 5px;
}

.calendar-event {
    font-size: 0.8em;
    padding: 4px 6px;
    border-radius: 6px;
    margin-bottom: 3px;
    cursor: pointer;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 768px) {
    .form-row, .add-product-form {
        grid-template-columns: 1fr;
    }
    
    .list-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .app-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .tabs {
        flex-direction: column;
    }
    
    .calendar-day {
        min-height: 60px;
        padding: 4px;
    }
    
    .calendar-event {
        font-size: 0.7em;
    }
}


.badge { display: inline-block; padding: 3px 8px; border-radius: 12px; background: #e2e8f0; font-size: 0.85em; margin: 2px; }
.badge.open { background: #dcfce7; color: #166534; }
.badge.closed { background: #fee2e2; color: #991b1b; }
.modal-section { margin-bottom: 25px; }
.modal-section h3 { margin-bottom: 10px; color: #4c1d95; }

