/* style.css - Main stylesheet */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* Navbar */
.navbar {
    background: #2c3e50;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-content-fluid {
  max-width: none;
  margin: 10px;
  padding: 0 2rem;
}

.navbar h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Login */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

.login-box {
    background: white;
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.login-box h2 {
    text-align: center;
    color: #7f8c8d;
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 2rem;
}

.login-help {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #ecf0f1;
    font-size: 0.9rem;
    color: #7f8c8d;
}

.login-help code {
    background: #ecf0f1;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: monospace;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
}

.form-control, input[type="text"], input[type="password"], select, textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

.form-control:focus, input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Buttons */
.btn {
    display: inline-flex !important;          /* was inline-block */
    align-items: center;                      /* vertical centering */
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    line-height: 1;                           /* normalize */
    border: none;
    border-radius: 4px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
    box-sizing: border-box;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-success {
    background: #2ecc71;
    color: white;
}

.btn-success:hover {
    background: #27ae60;
}

.btn-block {
    width: 100%;
    text-align: center;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Full width like Bootstrap container-fluid */
.container-fluid {
  width: 100%;
  max-width: none;
  margin: 10px;
  padding: 2rem; /* keep your spacing */
}

/* Dashboard */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.dashboard-header h2 {
    color: #2c3e50;
}

.meetings-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.meetings-section h3 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.meetings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.meeting-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.meeting-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.meeting-card h4 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.meeting-card p {
    margin-bottom: 0.5rem;
    color: #555;
}

.meeting-status {
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
}

.status-not_started {
    background: #ecf0f1;
    color: #7f8c8d;
}

.status-active {
    background: #d5f4e6;
    color: #27ae60;
}

.status-stopped {
    background: #fadbd8;
    color: #e74c3c;
}

/* Meeting Layout */
.meeting-layout {
    display: flex;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.meeting-layout-fluid {
  max-width: none;
  margin: 0;
  width: 100%;
  padding: 2rem; /* keep your page spacing */
}

.meeting-sidebar {
    width: 300px;
    flex-shrink: 0;
}

.meeting-content {
    flex: 1;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sidebar-section {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.sidebar-section h3 {
    margin-bottom: 1rem;
    font-size: 1rem;
    color: #2c3e50;
}

.status-indicator {
    padding: 0.75rem;
    border-radius: 4px;
    text-align: center;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
}

/* Participants */
.participant-item {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #f8f9fa;
}

.participant-item.ready {
    background: #d5f4e6;
}

.ready-icon {
    font-weight: bold;
    font-size: 1.2rem;
}

.participant-item.ready .ready-icon {
    color: #27ae60;
}

.participant-item.not-ready .ready-icon {
    color: #95a5a6;
}

/* Badges */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
}

.badge-leader {
    background: #3498db;
    color: white;
}

.badge-participant {
    background: #95a5a6;
    color: white;
}

.badge-small {
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    font-size: 0.75rem;
    background: #3498db;
    color: white;
    margin-left: auto;
}

.badge-today {
    background: #ffc107;
    color: black;
}

.badge-over {
    background: #dc3545;
    color: rgb(255, 255, 255);
}

.badge-future {
    background: #198754;
    color: rgb(255, 255, 255);
}

/* Job Details */
.job-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #ecf0f1;
}

.job-header h2 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.job-header p {
    color: #7f8c8d;
}

.notes-section {
    margin-bottom: 2rem;
}

.notes-section h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.notes-actions {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
}

.ready-status {
    margin-top: 1rem;
}

/* All Notes */
.all-notes-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #ecf0f1;
}

.all-notes-section h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.note-item {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    border-left: 4px solid #3498db;
}

.note-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.note-time {
    color: #7f8c8d;
    font-size: 0.85rem;
}

.note-content {
    color: #555;
    line-height: 1.6;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert-success {
    background: #d5f4e6;
    color: #27ae60;
    border-left: 4px solid #27ae60;
}

.alert-danger {
    background: #fde2e2;
    color: #c0392b;
    border-left: 4px solid #c0392b;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #7f8c8d;
}

.empty-state h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover,
.close:focus {
    color: #000;
}

/* Messages */
.error-message {
    background: #fadbd8;
    color: #e74c3c;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    border-left: 4px solid #e74c3c;
}

.text-muted {
    color: #7f8c8d;
}

/* Responsive */
@media (max-width: 768px) {
    .meeting-layout {
        flex-direction: column;
    }
    
    .meeting-sidebar {
        width: 100%;
    }
    
    .meetings-grid {
        grid-template-columns: 1fr;
    }
    
    .navbar-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .notes-actions {
        flex-direction: column;
    }
}
/* Job Selection Controls */
.job-selection {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.job-selection h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.job-selection-controls {
    display: flex;
    gap: 2rem;
    margin-bottom: 1rem;
}

.job-selection-controls label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: #555;
}

.job-selection-controls input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}

/* Job Header with Image */
.job-header-content {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.job-info {
    flex: 1;
}

.job-image-container {
    flex-shrink: 0;
    width: 320px;
    max-width: 320px;
}

.job-image {
    width: 320px;
    height: 340px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    object-fit: cover;
    max-height: 340px;
}

/* Reviewed Jobs */
#jobSelect option.reviewed-job {
    color: #95a5a6;
    font-style: italic;
}

#jobSelect optgroup {
    font-weight: bold;
    color: #2c3e50;
}

/* Action Points */
.action-point-item {
    background: #f8f9fa;
    padding: 1rem;
    margin-bottom: 0.75rem;
    border-radius: 4px;
    border-left: 4px solid #3498db;
}

.action-point-item.completed {
    opacity: 0.6;
    border-left-color: #27ae60;
}

.action-point-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.action-point-header strong {
    color: #2c3e50;
    font-size: 0.9rem;
}

.action-due-date {
    font-size: 0.85rem;
    color: #7f8c8d;
    background: #ecf0f1;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
}

.action-point-description {
    color: #555;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.4;
}

.action-point-job {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-bottom: 0.5rem;
}

.action-point-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-link {
    background: none;
    border: none;
    color: #3498db;
    cursor: pointer;
    padding: 0;
    font-size: 0.85rem;
    text-decoration: underline;
}

.btn-link:hover {
    color: #2980b9;
}

.text-success {
    color: #27ae60;
    font-weight: 500;
    font-size: 0.85rem;
}

/* Responsive adjustments for job images */
@media (max-width: 768px) {
    .job-header-content {
        flex-direction: column;
    }
    
    .job-image-container {
        width: 100%;
        max-width: 100%;
    }
    
    .job-selection-controls {
        flex-direction: column;
        gap: 0.5rem;
    }
}
/* IMPORTANT: this forces side-by-side */
.tables-side-by-side{
  display: flex !important;
  flex-direction: row !important;
  gap: 24px;
  align-items: flex-start;
  flex-wrap: nowrap; /* keep them on one line */
}

/* IMPORTANT: stop tables being 100% wide */
.tables-side-by-side > table{
  width: auto !important;
  display: table;    /* ensure it behaves like a table */
  flex: 0 0 auto;    /* don't stretch */
  border-collapse: collapse;
}
/* .tables-side-by-side{ border:1px solid red; } */
/* .tables-side-by-side > table{ border:1px solid blue; } */

/* Make the progress bar sit on a new line under the tables */
.tables-side-by-side{
  flex-wrap: wrap !important;   /* allow wrapping */
}

.tables-side-by-side .progress{
  flex: 0 0 100%;               /* full width row */
  width: 100%;
  margin-top: 10px;
}

.rot90{
  display: inline-block;          /* important so transform applies nicely */
  transform: rotate(90deg);       /* clockwise */
  transform-origin: left top;
  white-space: nowrap;            /* prevents wrapping */
}
table.no-overlap {
border-collapse: collapse;
table-layout: fixed;          /* prevents cells from resizing weirdly */
}

table.no-overlap th,
table.no-overlap td {
border: 1px solid #ddd;
padding: 6px 10px;
text-align: center;
vertical-align: middle;
white-space: nowrap;
}

/* Left label column (Est/Act/Bal) */
table.no-overlap th:first-child,
table.no-overlap td:first-child {
text-align: left;
width: 70px;
}

/* Rotated header cells */
table.no-overlap th.rot90 {
width: 50px;                 /* column width */
height: 120px;               /* header row height */
padding: 0;
position: relative;
}

table.no-overlap th.rot90 > span {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%) rotate(-90deg);
transform-origin: center;
white-space: nowrap;
}

/* Simple progress bar (Bootstrap-like) */
.progress {
  width: 100%;
  height: 14px;
  background: #e9ecef;
  border-radius: 6px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: #0d6efd;
  transition: width 200ms ease;
}

/* default (under budget / <= 100%) */
.progress > .progress-bar {
  background: #0d6efd;
}

/* over 100% */
.progress > .progress-bar.over {
  background: #dc3545; /* red */
}

/* Collapsible sections */
.collapsible {
  overflow: hidden;
}

.collapsible-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}

