/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

/* Light Mode */
:root {
    --background-color: #F6F1F1;  
    --text-color: #000000;           
    --primary-color: #19A7CE;     
    --secondary-color: #000000;   
    --menu-background-color: #19A7CE; 
    --menu-text-color: #000000;
    --menu-hover-color: #FFFECB;
    --dropdown-hover: #FFFECB;    
    --search-bg: #dfe2eb;         
    --border-color: #19A7CE;
    --usertable-background-color:#19A7CE;
    --button-text-color: #000000;    
    --button-hover-color: #FFFECB;
    --error-color: #dc3545;       
    --success-color: #28a745;
    --neutral-color: #1e40af;
    --card-background-color: #f5f5f5;
    --table-cell-bg-light: #e3f2fd;
    --table-striped-odd-light:  rgba(0, 0, 0, 0.02);
}

[data-theme='dark'] {
    --background-color: #1e1e2f;           
    --text-color: #e0e0e0;                
    --primary-color: #3a7ca5;             
    --secondary-color: #a6b1e1;           
    --menu-background-color: #2c2c3e;     
    --menu-text-color: #ffffff;
    --menu-hover-color: #3a7ca5;       
    --dropdown-hover: #3a7ca5;
    --search-bg: #2a2a3d;     
    --border-color: #4f4f6f;
    --usertable-background-color: #2c2c3e;
    --button-text-color: #ffffff;
    --button-hover-color: #0c344b;
    --error-color: #ff6b6b; 
    --success-color: #4caf50;             
    --neutral-color: #63b3ed;
    --card-background-color: #2a2e3d; 
    --table-cell-bg-dark:  #2c3e50;
    --table-striped-odd-dark:   rgba(255,255,255,0.04);
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: background-color 0.3s, color 0.3s;
    text-align: center;
}

/* ✅ Header */
header {
    background: var(--primary-color);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* ✅ Logo Section */
.logo-section {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 15px; /* Ensures spacing from the left */
}

/* ✅ Logo */
.logo {
    max-height: 40px;
}

.login-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 40px;
    padding: 40px 20px;
}

