/* ========== Base Setup ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Lato', sans-serif;
  background-color: #f5f5f5;
  color: #000;
  min-height: 100vh;
}

h1, h2, h3 {
  font-family: 'Playfair Display', serif;
  letter-spacing: 1px;
}

/* ========== Login Page ========== */
.login-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: #000;
}

.login-container {
  background: #fff;
  padding: 50px 40px;
  border-radius: 10px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.login-header {
  text-align: center;
  margin-bottom: 30px;
}

.login-logo {
  max-width: 200px;
  margin-bottom: 15px;
}

.login-header h1 {
  font-size: 1.5rem;
  color: #000;
  text-transform: uppercase;
}

.login-form .form-group {
  margin-bottom: 20px;
}

.login-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: #333;
}

.login-form input {
  width: 100%;
  padding: 14px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.login-form input:focus {
  outline: none;
  border-color: #000;
}

.login-button {
  width: 100%;
  padding: 14px;
  background: #000;
  color: #fff;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.login-button:hover {
  background: #333;
}

.error-message {
  color: #d32f2f;
  text-align: center;
  margin-top: 15px;
  font-size: 0.9rem;
}

/* ========== Header ========== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  background: #000;
  color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-logo {
  height: 50px;
  width: auto;
}

.header-left h1 {
  font-size: 1.4rem;
  text-transform: uppercase;
  color: #fff;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

#userName {
  font-size: 0.9rem;
  opacity: 0.8;
}

/* ========== Buttons ========== */
.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-primary {
  background: #fff;
  color: #000;
}

.btn-primary:hover {
  background: #eee;
}

.btn-secondary {
  background: transparent;
  color: #fff;
  border: 1px solid #fff;
}

.btn-secondary:hover {
  background: #fff;
  color: #000;
}

.btn-danger {
  background: #d32f2f;
  color: #fff;
}

.btn-danger:hover {
  background: #b71c1c;
}

/* ========== Kanban Board ========== */
.kanban-board {
  display: flex;
  gap: 15px;
  padding: 20px;
  overflow-x: auto;
  min-height: calc(100vh - 80px);
}

.kanban-column {
  flex: 0 0 280px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 120px);
}

.column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: #000;
  color: #fff;
  border-radius: 8px 8px 0 0;
}

.column-header h2 {
  font-size: 0.95rem;
  text-transform: uppercase;
  font-weight: 600;
}

.column-header .count {
  background: #fff;
  color: #000;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 700;
}

.column-cards {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
  min-height: 100px;
}

.column-cards.drag-over {
  background: #f0f0f0;
}

/* ========== Project Cards ========== */
.project-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-left: 4px solid #000;
  border-radius: 6px;
  padding: 15px;
  margin-bottom: 10px;
  cursor: grab;
  transition: all 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.project-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.project-card.dragging {
  opacity: 0.5;
  cursor: grabbing;
}

.project-card h3 {
  font-size: 1rem;
  margin-bottom: 8px;
  color: #000;
}

.project-card .client-name {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 5px;
}

.project-card .address {
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 8px;
}

.project-card .dates {
  font-size: 0.75rem;
  color: #999;
  display: flex;
  justify-content: space-between;
}

.project-card .notes {
  font-size: 0.8rem;
  color: #666;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #eee;
  font-style: italic;
}

/* ========== Modal ========== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: #fff;
  border-radius: 10px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  background: #000;
  color: #fff;
  border-radius: 10px 10px 0 0;
}

.modal-header h2 {
  font-size: 1.2rem;
  text-transform: uppercase;
}

.close-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
}

.close-btn:hover {
  opacity: 0.7;
}

#projectForm {
  padding: 25px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #000;
}

.form-row {
  display: flex;
  gap: 15px;
}

.form-row .form-group {
  flex: 1;
}

.modal-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 25px;
}

.modal-actions .btn-primary {
  background: #000;
  color: #fff;
  flex: 1;
}

.modal-actions .btn-primary:hover {
  background: #333;
}

/* ========== Toast ========== */
.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #000;
  color: #fff;
  padding: 15px 25px;
  border-radius: 6px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s;
  z-index: 2000;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    gap: 15px;
    padding: 15px;
  }

  .header-left h1 {
    font-size: 1.1rem;
  }

  .header-right {
    flex-wrap: wrap;
    justify-content: center;
  }

  .kanban-board {
    padding: 10px;
  }

  .kanban-column {
    flex: 0 0 260px;
  }

  .modal-content {
    margin: 10px;
    max-height: calc(100vh - 20px);
  }
}

/* ========== Scrollbar ========== */
.column-cards::-webkit-scrollbar {
  width: 6px;
}

.column-cards::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.column-cards::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

.column-cards::-webkit-scrollbar-thumb:hover {
  background: #999;
}
