/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* This body style applies to the login page (which has no class) */
body {
  font-family: "Inter", sans-serif;
  font-size: 14px;
  background: linear-gradient(135deg, #f4f4f4 0%, #e8eaf6 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  padding: 20px;
}

/* This style OVERRIDES the one above when on the admin panel */
body.painel {
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  color: #333;
  background: linear-gradient(135deg, #f4f4f4 0%, #e8eaf6 100%);
  min-height: 100vh;
  /* Reset flex properties from the global body tag */
  display: block;
  justify-content: normal;
  align-items: normal;
}

/* ==========================================================================
   LAYOUT PRINCIPAL
   ========================================================================== */

.btn-back {
  display: inline-block;
  padding: 12px 24px;
  background: linear-gradient(135deg, #6b7280, #4b5563);
  color: #ffffff;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-back:hover {
  background: linear-gradient(135deg, #4b5563, #374151);
  transform: translateY(-2px);
}

#wrapper {
  max-width: 1200px;
  margin: 0 auto;
  background: #ffffff;
  min-height: 100vh;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* HEADER */
#header {
  height: 80px;
  background: linear-gradient(135deg, #051866 0%, #1e3a8a 100%);
  display: flex;
  align-items: center;
  padding: 0 24px;
  position: relative;
  box-shadow: 0 2px 20px rgba(5, 24, 102, 0.2);
}

#header img {
  width: 48px;
  height: 48px;
  margin-right: 16px;
}

#header h1 {
  font-size: 28px;
  font-weight: 700;
  color: #5793fb;
  margin: 0 auto;
  letter-spacing: 1px;
}

/* USER LOGGED */
.userlogado {
  position: absolute;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.userlogado h2 {
  margin: 0;
  font-size: 16px;
  color: #ffffff !important; /* FORÇA BRANCO */
  font-weight: 500;
}

.userlogado h2 a,
.userlogado h2 a:link,
.userlogado h2 a:visited,
.userlogado h2 a:hover,
.userlogado h2 a:active,
.userlogado h2 a:focus {
  color: #ffffff !important; /* FORÇA BRANCO EM TODOS ESTADOS */
  text-decoration: none !important; /* Remove sublinhado */
  font-weight: 500;
}
.toggle-user.item {
  color: #ffffff !important; /* Nome no dropdown também branco */
  text-decoration: none !important;
}

.toggle-user.item:hover {
  color: #ffffff !important; /* Mantém branco no hover */
  background: transparent; /* Sem fundo no hover */
}
#sair-accordion {
  position: relative;
}

#sair-accordion ul {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  background: #ffffff;
  min-width: 180px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  overflow: hidden;
}

#sair-accordion ul li {
  padding: 0;
  width: 100%;
  margin: 0;
}

#sair-accordion ul li a {
  display: block;
  padding: 12px 16px;
  font-size: 14px;
  color: #333;
  transition: all 0.3s ease;
  border-bottom: 1px solid #f0f0f0;
}

#sair-accordion ul li:last-child a {
  border-bottom: none;
}

#sair-accordion ul li a:hover {
  background: #5793fb;
  color: #ffffff;
}

/* MAIN CONTENT */
#wrap-content {
  flex: 1;
  display: flex;
  padding: 24px;
  gap: 24px;
}

/* SIDEBAR */
#sidebar {
  width: 240px;
  flex-shrink: 0;
  background: #ffffff;
  border-radius: 12px;
  padding: 16px 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  order: -1;
}

#content {
  flex: 1;
  background: #ffffff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

#accordion > li {
  list-style-type: none;
  margin-bottom: 4px;
}

#accordion > li > a {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 500;
  color: #64748b;
  text-decoration: none;
  transition: all 0.3s ease;
  border-radius: 8px;
  margin: 0 8px;
}

#accordion > li > a:hover,
#accordion > li > a.active {
  background: linear-gradient(135deg, #5793fb, #4f46e5);
  color: #ffffff;
  transform: translateX(4px);
}

#accordion ul.inner {
  display: none;
  background: #f8fafc;
  border-radius: 8px;
  margin: 4px 12px;
  overflow: hidden;
}

#accordion ul.inner li a {
  display: block;
  padding: 12px 20px;
  font-size: 14px;
  color: #64748b;
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

#accordion ul.inner li a:hover {
  background: #e0e7ff;
  color: #5793fb;
  border-left-color: #5793fb;
  padding-left: 24px;
}

/* CONTENT */
#content {
  flex: 1;
  background: #ffffff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

#content h2 {
  font-size: 24px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e2e8f0;
}

