/* --- Base Styles (for portal pages) --- */
body,
h1,
h2,
h3,
p,
ul {
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  line-height: 1.6;
  color: #333;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
}

.cta-button {
  display: inline-block;
  background-color: #3498db;
  color: #fff;
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

/* --- Login Page Specifics --- */
.login-page-body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: #f4f4f9;
}

.login-container {
  padding: 2rem;
}

.login-box {
  width: 100%;
  max-width: 400px;
  padding: 40px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.login-box .logo {
  color: #2c3e50;
  margin-bottom: 10px;
}

.login-box h2 {
  margin-bottom: 30px;
  font-size: 1.5rem;
  color: #555;
}

.input-group {
  text-align: left;
  margin-bottom: 20px;
}

.input-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: #333;
}

.input-group input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-sizing: border-box;
}

.login-button {
  width: 100%;
  padding: 12px;
  font-size: 1.1rem;
}

/* --- Dashboard --- */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 250px;
  background-color: #2c3e50;
  color: #ecf0f1;
  display: flex;
  flex-direction: column;
  padding: 20px;
  flex-shrink: 0;
}

.sidebar .logo {
  text-align: center;
  margin-bottom: 40px;
}

.sidebar-nav ul {
  list-style: none;
}

.sidebar-nav li {
  margin-bottom: 10px;
}

.sidebar-nav a {
  color: #ecf0f1;
  text-decoration: none;
  display: block;
  padding: 10px 15px;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.sidebar-nav li.active a,
.sidebar-nav a:hover {
  background-color: #34495e;
}

.sidebar-footer {
  margin-top: auto;
}

.sidebar-footer a {
  color: #bdc3c7;
  text-decoration: none;
}

#dashboard-main-content {
  flex-grow: 1;
  background-color: #f4f4f9;
  padding: 40px;
}

.dashboard-header h1 {
  font-size: 2.5rem;
  color: #2c3e50;
  margin-bottom: 40px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
}

.dashboard-widget {
  background: #fff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.dashboard-widget.full-width {
  grid-column: 1 / -1;
}

.dashboard-widget h3 {
  margin-top: 0;
  margin-bottom: 20px;
  color: #3498db;
}

.dashboard-widget ul {
  list-style: none;
}

.dashboard-widget ul li {
  margin-bottom: 10px;
}

.dashboard-widget input[type="checkbox"] {
  margin-right: 10px;
}

.message-preview {
  border-bottom: 1px solid #eee;
  padding-bottom: 15px;
  margin-bottom: 15px;
}

.message-preview:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.message-preview strong {
  color: #333;
}

.message-preview p {
  margin: 5px 0 0;
  color: #555;
}

.dashboard-panel {
  display: none;
}

.dashboard-panel.active {
  display: block;
}
.dashboard-widget canvas {
  max-height: 350px;
  width: 100% !important;
}
/* --- Calendar Widget --- */
.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.calendar-header h3 {
  margin: 0;
  color: #2c3e50;
}