.login-box, .guest-box {
    background: var(--background-color);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 30px;
    max-width: 350px;
    width: 100%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.guest-box h2 {
    margin-bottom: 12px;
}

.guest-box p {
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.guest-button {
    display: block;
    width: 100%;
    margin-bottom: 12px;
    padding: 10px;
    text-align: center;
    background-color: var(--primary-color);
    color: var(--button-text-color);
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
}

.guest-button:hover {
    background-color: var(--button-hover-color);
}

.secondary-button {
    display: inline-block;
    background-color:var(--primary-color);
    color: var(--button-text-color);
    padding: 8px 16px;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.2s ease;
    font-weight: bold;
}

.secondary-button:hover {
    background-color: var(--button-hover-color);
}


/* ✅ Right Section (Pushes Search & Menu to the Right) */
.right-section {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: auto;
    padding-right: 20px;
}

/* ✅ Search Box */
.search-box {
    display: flex;
    align-items: center;
    background: var(--search-bg);
    border-radius: 5px;
    padding: 5px;
    width: 220px;
}

/* ✅ Search Input */
.search-box input {
    border: none;
    padding: 8px;
    background: none;
    color: var(--text-color);
    outline: none;
    width: 100%;
}

/* ✅ Search Button */
.search-box button {
    border: none;
    background: none;
    color: black;
    cursor: pointer;
    padding: 5px 10px;
}

.search-box button:hover {
    color: var(--primary-color);
}

/* Wrapper must be relative */
.search-input-wrapper {
    position: relative;
}

/* Add padding to the input so icon doesn’t overlap text */
.form-input.with-icon {
    padding-right: 42px; /* enough space for icon */
}

/* Icon button style */
.search-icon-button {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    font-size: 16px;
    color: var(--text-color);
    padding: 0;
    margin: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Optional hover effect */
.search-icon-button:hover {
    color: var(--primary-color);
}

/* ─── Dropdown Container & Button ─── */
.dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.dropdown-toggle {
  background: none;
  border: none;
  color: var(--menu-text-color);
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  border-radius: 5px;
  transition: background 0.3s ease-in-out;
}

.dropdown-toggle:hover {
  background: var(--menu-hover-color);
}

/* ─── Main Menu Panel ─── */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  width: 200px;
  background: var(--menu-background-color);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  border-radius: 8px;
  padding: 10px 0;
  text-align: left;
  z-index: 1000;
  transition: all 0.3s ease-in-out;
}

.dropdown-menu.show {
  display: block;
}

/* ─── Menu Items & Links ─── */
.dropdown-menu li {
  list-style: none;
  transition: background 0.3s ease-in-out, transform 0.2s ease-in-out;
  border-radius: 5px;
}

.dropdown-menu li:hover {
  background: var(--dropdown-hover);
  transform: translateX(5px);
}

.dropdown-menu a,
.dropdown-menu button {
  display: block;
  width: 100%;
  padding: 16px 16px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  color: var(--button-text-color);
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
}

/* ─── Submenu (Left-Opening) ─── */
.dropdown-menu .has-submenu {
  position: relative;
}

.dropdown-menu .has-submenu > a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 16px;
}

.dropdown-menu .submenu {
  display: none;
  position: absolute;
  top: 0;
  right: 100%;
  background: var(--menu-background-color);
  padding: 0.5rem 0;
  margin: 0;
  list-style: none;
  border: 1px solid var(--border-color);
  border-radius: 0.25rem;
  z-index: 1000;
}

/* show on hover or when clicked-open */
.dropdown-menu .has-submenu:hover > .submenu,
.dropdown-menu .has-submenu.open > .submenu {
  display: block;
}

.dropdown-menu .submenu li a {
  padding: 16px 20px;   /* 16px top/bottom, 20px left/right */
  line-height: 1;       /* so padding alone sets the height */
  white-space: nowrap;
}

/* ─── Sign-Out Separator ─── */
.dropdown-menu > li:last-of-type {
  border-top: 1px solid rgba(255,255,255,0.2);
  padding-top: 12px;
  font-weight: bold;
}

/* ✅ Improve "Dark Mode" Button */
.toggle-theme {
    font-size: 15px;
    width: 100%;
    text-align: left;
    padding: 10px 15px;
    cursor: pointer;
    font-weight: 500;
}

/* ✅ Dark Mode Button Hover */
.toggle-theme:hover {
    background: var(--button-hover-color);
    transform: translateX(5px);
}

.main-content {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 15px; /* ✅ Reduce gap to avoid spacing issues */
    margin: 10px auto; /* ✅ Centers content properly */
    width: 100%;
    max-width: 100vw; /* Ensures no horizontal overflow */
    padding: 2rem;
}

/* ✅ Make Container Expand Dynamically */
.container {
    max-width: 95vw; /* Allow it to take up to 95% of the viewport width */
    width: auto; /* Allow automatic growth */
    min-width: 300px; /* Prevent it from being too small */
    background: var(--background-color);
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0px 0px 10px var(--border-color);
    text-align: center;
    margin-top: 20px; /* Adds spacing from the top */
    overflow: auto; /* Allows content expansion without breaking */
}

.flash-wrapper {
    max-width: 600px;
    margin: 0 auto;
    box-shadow: none !important;
}

/* Prevent any shadow or glowing box */
.alert {
    box-shadow: none !important;
}

/* Optional: style your flash container explicitly */
.flash-container {
    padding: 0 16px;
}


.wide-container {
    max-width: 100%;
    width: 100%;
}


/* Form Styling */

.form-card {
    max-width: 700px;            /* ⬅️ Increase width */
    width: 100%;
    margin: 40px auto;
    padding: 30px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background-color: var(--card-background-color);  /* Better contrast */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.form-group {
    display: flex;
    flex-direction: column;
    text-align: left;
    margin-bottom: 15px;
}

.form-group label {
    font-weight: bold;
    margin-bottom: 5px;
}

.form-input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background: var(--background-color);
    color: var(--text-color);
    font-size: 16px;
}

.form-input.small {
    width: 140px;
    padding: 6px;
}

.form-input.tiny {
    width: 100px;
    padding: 4px;
}

/* ─── Buttons ─── */
button,
.button {
  /* sizing & spacing */
  padding: 8px 12px;          /* merged the 8×12 & 12px padding from before */
  margin: 5px;                /* utility margin */
  min-width: 100px;           /* if you still need the group min-width */
  
  /* appearance */
  background: var(--primary-color);
  color: var(--button-text-color);
  border: none;
  border-radius: 5px;         /* bumped to 5px for consistency */
  
  /* behavior */
  cursor: pointer;
  transition: background 0.3s;
  font-size: 16px;
  text-align: center;         /* so links/buttons center their text */
}

/* hover state for both button types */
button:hover,
.button:hover {
  background: var(--button-hover-color);
}

/* ─── Button Group ─── */
.button-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin-top: 15px;
}

