/* ===== CSS RESET & BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #2c3e50;
  background-color: #f8f9fa;
  min-height: 100vh;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: #1a202c;
}

h1 {
  font-size: 2rem;
  letter-spacing: -0.5px;
}

h2 {
  font-size: 1.5rem;
}

p {
  margin-bottom: 1rem;
}

a {
  color: #4E81EE;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #3B74EA;
}

a:focus {
  outline: 2px solid #4E81EE;
  outline-offset: 2px;
}

/* ===== LAYOUT ===== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

main {
  padding: 3rem 0;
  min-height: calc(100vh - 200px);
}

/* ===== HEADER & NAVIGATION ===== */
header {
  background-color: #ffffff;
}

.color-bar {
  width: 100%;
  height: 8px;
  background-image: url('color_bar_horiz.jpg');
  background-size: cover;
  background-position: center;
}

.logo {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1a202c;
  padding: 1.25rem 0;
  display: inline-block;
}

nav {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.25rem 0;
}

.nav-menu {
  display: flex;
  gap: 2.5rem;
  list-style: none;
  align-items: center;
  justify-content: center;
}

.nav-menu li {
  position: relative;
}

.nav-menu li:not(:last-child)::after {
  content: "|";
  position: absolute;
  right: -1.4rem;
  top: 50%;
  transform: translateY(-50%);
  color: #d1d5db;
  font-weight: 300;
}

.nav-menu a {
  color: #4b5563;
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
}

.nav-menu a:hover {
  color: #1a202c;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  text-align: center;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  line-height: 1.5;
}

.btn:focus {
  outline: 2px solid #4E81EE;
  outline-offset: 2px;
}

.btn-primary {
  background-color: #4E81EE;
  color: #ffffff;
}

.btn-primary:hover {
  background-color: #3B74EA;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(78,129,238,0.30);
}

.btn-secondary {
  background-color: #f3f4f6;
  color: #374151;
}

.btn-secondary:hover {
  background-color: #e5e7eb;
  color: #1f2937;
}

.btn-link {
  background: none;
  color: #4E81EE;
  padding: 0.5rem 1rem;
}

.btn-link:hover {
  color: #3B74EA;
  background-color: #eff6ff;
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.1rem;
  min-width: 240px;
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

.btn-danger {
  background-color: #ef4444;
  color: #ffffff;
}

.btn-danger:hover {
  background-color: #dc2626;
  color: #ffffff;
}

.button-group {
  display: flex;
  gap: 1.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

/* ===== CARDS ===== */
.card {
  background-color: #ffffff;
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  border: 1px solid #e5e7eb;
  margin-bottom: 2rem;
}

.card h2, .card h3 {
  margin-bottom: 1rem;
  color: #1a202c;
}

/* ===== FORMS ===== */
.form-group {
  margin-bottom: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #374151;
  font-size: 0.95rem;
}

.field-note {
  font-size: 0.85rem;
  color: #6b7280;
  margin-top: 0.25rem;
  font-style: italic;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background-color: #ffffff;
  transition: all 0.2s ease;
  font-family: inherit;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #4E81EE;
  box-shadow: 0 0 0 3px rgba(78,129,238,0.30);
}

textarea {
  min-height: 150px;
  resize: vertical;
}

.checkbox-group {
  margin: 1.5rem 0;
}

.checkbox-wrapper {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-right: 0.75rem;
  cursor: pointer;
}

input[type="checkbox"]:focus {
  outline: 2px solid #4E81EE;
  outline-offset: 2px;
}

.checkbox-wrapper label {
  margin-bottom: 0;
  font-weight: 400;
  cursor: pointer;
}

.conditional-fields {
  margin-left: 2rem;
  padding-left: 1rem;
  border-left: 2px solid #e5e7eb;
  margin-top: 1rem;
}

.form-tip {
  font-size: 0.9rem;
  color: #6b7280;
  font-style: italic;
  margin-top: 1.5rem;
  padding: 1rem;
  background-color: #f9fafb;
  border-left: 3px solid #4E81EE;
  border-radius: 4px;
}

.form-note {
  font-size: 0.9rem;
  color: #6b7280;
  margin-bottom: 1.5rem;
}

.page-intro {
  margin-bottom: 2rem;
  color: #4b5563;
  line-height: 1.7;
}

.page-intro-secondary {
  font-style: italic;
  color: #6b7280;
  font-size: 0.95rem;
  margin-top: 0.5rem;
}

/* ===== TABLES ===== */
.table {
  width: 100%;
  border-collapse: collapse;
  background-color: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  border: 1px solid #e5e7eb;
}

.table thead {
  background-color: #f9fafb;
}

.table th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: #374151;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #e5e7eb;
}

.table td {
  padding: 1rem;
  border-bottom: 1px solid #f3f4f6;
}

.table-striped tbody tr:nth-child(even) {
  background-color: #f9fafb;
}

.table tbody tr:hover {
  background-color: #f3f4f6;
}

.table-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.table-actions a,
.table-actions button {
  font-size: 0.9rem;
  font-weight: 500;
}

/* ===== STATUS BADGES ===== */
.status-badge {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 4px;
  text-transform: capitalize;
}

.status-pending {
  background-color: #ffffff;
  color: #374151;
  border: 1px solid #d1d5db;
}

.status-overdue {
  background-color: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.status-completed {
  background-color: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}

/* ===== LOGIN PAGE ===== */
.login-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
}

.login-card {
  background-color: #ffffff;
  border-radius: 8px;
  padding: 3rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
  border: 1px solid #e5e7eb;
  width: 100%;
  max-width: 420px;
}

.login-title {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2.25rem;
  color: #1a202c;
}

/* Center login card on login.php */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
}

