body {
    font-family: sans-serif;
    text-align: center;
    background-color: var(--color-surface);
}
*{
	box-sizing: border-box;
}

header {
    background-color: var(--color-fore1);
    color: white;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header a {
    color: white;
    text-decoration: underline;
    cursor: pointer;
}
.container{}
main{
	width:100%;
	flex-grow: 1;
	padding:var(--pad);
	display: flex;flex-direction: column; gap:1rem;
	justify-items: center;
}
.seleccio{
	margin-bottom: auto;
}
.pas {
    display: none;

}
.appt .container{
width: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  overflow: hidden;
}
.pas.actiu{
	
}
.pasos{margin-bottom:auto;}

.box{
	background-color: #fff;
	box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.pas.actiu {
    display: block;
}

select {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    margin-top: 10px;
}

.botons {
    margin-top: 4rem;
	justify-content: center;
	--pad:1.5rem;
}

button {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
}
.form{
	max-width:20em;
	margin:0 auto;
}
.footer  {
	margin-bottom:3rem;
}
.circle {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background-color: #4CAF50;
    color: white;
    font-size: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px auto;
    cursor: pointer;
	padding:var(--pad);
}

#timer {
    font-size: 48px;
    font-weight: bold;
    margin: 20px 0;
}
header .detail{ font-size:11px;}
#stopBtn {
    background-color: #f44336;
    color: white;
    border: none;
	margin:0 auto;
}

.seleccio{display:flex;gap:1rem;}

.pas label {
    font-size: 1.2em;
    font-weight: bold;
}
header .acc .btn{
	border:0;padding:0;
}
#panellConnexio {
   
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    width: var(--icos);
	height: var(--icos);
  
	border-radius:50%;
	overflow:hidden;
	
    color: #fff;
    font-size: 14px;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 9999;
    font-family: sans-serif;
	  background: var(--color-surface2);

}

#panellConnexio #estat_connexio span {
    color: red; /* Default to disconnected */
}

#panellConnexio > div > span {
    font-size: 11px;
    opacity: 0.7;
}

.popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 20000;
    justify-content: center;
    align-items: center;
}

#popupCaixes {
    display: none; /* Ensure it's controlled by JS */
}

.popup-content {
    background: white;
    padding: 20px 30px;
    border-radius: 12px;
    width: 300px;
    text-align: center;
}

#inputCaixes {
    width: 100%;
    padding: 10px;
    font-size: 18px;
    margin-top: 10px;
}

.popup-buttons {
    margin-top: 20px;
    display: flex;
    justify-content: space-around;
}

.popup-buttons button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
}

.popup-buttons .cancel {
    background: #ccc;
    color: #000;
}

.popup-buttons .confirm {
    background: #2d7a46;
    color: white;
}

#adminOverlay {
    display: none; /* ensure it is hidden by default */
}

#adminLogin {
    background: #fff;
    padding: 20px 25px;
    border-radius: 10px;
    width: 320px;
    max-width: 90%;
    text-align: center;
}

#adminPin {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    margin: 10px 0;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.admin-buttons {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.admin-buttons button {
    flex: 1;
    border: none;
    border-radius: 6px;
    padding: 8px 0;
    color: #fff;
}

.admin-buttons .login {
    background: #2d7a46;
}

.admin-buttons .close {
    background: #999;
}

#adminPanel {
    display: none;
    background: #fff;
    padding: 15px 15px 20px;
    border-radius: 10px;
    width: 95%;
    max-width: 650px;
    max-height: 80vh;
    overflow: auto;
    text-align: left;
}

.admin-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.admin-panel-header h3 {
    margin: 0;
}
h1,h2,h3{
	color: var(--color-fore3);
}
.admin-panel-header button {
    background: #999;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
}

#adminConnexioText {
    font-size: 14px;
    margin-bottom: 10px;
}

.admin-panel-actions {
    margin-bottom: 10px;
}

.admin-panel-actions button {
    border: none;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 13px;
    color: #fff;
}

.admin-panel-actions .sync {
    background: #4caf50;
}

.admin-panel-actions .close-panel {
    background: #b71c1c;
    margin-left: 8px;
}

#adminPendents {
    font-size: 12px;
}