.button-group .button {
  flex: 1;                   /* each button fills equally */
}


/* Footer */
footer {
    width: 100%;
    background: var(--primary-color);
    padding: 15px;
    text-align: center;
    color: white;
    margin-top: auto;
}

/* ─── Table Wrapper & Responsiveness ─── */
.table-responsive,
.table-container {
  width: 100%;
  overflow-x: auto; /* Ensures responsiveness / horizontal scroll */
}

.table-responsive {
  margin-top: 20px;
}

.table-wrapper {
  width: 100%;
  max-width: 95vw;  /* Expands dynamically */
  margin: 0 auto;
}

/* ─── Base Table Styles ─── */
.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  border-radius: 5px;
  overflow: hidden;
}

/* Single rule for TH & TD padding, border, text-alignment */
.table th,
.table td {
  padding: 12px;
  border: 1px solid var(--border-color) !important;
  text-align: left;
  background-color: var(--card-background-color) !important;
  color: var(--text-color) !important;
}

/* ─── Header (TH) Styling ─── */
/* Light mode header */
.table th {
  background: var(--secondary-color);
  color: var(--button-text-color);
}

/* Dark mode header override */
[data-theme='dark'] .table th {
  background: var(--menu-background-color);
  color: var(--button-text-color);
}

/* ─── Body Cell (TD) Styling ─── */
/* Light mode cells */
.table td {
  background: var(--table-cell-bg-light);  /* Light blue */
  color: var(--text-color);
}

/* Dark mode cells override */
[data-theme='dark'] .table td {
  background: #2c3e50;  /* Darker blue for contrast */
  color: var(--button-text-color);
}

/* ─── Striped Rows ─── */
.table-striped > tbody > tr:nth-of-type(odd) {
   background-color: var(--table-striped-odd-light) !important;
}

[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) {
  background-color: rgba(255,255,255,0.04) !important;
}

/* ✅ Membership Status Styling */
.membership-status {
    padding: 12px;
    font-weight: bold;
    border-radius: 5px;
    text-align: center;
    margin: 10px auto;
    width: 100%;
}

/* ✅ Fix Membership Status Visibility */
.status-red {
    background: #e74c3c !important; /* Brighter red */
    color: white;
}

.status-green {
    background: #27ae60 !important; /* Brighter green */
    color: white;
}

.status-yellow {
    background: #f1c40f !important; /* Brighter yellow */
    color: black;
}

.status-wrapper {
    max-width: 600px;
    margin: 40px auto;
    text-align: left;
}

