:root {
    --brand-primary: #2563eb;
    --brand-primary-light: rgba(37, 99, 235, 0.1);
}

/* --- UI COMPONENTS (FAB, MODAL, LOADERS) --- */

/* Floating Action Button */
.fab {
    position: fixed; bottom: 30px; right: 25px;
    width: 60px; height: 60px; border-radius: 50%;
    background: var(--brand-primary); color: white;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; box-shadow: 0 4px 15px var(--brand-primary-light);
    transition: transform 0.2s; cursor: pointer; z-index: 50;
}
.fab:active { transform: scale(0.90); }

/* Modal */
.modal { 
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(0,0,0,0.6); display: none; 
    align-items: center; justify-content: center; 
    z-index: 100; backdrop-filter: blur(3px); 
}
.modal.active { display: flex; }

/* Loader */
.loader { 
    border: 4px solid #f3f3f3; border-top: 4px solid var(--brand-primary); 
    border-radius: 50%; width: 30px; height: 30px; 
    animation: spin 1s linear infinite; margin: 0 auto; 
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }


/* --- CARDS & LISTS --- */

/* Group Card Status Colors */
.group-card { transition: all 0.2s; border-left: 5px solid transparent; }
.status-danger { border-left-color: #ef4444; background: #fff1f2; }
.status-safe { border-left-color: #10b981; background: #fff; }
.status-history { border-left-color: #64748b; background: #f1f5f9; opacity: 1; }

/* Filter Chips */
.filter-chip {
    white-space: nowrap; padding: 6px 14px; border-radius: 20px;
    font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.2s;
    border: 1px solid #e2e8f0; background: white; color: #64748b;
}
.filter-chip.active { background: var(--brand-primary); color: white; border-color: var(--brand-primary); }

/* Settings Buttons */
.settings-btn {
    width: 100%; text-align: left; padding: 12px; border-radius: 8px;
    background: #f8fafc; color: #334155; font-weight: 600; margin-bottom: 8px;
    display: flex; align-items: center; justify-content: space-between;
    border: 1px solid #e2e8f0;
}
.settings-btn:active { background: #e2e8f0; }
.settings-btn i { color: #64748b; width: 25px; }

/* Location Controls (Arrows, Edit, Delete) */
.loc-btn {
    padding: 4px 8px; border-radius: 4px; margin-left: 2px; font-size: 10px;
}
.loc-btn:hover { background-color: #e2e8f0; }


/* --- SLIDER (QUANTITY CONTROL) --- */

input[type=range] {
    -webkit-appearance: none; width: 100%; height: 6px; 
    border-radius: 5px; background: #e2e8f0; outline: none; 
    transition: background 0.2s;
}
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none; 
    width: 18px; height: 18px; border-radius: 50%; 
    background: var(--brand-primary); cursor: pointer; 
    border: 2px solid white; box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
/* Когато е изядено (0) -> Червено */
input[type=range].empty::-webkit-slider-thumb { background: #ef4444; }
/* Когато е пълно (100%) -> Зелено */
input[type=range].full::-webkit-slider-thumb { background: #16a34a; }


/* --- SWIPE TO DELETE (INDIVIDUAL ITEMS) --- */

.item-swipe-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 8px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.item-swipe-bg {
    position: absolute;
    top: 0; left: 0; bottom: 0; width: 100%;
    background-color: #ef4444;
    display: flex; align-items: center; justify-content: flex-start;
    padding-left: 20px;
    color: white; font-weight: bold; font-size: 14px;
    z-index: 1;
    border-radius: 12px;
}

.item-row-content {
    position: relative;
    z-index: 10;
    transition: transform 0.1s linear; 
    padding: 10px 12px;
    border-radius: 12px;
}


/* --- HISTORY / ARCHIVE --- */

.history-card {
    border: 1px solid #e2e8f0;
    background-color: #f8fafc;
}
.history-label {
    font-size: 10px; text-transform: uppercase; color: #94a3b8; font-weight: bold;
}

/* --- BRAND HELPERS --- */
.bg-brand { background-color: var(--brand-primary) !important; }
.text-brand { color: var(--brand-primary) !important; }
.border-brand { border-color: var(--brand-primary) !important; }
.bg-brand-light { background-color: var(--brand-primary-light) !important; }

/* --- UTILITIES --- */

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
