body { font-family: sans-serif; background-color: #f4f4f9; margin: 0; padding: 20px; }
.container { max-width: 1000px; margin: 0 auto; background: white; padding: 20px; border-radius: 8px; box-shadow: 0 4px 8px rgba(0,0,0,0.1); }
header { text-align: center; border-bottom: 2px solid #eee; padding-bottom: 20px; margin-bottom: 20px; }
.stats-box { background: #333; color: white; padding: 10px 20px; border-radius: 5px; display: inline-block; margin-top: 10px; }

/* Controls & Form */
.controls-section { display: flex; gap: 10px; margin-bottom: 20px; background: #eef2f5; padding: 15px; border-radius: 5px; flex-wrap: wrap; }
.controls-section input, .controls-section select { padding: 8px; flex: 1; min-width: 150px; border: 1px solid #ccc; border-radius: 4px; }
.form-section { background: #fafafa; padding: 15px; border: 1px solid #ddd; border-radius: 5px; margin-bottom: 20px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 10px; }
.form-grid input { padding: 8px; border: 1px solid #ccc; border-radius: 4px; }
button { padding: 10px 15px; border: none; border-radius: 4px; cursor: pointer; color: white; font-weight: bold; }
#save-btn { background: #28a745; width: 100%; }

/* Grid Layout */
.grid-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; margin-bottom: 20px; }
.card { background: white; border: 1px solid #eaeaea; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 5px rgba(0,0,0,0.05); transition: transform 0.2s; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-5px); box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.card img { width: 100%; height: 180px; object-fit: cover; background: #f0f0f0; }
.card-info { padding: 15px; flex-grow: 1; display: flex; flex-direction: column; justify-content: space-between; }
.card-info h4 { margin: 0 0 10px 0; font-size: 1.1em; }
.card-info p { margin: 5px 0; color: #555; }
.actions { margin-top: 15px; display: flex; gap: 10px; }
.btn-edit { background: #f39c12; flex: 1; }
.btn-delete { background: #e74c3c; flex: 1; }

/* Pagination */
.pagination-controls { text-align: center; margin-top: 20px; }
.pagination-controls button { background: #007bff; margin: 0 10px; }
.pagination-controls button:disabled { background: #ccc; cursor: not-allowed; }
#page-indicator { font-weight: bold; }

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #28a745;
    color: white;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 0.95em;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 9999;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    pointer-events: none;
}
.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}
.toast.error {
    background: #e74c3c;
}

/* Loading Spinner */
.loading-container {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
}
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e0e0e0;
    border-top-color: #007bff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 15px;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.loading-container p {
    color: #666;
    font-size: 0.95em;
    margin: 5px 0;
}
.loading-container .loading-sub {
    color: #999;
    font-size: 0.85em;
}