#content p.index {
  font-size: 18px;
  color: #64748b;
  text-align: center;
  padding: 40px;
}

/* FOOTER */
#footer {
  background: #f1f5f9;
  padding: 16px 24px;
  text-align: center;
  font-size: 14px;
  color: #64748b;
  border-top: 1px solid #e2e8f0;
}

/* ==========================================================================
   FORMS MODERN - TABELAS DE FORMULÁRIO
   ========================================================================== */
.form-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  margin: 24px 0;
}

.form-table td {
  padding: 20px;
  vertical-align: top;
}

.form-table td:first-child {
  width: 180px;
  font-weight: 600;
  color: #1e293b;
  background: #f8fafc;
  border-right: 1px solid #e2e8f0;
}

.form-table td:last-child {
  background: #ffffff;
}

.form-table tr:hover td {
  background: #f1f5f9;
}

.form-table label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}

.form-table input[type="text"],
.form-table input[type="number"],
.form-table input[type="password"],
.form-table textarea,
.form-table select {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.3s ease;
  background: #ffffff;
}

.form-table input[type="text"]:focus,
.form-table input[type="number"]:focus,
.form-table input[type="password"]:focus,
.form-table textarea:focus,
.form-table select:focus {
  outline: none;
  border-color: #5793fb;
  box-shadow: 0 0 0 4px rgba(87, 147, 251, 0.1);
  transform: translateY(-1px);
}

.form-table input[type="submit"],
.form-table input[type="button"] {
  padding: 14px 28px;
  background: linear-gradient(135deg, #5793fb, #4f46e5);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(87, 147, 251, 0.2);
}

.form-table input[type="submit"]:hover,
.form-table input[type="button"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(87, 147, 251, 0.3);
}

.form-table a {
  display: inline-block;
  padding: 14px 28px;
  margin-left: 12px;
  background: #6b7280;
  color: #ffffff;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.form-table a:hover {
  background: #4b5563;
  transform: translateY(-2px);
}
/* ==========================================================================
   DATA TABLE PREMIUM
   ========================================================================== */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  background: #ffffff;
  margin: 24px 0;
  font-size: 14px;
}

.data-table thead th {
  padding: 18px 16px;
  background: linear-gradient(135deg, #051866, #1e3a8a);
  color: #ffffff;
  font-weight: 600;
  text-align: left;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  position: relative;
}

.data-table thead th::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #5793fb, transparent);
}

.data-table tbody tr {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-bottom: 1px solid #f1f5f9;
}

.data-table tbody tr:hover {
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(87, 147, 251, 0.1);
}

.data-table tbody tr:nth-child(even) {
  background: #f8fafc;
}

.data-table tbody tr:nth-child(even):hover {
  background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
}

.data-table td {
  padding: 18px 16px;
  color: #374151;
  font-weight: 500;
}

