/* ========== GLOBAL RESET ========== */
* {
  box-sizing: border-box;
  margin: 10;
  padding: 0;
}

body {
  font-family: "Segoe UI", Arial, sans-serif;
  background-color: #003366;
  color: #222;
  line-height: 1.5;
}
.report-company-select {
  text-align: center;
margin-top: -45px;
  margin-bottom: 20px;
}

.report-company-select label {
  font-weight: bold;
  margin-right: 8px;
}

.report-company-select select {
  padding: 6px 12px;
  border-radius: 5px;
  border: 1px solid #ccc;
}

/* ========== LOGIN PAGE ========== */
.login-page {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 90vh;
  background: #003366;
}

.login-card {
  background: #fff;
  padding: 40px 30px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  text-align: center;
  width: 400px;
}

.login-card img.login-logo {
  width: 120px;
  margin-bottom: 15px;
}

.login-card h3 {
  margin-bottom: 20px;
  color: #003366;
}

.login-card input {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 15px;
}

.login-card button {
  width: 100%;
  padding: 10px;
  background: #0078d7;
  color: white;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.login-card button:hover {
  background: #005fa3;
}

/* ========== APP CONTAINER ========== */
.hidden {
  display: none;
}

.app-container {
  max-width: 1200px;
  margin: 30px auto;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

/* HEADER */
.app-header {
  background: #107dac;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 25px;
}

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

.small-logo {
  width: 145px;
  height: 45px;
}

.company-title {
  font-weight: bold;
  font-size: 18px;
align-items: center;

}

.page-title {
  font-size: 14px;
  opacity: 0.85;
}
#reportsTable th {
  background: #f0f4ff;
  border-bottom: 2px solid #ccc;
  text-align: center;
}

#reportsTable td, #reportsTable th {
  border: 1px solid #ddd;

  padding: 8px;
}

#reportsTable tr:hover {
  background-color: #f9f9f9;
}

.header-right button {
  background: #d9534f;
  border: none;
  padding: 8px 15px;
  color: white;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

.header-right button:hover {
  background: #b52a27;
}

/* ========== TABS ========== */
.tabs {
  display: flex;
  justify-content: center;
  background: #f1f3f6;
  border-bottom: 1px solid #ddd;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 12px 25px;
  border: none;
  background: transparent;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  color: #333;
}

.tab-btn.active {
  background: #0078d7;
  color: white;
  border-radius: 5px 5px 0 0;
}

.tab-btn:hover {
  background: #0078d7;
  color: white;
}

/* ========== CONTENT PANELS ========== */
.content {
  padding: 25px 30px;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

h2 {
  color: #003366;
  margin-bottom: 15px;
}
/* ========== DashBoard ========== */
.dash-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
  margin-top:-45px;
}
.status-dot {
  height: 12px;
  width: 12px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}
.client-name {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  color: blue;
}

.online-dot { background-color: blue; }
.warning-dot { background-color: orange; }
.offline-dot { background-color: black; }
/* === history table === */
.history-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-family: Arial, sans-serif;
}

.history-table th {
  background: #374151;
  color: #fff;
  padding: 8px;
  text-align: left;
}

.history-table td {
  padding: 8px;
  border-bottom: 1px solid #e5e7eb;
}

.history-table tr:nth-child(even) {
  background: #f3f4f6;
}

.status-online {
  color: blue;
  font-weight: bold;
}

.status-warning {
  color: orange;
  font-weight: bold;
}

.status-offline {
  color: black;
  font-weight: bold;
}
.history-controls {
  display: flex;
  align-items: center;   /* vertical centering */
  gap: 10px;             /* spacing */
  flex-wrap: nowrap;     /* prevent wrapping */
  padding: 8px 8px;
  box-sizing: border-box;
  /* remove any scrolling behavior */
  overflow: visible;
}

/* prevent children from shrinking and keep consistent height */
.history-controls label,
.history-controls input[type="date"],
.history-controls .btn-primary {
  display: inline-flex;
  align-items: center;
  height: 36px;
  line-height: 1.5em;
  flex: 0 0 auto;       /* do not grow or shrink */
  box-sizing: border-box;
  margin: 5px;
  font-size: 14px;
  justify-content:space-evenly;
font-weight: bold;
}

