
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background: #f4f6f9;
    color: #333;
}

h2 {
    margin-top: 0;
}

button {
    background: #007bff;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background: #0056b3;
}

input, select, textarea {
    width: 100%;
    padding: 8px;
    margin-top: 6px;
    margin-bottom: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.login-container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #eef1f5;
}

.login-box {
    width: 320px;
    background: white;
    padding: 28px;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

.login-box h2 {
    text-align: center;
    margin-bottom: 20px;
}

.error-msg {
    color: red;
    font-size: 14px;
    text-align: center;
}

#panel-section {
    display: flex;
    height: 100vh;
}

.sidebar {
    width: 220px;
    background: #283046;
    color: white;
    padding-top: 20px;
    display: flex;
    flex-direction: column;
}

.sidebar .logo-admin {
    text-align: center;
    padding: 10px 0;
}

.sidebar .logo-admin img {
    width: 60px;
}

.sidebar .logo-admin h3 {
    margin: 10px 0 0 0;
    font-size: 18px;
}

.menu {
    list-style: none;
    padding: 0;
    margin-top: 25px;
    flex-grow: 1;
}

.menu li {
    padding: 20px 20px;
    cursor: pointer;
    transition: background 0.2s;
}

.menu li:hover {
    background: #39425a;
}

.menu-item.active {
    background-color: #1f2536 !important;
    color: #fff !important;
    border-radius: 4px;
}

.logout-box {
    padding: 15px;
    border-top: 1px solid #444a5e;
}

#logout-btn {
    background: #dc3545;
}

#logout-btn:hover {
    background: #a52834;
}

.content {
    flex-grow: 1;
    padding: 20px 30px;
    overflow-y: auto;
}

.admin-view {
    display: none;
}

.admin-view.active {
    display: block;
}

.item {
    background: white;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.05);
}

.item h3 {
    margin: 0 0 5px 0;
}

.item button {
    margin-right: 8px;
}

.grid-imagenes {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
}

.galeria-item {
    background: white;
    padding: 10px;
    border-radius: 6px;
    text-align: center;
    box-shadow: 0 3px 8px rgba(0,0,0,0.05);
}

.galeria-item img {
    max-width: 100%;
    border-radius: 4px;
}

.galeria-item button {
    margin-top: 10px;
    background: #dc3545;
}

.galeria-item button:hover {
    background: #a52834;
}

#configuracion label {
    font-weight: bold;
    margin-top: 10px;
}

#btn-guardar-config {
    background: #28a745;
}

#btn-guardar-config:hover {
    background: #1e7e34;
}

.content::-webkit-scrollbar {
    width: 8px;
}

.content::-webkit-scrollbar-track {
    background: #ddd;
}

.content::-webkit-scrollbar-thumb {
    background: #999;
    border-radius: 4px;
}

.content::-webkit-scrollbar-thumb:hover {
    background: #777;
}

.kpi-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.kpi-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0px 3px 8px rgba(0,0,0,0.08);
}

.kpi-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.kpi-value {
    font-size: 26px;
    font-weight: bold;
}

.kpi-label {
    font-size: 14px;
    color: #555;
    margin-top: 4px;
}

/* Colores */
.kpi-orange { border-top: 4px solid #ff9800; }
.kpi-blue   { border-top: 4px solid #2196f3; }
.kpi-green  { border-top: 4px solid #4caf50; }
.kpi-purple { border-top: 4px solid #9c27b0; }

.dashboard-table {
    margin-top: 30px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0px 3px 8px rgba(0,0,0,0.08);
}

.dashboard-table table {
    width: 100%;
    border-collapse: collapse;
}

.dashboard-table th,
.dashboard-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.dashboard-table th {
    background: #f5f5f5;
    font-weight: bold;
}

#config-list {
    max-width: 600px;
}

.config-row {
    margin-bottom: 15px;
}

.config-row label {
    display: block;
    font-weight: bold;
    margin-bottom: 4px;
}

.config-row small {
    display: block;
    color: #777;
    font-size: 12px;
    margin-bottom: 3px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    margin-bottom: 25px;
}

.admin-table th {
    background: #f5f5f5;
    padding: 10px;
    font-weight: bold;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.admin-table td {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.admin-table tr:nth-child(even) {
    background: #fafafa;
}

.admin-table tr:hover {
    background: #f0f0f0;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.55);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-box {
    background: white;
    width: 500px;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.25);
    animation: modalIn 0.2s ease-out;
}

@keyframes modalIn {
    from { transform: scale(0.9); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

.modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0,0,0,0.5);
}
.modal.hidden { display: none; }

.modal-content {
  background: #fff;
  padding: 20px;
  border-radius: 6px;
  width: 300px;
}

.galeria-grid {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.galeria-grid img {
    width: 260px;
    height: 160px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}