body {
    background: #121212;
    color: #cce7ff;
    font-family: 'Heebo', sans-serif;
}

#dashboard-container {
    max-width: 800px;
    margin: 2rem auto 4rem;
    background: rgba(20, 20, 20, 0.6);
    border-radius: 1rem;
    box-shadow: 0 0 15px rgba(10, 100, 180, 0.5);
    padding: 2rem 2.5rem;
    backdrop-filter: blur(10px);
}

/* גריד לדשבורד */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1rem;
}

.dashboard-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.75rem;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dashboard-section h3 {
    margin-bottom: 1.5rem;
    color: #45e0f9;
    font-size: 1.25rem;
}

/* התאמה ל-sidebar במסכים גדולים */
@media (min-width: 1200px) {
    #dashboard-container {
        margin-right: 220px;
        margin-left: auto;
        max-width: 800px;
    }
}

/* במסכים קטנים - התוכן המרכזי תופס את כל הרוחב */
@media (max-width: 1199px) {
    #dashboard-container {
        margin-right: 0;
        margin-left: auto;
        max-width: 800px;
    }
}

/* במסכים קטנים - גריד אחד עמודה */
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .dashboard-section {
        padding: 1.25rem;
    }
}

h2,
h3 {
    color: #45e0f9;
    font-weight: 700;
    margin-bottom: 1rem;
}

label {
    font-weight: 600;
    margin-bottom: 0.3rem;
}

input[readonly] {
    background: #e2e2e2;
    color: #333;
}

.form-control:focus {
    box-shadow: 0 0 8px #45e0f9;
    border-color: #45e0f9;
}

.btn-update {
    background-color: #0085c3;
    border-color: #0085c3;
}

.btn-update:hover {
    background-color: #006ea0;
    border-color: #006ea0;
}

.msg-success {
    color: #0085c3;
    margin-top: 0.5rem;
}

.msg-error {
    color: #ff5252;
    margin-top: 0.5rem;
}

a.back-home {
    color: #45e0f9;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 1.5rem;
}

a.back-home:hover {
    text-decoration: underline;
}

/* סגנונות נקודות נאמנות */
.loyalty-stats {
    margin-bottom: 2rem;
}

.loyalty-stat-card {
    background: linear-gradient(135deg, rgba(69, 224, 249, 0.1), rgba(0, 133, 195, 0.1));
    border: 1px solid rgba(69, 224, 249, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
}

.loyalty-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(69, 224, 249, 0.2);
    border-color: rgba(69, 224, 249, 0.5);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #45e0f9;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: #e0e0e0;
    font-weight: 500;
}

.loyalty-info .alert {
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.loyalty-history h4 {
    color: #45e0f9;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid rgba(69, 224, 249, 0.3);
    padding-bottom: 0.5rem;
}

#points-history-container {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 8px;
    margin-right: -8px;
}

/* עיצוב הגלילה */
#points-history-container::-webkit-scrollbar {
    width: 6px;
}

#points-history-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

#points-history-container::-webkit-scrollbar-thumb {
    background: rgba(69, 224, 249, 0.6);
    border-radius: 3px;
}

#points-history-container::-webkit-scrollbar-thumb:hover {
    background: rgba(69, 224, 249, 0.8);
}

/* גלילה למובייל */
@media (max-width: 768px) {
    #points-history-container {
        max-height: 300px;
    }
}

@media (max-width: 480px) {
    #points-history-container {
        max-height: 250px;
    }
}

.points-history-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
}

.points-history-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(69, 224, 249, 0.3);
}

.points-history-item.purchase {
    border-left: 4px solid #28a745;
}

.points-history-item.redemption {
    border-left: 4px solid #ffc107;
}

.points-history-item.bonus {
    border-left: 4px solid #17a2b8;
}

.points-history-item.admin_update {
    border-left: 4px solid #6f42c1;
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.history-item-type {
    font-weight: 600;
    color: #45e0f9;
}

.history-item-points {
    font-weight: 700;
    font-size: 1.1rem;
}

.history-item-points.positive {
    color: #28a745;
}

.history-item-points.negative {
    color: #ffc107;
}

.history-item-description {
    color: #e0e0e0;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.history-item-date {
    color: #999;
    font-size: 0.8rem;
}

.no-history {
    text-align: center;
    color: #999;
    padding: 2rem;
    font-style: italic;
}

/* התאמה למסכים קטנים */
@media (max-width: 768px) {
    /* עיצוב רשימה לנקודות נאמנות במובייל */
    .loyalty-stats .row {
        display: block;
    }
    
    .loyalty-stats .col-md-4 {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .loyalty-stat-card {
        display: flex;
        align-items: center;
        padding: 0.75rem 1rem;
        margin-bottom: 0.5rem;
        background: rgba(69, 224, 249, 0.08);
        border: 1px solid rgba(69, 224, 249, 0.2);
        border-radius: 8px;
        text-align: right;
        transition: none;
        height: auto;
    }
    
    .loyalty-stat-card:hover {
        transform: none;
        box-shadow: none;
        border-color: rgba(69, 224, 249, 0.3);
    }
    
    .loyalty-stat-card .stat-icon {
        font-size: 1.2rem;
        margin-left: 0.75rem;
        flex-shrink: 0;
    }
    
    .loyalty-stat-card .stat-value {
        font-size: 1.1rem;
        font-weight: 600;
        color: #45e0f9;
        margin-left: auto;
        flex-shrink: 0;
    }
    
    .loyalty-stat-card .stat-label {
        font-size: 0.85rem;
        color: #e0e0e0;
        margin: 0;
        flex-grow: 1;
    }
    
    .loyalty-info .alert {
        padding: 0.75rem;
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    .loyalty-info .alert strong {
        font-size: 0.9rem;
    }
    
    .loyalty-history h4 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
    
    /* עיצוב רשימה להיסטוריית נקודות במובייל */
    .points-history-item {
        display: flex;
        align-items: center;
        padding: 0.75rem 1rem;
        margin-bottom: 0.5rem;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        border-left: 4px solid;
        transition: none;
    }
    
    .points-history-item:hover {
        background: rgba(255, 255, 255, 0.08);
        transform: none;
        box-shadow: none;
    }
    
    .points-history-item.purchase {
        border-left-color: #28a745;
    }
    
    .points-history-item.redemption {
        border-left-color: #dc3545;
    }
    
    .points-history-item.bonus {
        border-left-color: #ffc107;
    }
    
    .points-history-item.admin_update {
        border-left-color: #6f42c1;
    }
    
    .points-history-item > div:first-child {
        flex: 1;
        min-width: 0;
    }
    
    .points-history-item .history-item-header {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        margin-bottom: 0.25rem;
    }
    
    .points-history-item .history-item-type {
        font-size: 0.9rem;
        font-weight: 600;
        color: #45e0f9;
    }
    
    .points-history-item .history-item-points {
        font-size: 1rem;
        font-weight: 700;
        margin-left: auto;
        flex-shrink: 0;
    }
    
    .points-history-item .history-item-description {
        font-size: 0.8rem;
        color: #e0e0e0;
        margin-bottom: 0.25rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .points-history-item .history-item-date {
        font-size: 0.75rem;
        color: #999;
    }
    
    .history-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .dashboard-section {
        padding: 1rem;
    }
    
    .dashboard-section h3 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
}