/* give date a small fixed width so it doesn't expand and trigger scroll */
.history-controls input[type="date"] {
  width: 170px;          /* adjust as needed */
  padding: 4px 8px;
  -webkit-appearance: none;
  appearance: none;
}

/* keep button compact */
.history-controls .btn-primary {
  padding: 6px 12px;
  cursor: pointer;
}

/* responsive fallback: on very narrow screens allow wrap instead of scroll */
@media (max-width: 420px) {
  .history-controls { flex-wrap: wrap; gap: 6px; }
  .history-controls input[type="date"] { width: 100%; flex: 1 1 auto; }
}

/* History overall modal box */
/* hidden state */
.historyBox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

/* visible state */
.historyBox.show {
  display: flex;
}
/* header and footer fixed */
.historyBox-header,
.historyBox-footer {
  padding: 10px;
  background: #f0f0f0;
  flex-shrink: 0;
  text-align: center;
}

/* scrollable body */
.historyBox-body {
background: #fff;
  padding: 30px;
  overflow-y: auto;   /* vertical scroll */
  overflow-x: hidden;
  flex-grow: 1;       /* take remaining space */
  max-height: 60vh; /* adjust as needed */
  max-width: 60vh; /* adjust as needed */

}

/* ========== LOCATION MANAGER ========== */
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;

}

.panel-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

#searchLocation {
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  width: 220px;
  font-size: 14px;
}

.table-wrap {
  overflow-x: auto;
  font-size: 14px;
font-weight: bold;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

table th,
table td {
  border: 1px solid #ccc;
  padding: 8px 10px;
  text-align: center;
 
}

table th {
  background: #f4f7fb;
  color: #333;
  font-weight: bold;
}

.delete-btn {
  background: #dc3545;
  color: #fff;
  padding: 5px 10px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.delete-btn:hover {
  background: #b52a37;
}

/* ========== MODAL (Add Location) ========== */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: #fff;
  padding: 25px;
  border-radius: 10px;
  width: 400px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}

.modal-content h3 {
  color: #003366;
  margin-bottom: 15px;
}

.modal-content input {
  width: 100%;
  margin-bottom: 12px;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

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

.btn-primary,
.btn-danger,
.btn-secondary {
  padding: 8px 14px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s;
}

.btn-primary {
  background: #0078d7;
  color: white;
}

.btn-primary:hover {
  background: #005fa3;
}

.btn-danger {
  background: #dc3545;
  color: white;
}

.btn-danger:hover {
  background: #b52a37;
}

.btn-secondary {
  background: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background: #545b62;
}
/* ======download blue button==== */
.btn-delete {
  padding: 8px 14px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s;
}
.no-underline {
  text-decoration: none !important;
}
.btn-delete {
  background: #0078d7;
  color: white;
}

.btn-delete:hover {
  background: #005fa3;
}

/* ========== DATA MANAGER ========== */
.data-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.data-card {
  flex: 1;
  min-width: 300px;
  background: #f9fafc;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.data-card h3 {
  margin-bottom: 10px;
  color: #003366;
}

.data-card p {
  font-size: 14px;
  color: #444;
}

.inline-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

/* ========== REPORT GENERATION ========== */
.report-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.report-card {
  flex: 1;
  min-width: 350px;
  background: #f9fafc;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.report-card h4 {
  color: #003366;
  margin-bottom: 12px;
  border-bottom: 2px solid #0078d7;
  padding-bottom: 5px;
}

.report-card label {
  display: block;
  font-weight: 600;
  margin-top: 10px;
  margin-bottom: 4px;
  color: #333;
}

.report-card input,
.report-card select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
}

.report-card button {
  width: 100%;
  margin-top: 15px;
}

/* ========== FOOTER ========== */
.footer-note {
  text-align: center;
  padding: 16px 24px;
  font-size: 14px;
  font-weight: 500;
  background: linear-gradient(to right, #003366, #005599);
  color: #fff;
  border-top: 2px solid #ffffff33;
  border-bottom: 2px solid #ffffff33;
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.2);
  letter-spacing: 0.5px;
}
.footer-note {
  transition: background 0.3s ease;
}

.footer-note:hover {
  background: linear-gradient(to right, #005599, #003366);
}
/* ========== FOOTER END ========== */
.action-btn {
  font-size: 12px;
  padding: 10px 20px;
  margin-right: 10px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: #007bff;
  color: white;
  transition: background 0.2s ease;
}

.action-btn:hover {
  background: #0056b3;
}

.refresh-btn {
  background: #007bff;
}

.refresh-btn:hover {
  background: #0056b3;
}

.delete-btn {
  background: #c33;
}

.delete-btn:hover {
  background: #a00;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .panel-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .data-row,
  .report-row {
    flex-direction: column;
  }

  .modal-content {
    width: 90%;
  }
}
/*------YT Generator-----*/
/* ========== YOUTUBE GENERATOR ========== */

/* Align YouTube Generator panel with other tabs */

#youtubeTab.tab-panel,
#youtubeManage.tab-panel {
  padding-top: 0;
  margin-top: 0;   /* eliminate gap above card */
}

#youtubeTab.tab-panel {
  max-width: 1100px;
  margin: 0px auto;
 
}
/* Use card style like reports */

