
/* ===========================
   Global Reset & Base Styles
   =========================== */
/* ===========================
   Global Reset & Base Styles
   =========================== */
body {
  background-color: #f8f9fa;
  font-family: Arial, sans-serif;
  color: #333;
  padding: 20px;
  line-height: 1.5;
}

h1, h2, h3 {
  margin-bottom: 15px;
  color: #2c3e50;
}

/* ===========================
   Form Styling
   =========================== */
form {
  background: #fff;
  padding: 20px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  max-width: 600px;
  margin-bottom: 20px;
}

form label {
  display: block;
  margin-top: 10px;
  margin-bottom: 5px;
  font-weight: bold;
}

form input,
form select,
form textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  margin-bottom: 10px;
  box-sizing: border-box;
}

form input[type="submit"],
form button {
  background: #2f4f4f;
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s ease;
}

form input[type="submit"]:hover,
form button:hover {
  background: #1e3636;
}

/* ===========================
   Generic Table Styling
   =========================== */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
  text-align: left;
}

table th,
table td {
  padding: 10px;
  border: 1px solid #ddd;
}

table th {
  background-color: #2f4f4f;
  color: white;
}

table tr:nth-child(even) {
  background-color: #f9f9f9;
}

table tr:hover {
  background-color: #f1f1f1;
  cursor: pointer;
}

/* ===========================
   Specific Styling for TripData
   =========================== */
#TripData {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
  font-family: Arial, sans-serif;
  text-align: left;
  /* remove block & nowrap so it acts like normal table */
  table-layout: auto;
}

#TripData th {
  background-color: #2f4f4f;
  color: #ffffff;
  padding: 10px;
  border: 1px solid #ddd;
  position: sticky;
  top: 0;
  z-index: 2;
  text-align: center;
}

#TripData td {
  padding: 8px 10px;
  border: 1px solid #ddd;
}

#TripData tr:nth-child(even) {
  background-color: #f9f9f9;
}

#TripData tr:hover {
  background-color: #f1f1f1;
}

/* ===========================
   Message Styling
   =========================== */
.message {
  margin-top: 15px;
  padding: 10px;
  border-radius: 4px;
  font-weight: bold;
}

.message.success {
  background: #d4edda;
  color: #155724;
}

.message.error {
  background: #f8d7da;
  color: #721c24;
}

/* ===========================
   PRINT STYLES FOR A4 (One Pager)
   =========================== */
@media print {
  body {
    font-family: "Times New Roman", serif;
    font-size: 10pt;       /* smaller font to save space */
    color: #000;
    background: #fff;
    margin: 10mm;          /* reduced margin */
  }

  h1, h2 {
    text-align: center;
    margin: 5px 0;
  }

  table {
    width: 100%;
    border-collapse: collapse;
    margin: 5px 0;
    font-size: 9pt;        /* smaller table font */
    page-break-inside: avoid; /* prevent table from splitting */
  }

  table th, table td {
    border: 1px solid #000;
    padding: 4px 6px;      /* tighter padding */
    text-align: left;
    vertical-align: top;
  }

  table th {
    background: #f0f0f0 !important;
    color: #000 !important;
  }

  input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 9pt;
    font-family: inherit;
  }

  /* Hide interactive elements */
  button, .no-print {
    display: none !important;
  }

  /* Page setup */
  @page {
    size: A4;
    margin: 10mm;         /* narrow margins to fit more */
  }
}

.print-btn {
    position: fixed;
    top: 15px;
    right: 15px;
    padding: 10px 18px;
    font-size: 16px;
    cursor: pointer;
    color: #2c3e50;
    border: none;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    transition: background 0.2s;
}

/* .print-btn:hover {
    background: ;
} */

/* Hide button when printing */
@media print {
    .print-btn {
        display: none;
    }
}

body {
    font-family: Arial, sans-serif;
    margin: 20px;
    background: #f9f9f9;
    /* text-align: center; */
}

h1 {
    margin-bottom: 30px;
    color: #333;
}

/* Grid layout */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

/* Card style */
.card {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: white;
    border-radius: 12px;
    text-decoration: none;
    color: #007bff;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

/* Hover effect */
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    background: #f0f8ff;
}

/* ===========================
   Auth Pages Styling
   =========================== */
.auth-container {
  max-width: 400px;
  margin: 80px auto;
  padding: 30px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  text-align: left;
}

.auth-container h2 {
  text-align: center;
  margin-bottom: 20px;
  color: #2c3e50;
}

.auth-container label {
  font-weight: bold;
  margin: 10px 0 5px;
  display: block;
}

.auth-container input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-bottom: 15px;
}

.auth-container button {
  width: 100%;
  padding: 12px;
  background: #2f4f4f;
  border: none;
  border-radius: 6px;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}

.auth-container button:hover {
  background: #1e3636;
}

.auth-message {
  text-align: center;
  color: red;
  margin-top: 10px;
}

/* ===========================
   Logout Bar
   =========================== */
.logout-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  background: #2f4f4f;
  padding: 10px 20px;
  border-radius: 0 0 8px 8px;
  color: #fff;
  font-size: 14px;
}

.logout-bar span {
  margin-right: 15px;
}

.logout-btn {
  background: #ff4d4d;
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.2s;
}

.logout-btn:hover {
  background: #e60000;
}

/* General reset for images inside tables */
table img {
    width: 300px;
    max-height: 170px;   /* Adjust height so it doesn’t push table rows too tall */
    /* object-fit: contain; Keeps proportions without cropping */
    display: block;
    margin: auto; /* Centers the image inside the cell */
}

/* Optional: specific to your signature image */
#displayimage {
    width:300px;        /* Keeps natural width */
    height: 170px;       /* Fixes consistent height */
    /* object-fit: contain; */
}

.download-btn {
    display: inline-block;
    padding: 10px 20px;
    margin-top: 15px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background-color: #28a745;   /* green */
    border: none;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

.download-btn:hover {
    background-color: #218838;   /* darker green */
    text-decoration: none;
    color: #fff;
}

.download-btn:active {
    background-color: #1e7e34;
}
