/* CSS is how you can add style to your website, such as colors, fonts, and positioning of your
   HTML content. To learn how to do something, just try searching Google for questions like
   "how to change link color." */

/* --- Base --- */
* {margin:0; padding:0; box-sizing:border-box;}
body {background:#111; display:flex; justify-content:center; align-items:center; height:100vh; font-family:"Segoe UI",Arial,sans-serif; transition: background 0.5s;}
.tablet {background:#000; padding:30px; border-radius:50px; box-shadow:0 15px 50px rgba(0,0,0,0.9); display:flex; justify-content:center; align-items:center;}
.dashboard {position:relative; width:1000px; height:700px; border-radius:35px; overflow:hidden; background-size:cover; background-position:center; background-repeat:no-repeat; transition: background 0.5s, filter 0.5s;}
.dashboard::before {content:""; position:absolute; inset:0; background:rgba(0,0,0,0.35); z-index:0;}

/* --- Top bar --- */
.top-bar {position:relative; z-index:1; background:rgba(43,43,43,0.9); padding:15px; text-align:center; font-size:16px; color:orange; border-top-left-radius:35px; border-top-right-radius:35px;}

/* --- Apps --- */
.apps {position:relative; z-index:1; flex:1; display:grid; grid-template-columns:repeat(2,1fr); gap:40px; padding:50px; justify-items:center; align-items:center;}
.app {width:180px; height:180px; border-radius:30px; display:flex; flex-direction:column; justify-content:center; align-items:center; position:relative; cursor:pointer; color:white; transition:transform 0.2s ease, box-shadow 0.3s ease; box-shadow: inset 0 2px 8px rgba(255,255,255,0.3),0 6px 20px rgba(0,0,0,0.7);}
.app:hover {transform:scale(1.05);}
.app span.emoji {font-size:2em; margin-bottom:10px;}
.app p {font-size:16px; text-align:center;}
.app.green {background:linear-gradient(145deg,#27ae60,#2ecc71);}
.app.blue {background:linear-gradient(145deg,#2980b9,#3498db);}
.app.orange {background:linear-gradient(145deg,#d35400,#e67e22);}
.app.gray {background:linear-gradient(145deg,#636e72,#95a5a6);}
.badge {position:absolute; top:10px; right:16px; background:red; color:white; font-size:14px; border-radius:50%; padding:6px 10px; font-weight:bold; box-shadow:0 2px 6px rgba(0,0,0,0.6);}

.bottom-bar {
  background: rgba(43,43,43,0.9);
  display: flex;
  justify-content: space-evenly; /* más uniforme que space-around */
  align-items: center;
  padding: 15px 30px; /* más espacio horizontal */
  border-bottom-left-radius: 35px;
  border-bottom-right-radius: 35px;
  position: absolute;
  bottom: 0;
  width: 100%;
  box-sizing: border-box;
}

.bottom-bar button {
  background: rgba(255,255,255,0.1);
  border: none;
  color: white;
  font-size: 16px;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}

.bottom-bar button:hover {
  transform: scale(1.05);
  background: rgba(255,255,255,0.2);
}

/* --- Pantallas flotantes --- */
.pantalla-factura, .pantalla-historial, .pantalla-estadisticas {position:absolute; inset:60px 60px 80px 60px; background:rgba(43,43,43,0.95); border-radius:25px; padding:25px; color:white; z-index:2; display:flex; flex-direction:column; overflow-y:auto;}
.pantalla-factura input, .pantalla-factura select {width:80%; padding:10px; margin-bottom:15px; border-radius:8px; border:none; outline:none;}
.pantalla-factura button, .botones-historial button {width:45%; margin:10px; padding:12px; border-radius:10px; border:none; cursor:pointer; background:#3498db; color:white; font-weight:bold; font-size:16px; transition:transform 0.2s;}
.pantalla-factura button:hover, .botones-historial button:hover {transform:scale(1.05);}
.hidden {display:none;}

/* --- Preview imagen --- */
.preview-imagen-container {width:300px; height:180px; border:2px dashed #888; border-radius:10px; display:flex; justify-content:center; align-items:center; margin-bottom:15px; overflow:hidden;}
.preview-imagen-container img {max-width:100%; max-height:100%; object-fit:contain;}

/* --- Historial --- */
#historialContainer {display:flex; flex-direction:column; gap:15px; margin-top:15px;}
.historial-item {background:rgba(0,0,0,0.4); padding:12px; border-radius:10px;}
.historial-item img {max-width:100px; max-height:80px; margin-top:5px;}

/* --- Modal ajustes --- */
.modal {display:none; position:fixed; inset:0; background:rgba(0,0,0,0.7); justify-content:center; align-items:center; z-index:100;}
.modal-content {background:#2b2b2b; padding:25px; border-radius:15px; text-align:center; color:white; width:400px; box-shadow:0 8px 20px rgba(0,0,0,0.8);}
.modal-content input, .modal-content button {margin:5px 0;}
.galeria img {width:80px; height:60px; object-fit:cover; margin:5px; cursor:pointer; border-radius:8px; transition:transform 0.2s;}
.galeria img:hover {transform:scale(1.1); border:2px solid #3498db;}

/* --- Notificaciones --- */
.notificacion {position:fixed; bottom:20px; right:20px; background:#3498db; color:white; padding:12px 20px; border-radius:10px; box-shadow:0 4px 10px rgba(0,0,0,0.5); font-weight:bold; z-index:200;}