.youtube-card {
  margin-top: 0;   /* no gap at the top */
  background: #fff;
  border-radius: 10px;
  max-width: 1200px;
}
/* Two-column layout for width + height */
.youtube-card .grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.youtube-card .grid-2 label {
  margin-top: 0;
}

.youtube-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}


.youtube-card h4 {
  color: #003366;
  margin-bottom: 12px;
  border-bottom: 2px solid #0078d7;
  padding-bottom: 5px;
  font-size: 1.2rem;
}
.youtube-card label {
  display: block;
  font-weight: 600;
  margin-top: 10px;
  margin-bottom: 4px;
  color: #333;
}

 


.youtube-card input,
.youtube-card select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
}

.youtube-card .checkmark {
  margin-left: 8px;
  font-size: 1.2rem;
  color: forestgreen;
  visibility: hidden; /* toggled by JS */
}

.youtube-card .error {
  color: #d83b01;
  font-size: 0.9rem;
  margin-top: 6px;
}

.youtube-card button {
  width: 100%;
  margin-top: 15px;
  padding: 10px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  background: #0078d7;
  color: white;
}

.youtube-card .btn-primary {
  background: #0078d7;
  color: white;
}

.youtube-card button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.youtube-card .btn-secondary {
  background: #6c757d;
  color: white;
}
/* Inline label + checkbox */
/* Mute checkbox alignment */
  .one-line-controls {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: nowrap;     /* prevent wrapping */
    justify-content: flex-start;
    padding: 6px 0;
    box-sizing: border-box;
  }

  .one-line-controls .ctrl {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    flex: 0 0 auto;       /* don't grow or shrink */
  }

  .one-line-controls .lbl {
    white-space: nowrap;   /* crucial: keep label on one line */
  }

  .one-line-controls .ctrl input[type="number"] {
    width: 84px;
    padding: 6px 8px;
    font-size: 14px;
  }

  /* Small screens: allow horizontal scroll rather than wrap */
  @media (max-width: 480px) {
    .one-line-controls { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  } ========== YOUTUBE MANAGER ========== */

#youtubeManage.tab-panel {
  padding: 20px;
  max-width: 1100px;
  margin-top: 0 auto;
}

.youtube-manage-card {
  background: #f9fafc;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  max-width: 800px;
  margin: 20px auto;
}

.youtube-manage-card h4 {
  color: #003366;
  margin-bottom: 12px;
  border-bottom: 2px solid #0078d7;
  padding-bottom: 5px;
  font-size: 1.2rem;
  text-align: center;
}

/* Panel controls */
.youtube-manage-card .panel-controls {
  text-align: center;
  margin-bottom: 20px;
}

.youtube-manage-card .btn-primary,
.youtube-manage-card .btn-danger {
  padding: 8px 16px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  margin: 0 6px;
}

.youtube-manage-card .btn-primary {
  background: #0078d7;
  color: white;
}

.youtube-manage-card .btn-danger {
  background: #d9534f;
  color: white;
}

.youtube-manage-card .btn-primary:hover {
  background: #005fa3;
}

.youtube-manage-card .btn-danger:hover {
  background: #b52a27;
}

/* File list */
#ytFileList.file-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

#ytFileList .file-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid #ddd;
}

#ytFileList .file-row:nth-child(even) {
  background: #f4f6f9;
}

#ytFileList .file-name a {
  text-decoration: none;
  color: #0078d7;
  font-weight: 600;
}

