body {
    font-family: Arial;
    background: #1e1e2f;
    color: white;
    text-align: center;
}


body {
    background: #1e1e2f;
    margin: 0;
    font-family: Arial;
    text-align: center;
}

h1 {
    color: white;
    padding: 20px;
}


.sala {
    background: #ffffff;
    margin: 30px auto;
    padding: 40px;
    width: 80%;
    max-width: 1200px;
    border-radius: 10px;
    position: relative;
    height: auto;
}

.grid-sala {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: clamp(10px, 2vw, 30px);
    width: 100%;
}
.maquina {
    position: relative;
    font-size: clamp(24px, 4.5vw, 90px);
    cursor: pointer;
    transition: transform 0.2s;
}
.maquina:hover {
    transform: scale(1.1);
}

.maquina.professor {
    transform: rotate(180deg);
}

.maquina.professor:hover {
    transform: scale(1.1);
}

.maquina.indisponivel .icone-maquina {
    filter: grayscale(100%);
    opacity: 0.6;
}
.alerta {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #ffc107;
    color: #000;
    font-weight: bold;
    font-size: 12px;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 5px rgba(0,0,0,0.3);
    z-index: 10; /* importante */
}
.porta {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: clamp(24px, 6vw, 90px);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 9999;
}

.modal-content {
    background: #2c2c3f;
    color: white;
    width: 400px;
    margin: 10vh auto;
    padding: 20px;
    position: relative;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    animation: fadeIn 0.2s ease;

    max-height: 80vh;
    overflow-y: auto;

    display: block;
}

#listaProblemas {
    max-height: 150px; /* altura equivalente a ~2-3 problemas */
    overflow-y: auto;
    padding-right: 5px;
}

#listaProblemas::-webkit-scrollbar {
    width: 6px;
}

#listaProblemas::-webkit-scrollbar-track {
    background: transparent;
}

#listaProblemas::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}

#listaProblemas::-webkit-scrollbar-thumb:hover {
    background: #777;
}

.btn-delete {
    background: transparent;
    border: none;
    color: #999;
    font-size: 14px;
    cursor: pointer;
    transition: 0.2s ease;
    padding: 4px;
}

.btn-delete:hover {
    color: #ff5252;
    transform: scale(1.2);
}

select {
    background: #1f1f2e;
    color: white;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 5px 8px;
    font-size: 13px;
    cursor: pointer;
    transition: 0.2s ease;
}

select:hover {
    border-color: #666;
}

select:focus {
    outline: none;
    border-color: #4f46e5;
}

.problema-item {
    background: #1f1f2e;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 8px;

    display: flex;
    align-items: center;
    gap: 10px;
}

.problema-item p {
    margin: 0;
    flex: 1;
    font-size: 14px;
}

/* deixa descrição + data em coluna */
.problema-texto{
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.problema-data{
    color: rgba(255,255,255,0.75);
    font-weight: 500;
    margin-top: 4px;
    letter-spacing: 0.3px;
}

/* opcional: garante que o texto não estoure */
.problema-item p{
    margin: 0;
    overflow-wrap: anywhere;
}

textarea {
    width: 93%;
    min-height: 90px;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #444;
    background: #1f1f2e;
    color: white;
    font-size: 14px;
    resize: none;
    margin-bottom: 15px;
}

textarea:focus {
    outline: none;
    border-color: #4f46e5;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.btn {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s ease;
}

.btn-primary {
    background: #4f46e5;
    color: white;
}

.btn-primary:hover {
    background: #4338ca;
}

.btn-secondary {
    background: #444;
    color: white;
}

.btn-secondary:hover {
    background: #555;
}

.modal-content label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    cursor: pointer;
}



.problema-item {
    background: #1f1f2e;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: 0.2s ease;
}

.problema-item:hover {
    background: #29293d;
}
.problema-item p {
    margin: 0;
    flex: 1;
}

.fechar {
    position: absolute;
    right: 15px;
    top: 10px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    color: #888;
}

.fechar:hover {
    color: red;
}

.problema-item.aberto {
    border-left: 5px solid #e53935;
}

.problema-item.andamento {
    border-left: 5px solid #fb8c00;
}

.problema-item.resolvido {
    border-left: 5px solid #43a047;
}