.calendar-header button {
  background: none;
  border: 1px solid #ccc;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  cursor: pointer;
  font-weight: bold;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.day-name,
.day {
  text-align: center;
  padding: 10px;
}

.day-name {
  font-weight: bold;
  color: #555;
}

.day {
  border: 1px solid #eee;
  min-height: 100px;
  text-align: right;
  padding: 5px;
  font-size: 0.9rem;
  background-color: #fff;
}

.day.other-month {
  color: #ccc;
  background-color: #fafafa;
}

.event {
  background-color: rgba(52, 152, 219, 0.2);
  border-left: 3px solid #3498db;
  padding: 5px;
  margin-top: 5px;
  border-radius: 3px;
  font-size: 0.8rem;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
/* --- Messaging Interface --- */
.messaging-layout {
  display: flex;
  height: calc(100vh - 150px); /* Full height minus header padding */
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.message-list {
  width: 300px;
  border-right: 1px solid #eee;
  flex-shrink: 0;
  overflow-y: auto;
}

.message-thread {
  padding: 15px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  position: relative;
}

.message-thread:hover {
  background-color: #f9f9f9;
}

.message-thread.active {
  background-color: #eaf5fd;
}

.message-thread h4 {
  margin: 0 0 5px;
  color: #333;
}

.message-thread p {
  margin: 0;
  font-size: 0.9rem;
  color: #777;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.thread-date {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 0.8rem;
  color: #999;
}

.message-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.message-content-header {
  padding: 15px 20px;
  border-bottom: 1px solid #eee;
  flex-shrink: 0;
}

.message-content-header h3 {
  margin: 0;
  color: #2c3e50;
}

.message-content-header span {
  font-size: 0.9rem;
  color: #777;
}

.message-history {
  flex-grow: 1;
  padding: 20px;
  overflow-y: auto;
}

.message {
  max-width: 70%;
  margin-bottom: 15px;
  padding: 10px 15px;
  border-radius: 18px;
}

.message p {
  margin: 0;
}

.message.received {
  background-color: #f1f0f0;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.message.sent {
  background-color: #3498db;
  color: #fff;
  align-self: flex-end;
  margin-left: auto;
  border-bottom-right-radius: 4px;
}

.message-timestamp {
  display: block;
  font-size: 0.75rem;
  color: #999;
  margin-top: 5px;
  text-align: right;
}

.message.sent .message-timestamp {
  color: #e0f7ff;
}

.message-reply-box {
  display: flex;
  padding: 20px;
  border-top: 1px solid #eee;
  gap: 10px;
}

.message-reply-box textarea {
  flex-grow: 1;
  border: 1px solid #ccc;
  border-radius: 5px;
  padding: 10px;
  resize: none;
  font-family: inherit;
}

.message-reply-box button {
  flex-shrink: 0;
}
/* --- Timecard Section --- */
.timecard-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.time-entry-row {
  display: grid;
  grid-template-columns: 1fr repeat(5, 50px);
  gap: 10px;
  align-items: center;
}

.time-entry-row label {
  font-weight: bold;
}

.time-entry-row input {
  width: 100%;
  padding: 8px;
  text-align: center;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.timecard-summary {
  margin-top: 10px;
  text-align: right;
  font-size: 1.1rem;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.history-table th,
.history-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.history-table th {
  background-color: #f9f9f9;
  font-weight: bold;
  color: #555;
}

.status-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: bold;
  color: #fff;
}

.status-badge.approved {
  background-color: #27ae60;
}

.status-badge.pending {
  background-color: #f39c12;
}

.status-badge.rejected {
  background-color: #e74c3c;
}
/* --- Clients Section --- */
.client-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.client-header h3 {
  margin: 0;
}

.client-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.client-card {
  background-color: #f9f9f9;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 20px;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.client-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.07);
}

.client-card h4 {
  margin: 0 0 10px;
  color: #2c3e50;
}

.client-card .contact-info {
  color: #555;
  margin-bottom: 15px;
}

.client-card .client-stats {
  display: flex;
  gap: 15px;
  font-size: 0.9rem;
  color: #777;
  border-top: 1px solid #eee;
  padding-top: 15px;
}

/* --- Daily Tasks (Kanban Board) --- */
.task-board-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  height: calc(100vh - 150px);
  align-items: start;
}

.task-column {
  background-color: #f0f2f5;
  border-radius: 8px;
  padding: 15px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.task-column-header {
  padding-bottom: 10px;
  border-bottom: 2px solid #e1e4e8;
  margin-bottom: 15px;
}

.task-column-header h3 {
  margin: 0;
  color: #2c3e50;
}

.task-list {
  flex-grow: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.task-card {
  background-color: #fff;
  border-radius: 5px;
  padding: 15px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  cursor: grab;
}

.task-card h4 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.task-card .task-meta {
  font-size: 0.85rem;
  color: #777;
  margin: 0;
}
