    body {
      background-color: #f4f6f8;
      font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
      color: #333;
    }

    form {
      max-width: 900px;
      margin: 40px auto;
      background: #ffffff;
      padding: 30px 35px;
      border-radius: 10px;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    }

    /* =============================
      Headings
      ============================= */

    h2 {
      margin-top: 35px;
      margin-bottom: 15px;
      font-size: 20px;
      color: #1f3a5f;
      border-bottom: 2px solid #e5e9ef;
      padding-bottom: 6px;
    }

    h2:first-of-type {
      margin-top: 0;
    }

    /* =============================
      Improve Label Spacing
      ============================= */

    label {
      line-height: 1.4;
    }
    
    /* Layout Defaults */
    :root {
        --primary: #007bff;
        --dark: #333;
        --light: #f8f9fa;
        --error: #dc3545;
    }

    body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; margin: 0; background-color: #eee; }

    /* Header/Footer */
    .main-footer { text-align: center; color: #777; margin-top: 40px; padding: 20px; }

    /* Cards & Forms */
    .card { background: white; padding: 2rem; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
    .auth-container { display: flex; justify-content: center; margin-top: 50px; }
    .auth-form { display: flex; flexDirection: column; gap: 15px; }

    .form-group { display: flex; flex-direction: column; margin-bottom: 15px; }
    .form-group label { margin-bottom: 5px; font-weight: 600; }

    input[type="text"], input[type="password"], input[type="email"] {
        padding: 10px;
        border: 1px solid #ccc;
        border-radius: 4px;
        font-size: 1rem;
    }

    .btn-primary {
        background: var(--primary);
        color: white;
        padding: 12px;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        font-weight: bold;
    }

    .btn-success {
        background: #28a745;
        color: white;
        padding: 12px 24px;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        font-weight: bold;
        font-size: 16px;
    }

    .btn-success:hover {
        background: #218838;
    }

    .btn-secondary {
        background: #6c757d;
        color: white;
        padding: 12px 24px;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        font-weight: bold;
        font-size: 16px;
    }

    .btn-secondary:hover {
        background: #5a6268;
    }

    .error-msg { background: #f8d7da; color: var(--error); padding: 10px; border-radius: 4px; margin-bottom: 15px; border: 1px solid #f5c6cb; }

    /* =============================
      Buttons
      ============================= */

    button[type="submit"] {
      margin-top: 30px;
      background: #1f3a5f;
      color: white;
      border: none;
      padding: 12px 24px;
      font-size: 16px;
      border-radius: 5px;
      cursor: pointer;
    }

    button[type="submit"]:hover {
      background: #16304d;
    }

    .viewViolation {
            margin-top: 30px;
      background: #1f3a5f;
      color: white;
      border: none;
      padding: 12px 24px;
      font-size: 16px;
      border-radius: 5px;
      cursor: pointer;
    }

    .viewViolation:hover {
      background: #16304d;
    }

    .error-banner {
      background: #ffe5e5;
      border-left: 4px solid #dc3545;
      padding: 12px 16px;
      margin-bottom: 25px;
      color: #842029;
      border-radius: 4px;
    }

    .form-buttons {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-top: 30px;
    }

    #permissionsSection label {
      margin-bottom: 12px;
    }

    input:disabled,
    select:disabled {
      background-color: #f0f0f0;
      color: #666;
    }

    label {
      display: block;
      margin-bottom: 10px;
    }

    label span {
      display: inline-block;
      width: 150px;
    }

    input[type="text"],
    input[type="email"],
    input[type="number"],
    input[type="tel"],
    select,
    textarea {
      width: 250px;
      height: 40px;
      padding: 8px 12px;
      border: 1px solid #ccc;
      border-radius: 4px;
      font-size: 14px;
      box-sizing: border-box;
      vertical-align: middle;
    }

    #tenantFields {
      display: none;
      border: 1px solid #ccc;
      padding: 15px;
      margin-top: 15px;
      border-radius: 5px;
    }

    #tenantFields.show {
      display: block;
    }

    #permissionsSection {
      display: none;
    }
    
    #permissionsSection.show {
      display: block;
      gap: 20px;
    }

    .leaseDatesRow div {
      flex: 1;
    }
    .tenantsList {
      margin-top: 15px;
      margin-bottom: 15px;
    }

    .tenantItem {
      display: flex;
      gap: 10px;
      margin-bottom: 10px;
      align-items: flex-end;
    }

    .tenantItem input {
      width: 180px;
    }

    .tenantItem button {
      padding: 5px 10px;
      background-color: #dc3545;
      color: white;
      border: none;
      border-radius: 3px;
      cursor: pointer;
    }

    .tenantItem button:hover {
      background-color: #c82333;
    }

    .addTenantBtn {
      padding: 8px 15px;
      background-color: #28a745;
      color: white;
      border: none;
      border-radius: 3px;
      cursor: pointer;
      margin-top: 10px;
    }

    .addTenantBtn:hover {
      background-color: #218838;
    }

    textarea {
      resize: vertical;
      height: 60px;
    }

    .minorsInput {
      width: 80px !important;
    }

    .warning {
      color: red;
      font-weight: bold;
      margin-left: 25px;
      margin-top: 5px;
      display: none;
    }

    .warning.show {
      display: block;
    }

    .permission-highlight {
      color: #084c7d;
      font-weight: bold;
      margin-left: 25px;
      margin-top: 5px;
      padding: 12px 16px;
      background-color: #d1ecf1;
      border: 1px solid #bee5eb;
      border-left: 4px solid #17a2b8;
      border-radius: 4px;
      display: none;
    }

    .permission-highlight.show {
      display: block;
    }
    
    .property-info {
      margin-bottom: 20px;
      line-height: 1.6;
    }

    .rules-table-container {
      max-height: 300px;
      overflow-y: auto;
      border: 1px solid #ccc;
      margin-bottom: 15px;
    }

    .rules-table {
      width: 100%;
      border-collapse: collapse;
    }

    .rules-table th,
    .rules-table td {
      padding: 8px;
      border-bottom: 1px solid #eee;
      vertical-align: top;
    }

    .rules-table th {
      position: sticky;
      top: 0;
      background: #f8f9fa;
      z-index: 1;
    }

    .selected-rules {
      padding: 10px;
      margin-top: 10px;
      border-left: 4px solid #007bff;
      background: #f1f7ff;
    }
    
    .violations-page textarea {
      width: 100%;
      resize: vertical;
      font-size: 15px;
      line-height: 1.6;
      min-height: 320px; /* Large for long content */
    }

    /* Delivery scope section */
    .violations-page .delivery-scope {
      display: flex;
      flex-direction: column;   /* 🔑 STACK vertically */
      gap: 12px;
      padding: 14px 16px;
    }

    .violations-page .delivery-options {
      display: flex; 
      flex-direction: row;      /* 🔑 radios inline */
      gap: 20px;
      align-items: center;
    }
    .violations-page .delivery-options label {
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .violations-page .delivery-warning {
      padding: 10px 12px;
      background: #fff4f4;
      border-left: 4px solid #b30000;
      color: #7a0000;
      font-size: 0.9rem;
    }

    /* Highlight container */
    .violations-page .highlight-box {
      border: 2px solid #b30000;
      background: #fff5f5;
      border-radius: 8px;
    }

    /* Horizontal radio buttons */
    .violations-page .radio-inline {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 16px;
      border-radius: 6px;
      cursor: pointer;
      font-weight: 500;
    }

    /* Default highlighted option */
    .violations-page .radio-inline.highlighted {
      background: #ffecec;
      border: 1px solid #b30000;
    }

    /* Rules table container */
    .violations-page .rules-table-container {
      max-height: 380px;
      overflow-y: auto;
    }

    /* Selected violations summary */
    .violations-page .selected-violation {
      margin-top: 16px;
      padding: 12px;
      background: #f8f8f8;
      border-radius: 6px;
    }
    
    .violations-page .danger-btn {
      background: #b30000;
      color: white;
      border: none;
      padding: 10px 16px;
      border-radius: 6px;
      cursor: pointer;
    }
    
    .tenant-allowed {
      background-color: #f6fff6;
    }

    .tenant-flag {
      text-align: center;
      font-weight: bold;
    }

    .violation-detail {
      font-size: 0.85rem;
      color: #666;
      margin-top: 4px;
    }

    #rulesDialog {
      width: 90%;
      max-width: 600px;
      border: none;
      border-radius: 12px;
      padding: 0; /* Remove default padding for better control */
      box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    }

    /* Header & Footer Padding */
    .dialog-header, .dialog-footer {
        padding: 1.5rem;
        background: #f8f9fa;
    }

    /* The Scrollable Area */
    .rules-container {
        max-height: 300px; /* Adjust height as needed */
        overflow-y: auto;
        border-top: 1px solid #ddd;
        border-bottom: 1px solid #ddd;
        padding: 0 1.5rem;
    }

    /* The 2-Column Grid */
    .rules-grid {
        display: grid;
        grid-template-columns: 80px 1fr; /* Fixed width for Rule #, flexible for description */
        gap: 0;
    }

    .rules-grid > div {
        padding: 12px 8px;
        border-bottom: 1px solid #eee;
        font-size: 0.95rem;
        line-height: 1.4;
    }

    /* Style for the Header Row */
    .grid-header {
        font-weight: bold;
        background-color: #fff;
        position: sticky; /* Keeps the headers visible while scrolling */
        top: 0;
        color: #333;
        z-index: 1;
        border-bottom: 2px solid #007bff !important;
    }

    /* Dimmed backdrop */
    #violationsDialog::backdrop {
        background: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(4px);
    }

    .close-btn {
        padding: 8px 20px;
        background: #007bff;
        color: white;
        border: none;
        border-radius: 4px;
        cursor: pointer;
    }
    /* Make the button look like a link */
    .link-btn {
        background: none;
        border: none;
        color: #007bff;
        text-decoration: underline;
        cursor: pointer;
        padding: 0;
        font-size: inherit;
    }

    .hoa-header {
      background: linear-gradient(135deg, #1f3a5f, #274c77);
      color: white;
      padding: 18px 0;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .hoa-header-inner {
      max-width: 1100px;
      margin: 0 auto;
      padding: 0 30px;
      display: flex;
      align-items: center;
      gap: 20px;
    }

    .hoa-logo {
      height: 55px;
      width: auto;
    }

    .hoa-title h1 {
      margin: 0;
      font-size: 24px;
      font-weight: 600;
      letter-spacing: 0.3px;
    }

    .hoa-title p {
      margin: 2px 0 0;
      font-size: 14px;
      opacity: 0.9;
    }

    .trash-btn {
      background: none;
      border: none;
      font-size: 1.2rem;
      cursor: pointer;
      color: #b00020;
    }

    .trash-btn:hover {
      transform: scale(1.15);
    }

    .tabs {
      display: flex;
      gap: 8px;
      margin-bottom: 12px;
    }

    .tab-btn {
      padding: 8px 16px;
      border: 1px solid #bbb;
      background: #f5f5f5;
      cursor: pointer;
      font-weight: 600;
    }

    .tab-btn.active {
      background: #fff;
      border-bottom: 3px solid #b30000;
      color: #b30000;
    }

    .preview-actions {
      display: flex;
      gap: 10px;
      align-items: center;
    }

    .btn-update {
      padding: 10px 20px;
      border: 2px solid #1f3a5f;
      background: white;
      color: #1f3a5f;
      font-size: 15px;
      font-weight: 600;
      border-radius: 5px;
      cursor: pointer;
      transition: all 0.2s;
    }

    .btn-update:hover {
      background: #f0f4f8;
      border-color: #16304d;
      color: #16304d;
    }

    .btn-send {
      padding: 12px 24px;
      background: #1f3a5f;
      color: white;
      border: none;
      font-size: 16px;
      font-weight: 600;
      border-radius: 5px;
      cursor: pointer;
      transition: background 0.2s;
    }

    .btn-send:hover {
      background: #16304d;
    }

/* Tenant Registration Styles */
.acknowledgment-section {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.acknowledgment-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 16px;
    line-height: 1.5;
    cursor: pointer;
}

.acknowledgment-checkbox input[type="checkbox"] {
    margin-top: 2px;
    transform: scale(1.2);
}

/* 3-Column Rules Grid for Tenant Registration */
.tenant-rules-grid {
    display: grid;
    grid-template-columns: 80px 1fr 2fr; /* Rule #, Title, Description */
    gap: 0;
}

.tenant-rules-grid > div {
    padding: 12px 8px;
    border-bottom: 1px solid #eee;
    font-size: 0.95rem;
    line-height: 1.4;
}

/* Rules Summary Sections */
.rule-section {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #e5e9ef;
    border-radius: 5px;
    background-color: #fafbfc;
}

.rule-section h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #1f3a5f;
    font-size: 18px;
}

.rule-section p {
    margin: 0;
    line-height: 1.5;
}

/* Show/Hide utility classes */
.hide {
    display: none !important;
}

.show {
    display: block !important;
}

/* Acknowledgment Section */
.acknowledgment-section {
    margin: 25px 0;
    padding: 20px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    border-left: 4px solid #1f3a5f;
}

.acknowledgment-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 16px;
    line-height: 1.5;
    cursor: pointer;
}

