* {
 box-sizing: border-box;
 margin: 0;
 padding: 0;
 font-family: 'Segoe UI', Tahoma, sans-serif;
}

:root {
  --navbar-height: 60px;
  --footer-height: 50px;
}

body {
 background: #f5f5f5;
 color: #333;
 display: flex;
 justify-content: center;
 align-items: flex-start;
 padding: 40px 20px;
 padding-top: calc(var(--navbar-height) + 40px);
 padding-bottom: calc(var(--footer-height) + 40px);
 min-height: 100vh;
}

main, .container {
 background: #fff;
 padding: 30px 40px;
 border-radius: 12px;
 box-shadow: 0 6px 18px rgba(0,0,0,0.1);
 width: 100%;
 max-width: 500px;
}

h1 {
 text-align: center;
 margin-bottom: 8px;
 color: #333;
}

h2 {
 margin-top: 15px;
 margin-bottom: 5px;
 color: #555;
 font-weight: 500;
}

p {
  margin-bottom: 10px;
}

ul {
 list-style: none;
 padding: 0;
 margin-bottom: 10px;
}

input, select {
 width: 100%;
 padding: 10px 12px;
 margin-bottom: 6px;
 border: 1px solid #ccc;
 border-radius: 6px;
 transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, select:focus {
 border-color: #4CAF50;
 box-shadow: 0 0 5px rgba(76, 175, 80, 0.4);
 outline: none;
}

button {
 padding: 12px;
 border: none;
 border-radius: 6px;
 cursor: pointer;
 font-weight: 600;
 transition: background 0.2s;
}

button.full { width: 100%; margin-top: 5px; margin-bottom: 6px; }

button.green { background: #4CAF50; color: #fff; }
button.green:hover { background: #45a049; }

button.red { background: #f44336; color: #fff; }
button.red:hover { background: #e53935; }

button.gray { background: #9e9e9e; color: #fff; }
button.gray:hover { background: #757575; }

a {
 color: #4CAF50;
 text-decoration: none;
}

a:hover { text-decoration: underline; }

p.links {
 text-align: center;
 margin-top: 8px;
 font-size: 0.9rem;
 color: #777;
}


li {
 margin-bottom: 8px;
 padding: 8px;
 border: 1px solid #ddd;
 border-radius: 8px;
 background: #fafafa;
 display: flex;
 justify-content: space-between;
 align-items: flex-start;
 flex-wrap: wrap;
 transition: background 0.2s;
}

li:hover { background: #f0f0f0; }

.obra-info {
 flex-grow: 1;
 padding-right: 15px;
}

.obra-info p {
  margin-bottom: 4px;
}
.obra-info p:last-child {
  margin-bottom: 0;
}

.btn-container {
  display: flex;
  gap: 5px;
}

li .history-container {
 flex-basis: 100%;
 margin: 10px 0 0 0;
 padding: 10px;
 border-left: 3px solid #ccc;
 background: #fdfdfd;
}

.user-menu {
 position: fixed;
 top: 20px;
 right: 20px;
 cursor: pointer;
 display: flex;
 align-items: center;
 gap: 5px;
 font-weight: 500;
 z-index: 1000;
}

.user-icon { font-size: 1.4rem; }

.user-submenu {
 display: none;
 position: absolute;
 top: 32px;
 right: 0;
 background: #fff;
 border: 1px solid #ccc;
 border-radius: 8px;
 box-shadow: 0 6px 18px rgba(0,0,0,0.1);
 flex-direction: column;
 min-width: 160px;
}

.user-submenu a {
 padding: 6px 10px;
 color: #333;
 text-decoration: none;
 display: block;
}

.user-submenu a:hover { background: #f0f0f0; }

.toast-container {
 position: fixed;
 top: 20px;
 right: 20px;
 z-index: 9999;
 display: flex;
 flex-direction: column;
 gap: 10px;
}

.toast-container {
    top: calc(var(--navbar-height) + 20px);
}


.toast {
 min-width: 200px;
 max-width: 300px;
 padding: 12px 18px;
 border-radius: 8px;
 color: #fff;
 font-weight: 500;
 box-shadow: 0 4px 12px rgba(0,0,0,0.15);
 opacity: 0;
 transform: translateX(100%);
 animation: slideIn 0.3s forwards, fadeOut 0.3s 3s forwards;
}

.toast-success { background-color: #4CAF50; }
.toast-error { background-color: #f44336; }

@keyframes slideIn {
 to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeOut {
 to { opacity: 0; transform: translateX(100%); }
}

.modal-backdrop {
 position: fixed;
 top: 0;
 left: 0;
 width: 100%;
 height: 100%;
 background: rgba(0,0,0,0.5);
 z-index: 10000;
 display: none; 
 justify-content: center;
 align-items: center;
}

.modal {
 background: #fff;
 padding: 25px 30px;
 border-radius: 12px;
 box-shadow: 0 6px 18px rgba(0,0,0,0.15);
 width: 90%;
 max-width: 400px;
}

.modal-message {
 margin-bottom: 20px;
 font-size: 1.1rem;
 line-height: 1.5;
}

.modal-buttons {
 display: flex;
 justify-content: flex-end;
 gap: 10px;
}

.modal-buttons button {
 padding: 10px 16px;
}

.history-item {
 background: #fff;
 border: 1px solid #e0e0e0;
 border-radius: 6px;
 padding: 8px 10px;
 margin-bottom: 8px;
}

.history-item:last-child {
 margin-bottom: 0;
}

.history-date {
 font-weight: 600;
 color: #4CAF50;
 margin-bottom: 6px;
 font-size: 0.95rem;
}

.history-changes {
 font-size: 0.9rem;
 line-height: 1.5;
}

.history-changes p {
 margin: 3px 0;
}

.history-changes strong {
 color: #555;
}

.navbar {
  background: #fff;
  height: var(--navbar-height);
  border-bottom: 1px solid #ddd;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  padding: 0 30px;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1001; 
  display: flex;
  justify-content: center;
}

.navbar-content {
  width: 100%;
  max-width: 1100px; 
  display: flex;
  align-items: center;
  height: 100%;
}

.navbar-content.public-nav {
    justify-content: space-between;
}

.navbar-content.auth-nav .nav-menu {
    margin-left: 30px;
    margin-right: auto;
}

.nav-brand {
  font-size: 1.4rem;
  font-weight: 600;
  color: #333;
  text-decoration: none;
  flex-shrink: 0;
  cursor: default;
}

.navbar ul {
  list-style: none;
  display: flex;
  gap: 15px;
  margin: 0;
  padding: 0;
}

.navbar li {
   margin-bottom: 0;
   padding: 0;
   border: none;
   background: none;
   display: block;
   flex-wrap: nowrap;
   line-height: normal;
}

.navbar li:hover {
    background: none;
}

.navbar ul a {
  color: #555;
  text-decoration: none;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}

.navbar ul a:hover {
  background: #f0f0f0;
  color: #4CAF50;
  text-decoration: none;
}

.nav-user-area {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-shrink: 0;
}

.nav-user-area .user-email {
  font-weight: 500;
  color: #555;
  font-size: 0.9rem;
}

.nav-user-area .nav-logout {
  color: #f44336;
  font-weight: 500;
  padding: 8px 12px;
  border: 1px solid #f44336;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s;
}

.nav-user-area .nav-logout:hover {
  background: #f44336;
  color: #fff;
  text-decoration: none;
}


.footer {
  background: #333;
  color: #f0f0f0;
  height: var(--footer-height);
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  z-index: 1000;
}

.footer p {
    margin: 0;
    font-size: 0.8rem;
    text-align: center;
}

                    
#info-page-container {
  max-width: 800px;
}

#info-page-container h1 {
  text-align: center;
  color: #2b2b2b;
  margin-bottom: 24px;
}

#info-page-container p {
  line-height: 1.6;
  color: #333;
}

#info-page-container ol {
  margin-left: 20px;
  padding-left: 20px;
  list-style: decimal;
}

#info-page-container li {
    margin-bottom: 8px;
    padding: 0;
    border: none;
    border-radius: 0;
    background: none;
    display: list-item;
    justify-content: flex-start;
    align-items: flex-start;
    flex-wrap: nowrap;
}

#info-page-container li:hover {
    background: none;
}

.image-container {
  text-align: center;
  margin: 20px 0;
}

#info-page-container img {
  max-width: 100%;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.example-box {
  background-color: #f0f8ff;
  border-left: 4px solid #0066cc;
  padding: 12px 16px;
  margin: 20px 0;
  border-radius: 8px;
}

#info-page-container a {
  color: #0056b3;
}

#info-page-container a:hover {
  text-decoration: underline;
}

.how-to-use-list li {
  background: #f9f9f9;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 10px 15px;
  margin-bottom: 8px;
  display: block;
}

.inline-text-group {
    display: inline;
}

.password-container {
  position: relative;
  display: flex;
  align-items: center;
}

.password-container input {
  width: 100%;
  padding-right: 40px;
}

.toggle-pass {
  position: absolute;
  right: 10px;
  width: 22px;
  height: 22px;
  cursor: pointer;
  opacity: 0.7;
}

.toggle-pass:hover {
  opacity: 1;
}

.password-rules {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 8px;
}