/* Container & Grid Setup */
.stations-container { max-width: 900px; padding: 1.5rem; }
.controls-bar { display: flex; gap: 15px; margin-bottom: 30px; }
#searchInput { flex: 1; padding: 15px 20px; border-radius: 12px; border: 2px solid #e2e8f0; font-size: 1rem; outline: none; transition: border-color 0.3s; }
#searchInput:focus { border-color: var(--primary); }
.btn-add { width: auto; padding: 15px 25px; }

.stations-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }

/* Station Cards */
.station-card { background: white; border-radius: 16px; padding: 20px; border: 1px solid #e2e8f0; box-shadow: 0 4px 6px rgba(0,0,0,0.02); text-align: left; }
.card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 15px; }

/* Circular Logo Image Styles */


.org-logo { 
    width: 48px; 
    height: 48px; 
    border-radius: 50%; /* Makes the container a circle */
    display: flex; 
    align-items: center; 
    justify-content: center; 
    border: 2px solid #e2e8f0; 
    background: white; 
    overflow: hidden; /* This is critical: it clips the square image into the circle */
    flex-shrink: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    padding: 0; /* Remove padding to let the logo reach the edges if needed */
}

.org-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Use 'cover' to fill the circle or 'contain' if you want the whole logo visible with white space */
    border-radius: 50%; /* Extra safety to ensure the image follows the curve */
}

/* Fallback Colors (if image fails) */
.org-Ceypetco { color: #d97706; border-color: #fcd34d; background: #fef3c7; }
.org-IOC { color: #dc2626; border-color: #fca5a5; background: #fee2e2; }
.org-Sinopec { color: #16a34a; border-color: #86efac; background: #dcfce7; }
.org-Shell { color: #ea580c; border-color: #fdba74; background: #ffedd5; }
.org-LAUGFS { color: #4338ca; border-color: #a5b4fc; background: #e0e7ff; }

.station-info h3 { margin: 0; font-size: 1.1rem; color: var(--text-main); }
.station-info p { margin: 0; font-size: 0.8rem; color: var(--text-muted); }

/* Status Badges */
.status-row { display: flex; justify-content: space-between; margin-bottom: 15px; padding: 10px; background: #f8fafc; border-radius: 8px; }
.badge-group { display: flex; flex-direction: column; gap: 5px; }
.badge-label { font-size: 0.7rem; text-transform: uppercase; font-weight: 700; color: var(--text-muted); }
.badge { padding: 4px 8px; border-radius: 6px; font-size: 0.85rem; font-weight: 600; text-align: center; }

.fuel-available, .queue-low { background: var(--success-bg); color: var(--success-text); }
.fuel-limited, .queue-medium { background: #fef08a; color: #a16207; }
.fuel-none, .queue-high { background: var(--error-bg); color: var(--error-text); }

/* Update Buttons */
.update-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; border-top: 1px dashed #e2e8f0; padding-top: 15px; }
.btn-update { padding: 8px; border-radius: 8px; border: 1px solid #cbd5e1; background: white; cursor: pointer; font-size: 0.8rem; font-weight: 600; transition: all 0.2s; color: var(--text-main); }
.btn-update:hover { background: #f8fafc; border-color: var(--primary); color: var(--primary); }

/* Bottom Card Actions */
.card-actions-bottom { display: flex; justify-content: space-between; margin-top: 15px; }
.btn-action-small { 
    border: 1px solid transparent;
    font-size: 0.75rem; 
    font-weight: 600; 
    cursor: pointer; 
    padding: 6px 12px; 
    border-radius: 8px; 
    transition: all 0.2s ease;
}
.btn-action-small.info { color: var(--secondary); background: #fdf2f8; border-color: #fbcfe8; }
.btn-action-small.info:hover { background: #fce7f3; transform: translateY(-1px); }
.btn-action-small.edit { color: var(--primary); background: #eef2ff; border-color: #c7d2fe; }
.btn-action-small.edit:hover { background: #e0e7ff; transform: translateY(-1px); }

/* Modals & Forms */
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal.hidden { display: none; }
.modal-content { background: white; padding: 30px; border-radius: 20px; width: 90%; max-width: 400px; position: relative; animation: popIn 0.3s ease-out; text-align: left; }
.close-btn { position: absolute; top: 15px; right: 20px; font-size: 1.5rem; cursor: pointer; color: var(--text-muted); }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 5px; }
.form-group input, .form-group select { width: 100%; padding: 10px; border-radius: 8px; border: 1px solid #cbd5e1; outline: none; }
.form-group input:focus, .form-group select:focus { border-color: var(--primary); }

/* Custom Radio Buttons */
.radio-group { display: flex; flex-direction: column; gap: 10px; }
.radio-card input { display: none; }
.radio-card .card-content { padding: 15px; border: 2px solid #cbd5e1; border-radius: 12px; cursor: pointer; font-weight: 600; transition: all 0.2s; background: #f8fafc; }
.radio-card input:checked + .card-content { background: white; }
.radio-card.available input:checked + .card-content { border-color: var(--success-text); color: var(--success-text); box-shadow: 0 0 0 3px var(--success-bg); }
.radio-card.limited input:checked + .card-content { border-color: #ca8a04; color: #ca8a04; box-shadow: 0 0 0 3px #fef08a; }
.radio-card.none input:checked + .card-content { border-color: var(--error-text); color: var(--error-text); box-shadow: 0 0 0 3px var(--error-bg); }

/* Stats UI */
.stats-container { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 15px; }
.stat-section { margin-bottom: 15px; }
.stat-section:last-child { margin-bottom: 0; padding-top: 15px; border-top: 1px dashed #cbd5e1; }
.stat-section h3 { margin: 0 0 10px 0; font-size: 1rem; color: var(--text-main); }
.stat-row { display: flex; align-items: center; font-size: 0.9rem; color: var(--text-muted); margin-bottom: 5px; }
.stat-row strong { margin-left: auto; color: var(--text-main); }
.dot { height: 10px; width: 10px; border-radius: 50%; display: inline-block; margin-right: 8px; }
.dot-green { background-color: var(--success-text); }
.dot-yellow { background-color: #ca8a04; }
.dot-red { background-color: var(--error-text); }

/* Green, Single-Line Toast Notification */
.toast-msg {
    position: fixed; 
    bottom: 40px; 
    left: 50%; 
    transform: translateX(-50%);
    background: #16a34a; 
    color: white; 
    padding: 12px 25px;
    border-radius: 50px; 
    font-size: 0.95rem; 
    font-weight: 600;
    z-index: 9999; 
    box-shadow: 0 10px 15px -3px rgba(22, 163, 74, 0.4);
    transition: opacity 0.3s ease, bottom 0.3s ease;
    white-space: nowrap; 
}
.toast-msg.hidden { opacity: 0; bottom: 20px; pointer-events: none; }

/* Mobile Adjustments */
@media (max-width: 600px) {
    .controls-bar { flex-direction: column; }
    .btn-add { width: 100%; }
    
    .toast-msg {
        font-size: 0.85rem;
        padding: 10px 20px;
        bottom: 25px;
    }
    .toast-msg.hidden { bottom: 10px; }
}