.acknowledgment-checkbox input[type="checkbox"] {
    margin-top: 2px;
    transform: scale(1.2);
}

/* =============================
  Calendar Styles
  ============================= */

.calendar-container {
    margin: 20px 0;
    padding: 20px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e9ef;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-header h3 {
    margin: 0;
    color: #1f3a5f;
    font-size: 20px;
}

.calendar-nav-btn {
    background: #1f3a5f;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.calendar-nav-btn:hover {
    background: #16304d;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-day-header {
    text-align: center;
    font-weight: bold;
    padding: 10px;
    background: #f8f9fa;
    color: #1f3a5f;
    border-radius: 4px;
}

.calendar-day {
    text-align: center;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #e5e9ef;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-day.empty {
    border: none;
    background: transparent;
}

.calendar-day.past {
    background: #f8f9fa;
    color: #999;
    cursor: not-allowed;
}

.calendar-day.available {
    background: #e8f5e9;
    color: #2e7d32;
    cursor: pointer;
    font-weight: 600;
}

.calendar-day.available:hover {
    background: #c8e6c9;
    transform: scale(1.05);
    transition: all 0.2s ease;
}

.calendar-day.booked {
    background: #fff3e0;
    color: #e65100;
    cursor: pointer;
}

.calendar-day.booked:hover {
    background: #ffe0b2;
}

.calendar-day.user-booked {
    background: #e3f2fd;
    color: #1565c0;
    cursor: pointer;
    font-weight: 600;
    border: 2px solid #1976d2;
}

.calendar-day.user-booked:hover {
    background: #bbdefb;
    transform: scale(1.05);
    transition: all 0.2s ease;
}

/* Reservations List */
.reservations-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.reservation-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e5e9ef;
}

.reservation-item.user-reservation {
    background: #e3f2fd;
    border-color: #90caf9;
}

.reservation-details {
    flex: 1;
}

.reservation-details strong {
    display: block;
    color: #1f3a5f;
    margin-bottom: 5px;
}

.btn-delete {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

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

.badge-yours {
    background: #28a745;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.badge-booked {
    background: #6c757d;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.secondary-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
}

.secondary-btn:hover {
    background: #5a6268;
}

/* Page & Menu Layout */
.menu, .page {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 30px;
}