.data-table td a {
  display: inline-block;
  padding: 8px 12px;
  margin: 0 4px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.data-table td a[href*="editar"] {
  background: #10b981;
  color: #ffffff;
}

.data-table td a[href*="editar"]:hover {
  background: #059669;
  transform: translateY(-1px);
}

.data-table td a[href*="deletar"] {
  background: #ef4444;
  color: #ffffff;
}

.data-table td a[href*="deletar"]:hover {
  background: #dc2626;
  transform: translateY(-1px);
}

.data-table td a[href*="ips"] {
  background: #3b82f6;
  color: #ffffff;
}

.data-table td a[href*="ips"]:hover {
  background: #2563eb;
  transform: translateY(-1px);
}

.data-table td:last-child {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.data-table td:last-child a {
  min-width: 60px;
  text-align: center;
}

@media (max-width: 768px) {
  .data-table td:last-child {
    flex-direction: column;
    gap: 6px;
  }

  .data-table td:last-child a {
    width: 100%;
    text-align: center;
  }
}

/* BOTÃO ADICIONAR */
.btn-add {
  display: inline-block;
  padding: 14px 28px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 600;
  margin: 20px 0;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.2);
}

.btn-add:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

/* ==========================================================================
   ALERTS & MESSAGES
   ========================================================================== */
.erro,
.sucesso,
.alerta,
.pergunta {
  padding: 16px 20px;
  margin: 20px 0;
  border-radius: 8px;
  font-weight: 500;
}

.sucesso {
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
  border: 1px solid #22c55e;
  color: #166534;
}

.alerta {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 1px solid #f59e0b;
  color: #92400e;
}

.erro {
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  border: 1px solid #ef4444;
  color: #dc2626;
}

.pergunta {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  border: 1px solid #3b82f6;
  color: #1e40af;
}

/* ==========================================================================
   DATA TABLE MODERN (Used for #listausers)
   ========================================================================== */
table.dataTable {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  background: #ffffff;
}

table.dataTable thead th {
  padding: 16px 12px;
  background: linear-gradient(135deg, #051866, #1e3a8a);
  color: #ffffff;
  font-weight: 600;
  text-align: left;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

table.dataTable tbody tr {
  transition: all 0.3s ease;
}

table.dataTable tbody tr:hover {
  background: #f8fafc;
  transform: scale(1.01);
}

table.dataTable td {
  padding: 16px 12px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 14px;
}

table.dataTable tbody tr:nth-child(even) {
  background: #f8fafc;
}

table.dataTable tbody tr:nth-child(even):hover {
  background: #e2e8f0;
}

/* PAGINATION */
.dataTables_paginate .paginate_button {
  padding: 8px 12px !important;
  margin: 0 2px;
  border: 2px solid #e5e7eb !important;
  border-radius: 6px !important;
  background: #ffffff !important;
  color: #374151 !important;
  transition: all 0.3s ease;
}

.dataTables_paginate .paginate_button:hover {
  background: #5793fb !important;
  color: #ffffff !important;
  border-color: #5793fb !important;
  transform: translateY(-1px);
}

.dataTables_paginate .paginate_active {
  background: #5793fb !important;
  color: #ffffff !important;
  border-color: #5793fb !important;
}

/* ==========================================================================
   LOGIN PAGE STYLES
   ========================================================================== */

/* The main login form container */
#loginform {
  width: 100%;
  max-width: 420px; /* Set a max-width for the form */
  padding: 40px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  animation: fadeInUp 0.5s ease;
}

/* Logo container */
#loginform .logo-img {
  text-align: center;
  margin-bottom: 24px;
}

#loginform .logo-img img {
  max-width: 100px; /* Adjust size as needed */
  height: auto;
}

/* Form and Fieldset reset */
#loginform .userform {
  width: 100%;
}

#loginform .userform fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

/* List styling reset */
#loginform .userform ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

#loginform .userform li {
  margin-bottom: 20px;
  position: relative;
}

/* Form labels */
#loginform .userform label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}

/* Form inputs (text and password) */
#loginform .userform input[type="text"],
#loginform .userform input[type="password"] {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.3s ease;
  background: #ffffff;
  box-sizing: border-box; /* Ensures padding doesn't break width */
}

#loginform .userform input[type="text"]:focus,
#loginform .userform input[type="password"]:focus {
  outline: none;
  border-color: #5793fb;
  box-shadow: 0 0 0 4px rgba(87, 147, 251, 0.1);
}

/* Login button */
#loginform .userform li.center {
  text-align: center;
  margin-top: 30px;
  margin-bottom: 0; /* No margin after the button */
}

#loginform .userform input[type="submit"] {
  width: 100%;
  padding: 14px 28px;
  background: linear-gradient(135deg, #5793fb, #4f46e5);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(87, 147, 251, 0.2);
}

#loginform .userform input[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(87, 147, 251, 0.3);
}

/* ==========================================================================
   Error/Success Messages
   (These are already in your CSS, but good to have them grouped)
   ========================================================================== */

.erro,
.sucesso,
.alerta {
  padding: 16px 20px;
  margin: 20px 0;
  border-radius: 8px;
  font-weight: 500;
  width: 100%;
  box-sizing: border-box; /* Add this */
  text-align: center; /* Center text */
  margin-bottom: 24px; /* Space below message */
}

.sucesso {
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
  border: 1px solid #22c55e;
  color: #166534;
}

.alerta {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 1px solid #f59e0b;
  color: #92400e;
}

.erro {
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  border: 1px solid #ef4444;
  color: #dc2626;
}

/* ==========================================================================
   CONTENT FORMS (User, Cliente, etc.)
   ========================================================================== */

/* ==========================================================================
   CONTENT FORMS (User, Cliente, etc.)
   ========================================================================== */

/* General styles for forms inside the #content area */
#content .userform,
#content .clienteform {
  width: 100%;
  max-width: 800px; 
  margin: 20px 0; 
}

#content .userform fieldset,
#content .clienteform fieldset {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px 30px; 
  background: #fdfdfd;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

#content .userform legend,
#content .clienteform legend {
  font-size: 18px;
  font-weight: 600;
  color: #1e3a8a;
  padding: 0 10px;
  margin-left: -10px; /* Aligns with padding */
}

#content .userform ul,
#content .clienteform ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