.dashboard {
    display: flex;
    justify-content: center;
    gap: 40px; /* mais espaço */
    flex-wrap: wrap; /* evita quebrar layout em telas menores */
    margin-bottom: 40px;
}

.card {
    background: #32324a; /* levemente mais claro que o fundo */
    padding: 25px;
    border-radius: 12px;
    width: 220px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.card h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 500;
    opacity: 0.9;
}

.card p {
    font-size: 36px;
    margin: 0;
    font-weight: bold;
}

.card.red {
    background: #b71c1c;
}

.card.orange {
    background: #ef6c00;
}


.alerta {
    position: absolute;
    right: -8px;
    top: -8px;
    width: 18px;
    height: 18px;
    background: #ffeb3b;
    color: black;
    font-weight: bold;
    font-size: 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 5px rgba(0,0,0,0.4);
}

@keyframes piscar {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.alerta {
    animation: piscar 1s infinite;
}


.labs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.lab-card {
    background: #2a2a3d;
    padding: 25px;
    border-radius: 15px;
    width: 350px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    transition: transform 0.3s;
}

.lab-card:hover {
    transform: translateY(-5px);
}

.lab-dashboard {
    display: flex;
    justify-content: space-between;
    margin: 20px 0;
}

.lab-dashboard .card {
    width: 90px;
    padding: 15px;
    border-radius: 10px;
}

.lab-dashboard .card p {
    font-size: 20px;
}

.btn-abrir {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #4e73df, #224abe);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-abrir:hover {
    background: linear-gradient(135deg, #224abe, #1b3a8a);
    transform: scale(1.05);
}

.top-bar {
    width: 80%;
    max-width: 1200px;
    margin: 30px auto 10px auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.top-bar h1 {
    margin: 0;
}

.btn-voltar {
    background: #32324a;
    color: white;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 14px;
    transition: 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 15px;
}

.btn-voltar:hover {
    background: #4f46e5;
    transform: translateY(-2px);
}

html, body {
    height: 100%;
    margin: 0;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.footer{
  margin-top: auto;
  padding: 18px 0;
  text-align: center;

  background: transparent;    
  color: rgba(255,255,255,.65);
  font-size: 14px;

  position: relative;
  z-index: 2;                  
}

.footer a{
  color: #8b5cf6;              
  text-decoration: none;
  font-weight: 600;
}

.footer a:hover{
  text-decoration: underline;
}

.user-bar {
    width: 90%;
    max-width: 1200px;
    margin: 40px auto 20px auto;

    display: flex;
    align-items: center;
    justify-content: space-between;

    background: #2a2a3d;
    padding: 20px 30px;
    border-radius: 14px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.user-info h1 {
    margin: 0;
    font-size: 22px;
}

.user-info span {
    font-size: 14px;
    color: #bbb;
}

.user-actions {
    display: flex;
    gap: 12px;
}

.btn-secondary {
    background: #444;
    color: white;
    padding: 8px 14px;
    border-radius: 8px;
    text-decoration: none;
    transition: 0.2s ease;
}

.btn-secondary:hover {
    background: #666;
}

.btn-danger {
    background: #b71c1c;
    color: white;
    padding: 8px 14px;
    border-radius: 8px;
    text-decoration: none;
    transition: 0.2s ease;
}

.btn-danger:hover {
    background: #e53935;
}

.section-title {
    text-align: center;
    margin: 40px 0 20px 0;
}

.user-bar {
    width: 90%;
    max-width: 1200px;
    margin: 30px auto 30px auto;

    display: flex;
    justify-content: space-between;
    align-items: center;

    background: #2a2a3d;
    padding: 10px 18px; 
    border-radius: 12px; 
    box-shadow: 0 6px 18px rgba(0,0,0,0.25); 
}

.user-bar h1 {
    margin: 0;
    font-size: 20px; 
    font-weight: 600;
}

.user-menu {
    position: relative;
}

.user-trigger {
    background: #444;
    border: none;
    color: white;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: 0.2s ease;
}

.user-trigger:hover {
    background: #555;
}

.dropdown-menu {
    position: absolute;
    right: 0;
    top: 45px;
    background: #2c2c3f;
    border-radius: 10px;
    overflow: hidden;
    display: none;
    min-width: 180px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
}

.dropdown-menu a {
    display: block;
    padding: 12px 15px;
    color: white;
    text-decoration: none;
    font-size: 14px;
    transition: 0.2s ease;
}

.dropdown-menu a:hover {
    background: #3a3a52;
}

.dropdown-menu .logout:hover {
    background: #b71c1c;
}

/* =========================
   LOGIN / AUTH PAGE
========================= */

.auth-page {
    font-family: "Inter", Arial, sans-serif;
    background: #1e1e2f;
    color: white;
    text-align: left;

    overflow-x: hidden;  /* só impede rolagem lateral */
    overflow-y: auto;    /* permite rolagem vertical (footer aparece) */
}

.auth-container {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 30px 16px;
    position: relative;
    z-index: 2;
}

.auth-bg{
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.auth-page{
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.auth-container{
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 16px;
}

.auth-container,
.footer{
    position: relative;
    z-index: 1;
}

.blob {
    position: absolute;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    filter: blur(50px);
    opacity: 0.35;
    animation: float 8s ease-in-out infinite;
}

.blob-1 {
    background: #4f46e5;
    top: -140px;
    left: -160px;
}

.blob-2 {
    background: #ef6c00;
    bottom: -160px;
    right: -160px;
    animation-delay: 1.5s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, -10px) scale(1.05); }
}

.auth-card, .auth-card * {
    box-sizing: border-box;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: rgba(42, 42, 61, 0.75);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 18px;
    padding: 26px 24px;
    box-shadow: 0 20px 70px rgba(0,0,0,0.55);
    backdrop-filter: blur(10px);
    animation: pop 0.25s ease;
}

@keyframes pop {
    from { transform: translateY(10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.auth-header {
    margin-bottom: 18px;
}

.auth-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.10);
    margin-bottom: 10px;
    color: rgba(255,255,255,0.9);
}

.auth-header h1 {
    margin: 0;
    font-size: 26px;
    letter-spacing: 0.2px;
}

.auth-header p {
    margin: 6px 0 0 0;
    color: rgba(255,255,255,0.72);
    font-size: 14px;
}

.auth-form {
    display: grid;
    gap: 14px;
}

.auth-field label {
    display: block;
    font-size: 13px;
    margin-bottom: 6px;
    color: rgba(255,255,255,0.85);
}

.auth-field input {
    width: 100%;
    padding: 12px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(31, 31, 46, 0.85);
    color: white;
    outline: none;
    transition: 0.2s ease;
}

.auth-field input::placeholder {
    color: rgba(255,255,255,0.35);
}

.auth-field input:focus {
    border-color: rgba(79, 70, 229, 0.9);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.18);
}

.auth-btn {
    margin-top: 6px;
    width: 100%;
    border: none;
    border-radius: 12px;
    padding: 12px 14px;
    cursor: pointer;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #4f46e5, #224abe);
    box-shadow: 0 12px 30px rgba(79, 70, 229, 0.25);
    transition: 0.2s ease;
}

.auth-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 40px rgba(79, 70, 229, 0.33);
}

.auth-btn:active {
    transform: translateY(0);
}

.auth-alert {
    background: rgba(183, 28, 28, 0.20);
    border: 1px solid rgba(229, 57, 53, 0.35);
    color: #ffd1d1;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 10px;
}

.auth-error {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #ffb4b4;
}

.is-invalid {
    border-color: rgba(229, 57, 53, 0.85) !important;
    box-shadow: 0 0 0 4px rgba(229, 57, 53, 0.12);
}

.auth-footer {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 10px;
    font-size: 12px;
    color: rgba(255,255,255,0.55);
}

.auth-footer .dot {
    opacity: 0.6;
}

.auth-actions{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 6px;
}

.auth-btn-ghost{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;

    background: transparent;
    border: 1px solid rgba(255,255,255,0.16);
    color: rgba(255,255,255,0.9);
    box-shadow: none;
}

.auth-btn-ghost:hover{
    background: rgba(255,255,255,0.08);
    transform: translateY(-1px);
}

.auth-switch{
    text-align: center;
    margin-top: 18px;
    font-size: 14px;
    color: rgba(255,255,255,0.7);
}

.auth-switch a{
    color: #8b5cf6;
    text-decoration: none;
    font-weight: 500;
}

.auth-switch a:hover{
    text-decoration: underline;
}


.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.auth-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}