/* prevent the generic .card margin-bottom from shifting layout */
.login-container .login-card {
  margin-bottom: 0;
}


/* ===== HOME PAGE ===== */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.page-header h1 {
  margin-bottom: 0;
}

.date-display {
  color: #6b7280;
  font-size: 0.95rem;
  font-weight: 500;
}

.announcement-board {
  background-color: #fffbeb;
  border: 1px solid #fde68a;
  border-left: 4px solid #f59e0b;
}

.announcement-board h3 {
  color: #92400e;
  margin-bottom: 0.75rem;
}

.announcement-board p {
  color: #78350f;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background-color: #ffffff;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  border: 1px solid #e5e7eb;
  text-align: center;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: #4E81EE;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.9rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ===== TIMELINE PAGE ===== */
.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0; /* Changed from 2rem */
  flex-wrap: wrap;
  gap: 1rem;
  background-color: #ffffff;
  padding: 2rem;
  padding-bottom: 1.5rem; /* Reduce bottom padding */
  border-radius: 8px 8px 0 0; /* Only round top corners */
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  border: 1px solid #e5e7eb;
  border-bottom: none; /* Remove bottom border to connect seamlessly */
}

/* Add a new rule for the view toggle container */
.timeline-controls {
  background-color: #ffffff;
  padding: 1.5rem 2rem;
  padding-top: 0; /* Remove top padding to connect seamlessly */
  border-radius: 0 0 8px 8px; /* Only round bottom corners */
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  border: 1px solid #e5e7eb;
  border-top: 1px solid #f3f4f6; /* Subtle separator line */
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.dg-toolbar-row{
  background:#ffffff;
  border: 1px solid #e5e7eb;
  border-top: 0;                 /* seam removal */
  border-radius: 0 0 18px 18px;  /* bottom only */
  padding: 18px 24px;

  box-shadow: 0 10px 30px rgba(0,0,0,.06);
  margin-top: 0;
}




.timeline-info h1 {
  margin-bottom: 0.5rem;
}

.timeline-meta {
  font-size: 0.95rem;
  color: #6b7280;
  margin-bottom: 0.5rem;
}

.timeline-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.view-toggle {
  display: inline-flex;
  border: 2px solid #4E81EE;
  border-radius: 6px;
  overflow: hidden;
}

.toggle-button {
  padding: 0.65rem 1.5rem;
  font-size: 0.95rem;
  background-color: #ffffff;
  color: #4E81EE;
  border: none;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
  border-right: 1px solid #4E81EE;
}

.toggle-button:last-child {
  border-right: none;
}

.toggle-button:hover {
  background-color: #eff6ff;
}

.toggle-button:focus {
  outline: 2px solid #4E81EE;
  outline-offset: 2px;
}

.toggle-button.active {
  background-color: #4E81EE;
  color: #ffffff;
}

.timeline-preview-link {
  font-size: 0.9rem;
  display: inline-block;
  margin-bottom: 1.5rem;
}

.view-container {
  display: none;
}

.view-container.active {
  display: block;
}

/* Timeline vertical view */
.timeline {
  position: relative;
  padding-left: 3rem;
  margin-top: 2rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0.875rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: #e5e7eb;
}

.timeline-item {
  position: relative;
  padding-bottom: 2.5rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -2.375rem;
  top: 0.375rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #4E81EE;
  border: 3px solid #ffffff;
  box-shadow: 0 0 0 2px #4E81EE;
}

.timeline-item.completed::before {
  background-color: #10b981;
  box-shadow: 0 0 0 2px #10b981;
}

.timeline-item.overdue::before {
  background-color: #f59e0b;
  box-shadow: 0 0 0 2px #f59e0b;
}

.timeline-date {
  font-size: 0.9rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.25rem;
}

.timeline-title {
  font-size: 1rem;
  font-weight: 500;
  color: #1a202c;
  margin-bottom: 0.5rem;
}

/* ===== MODAL ===== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background-color: #ffffff;
  border-radius: 8px;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.modal h3 {
  margin-bottom: 1rem;
  color: #1a202c;
}

.modal p {
  margin-bottom: 1.5rem;
  color: #4b5563;
}

.modal-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

/* ===== MESSAGES ===== */
.copy-message {
  display: none;
  margin-top: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 500;
}

.copy-message.success {
  background-color: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}

.copy-message.error {
  background-color: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.copy-message.active {
  display: block;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }

  main {
    padding: 2rem 0;
  }

  .nav-menu {
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-menu li:not(:last-child)::after {
    display: none;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .button-group {
    flex-direction: column;
  }

  .btn-large {
    width: 100%;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  h1 {
    font-size: 1.75rem;
  }

  .table-wrapper {
    overflow-x: auto;
  }

  .timeline {
    padding-left: 2rem;
  }

  .timeline-actions {
    width: 100%;
  }

  .timeline-header {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .login-card {
    padding: 2rem 1.5rem;
  }

  .nav-menu {
    font-size: 0.9rem;
  }

  .quick-stats {
    grid-template-columns: 1fr;
  }
}

/* FORCE CENTER LOGIN (override any conflicting rules) */
.login-container,
.login-wrapper {
  min-height: 100vh !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 2rem !important;
}

.login-container .login-card,
.login-wrapper .login-card {
  margin: 0 !important;
  width: 100%;
  max-width: 520px;
}