.status-card {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    background-color: var(--background-color);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.status-card.error {
    background-color: #fff0f0;
    color: #b00020;
}

/* ✅ Form Styling */
.scan-form {
    background: var(--background-color);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    margin: 20px auto;
}

.form-group {
    margin-bottom: 15px;
}

.form-label {
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

.form-input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background: var(--background-color);
    color: var(--text-color);
}

textarea.form-input.textarea-paragraph {
    width: 100%;
    min-height: 150px;
    padding: 10px;
    font-size: 1em;
    line-height: 1.4;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    resize: vertical; /* allows user to resize vertically */
    box-sizing: border-box;
}

textarea.form-input {
    min-height: 150px;
    resize: vertical;
    width: 100%;
    padding: 10px;
}

/* ✅ No Results Message */
.no-results {
    text-align: center;
    font-size: 16px;
    color: var(--secondary-color);
    margin-top: 15px;
}

/* ✅ Centered Button */
.center-content {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

/* ✅ Update Member Button */
.btn-primary {
    background: var(--primary-color);
    color: var(--button-text-color);
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: var(--secondary-color);
}

.card {
    background-color: var(--card-background-color) !important;
    color: var(--text-color) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn {
    background-color: var(--primary-color) !important;
    color: var(--button-text-color) !important;
    border: none;
}

.btn:hover {
    background-color: var(--button-hover-color) !important;
    color: var(--button-text-color) !important;
}

.btn-close {
    filter: invert(1); /* Makes the close button white in dark mode */
}


.modal-content {
    background-color: var(--background-color) !important;
    color: var(--text-color) !important;
    border: 1px solid var(--border-color);
}

.modal-header, .modal-footer {
    border-color: var(--border-color);
}

.modal-body label {
    color: var(--text-color);
}

.bootstrap-dark .card,
.bootstrap-dark .table,
.bootstrap-dark .btn {
    background-color: var(--card-background-color);
    color: var(--text-color);
}

/* ✅ Flash Messages */
.flash-messages {
    background: var(--background-color);
    padding: 15px;
    border-radius: 5px;
    margin-top: 20px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
}

.user-table {
    width: 100%;
    border-collapse: collapse;
}
.user-table th, .user-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
}
.user-table th {
    background-color: var(--usertable-background-color);
    color: white;
}
.user-table td select, .user-table td input {
    width: 100%;
    padding: 5px;
    border: 1px solid #ccc;
}

.user-table input.form-input,
.user-table select.form-input {
    width: 100%;
    box-sizing: border-box;
}

.narrow-form {
    max-width: 700px;
    margin: 30px auto;
    padding: 20px;
    background: var(--card-background-color);
    border-radius: 10px;
    box-shadow: 0 0 10px var(--border-color);
}

.small-button {
    padding: 5px 8px;
}
.delete-btn {
    background-color: #dc3545;
    color: white;
}
.delete-btn:hover {
    background-color: #c82333;
}

/* === Member Table: Layout and Responsiveness === */
.member-table {
    width: 100%;
    min-width: 950px;
    font-size: 13px;
    border-collapse: collapse;
    table-layout: fixed;
}

.member-table th,
.member-table td {
    padding: 10px;
    border: 1px solid var(--border-color, #ccc);
    word-wrap: break-word;
    white-space: normal;
    vertical-align: middle;
}

/* === Row Styling === */
.member-table tbody tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.02);
}

.member-table tbody tr:hover {
    background-color: rgba(25, 167, 206, 0.1);
    transition: background 0.3s ease;
}

/* === Column Widths and Alignments === */
.member-table td:nth-child(1) { width: 50px; text-align: center; }  /* ID */
.member-table td:nth-child(5) { width: 80px; text-align: center; }  /* Status */
.member-table td:nth-child(7) { width: 90px; text-align: center; }  /* Expires */
.member-table td:nth-child(10) { width: 120px; text-align: center; }  /* Family */

.member-table td:nth-child(1),
.member-table td:nth-child(2),
.member-table td:nth-child(3),
.member-table td:nth-child(9),
.member-table td:nth-child(10) {
    text-align: left;
}

/* === Address Column Wrapping === */
.property-address,
.billing-address {
    max-width: 280px;
    white-space: normal;
    word-break: break-word;
}

/* === Status/Type/Expires Wrapping === */
.member-table td:nth-child(5),
.member-table td:nth-child(6),
.member-table td:nth-child(7) {
    max-width: 80px;
    overflow-wrap: break-word;
    text-align: center;
}

/* === Rounded Corners === */
.member-table th:first-child,
.member-table td:first-child {
    border-top-left-radius: 8px;
}

.member-table th:last-child,
.member-table td:last-child {
    border-top-right-radius: 8px;
}

.member-table thead th {
    padding: 10px;
    font-weight: bold;
    background-color: var(--background-color);
    color: var(--text-color);
    border-bottom: 2px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 2;
}

/* === Status Colors === */
.status-paid,
.member-table td:nth-child(5).status-paid {
    color: #28a745;
    font-weight: bold;
}

.status-unpaid,
.member-table td:nth-child(5).status-unpaid {
    color: #dc3545;
    font-weight: bold;
}

/* === Dark Mode Adjustments === */
[data-theme='dark'] .member-table tbody tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.03);
}