#content .userform li,
#content .clienteform li {
  padding: 14px 0; 
  border-bottom: 1px dashed #f1f5f9;
  display: flex;
  flex-wrap: wrap; 
  align-items: center;
  gap: 10px 16px; 
}

#content .userform li:last-child,
#content .clienteform li:last-child {
  border-bottom: none;
  padding-top: 24px;
}

/* Nested lists (for permissions in usuarios.php) */
#content .userform li ul {
  width: 100%;
  margin-top: 10px;
  margin-left: 20px;
  background: #f8fafc;
  border-radius: 8px;
  padding: 10px;
}

#content .userform li ul li {
  border-bottom: none;
  padding: 6px 0;
  display: block; /* Stack permissions vertically */
}

/* Form Labels */
#content .userform label.user,
#content .clienteform label.user {
  font-weight: 500;
  color: #374151;
  flex-basis: 180px; 
  flex-shrink: 0;
}

#content .userform li ul label.user {
  flex-basis: auto; /* Reset basis for nested labels */
  margin-right: 10px;
}

/* Form Inputs */
#content .userform input[type="text"],
#content .userform input[type="text2"], /* From usuarios.php */
#content .userform input[type="email"], 
#content .userform input[type="password"],
#content .clienteform input[type="text"] {
  flex-grow: 1;
  min-width: 250px; 
  padding: 12px 14px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.3s ease;
  background: #ffffff;
  box-sizing: border-box;
}

#content .userform input[type="text"]:focus,
#content .userform input[type="text2"]:focus,
#content .userform input[type="email"]:focus,
#content .userform input[type="password"]:focus,
#content .clienteform input[type="text"]:focus {
  outline: none;
  border-color: #5793fb;
  box-shadow: 0 0 0 4px rgba(87, 147, 251, 0.1);
}

#content .userform input[type="checkbox"],
#content .clienteform input[type="checkbox"] {
  margin-right: 8px;
  transform: scale(1.1);
  accent-color: #4f46e5;
}

/* Disabled inputs */
#content .userform input:disabled,
#content .clienteform input:disabled {
  background: #f1f5f9;
  color: #64748b;
  cursor: not-allowed;
  border-color: #f1f5f9;
}

/* Button alignment */
#content .userform li.center,
#content .clienteform li.center {
  justify-content: center;
}

#content .userform li.right,
#content .clienteform li.right {
  justify-content: flex-end;
  flex-grow: 1;
}

/* General Button Styles */
#content .userform input[type="submit"],
#content .userform input[type="button"],
#content .clienteform input[type="submit"],
#content .clienteform input[type="button"] {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 5px;
}

/* --- Specific Button Colors --- */

/* .submit2 (Cadastrar/Registar) */
#content input.submit2[type="submit"] {
  background: linear-gradient(135deg, #5793fb, #4f46e5);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(87, 147, 251, 0.2);
}
#content input.submit2[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(87, 147, 251, 0.3);
}

/* .submit3 (Salvar Alterações) */
#content input.submit3[type="submit"] {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.2);
}
#content input.submit3[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

/* .submit4 (Confirmar Exclusão) */
#content input.submit4[type="submit"] {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.2);
}
#content input.submit4[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.3);
}

/* Cancelar Buttons (all types) */
#content input[value="Cancelar"].submit2,
#content input[value="Cancelar"].submit3,
#content input[value="Cancelar"].submit4 {
  background: #6b7280;
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(107, 114, 128, 0.2);
}
#content input[value="Cancelar"]:hover {
  background: #4b5563;
  transform: translateY(-2px);
}

/* ==========================================================================
   DATA TABLE ACTIONS (for .tableuser)
   ========================================================================== */

/* Styles the <img> icons in your tables */
.tableuser td a {
  display: inline-block;
  margin: 0 4px;
  padding: 6px;
  border-radius: 50%; /* Makes a circle */
  transition: all 0.3s ease;
}

.tableuser td a:hover {
  transform: translateY(-2px);
  background: #f1f5f9;
}

.tableuser td a img {
  display: block;
  width: 16px; /* Standard icon size */
  height: 16px;
  vertical-align: middle;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
  #wrap-content {
    flex-direction: column;
    padding: 16px;
  }

  #sidebar {
    width: 100%;
    order: 2;
  }

  #header {
    padding: 0 16px;
  }

  #header h1 {
    font-size: 20px;
  }

  .userlogado {
    right: 16px;
  }

  #content {
    padding: 16px;
  }
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#content, #loginform { /* Apply animation to login form too */
  animation: fadeInUp 0.6s ease;
}

/* LOADING */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #5793fb;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}