.collapsible-toggle {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0 6px;
}

.collapsible-body {
  margin-top: 10px;
}

.collapsed .collapsible-body {
  display: none;
}

/* Data tables (e.g. Outstanding Actions) */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden; /* rounds corners when inside wrapper */
}

.data-table thead th {
    background: #f8f9fa;
    color: #2c3e50;
    font-weight: 600;
    text-align: left;
    padding: 0.9rem 0.9rem;
    border-bottom: 1px solid #e9ecef;
    white-space: nowrap;
}

.data-table tbody td {
    padding: 0.85rem 0.9rem;
    border-bottom: 1px solid #f0f2f4;
    vertical-align: top;
}

.data-table tbody tr:nth-child(even) {
    background: #fcfcfd;
}

.data-table tbody tr:hover {
    background: #f6fbff;
}

.data-table .actions-col {
    white-space: nowrap;
}

.data-table .truncate {
    max-width: 520px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Mobile: allow description to wrap instead of being cut off */
@media (max-width: 768px) {
    .data-table .truncate {
        max-width: 320px;
    }
}
.onoff-cell {
    text-align: center;
    position: relative;
}

.tooltip-wrapper {
    position: relative;
    cursor: pointer;
}

.tooltip-box {
    position: absolute;
    bottom: 140%;
    left: 50%;
    transform: translateX(-50%);
    background: #222;
    color: #fff;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    width: 260px;
    text-align: left;
    white-space: pre-wrap;
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);

    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
    z-index: 1000;
}

.tooltip-wrapper:hover .tooltip-box {
    opacity: 1;
    visibility: visible;
}
.cell-on {
    background-color: #e8f5e9;   /* light green */
    color: #1b5e20;
    font-weight: bold;
    text-align: center;
}

.cell-off {
    background-color: #ffebee;   /* light red */
    color: #b71c1c;
    font-weight: bold;
    text-align: center;
}

.cell-empty {
    background-color: #f5f5f5;
    color: #999;
    text-align: center;
}

.recovery-plan {
    font-size: 0.8em;
    margin-top: 4px;
    font-weight: normal;
}