#ytFileList .file-actions {
  display: flex;
  gap: 10px;
}

#ytFileList .file-actions form button {
  padding: 6px 12px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
}

#ytFileList .file-actions .rename-form button {
  background: #0078d7;
  color: white;
}

#ytFileList .file-actions .delete-form button {
  background: #d9534f;
  color: white;
}
/* Table layout & base */
.yt-table {
  width: 100%;
  border-collapse: collapse;
  font-family: system-ui, Arial, sans-serif;
  font-size: 14px;
  color: #222;
  background: #fff;
}

/* Head row */
.yt-table thead th {
  text-align: center;
  font-weight: 600;
  padding: 10px 12px;
  border-bottom: 2px solid #e6e6e6;
  background: #f4f7fb;
}

/* Body cells */
.yt-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
}

/* Sr No column */
.yt-table tbody td:first-child,
.yt-table thead th:first-child {
  text-align: center;
  white-space: nowrap;
  width: 56px;
  color: #444;
}

/* File name link */
.yt-table a {
  color: #1a73e8;
  text-decoration: none;
}
.yt-table a:hover { text-decoration: underline; }

/* Actions column layout */
.yt-table tbody td:last-child {
  white-space: nowrap;
}

/* Forms inside actions: inline and compact */
.file-row form {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin: 0 6px 0 0;
}
.file-row input[type="text"] {
  padding: 6px 8px;
  font-size: 13px;
  border: 1px solid #ddd;
  border-radius: 4px;
  min-width: 160px;
}

/* Buttons */
.btn-primary,
.file-row button {
  background: #0066cc;
  color: #fff;
  border: 0;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
}
.file-row button[aria-disabled="true"],
.file-row button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Small subtle spacing for the actions cell */
.file-row .btn-primary { margin-left: 6px; }

/* Manager message */
#ytManagerMessage {
  display: none;
  padding: 8px 10px;
  background: #f3f3f3;
  border: 1px solid #e6e6e6;
  border-radius: 4px;
  margin-bottom: 8px;
  color: #333;
}

/* Responsive: keep table readable on narrow viewports */
@media (max-width: 760px) {
  .yt-table thead { display: none; } /* stack rows */
  .yt-table, .yt-table tbody, .yt-table tr, .yt-table td { display: block; width: 100%; }
  .yt-table tr { margin-bottom: 12px; border-bottom: 1px solid #eee; padding-bottom: 8px; }
  .yt-table td { padding: 6px 0; border: 0; }
  .yt-table td:first-child { display: none; } /* hide Sr No on tiny */
  .yt-table td:nth-child(2) { font-weight: 600; } /* file name */
  .yt-table td:nth-child(3) { color: #666; } /* date */
  .yt-table td:nth-child(4) { white-space: normal; } /* actions wrap */
  .file-row input[type="text"] { min-width: 100%; box-sizing: border-box; }
}
/* confirmation box css */
/* Overlay */
.uxc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.uxc-overlay.uxc-show {
  display: flex;
}

/* Modal box */
.uxc-modal {
  width: min(520px, 92vw);
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
  overflow: hidden;
  transform: translateY(10px);
  animation: uxc-pop-in 120ms ease-out forwards;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

/* Header */
.uxc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #b00020; /* danger tone */
  color: #fff;
  padding: 14px 16px;
}
.uxc-header h2 {
  font-size: 1.05rem;
  color: #fff;
  margin: 0;
}
.uxc-close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.25rem;
  cursor: pointer;
}

/* Body */
.uxc-body {
  padding: 16px 18px;
  color: #222;
  line-height: 1.5;
}

/* Footer */
.uxc-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 12px 16px 16px;
  background: #f6f6f6;
  border-top: 1px solid #e7e7e7;
}

/* Buttons */
.uxc-btn {
  border: none;
  padding: 10px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}
.uxc-btn-secondary {
  background: #e0e0e0;
  color: #222;
}
.uxc-btn-secondary:hover {
  background: #d5d5d5;
}
.uxc-btn-danger {
  background: #d32f2f;
  color: #fff;
}
.uxc-btn-danger:hover {
  background: #c62828;
}

/* Animation */
@keyframes uxc-pop-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Prevent scroll when modal open */
body.uxc-modal-open {
  overflow: hidden;
}
.search-box {
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  min-width: 200px;
}