/* === Member Status Card (Check Membership) === */
.member-status-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.member-status-box {
    background-color: var(--background-color);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 20px 30px;
    text-align: left;
    max-width: 450px;
    width: 100%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    font-size: 1rem;
    color: var(--text-color);
}

.member-status-box.error {
    border-color: #e53935;
    background-color: #fff0f0;
    color: #c62828;
}

/* ✅ Adjust Password Input Width */
.password-input {
    width: 150px;  /* Adjust width to desired length */
    max-width: 100%;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background: var(--background-color);
    color: var(--text-color);
    font-size: 14px;
}

.recent-scans {
    margin-top: 30px;
    background: var(--background-color);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px var(--background-color);
}

.recent-scans table {
    width: 100%;
    margin-top: 10px;
}

.submitted-card {
    max-width: 600px;
    margin: 40px auto;
    padding: 30px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background-color: var(--background-color);
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 188, 212, 0.1);
}

.submission-message {
    font-size: 1.1em;
    margin-bottom: 15px;
}

.emoji {
    font-size: 1.4em;
    margin-right: 5px;
    vertical-align: middle;
}

.check-ticket-form {
    max-width: 500px;
    margin: 30px auto;
    padding: 25px;
}

.comment-history {
    max-height: 250px;       /* limit height */
    overflow-y: auto;        /* scroll if overflow */
    padding-right: 10px;     /* space for scrollbar */
    margin-top: 10px;
    border-top: 1px dashed var(--border-color);
    padding-top: 10px;
}


.comment-entry {
    word-wrap: break-word;
    white-space: pre-line;
    margin-bottom: 15px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

.comment-timestamp {
    display: block;
    color: gray;
    font-size: 0.85rem;
    margin-top: 2px;
}

.comment-content {
    margin-top: 5px;
    white-space: pre-wrap;
}

.status-badge {
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: bold;
    color: white;
    background-color: var(--success-color);
}

.ticket-success {
    text-align: center;
    border: 2px solid var(--border-color);
    background-color: var(--background-color);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 188, 212, 0.1);
    margin-top: 40px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.ticket-id {
    font-weight: bold;
    font-size: 1.2em;
    color: #00796b;
}

.ticket-list-container {
    max-width: 1200px; /* Previously narrow, now more spacious */
    width: 95%;
    margin: 40px auto;
    padding: 20px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--background-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    color: var(--text-color);
    overflow-x: auto;
}

.ticket-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
    background-color: var(--background-color);
    table-layout: auto
}

.ticket-table th,
.ticket-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
    white-space: nowrap;
}

.ticket-table th {
    background-color: var(--primary-color);
    color: var(--button-text-color);
}

.ticket-table tr:nth-child(even) {
    background-color: var(--search-bg);
}

.ticket-table tr:hover {
    background-color: var(--button-hover-color);
}

.pagination {
  display: flex;
  justify-content: center;  /* or flex-end for right-align */
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.ticket-status-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.ticket-status-wrapper {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
}

.ticket-status-flex {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    align-items: flex-start;
    margin-top: 30px;
}

.ticket-status-box, .ticket-comment-box {
    flex: 1 1 450px;
    max-width: 700px;
    border: 2px solid var(--border-color);
    background-color: var(--background-color);
    padding: 20px 30px;
    border-radius: 10px;
    font-size: 1rem;
    box-shadow: 0 4px 10px rgba(0, 188, 212, 0.1);
    color: var(--text-color);
}

.ticket-status-box.success {
    border-color: #00796b;
}

.ticket-error-message {
    text-align: center;
    margin-top: 20px;
    color: #d32f2f;
    font-weight: bold;
}

.ticket-link {
    color: var(--neutral-color);
    font-weight: bold;
    text-decoration: none;
}

.ticket-link:hover {
    text-decoration: underline;
}

.login-page-wrapper {
    max-width: 1000px;
    margin: 40px auto;
    text-align: center;
}

.login-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
}

