/* RESET */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* BACKGROUND */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 20px;
  background:
    linear-gradient(rgba(238,241,244,0.95), rgba(238,241,244,0.95)),
    url("assets/background.jpg") no-repeat center center fixed;
  background-size: cover;
}

/* HEADER */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding: 15px 20px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo {
  height: 55px;
  width: auto;
}

.main-header h1 {
  margin: 0;
  font-size: 1.5rem;
}

.subtitle {
  margin: 4px 0 0;
  font-size: 0.9rem;
  color: #666;
}

/* BOTÕES */
button {
  background: #f1f3f5;
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

button:hover { background: #e2e6ea; }
button:active { transform: scale(0.96); }

.main-header button {
  background: #0d6efd;
  color: #fff;
}

.main-header button:hover {
  background: #0b5ed7;
}

button.danger {
  background: #dc3545;
  color: #fff;
}

/* KANBAN */
.kanban {
  display: flex;
  gap: 20px;
}

.column {
  background: #fff;
  width: 33%;
  padding: 12px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,.1);
}

.column-actions {
  margin-bottom: 14px;
}

.pillar-desc {
  font-size: 0.85rem;
  color: #666;
  margin: 4px 0 12px;
  line-height: 1.4;
}

/* PROCESSOS */
.card {
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 10px;
  cursor: grab;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.card:active {
  cursor: grabbing;
}

.card.palha {
  background: #e0e0e0;
  border-left: 6px solid #9e9e9e;
}

.card.madeira {
  background: #fff3cd;
  border-left: 6px solid #ffc107;
}

.card.tijolo {
  background: #d4edda;
  border-left: 6px solid #28a745;
}

/* SUBPROCESSOS */
.sub {
  background: #fff;
  margin-top: 6px;
  padding: 6px;
  border-radius: 8px;
  font-size: 0.9em;
}

.todo { border-left: 4px solid #999; }
.doing { border-left: 4px solid orange; }
.done  { border-left: 4px solid green; opacity: 0.7; }

/* MODAL */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(3px);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: #fff;
  width: 380px;
  padding: 20px;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}

.modal-content h3 {
  margin-top: 0;
  margin-bottom: 12px;
}

/* INPUTS */
.modal-content input,
.modal-content textarea,
select {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 12px;
  border-radius: 8px;
  border: 1px solid #ced4da;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ================= LOGIN ================= */

.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.login-container {
  flex: 1; /* ISSO É O MAIS IMPORTANTE */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  background: #ffffff;
  width: 360px;
  padding: 32px;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  text-align: center;
}

/* textos */
.login-card h2 {
  margin: 0;
  margin-bottom: 6px;
}

.login-subtitle {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 18px;
}

/* inputs */
.login-card input {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 12px;
  border-radius: 8px;
  border: 1px solid #ced4da;
  font-size: 0.95rem;
}

/* botão */
.login-card button.primary {
  width: 100%;
  padding: 10px;
  background: #0d6efd;
  color: #fff;
  border-radius: 8px;
  border: none;
  cursor: pointer;
}

.login-card button.primary:hover {
  background: #0b5ed7;
}

.login-error {
  color: #dc3545;
  font-size: 0.85rem;
  margin-top: 10px;
}

/* ================= DASHBOARD ================= */

.dashboard {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
}

.dash-card {
  background: #ffffff;
  flex: 1;
  padding: 16px 18px;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.dash-card h3 {
  margin-top: 0;
  margin-bottom: 10px;
}

.dash-card p {
  margin: 4px 0;
  font-size: 0.9rem;
}

/* Barra de progresso */
.dash-bar {
  background: #e9ecef;
  height: 8px;
  border-radius: 6px;
  margin-top: 10px;
  overflow: hidden;
}

.dash-bar div {
  height: 100%;
  width: 0%;
  transition: width 0.3s ease;
}

/* Cores por pilar */
.dash-card.palha .dash-bar div {
  background: #9e9e9e;
}

.dash-card.madeira .dash-bar div {
  background: #ffc107;
}

.dash-card.tijolo .dash-bar div {
  background: #28a745;
}

.user-label {
  margin-right: 12px;
  font-weight: 500;
  color: #333;
}