.unapproved-user {
    color: crimson;
    font-weight: bold;
}

.modal-title {
    font-size: 1.6rem;
    font-weight: bold;
}

.modal-body label {
    font-weight: 500;
    margin-bottom: 0;
}

.modal-title-lg {
    font-size: 1.6rem;
    font-weight: 600;
}

.modal-body .row {
    align-items: center;
}

.modal-body .form-control {
    font-size: 15px;
    padding: 10px;
}

.modal-body .form-label {
    font-weight: 500;
}

@media print {
    body * {
        visibility: hidden;
    }

    #print-section, #print-section * {
        visibility: visible;
    }

    #print-section {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
    }
}

@media (max-width: 900px) {
    .ticket-status-flex {
        flex-direction: column;
        align-items: center;
    }

    .ticket-status-box, .ticket-comment-box {
        max-width: 95%;
    }
}

@media (max-width: 768px) {
    /* ✅ Make Header Centered */
    header {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        position: relative;
        text-align: center;
        padding: 15px 0;
    }

    /* ✅ Center Logo */
    .logo-section {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        margin-bottom: 10px;
    }

    .logo {
        max-width: 80px;
    }

    /* ✅ Center Search Box */
    .search-box {
        width: 90%;
        max-width: 280px;
        margin-top: 10px;
    }

    /* ✅ Center Dropdown Menu */
    .right-section {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        width: 100%;
        gap: 10px;
        margin-top: 10px;
    }

    .dropdown {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    padding-right: 15px;
    }

    .dropdown-toggle {
        position: relative;
        z-index: 1010;
    }

    .dropdown-menu {
        position: absolute;
        top: 100%; /* appear just below the toggle */
        right: 0;
        left: auto;
        width: 200px;
        text-align: left;
        background-color: var(--menu-background-color);
        border-radius: 8px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
        z-index: 9999;
    }

    .dropdown-menu li {
        text-align: center;
    }

    /* ✅ Improve Dropdown Item Clickability */
    .dropdown-menu li {
        padding: 12px 15px;
        transition: background 0.3s ease-in-out;
    }

    /* ✅ Responsive Form Adjustments */
    .form-container {
        width: 95%;
        padding: 15px;
    }

    .form-input {
        width: 100%;
        padding: 12px;
        font-size: 14px;
    }

    .ticket-status-box,
    .ticket-comment-box {
        flex: 1 1 100%;
    }

    /* ✅ Buttons for Mobile */
    .button, .small-button {
        width: 100%;
        padding: 12px;
        font-size: 14px;
        text-align: center;
    }

    /* ✅ Improve Footer Layout */
    footer {
        text-align: center;
        padding: 15px;
        font-size: 14px;
    }

    /* ✅ Ensure Full Table Responsiveness */
    .table-container {
        overflow-x: auto; /* Allows scrolling only when needed */
        -webkit-overflow-scrolling: touch
    }

    .member-table {
        font-size: 12px;
        min-width: 900px
    }

    .scan-form {
        width: 90%;
    }

    .property-address, .billing-address {
        max-width: 200px; /* Reduce width on small screens */
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    /* ✅ Ensure Menu Toggles Properly */
    .menu-toggle {
        display: block;
        font-size: 24px;
        cursor: pointer;
        padding: 10px;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        align-items: center;
        width: 100%;
        text-align: center;
        background: var(--primary-color);
        padding: 10px;
        gap: 10px;
    }

    /* ✅ Show Menu When Active */
    .nav-menu.active {
        display: flex;
    }

    .menu {
        flex-direction: column;
        text-align: center;
        width: 100%;
    }

    .menu li {
        width: 100%;
        text-align: center;
    }

    .dropdown-menu li {
        text-align: center;
        padding: 12px 15px;
        transition: background 0.3s ease-in-out;
    }
}
