/* # v0.5 (10_28_2025 - 7:30 pm Service Credits - Properties - Tenants)  */
    
    body {
      margin: 0;
      font-family: Arial, sans-serif;
      background: #fff;
    }

    /* ---------------- TOP NAV ---------------- */
    .top-nav {
      display: none; /* hidden until authenticated */
      justify-content: space-between;
      align-items: center;
      background: white; /* match mntlc.org */
      padding: 10px 20px;
      position: sticky;
      top: 0;
      z-index: 1000;
      border-bottom: 2px solid #307985;
    }

    .top-nav.visible {
      display: flex; /* shown after successful login */
    }


    .nav-left {
      display: flex;
      align-items: center;
      gap: 10px;
      color: #307985;
      font-weight: bold;
    }

    .nav-logo {
      height: 40px;
      cursor: pointer;
    }

    .nav-links a {
      display: inline-block !important;
      margin: 0 10px;
      color: #307985;
      text-decoration: none;
      font-weight: 500;
    }

    .nav-links a.active {
      border-bottom: 2px solid #307985;
      padding-bottom: 2px;
      color: #225c63;
    }
    
    .hidden-link {
      display: none !important;
    }
    .nav-links a:hover {
      text-decoration: underline;
    }

    .nav-right {
      display: flex;
      align-items: center;
      gap: 10px;
      color: #307985;
    }

    .logout-btn {
      padding: 6px 10px;
      border: none;
      border-radius: 6px;
      background: #307985;
      color: white;
      font-size: 0.85rem;
      cursor: pointer;
    }
    .logout-btn:hover { opacity: 0.9; }

    .nav-toggle {
      display: none;
      font-size: 1.5rem;
      cursor: pointer;
    }

    /* ---------------- HERO HEADER ---------------- */
    .hero {
      position: relative;
      text-align: center;
      padding: 60px 20px 120px;
      background: linear-gradient(130deg, #307985 37%, #97B67D 100%);
      overflow: hidden;
    }
    .hero::before {
      content: "";
      position: absolute;
      inset: 0;
      background: url("https://mntlc.org/wp-content/uploads/2025/06/BG-contact-hero-New.png") center/cover no-repeat;
      opacity: 0.15;
      z-index: 1;
    }
    .hero-content {
      position: relative;
      z-index: 2;
      color: white;
    }
    .hero-logo {
      height: 120px;
      margin-bottom: 10px;
    }
    .shape-divider {
      position: absolute;
      bottom: 0;
      left: 0;
      width: 260%;
      height: 120px;
      background: url("https://mntlc.org/wp-content/plugins/elementor/assets/shapes/waves.svg") repeat-x;
      background-size: cover;
      transform: scaleY(-1);
      opacity: 0.99;
      filter: brightness(0) invert(1);
      z-index: 2;
    }
/* ---------------- Selector---------------- */
    .user-controls {
      position: absolute;
      top: 20px;
      right: 10px;
      text-align: right;
      z-index: 3;
    }
    .user-controls h3 {
      margin: 0;
      font-size: 1rem;
      color: white;
      font-weight: normal;
      display: inline-block;
      margin-right: 10px;
    }
    #userSelector {
      margin-top: 10px;
      text-align: left;
    }
    #userSelector label {
      display: block;
      margin-bottom: 4px;
      color: white;
      font-weight: bold;
      font-size: 0.85rem;
    }
    #userSelector select {
      min-width: 150px;
      display: block;
    }

    /* ---------------- REPORTS CONTENT ---------------- */
    #reportsSection {
      max-width: 1000px !important;
      margin: 40px auto !important;
      padding: 20px !important;
      text-align: left !important;
    }

    #reportsSection .card {
      width: 100%;
      padding: 20px;
      margin-bottom: 20px;
      text-align: left;
    }

    .card {
      background: #fff;
      border-radius: 12px;
      box-shadow: 0 4px 10px rgba(0,0,0,0.08);
      padding: 20px;
      margin-bottom: 30px;
    }

    .card h2, .card h3 {
      color: #307985;
      text-align: left;
    }

    /* 🔹 Lists inside reports */
    #reportsSection ul.list-group {
      margin: 0;
      padding: 0;
      border: 1px solid #ddd;           /* ✅ one clean border */
      border-radius: 8px;               /* ✅ rounded corners */
      overflow: hidden;                 /* ✅ prevents double borders */
    }

    /* 🔹 Each list item */
    #reportsSection .list-group-item {
      text-align: left !important;
      border: none;                     /* remove default borders */
      border-bottom: 1px solid #eee;    /* ✅ clean divider */
      padding: 10px 15px;
    }

    #reportsSection .list-group-item:last-child {
      border-bottom: none;              /* ✅ no extra line at bottom */
    }

    .day-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-weight: bold;
      margin-top: 20px;
      margin-bottom: 10px;
      color: #307985;
    }

    .month-header {
      font-size: 1.4rem;
      font-weight: bold;
      margin-bottom: 15px;
      color: #307985;
    }


    /* ---------------- CONTENT AREA ---------------- */
    .page-content {
      max-width: 1000px;
      margin: 0px auto;
      padding: 20px;
      background: white;
      border-radius: 8px;
      box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    }

    /* ---------------- AUTH FORM ---------------- */
    #auth-container {
      max-width: 400px;
      margin: 80px auto;
      background: white;
      padding: 20px;
      border-radius: 8px;
      box-shadow: 0 2px 6px rgba(0,0,0,0.1);
      text-align: center;
    }
    #auth-container input,
    #auth-container button {
      width: 100%;
      box-sizing: border-box;
      margin: 8px 0;
    }
    #auth-container input {
      padding: 10px;
      border: 1px solid #ccc;
      border-radius: 6px;
    }
    #auth-container button {
      padding: 12px;
      border: none;
      border-radius: 6px;
      background: #307985;
      color: white;
      font-size: 1rem;
      cursor: pointer;
    }
    #auth-container button:hover {
      opacity: 0.9;
    }
    .password-container {
      position: relative;
      width: 100%;
    }
    .password-container input {
      width: 100%;
      padding-right: 40px;
      box-sizing: border-box;
    }
    .toggle-password {
      position: absolute;
      right: 10px;
      top: 50%;
      transform: translateY(-50%);
      cursor: pointer;
      color: #555;
      font-size: 1rem;
    }
    .auth-links {
      margin-top: 12px;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 6px;
    }
    .auth-links a {
      color: #307985;
      cursor: pointer;
      text-decoration: none;
      font-size: 0.9rem;
    }
    .auth-links a:hover {
      text-decoration: underline;
    }
    .error-message {
      margin-top: 10px;
      color: #dc3545;
      font-size: 0.9rem;
      font-weight: bold;
      text-align: center;
    }

    /* ---------------- DASHBOARD ---------------- */
    #dashboard {
      display: none;
      text-align: center;
      padding: 40px 20px;
    }

    .card-grid {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 30px;
      margin-top: 10px;
    }

    .card {
      background: #fff;
      border-radius: 12px;
      box-shadow: 0 4px 10px rgba(0,0,0,0.08);
      width: 220px;
      padding: 20px;
      text-align: center;
      transition: transform 0.2s ease;
    }
    .card:hover {
      transform: translateY(-5px);
    }
    .card h3 {
      font-size: 1.1rem;
      margin-bottom: 15px;
      color: #307985;
    }
    .card button {
      padding: 10px 18px;
      border: none;
      border-radius: 6px;
      background: #307985;
      color: white;
      font-size: 0.95rem;
      cursor: pointer;
    }
    .card button:hover {
      opacity: 0.9;
    }

    /* --------------- CALENDAR CARD ---------------- */
    #calendar-card {
      border: 1px solid #ccc;
      border-radius: 8px;
      background: white;
      margin-top: 20px;
      box-shadow: 0 2px 6px rgba(0,0,0,0.1);
      width: 100%;        /* ✅ full width */
      max-width: 1000px;  /* optional: constrain it so it doesn’t stretch too wide */
      margin-left: auto;  /* ✅ center horizontally */
      margin-right: auto;
    }
    

    /* Title at the top of the card */
    #calendar-title {
      background: #307985;       /* same teal as buttons */
      color: white;
      text-align: center;
      font-size: 1.2rem;
      font-weight: bold;
      padding: 12px;
      border-radius: 8px 8px 0 0; /* round top only */
      margin: 0;                 /* remove default h3 margin */
    }

    #calendar-container { display:block; min-height:650px; height:auto; }

    /* --- Fix invisible calendar layout --- */
    #calendar {
      min-height: 600px;         /* ensures it has space to render */
      padding: 20px;
      visibility: visible !important;
      opacity: 1 !important;
      display: block !important;
    }

    .fc-view-harness {
      min-height: 600px !important;  /* ensures FullCalendar inner container has height */
    }


    /* General text inside calendar */
    #calendar .fc-daygrid-day-number,
    #calendar .fc-col-header-cell-cushion,
    #calendar .fc-timegrid-slot-label-cushion,
    #calendar .fc-list-day-text,
    #calendar .fc-list-day-side-text {
      color: #333 !important;   /* dark gray text */
      font-weight: 500;
    }

    /* ----------------- Event text (applies everywhere) ----------------- */
    #calendar .fc-event-title,
    #calendar .fc-event-time {
      color: #fff !important;   /* force white text */
      font-weight: 500;
      margin: 0;                /* remove extra spacing */
    }

    /* ✅ Core event pill styling (applies Day/Week/Month) */
    /* Core event pill styling */
    .fc-event {
      border-radius: 6px !important;
      font-size: 0.85em !important;
      font-weight: 500;
      color: #fff !important;
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
      padding: 0 !important;

      /* 🔑 Ensure pill is always 30px tall */
      min-height: 30px !important;
      display: flex !important;
      align-items: center !important;  /* vertically center text */
    }

    /* Inner container (title/text) */
    .fc-event-main {
      line-height: 1.2 !important;
      flex: 1 !important;
      display: flex !important;
      align-items: center !important;  /* keeps text centered vertically */
      padding: 0 6px !important;       /* add some horizontal padding */
    }


    /* ✅ Day/Week views: align time + title */
    .fc-timegrid-event .fc-event-main-frame {
      display: flex;
      align-items: center;
      gap: 6px;
      padding: 0px 6px;           /* consistent spacing inside pill */
      height: 100%;
      width: 100%;
      box-sizing: border-box;
      min-height: 30px !important;
    }

    /* ✅ Month view readability */
    .fc-daygrid-event .fc-event-time,
    .fc-daygrid-event .fc-event-title {
      color: #fff !important;
      font-weight: 500;
    }

    /* ✅ List view pills */
    .fc-list-event .fc-event-main {
      background-color: var(--fc-event-bg-color, #245c63) !important;
      border-left: 6px solid var(--fc-event-border-color, #245c63) !important;
      color: #fff !important;
      border-radius: 6px;
      padding: 0px 4px !important;
      line-height: 1.0em !important;
      font-size: 0.85em !important;  /* adjust font size */
      display: flex;
      align-items: center;
      gap: 6px;
    }

    /* ✅ Hide duplicate/illegible list view time */
    .fc-list-event-time {
      display: none !important;
    }

    /* ✅ Ensure list title is readable */
    .fc-list-event .fc-event-title {
      color: #fff !important;
      font-weight: 500;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    /* ✅ Simplify event main but keep layout intact */
    .fc-timegrid-event .fc-event-main,
    .fc-daygrid-event .fc-event-main {
      background: inherit !important;   /* keep parent .fc-event bg */
      border: none !important;          /* remove extra border */
      margin: 0 !important;
      box-shadow: none !important;
      display: flex !important;
      align-items: center !important;
      padding: 0 6px !important;        /* keep horizontal padding */
      min-height: 30px !important;      /* ensure consistent pill height */
    }
    .fc-timegrid-event {
      min-height: 30px !important;   /* apply to wrapper */
    }
    
    .fc-timegrid-event .fc-event-main {
      display: flex !important;
      align-items: center !important;
      padding: 0 6px !important;
      line-height: 1.2 !important;
    }



    /* Day view background (remove yellow) */
    #calendar .fc-timegrid-slot {
      background: #fff !important;  /* clean white */
    }

    /* Today highlight */
    #calendar .fc-day-today {
      background: #f0f8f8 !important;  /* subtle teal tint */
    }

        /* Make all timegrid slots exactly the same height */
    #calendar .fc-timegrid-slot,
    #calendar .fc-timegrid-slot-label {
      height: 30px !important;   /* adjust to match your 15min sizing */
      line-height: 30px !important;
      padding: 0 !important;
      box-sizing: border-box;
    }

    /* Align the time text nicely */
    #calendar .fc-timegrid-slot-label-cushion {
      line-height: 30px !important;
      padding: 0 4px !important;
    }


    /* ---------------- CALENDAR HEADER ---------------- */
    .fc-toolbar {
      background: #307985;          /* teal bar */
      color: white;
      border-radius: 8px 8px 0 0;   /* rounded top corners */
      padding: 10px 15px;
      margin-bottom: 0;             /* remove default spacing */
    }

    .fc-toolbar-title {
      color: white !important;
      font-size: 1.2rem;
      font-weight: bold;
    }

    /* Calendar buttons */
    .fc-button {
      background: #307985 !important;
      border: 1px solid #265f66 !important; /* darker border */
      color: white !important;
      border-radius: 6px !important;
      padding: 5px 12px !important;
      font-size: 0.9rem !important;
      margin: 0 2px !important;
    }

    .fc-button:hover {
      background: #265f66 !important;
      border-color: #1e4b50 !important;
    }

    /* Dashboard ED-only user selector (match Reports style) */
    #calendarUserSelector {
      margin-left: 15px;
    }
    #calendarUserSelector label {
      display: block;
      margin-bottom: 4px;
      color: white;
      font-weight: bold;
      font-size: 0.85rem;
    }

    #calendarUserSelector select {
      min-width: 150px;
      display: block;
    }
    .calendar-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 8px;
    }
    
    #calendarOwnerLabel {
      font-weight: bold;
      font-size: 1.1rem;
      margin-bottom: 10px;
      padding: 6px 12px;
      border-radius: 6px;
      display: inline-block;
    }
    
    #calendarOwnerLabel.self {
      color: #28a745; /* green */
      background-color: #e9f7ef; /* light green background */
      border: 1px solid #28a745;
    }
    
    #calendarOwnerLabel.other {
      color: #6f42c1; /* purple */
      background-color: #f3e9fc; /* light purple background */
      border: 1px solid #6f42c1;
    }

    /* ================================
    📅 Calendar Button Group Fix
    ================================ */
    .calendar-buttons {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 8px;
      margin: 10px auto 20px;
      width: 100%;
      max-width: 400px;
    }

    .calendar-buttons button {
      background-color: #307985;
      color: white;
      border: none;
      border-radius: 6px;
      padding: 10px 14px;
      font-size: 0.95rem;
      flex: 1 1 45%;
      min-width: 150px;
      transition: background 0.2s ease;
    }

    .calendar-buttons button:hover {
      background-color: #26656f;
    }

    /* General modal styling */
    .modal {
      display: none; /* hidden by default */
      position: fixed;
      z-index: 9999 !important;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
      overflow: auto;
      background-color: rgba(0, 0, 0, 0.5); /* dim background */
    }

    .sticky-header {
      position: sticky;
      top: 0;
      background: #ffffff;
      padding: 10px 15px;
      border-bottom: 2px solid #e0e0e0;
      z-index: 10;
      box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }

    .modal-content {
      background-color: #fff;
      margin: 10% auto; /* centers vertically & horizontally */
      padding: 20px;
      border-radius: 10px;
      max-width: 500px;   /* ✅ limit width */
      width: 90%;         /* responsive on smaller screens */
      box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.3);
      text-align: center;
      z-index: 10000 !important;
    }

    .modal-title {
      font-size: 1.4rem;
      color: #1e555c; /* MNTLC teal tone */
      font-weight: 600;
    }

    .modal-content h3 {
      color: #307985;
      margin-bottom: 1rem;
    }

    /* Buttons inside modal */
    .modal-content button {
      margin: 5px;
      padding: 8px 16px;
      border: none;
      border-radius: 6px;
      cursor: pointer;
      font-size: 14px;
    }

    .modal-content button#startTaskBtn {
      background-color: #28a745; /* green */
      color: white;
    }

    .modal-content button#endTaskBtn {
      background-color: #dc3545; /* red */
      color: white;
    }

    .modal-content button:hover {
      opacity: 0.9;
    }

    .btn-add-task {
      padding: 6px 12px;
      background: #307985; /* your teal */
      color: white;
      border: none;
      border-radius: 6px;
      cursor: pointer;
      font-size: 14px;
    }
    .btn-add-task:hover {
      background: #245b63;
    }

    .btn-cancel-teal {
      background: #307985; /* your teal */
      color: white;             /* teal text */
      border: none;
      border-radius: 6px;
      font-size: 14px;
      cursor: pointer;
      transition: background 0.2s ease, color 0.2s ease;
    }
    
    .btn-cancel-teal:hover {
      background: #245b63;   /* teal background on hover */
      color: #ffffff;        /* white text */
    }
    
    /* 🔹 Unify all primary buttons with MNTLC teal style */
    .btn-primary {
      background-color: #307985 !important;
      border: none !important;
      color: white !important;
      border-radius: 6px;
      padding: 6px 12px;
      font-size: 14px;
      cursor: pointer;
      transition: background 0.2s ease, color 0.2s ease;
    }

    .btn-primary:hover {
      background-color: #245b63 !important;
      color: #ffffff !important;
    }
    /* 🔹 Secondary Button (Outline Teal) */
    .btn-secondary {
      background-color: transparent !important;
      border: 2px solid #307985 !important;
      color: #307985 !important;
      border-radius: 6px;
      padding: 6px 12px;
      font-size: 14px;
      cursor: pointer;
      transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    }

    .btn-secondary:hover {
      background-color: #245b63 !important;
      border-color: #245b63 !important;
      color: #ffffff !important;
    }
    .btn-detail {
      padding: 6px 12px;
      border-radius: 6px;
      font-size: 14px;
      font-weight: 500;
      cursor: pointer;
      transition: background 0.2s ease, color 0.2s ease, transform 0.1s ease;
    }
    
    /* ✅ Edit: same teal as Add Task */
    .btn-edit {
      background-color: #307985;
      color: #fff;
      border: none;
    }
    .btn-edit:hover {
      background-color: #245b63;
      color: #fff;
      transform: translateY(-1px);
    }
    
    /* ✅ Rename: use outline teal style */
    .btn-rename {
      background-color: transparent;
      border: 2px solid #307985;
      color: #307985;
    }
    .btn-rename:hover {
      background-color: #245b63;
      border-color: #245b63;
      color: #fff;
      transform: translateY(-1px);
    }
    

    /* Scroll area smoothness */

    .scroll-area {
      overflow-y: auto;
      scrollbar-width: thin;
      scrollbar-color: #ccc #f9f9f9;
    }
    .scroll-area::-webkit-scrollbar {
      width: 8px;
    }
    .scroll-area::-webkit-scrollbar-thumb {
      background-color: #ccc;
      border-radius: 4px;
    }
    .scroll-area::-webkit-scrollbar-thumb:hover {
      background-color: #999;
    }

        /* Bigger checkboxes */
    #inspectionModal input[type="checkbox"] {
      width: 22px;
      height: 22px;
      margin-right: 10px;
    }

    /* Labels easier to tap */
    #inspectionModal label {
      display: flex;
      align-items: center;
      padding: 8px 0;
      font-size: 1.1em;
      line-height: 1.4;
      cursor: pointer;
    }

    /* Group spacing */
    #inspectionModal fieldset {
      border: none;
      margin-bottom: 12px;
    }

    #inspectionModal legend {
      font-weight: bold;
      margin-bottom: 6px;
    }

    .inspection-list {
      padding-left: 20px;
      margin: 0;
    }
    
    .inspection-item {
      margin-bottom: 16px;
      text-align: left;
    }
    
    .inspection-item > label {
      font-weight: 500;
      display: block;
      margin-bottom: 6px;
    }
    
    .yesno {
      display: flex;
      gap: 25px;
      margin-left: 5px;
    }
    
    .yesno label {
      font-size: 1.1em;
      cursor: pointer;
    }
    
    .yesno input[type="radio"] {
      width: 20px;
      height: 20px;
      margin-right: 6px;
    }

     /* Project CSS */
    .project-bubble {
      background: #f5f5f5;       /* light gray */
      border-radius: 8px;
      padding: 10px 12px;
      margin-bottom: 10px;
      text-align: left;          /* force left alignment inside */
    }
    .project-bubble strong {
      display: block;
      margin-bottom: 4px;
    }
    .project-bubble small {
      display: inline-block;
      max-width: 80%;
    }
    .project-bubble em {
      float: right;
      font-style: italic;
      color: #555;
    }
    .project-header {
      display: flex;
      justify-content: space-between;
      align-items: baseline;
    }
    .project-header strong {
      font-size: 1.05rem;
    }
    .project-header span {
      font-size: 0.9rem;
      color: #666;
    }
    
    #projectListModal .modal-content {
      text-align: left;   /* force left alignment */
    }
    #projectListModal .project-item em {
      float: right;       /* keep Est: to the right */
      font-style: italic;
      color: #555;
    }
    
    /* Force left alignment for project list */
    #projectList,
    #projectList .project-item,
    #projectList .project-item * {
      text-align: left !important;
    }
    .project-item {
      text-align: left;
      padding: 10px;
      border-bottom: 1px solid #eee;
    }
    .project-item strong {
      display: block;
      font-size: 1.05rem;
    }
    .project-item small {
      display: inline-block;
      max-width: 80%;
    }
    .project-item em {
      float: right;   /* ✅ Estimated time sits to the right */
      font-style: italic;
      color: #555;
    }
    .project-item:last-child {
      border-bottom: none;
    }

    /* ================= Unified Project & Maintenance Items ================= */

    /* Shared layout */
    .project-item, .maintenance-item {
      text-align: left;
      padding: 10px;
      border-bottom: 1px solid #eee;
    }

    .project-item:last-child, .maintenance-item:last-child {
      border-bottom: none;
    }

    .project-item strong, .maintenance-item strong {
      display: block;
      font-size: 1.05rem;
      color: #000;
    }

    .project-item em, .maintenance-item em {
      float: right;
      font-style: italic;
      color: #555;
      text-align: right;
      font-size: 0.9rem;
    }

    /* Header alignment for both lists */
    .project-header, .maintenance-header {
      display: flex;
      justify-content: space-between;
      align-items: baseline;
    }

    .project-header span, .maintenance-header span {
      font-size: 0.9rem;
      color: #666;
    }

    /* Button row */
    .project-item button, .maintenance-item button {
      margin-top: 8px;
      margin-right: 6px;
      border-radius: 6px;
      padding: 6px 10px;
      font-size: 0.85rem;
    }

    .project-item button.btn-primary,
    .maintenance-item button.btn-primary {
      background-color: #007bff;
      color: white;
    }

    .project-item button.btn-danger,
    .maintenance-item button.btn-danger {
      background-color: #dc3545;
      color: white;
    }

    .project-item button.btn-purple,
    .maintenance-item button.btn-purple {
      background-color: #6f42c1;
      color: white;
    }

    /* Stronger specificity */
    button.btn-purple {
      background-color: #6f42c1 !important;
      color: #fff !important;
      border: none;
    }
    button.btn-purple:hover {
      background-color: #5a32a3 !important;
      color: #fff !important;
    }

   /* =======================================================
   🔒 FINAL OVERRIDE — Role-Based Navbar Visibility
   ======================================================= */
    .top-nav .nav-links a.hidden-link,
    .nav-links a.hidden-link {
      display: none !important;
      visibility: hidden !important;
      opacity: 0 !important;
      pointer-events: none !important;
      width: 0 !important;
      height: 0 !important;
      margin: 0 !important;
      padding: 0 !important;
    }

  /* ==========================================================
   🏠 PROPERTY / UNIT DETAIL LAYOUT (v0.64 visual upgrade)
   ========================================================== */

    /* Main layout containers */
    .property-container {
      display: flex;
      height: calc(100vh - 140px);
      max-width: 1200px;
      margin: 20px auto;
      background: #fff;
      border-radius: 10px;
      box-shadow: 0 4px 12px rgba(0,0,0,.1);
      overflow: hidden;
    }
    .property-sidebar {
      width: 340px;
      background: #f9f9f9;
      border-right: 2px solid #e0e0e0;
      display: flex;
      flex-direction: column;
    }
    .property-list {
      flex: 1;
      overflow-y: auto;
      padding: 5px 0;
    }

    /* Side panel headers and unit list */
    .property-header {
      padding: 10px 15px;
      cursor: pointer;
      font-weight: 600;
      color: #307985;
      display: flex;
      justify-content: space-between;
      align-items: center;
      border-bottom: 1px solid #eee;
    }
    .property-header.active { background-color: #c3e3ea; }
    .unit-list { background: #f0f4f5; }
    .unit-item {
      padding: 8px 25px;
      border-bottom: 1px solid #e0e0e0;
      cursor: pointer;
      transition: background .2s;
    }
    .unit-item:hover { background: #e8f3f5; }
    .unit-item.active { background: #c3e3ea; font-weight: 600; }

    /* Right detail column */
    .property-detail {
      flex: 1;
      padding: 30px;
      overflow-y: auto;
    }
    .detail-card {
      background: #fff;
      border: 1px solid #ddd;
      border-radius: 8px;
      padding: 24px;
      box-shadow: 0 2px 6px rgba(0,0,0,.05);
    }

    /* Top info area with unit stats + donut */
    .unit-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-wrap: wrap;
      border-bottom: 1px solid #eee;
      padding-bottom: 1rem;
      margin-bottom: 1rem;
    }
    .unit-header h2 {
      margin: 0 0 5px;
      font-weight: 600;
      color: #000;
    }
    .unit-meta small {
      display: block;
      color: #555;
    }
    .unit-donut {
      text-align: right;
    }
    .unit-donut canvas {
      width: 110px;
      height: 110px;
    }
    .unit-donut h5 {
      margin: 5px 0 0;
      font-size: 1rem;
      font-weight: bold;
    }
    .unit-donut small {
      color: #555;
    }

    /* Tenants section */
    .tenants-card, .maintenance-card {
      background: #fff;
      border: 1px solid #ddd;
      border-radius: 8px;
      padding: 20px;
      margin-bottom: 20px;
    }
    .tenants-card h6, .maintenance-card h6 {
      font-weight: 600;
      color: #307985;
      margin-bottom: 10px;
    }
    .tenant-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      border-bottom: 1px solid #eee;
      padding: 8px 0;
    }
    .tenant-row:last-child { border-bottom: none; }
    .tenant-info {
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .tenant-info img, .avatar-circle {
      width: 38px;
      height: 38px;
      border-radius: 50%;
      object-fit: cover;
      background: #307985;
      color: #fff;
      display: flex;
      justify-content: center;
      align-items: center;
      font-weight: 600;
    }
    .tenant-rent-data {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 10px;
      min-width: 420px;
      font-size: 0.9rem;
    }
    .tenant-rent-data span strong {
      color: #000;
    }

    /* Maintenance block */
    .maintenance-item {
      display: flex;
      justify-content: space-between;
      align-items: center;
      border-bottom: 1px solid #eee;
      padding: 8px 0;
    }
    .maintenance-item:last-child { border-bottom: none; }

    /* Edit buttons */
    .btn-detail {
      padding: 6px 12px;
      border-radius: 6px;
      font-size: 14px;
      font-weight: 500;
      cursor: pointer;
      transition: background 0.2s ease, color 0.2s ease, transform 0.1s ease;
    }
    .btn-edit {
      background: #307985;
      color: #fff;
      border: none;
    }
    .btn-edit:hover {
      background: #245b63;
      transform: translateY(-1px);
    }

    /* Donut chart red/green accent */
    canvas#unitDonut {
      display: block;
      margin: 0 auto;
    }
    .tenant-grid {
      display: grid;
      grid-template-columns: 20% 10% 10% 10% 10% 20%;
      row-gap: 8px;
      width: 100%;
    }
   

    /* ✅ Animated checkmark for success */
    .checkmark-wrapper {
      width: 80px;
      height: 80px;
      margin: 0 auto;
    }
    .checkmark {
      width: 80px;
      height: 80px;
      stroke-width: 2;
      stroke: #28a745;
      stroke-miterlimit: 10;
      box-shadow: inset 0px 0px 0px #28a745;
      animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
    }
    .checkmark-circle {
      stroke-dasharray: 166;
      stroke-dashoffset: 166;
      stroke-width: 2;
      stroke-miterlimit: 10;
      stroke: #28a745;
      fill: none;
      animation: stroke .6s cubic-bezier(.65, 0, .45, 1) forwards;
    }
    .checkmark-check {
      transform-origin: 50% 50%;
      stroke-dasharray: 48;
      stroke-dashoffset: 48;
      animation: stroke .3s cubic-bezier(.65, 0, .45, 1) .8s forwards;
    }
    @keyframes stroke {
      100% { stroke-dashoffset: 0; }
    }
    @keyframes scale {
      0%, 100% { transform: none; }
      50% { transform: scale3d(1.1, 1.1, 1); }
    }
    @keyframes fill {
      100% { box-shadow: inset 0px 0px 0px 30px #28a745; }
    }

    /* --- Wizard Footer Button Consistency --- */
    .wizard-step .btn {
      font-size: 0.95rem;
      font-weight: 500;
      padding: 0.55rem 1.25rem;
      border-radius: 0.4rem;
    }

    .wizard-step .btn-primary {
      background-color: #2f7b80;
      border-color: #2f7b80;
    }

    .wizard-step .btn-primary:hover {
      background-color: #256367;
      border-color: #256367;
    }

    .wizard-step .btn-outline-primary {
      color: #0d6efd;
      border-color: #0d6efd;
    }

    .wizard-step .btn-outline-primary:hover {
      background-color: #eaf2ff;
      color: #084298;
    }

    .wizard-footer {
      border-top: 1px solid #e9ecef;
      padding-top: 1.25rem;
      margin-top: 1.5rem;
    }

     /* Teal save button */
     .btn-save {
      background-color: #307985;
      color: #fff;
      border: none;
      border-radius: 6px;
      padding: 6px 10px;
      cursor: pointer;
      font-weight: 500;
      height: 34px; /* ✅ match input height */
      line-height: 1; /* ✅ remove text baseline shift */
      display: flex; /* ✅ fix cross-browser button alignment */
      align-items: center;
      justify-content: center;
      margin-bottom: 10px;
    }

    .btn-save:hover {
      background-color: #245b63;
    }

  /* red delete button */
    .btn-delete {
      background-color: #853030;
      color: #fff;
      border: none;
      border-radius: 6px;
      padding: 6px 10px;
      cursor: pointer;
      font-weight: 500;
      height: 34px; /* ✅ match input height */
      line-height: 1; /* ✅ remove text baseline shift */
      display: flex; /* ✅ fix cross-browser button alignment */
      align-items: center;
      justify-content: center;
      margin-bottom: 10px;
    }

    .btn-delete:hover {
      background-color: #632429;
    }

    .card button.btn-delete {
      background-color: #853030 !important;
      color: #fff;
    }
    .card button.btn-delete:hover {
      background-color: #632429 !important;
    }
  /* ============================
    🧩 Delete Modal Styling
    ============================ */
    .modal-header.bg-danger,
    .modal-header.text-white {
      background-color: #853030 !important;
      color: #fff !important;
    }

    #confirmDeleteModal .text-warning {
      color: #b94747 !important; /* muted red instead of gold */
      font-weight: 500;
    }

    #confirmDeleteModal .fw-bold {
      color: #853030 !important;
    }

    #confirmDeleteBtn {
      background-color: #853030 !important;
      border: none !important;
    }

    #confirmDeleteBtn:hover {
      background-color: #a34040 !important;
    }

    #confirmDeleteModal .modal-header,
    #confirmDeleteModal .modal-header .modal-title {
      color: #fff !important;
    }
    #confirmDeleteModal .btn-secondary {
      background-color: #f2f2f2;
      color: #333;
      border: 1px solid #ccc;
      transition: all 0.2s ease-in-out;
    }
    
    #confirmDeleteModal .btn-secondary:hover {
      background-color: #e6e6e6;
      color: #000;
      border-color: #bbb;
    }
      /* ===============================
      📏 SERVICE CREDITS LAYOUT FIX
      =============================== */

    /* Make the credits container use full horizontal space */
    .credits-container {
      width: 100%;
      max-width: 1100px;
      margin: 40px auto;
      padding: 0 20px;
    }

    /* Remove flex shrink and force child width */
    .credits-backing {
      width: 100%;
      min-width: 100%;
      background: #fff;
      border: 1px solid #ddd;
      border-radius: 12px;
      box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
      padding: 30px;
    }

    /* Fix the card so its content expands */
    .credits-backing .card {
      width: 100%;
      min-width: 100%;
      border-radius: 10px;
    }

    /* Force the table wrapper to full width */
    .table-wrapper {
      display: block !important;
      width: 100% !important;
      overflow-x: auto;
      border-radius: 8px;
    }

    /* Table should fill the entire container */
    #creditsTable {
      width: 100% !important;
      min-width: 100% !important;
      table-layout: auto !important;
      border-collapse: collapse;
    }

    /* Fix header and text */
    #creditsTable th, #creditsTable td {
      padding: 12px;
      white-space: nowrap;
      text-align: left;
      vertical-align: middle;
    }

    #creditsTable th {
      background-color: #307985;
      color: #fff;
      font-weight: 600;
    }

    #creditsTable td:nth-child(2),
    #creditsTable th:nth-child(2) {
      white-space: normal;
      word-break: break-word;
    }

    /* Ensure no unnecessary scrollbars unless needed */
    .table-wrapper::-webkit-scrollbar {
      height: 6px;
    }
    .table-wrapper::-webkit-scrollbar-thumb {
      background: #bbb;
      border-radius: 3px;
    }

  /* ===========================================
    🟢 Teal Edit Button
    =========================================== */
    .btn-editcredit {
      background-color: #307985;
      color: #fff;
      border: none;
      border-radius: 6px;
      padding: 6px 12px; /* Slightly wider to match icon + text */
      font-weight: 500;
      line-height: 1.5; /* Ensures vertical centering */
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 4px; /* Space between icon and text */
      vertical-align: middle;
      cursor: pointer;
    }
    
    .btn-editcredit:hover {
      background-color: #245b63 !important;
      color: #fff !important;
    }
    
    /* ===========================================
      🔴 Red Delete Button
      =========================================== */
    .btn-deletecredit {
      background-color: #853030 !important;
      color: #fff;
      border: none;
      border-radius: 6px;
      padding: 6px 12px;
      font-weight: 500;
      line-height: 1.5;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 4px;
      vertical-align: middle;
      cursor: pointer;
    }
    
    .btn-deletecredit:hover {
      background-color: #632429 !important;
      color: #fff !important;
    }

    .btn-editcredit, .btn-deletecredit {
      padding: 4px 10px !important;
      font-size: 0.85rem;
      border-radius: 6px;
    }
    
    .btn-editcredit {
      background-color: #307985;
      color: #fff;
      border: none;
    }
    .btn-editcredit:hover {
      background-color: #2a6873;
    }
    
    .btn-deletecredit {
      background-color: #a33d3d;
      color: #fff;
      border: none;
    }
    .btn-deletecredit:hover {
      background-color: #8b3434;
    }
    
  
    /* ===========================================
      🟢 MNTLC Green Modals: Add + Edit Service Credit
      =========================================== */

    /* Modal Headers */
    #serviceCreditModal .modal-header,
    #editCreditModal .modal-header {
      background-color: #307985 !important;
      color: #ffffff !important;
      border-top-left-radius: 6px;
      border-top-right-radius: 6px;
    }

    /* Modal Titles */
    #serviceCreditModal .modal-title,
    #editCreditModal .modal-title {
      color: #ffffff !important;
      font-weight: 600;
    }

    /* Close Button (white X) */
    #serviceCreditModal .btn-close,
    #editCreditModal .btn-close {
      filter: invert(1) brightness(200%);
      opacity: 1;
    }

    /* Save Buttons (green primary) */
    #serviceCreditModal .btn-success,
    #serviceCreditModal .btn-primary,
    #editCreditModal .btn-success,
    #editCreditModal .btn-primary {
      background-color: #307985 !important;
      border-color: #307985 !important;
      color: #ffffff !important;
      transition: background-color 0.2s ease;
    }

    #serviceCreditModal .btn-success:hover,
    #serviceCreditModal .btn-primary:hover,
    #editCreditModal .btn-success:hover,
    #editCreditModal .btn-primary:hover {
      background-color: #25636d !important;
      border-color: #25636d !important;
    }

    /* Cancel Buttons (outlined green) */
    #serviceCreditModal .btn-secondary,
    #editCreditModal .btn-secondary {
      color: #307985 !important;
      border-color: #307985 !important;
      background-color: #ffffff !important;
    }

    #serviceCreditModal .btn-secondary:hover,
    #editCreditModal .btn-secondary:hover {
      background-color: #307985 !important;
      color: #ffffff !important;
    }
    #creditModal .modal-header {
      background-color: #307985 !important;
      color: #ffffff !important;
      border-top-left-radius: 6px;
      border-top-right-radius: 6px;
    }
    #creditModal .modal-title {
      color: #ffffff !important;
      font-weight: 600;
    }
    #creditModal .btn-close {
      filter: invert(1) brightness(200%);
      opacity: 1;
    }
    #filterStatus {
      max-width: 160px;
      min-width: 130px;
    }
    
    label[for="filterStatus"] {
      color: #333;
      font-weight: 600;
    }
    /* ============================================
   🟢 Force Teal Header for Export Modal
   ============================================ */
    #exportModal .modal-header {
      background-color: #307985 !important;  /* MNTLC teal */
      color: #ffffff !important;
      border-top-left-radius: 6px;
      border-top-right-radius: 6px;
    }

    #exportModal .modal-title {
      color: #ffffff !important;
      font-weight: 600;
    }

    #exportModal .btn-close {
      filter: invert(1) brightness(200%);
      opacity: 1;
    }
    #exportBtn {
      background-color: #1e6f5c;
      border: none;
    }
    #exportBtn:hover {
      background-color: #155b4b;
    }
    h4 {
      color: #1c3c3c;
    }
  
    /* ==============================
      MNTLC Service Credit Status Badges
    ============================== */
    .badge.bg-success {
      background-color: #3b9d66 !important; /* MNTLC green tint */
      color: #fff !important;
    }

    .badge.bg-danger {
      background-color: #c24646 !important; /* Softer red for attention */
      color: #fff !important;
    }
    .toast.bg-success {
      background-color: #1e6f5c !important;
    }
    #paymentBtn {
      background-color: #4fa3b3 !important;
    }
    #paymentBtn:hover {
      background-color: #3b8f9f !important;
    }
    #modeFilter, #monthFilter, #yearFilter, #statusFilter {
      min-width: 110px;
    }
    
    #paymentsTotalLabel {
      font-weight: 600;
      color: #307985;
    }

    /* ============================================================
   TABLES — Unified Styling (Service Credits + Payments)
   ============================================================ */

    /* Header bar — replace Bootstrap dark with MNTLC green */
    .table-dark {
      background-color: #307985 !important;
      color: #fff !important;
      border-color: #2e6d76 !important;
    }

    .table-dark th {
      font-weight: 600;
      padding: 0.6rem 0.75rem !important;
      white-space: nowrap;
    }

    /* Row height + alignment */
    .table td, .table th {
      vertical-align: middle !important;
      padding: 0.5rem 0.75rem !important;
    }

    /* Alternating row stripes (same as Service Credits) */
    .table-striped tbody tr:nth-child(odd) {
      background-color: #ffffff !important;
    }
    .table-striped tbody tr:nth-child(even) {
      background-color: #f7f9f9 !important;
    }

    /* Compact, consistent button spacing */
    .table .btn {
      padding: 0.25rem 0.6rem !important;
      font-size: 0.85rem !important;
      line-height: 1.2 !important;
      border-radius: 6px;
      margin: 0 2px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }

    .table .btn i {
      margin-right: 4px;
    }

    /* Edit button = blue-green tone, Delete = red */
    .table .btn-primary {
      background-color: #307985 !important;
      border: none !important;
    }
    .table .btn-primary:hover {
      background-color: #276872 !important;
    }

    .table .btn-danger {
      background-color: #a94442 !important;
      border: none !important;
    }
    .table .btn-danger:hover {
      background-color: #902f2c !important;
    }

    /* Optional: hover row highlight */
    .table-hover tbody tr:hover {
      background-color: #eaf3f4 !important;
    }
    /* Table should fill the entire container */
    #paymentsTable {
      width: 100% !important;
      min-width: 100% !important;
      table-layout: fixed;
      border-collapse: collapse;
    }

    #paymentsTable th {
      background-color: #307985;
      color: #fff;
      font-weight: 600;
    }

    /* Fix header and text */
    #paymentsTable th, #paymentsTable td {
      padding: 12px;
      white-space: nowrap;
      text-align: left;
      vertical-align: middle;
      text-overflow: ellipsis;
      overflow: hidden;
    }

    #paymentsTable td:nth-child(2),
    #paymentsTable th:nth-child(2) {
      white-space: normal;
      word-break: break-word;
    }

    #exportPaymentsModal .modal-header {
      background-color: #307985 !important;
      color: #ffffff !important;
      border-top-left-radius: 6px;
      border-top-right-radius: 6px;
    }
    #exportPaymentsModal .modal-title {
      color: #ffffff !important;
      font-weight: 600;
    }
    #paymentModal .modal-header {
      background-color: #307985 !important;
      color: #ffffff !important;
      border-top-left-radius: 6px;
      border-top-right-radius: 6px;
    }
    #paymentModal .modal-title {
      color: #ffffff !important;
      font-weight: 600;
    }
    #activateLeaseModal .modal-header {
      background-color: #307985 !important;
      color: #ffffff !important;
      border-top-left-radius: 6px;
      border-top-right-radius: 6px;
    }
    #activateLeaseModal .modal-title {
      color: #ffffff !important;
      font-weight: 600;
    }
    /* ✅ Universal modal header fix */
    #activationModal .modal-header {
      background-color: #307985 !important;
      color: #ffffff !important;
    }

    #activationModal .modal-title {
      color: #ffffff !important;
    }

    #activationModal .btn-close {
      filter: invert(1) brightness(200%);
    }
    /* ✅ Fix ghost "stacked paper" effect at bottom */
    .tenant-container {
      background: transparent !important;
      box-shadow: none !important;
      overflow: visible;
    }

    .tenant-backing {
      background: #ffffff;
      border-radius: 10px;
      box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
      padding: 20px;
      margin-bottom: 40px;
    }

    /* Tenant list cards */
    #tenantList {
      background: #ffffff;
      border-radius: 10px;
      overflow: hidden; /* prevents cascading box artifacts */
    }

    .tenant-card:last-of-type {
      margin-bottom: 0 !important;
      border-bottom: none !important;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    }



  /* Responsive */
  @media (max-width: 768px) {
    .property-container {
      flex-direction: column;
      height: auto;
    }
    .property-sidebar {
      width: 100%;
      border-right: none;
      border-bottom: 2px solid #e0e0e0;
    }
    .tenant-rent-data {
      flex-direction: column;
      align-items: flex-start;
      min-width: auto;
    }
    .nav-links {
      display: none;
      flex-direction: column;
      background: #307985;
      position: absolute;
      top: 60px;
      right: 20px;
      padding: 10px;
      border-radius: 6px;
    }
    .nav-links a {
      color: white !important;
      margin: 5px 0;
    }
    .nav-links.show {
      display: flex;
    }
    .nav-toggle {
      display: block;
      color: #307985;
    }
    .hero {
      padding: 40px 15px 70px;
    }
    .hero-logo {
      height: 90px;
    }
    .hero-content h1 {
      font-size: 1.6rem;
    }
    .shape-divider {
      position: absolute;
      bottom: 0;
      left: 0;
      width: 360%;
      height: 120px;
      background: url("https://mntlc.org/wp-content/plugins/elementor/assets/shapes/waves.svg") repeat-x;
      background-size: cover;
      transform: scaleY(-1);
      opacity: 0.99;
      filter: brightness(0) invert(1);
      z-index: 2;
    }
    .fc-toolbar {
      flex-direction: column !important;
      align-items: center !important;
      gap: 8px; /* add space between rows */
    }
  
    .fc-toolbar-chunk {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 6px;
    }
  
    .fc-button {
      flex: 1 1 auto; /* allow buttons to shrink/grow */
      min-width: 70px; /* keeps them readable */
    }
    #calendar-card {
      width: 100% !important;
      max-width: none !important;
      margin: 5px 0 !important; /* minimal vertical spacing */
      border-radius: 0;          /* optional: remove rounding on edges */
    }
  
    #calendar {
      padding: 0px !important; /* tighter padding on small screens */
    }

    /* 🔹 Tenant-specific mobile cleanup */
    body.tenant .nav-links a {
      display: none !important; /* hide all mobile links */
    }
    body.tenant .nav-links a#navDashboard {
      display: inline-block !important; /* show only My Calendar */
    }

    /* Optional: visually simplify nav bar for tenants */
    body.tenant .top-nav {
      justify-content: flex-end;
    }
    body.tenant .nav-left {
      display: none !important;
    }
    .calendar-buttons {
      flex-direction: column;
      align-items: stretch;
      max-width: 90%;
    }
  
    .calendar-buttons button {
      width: 100%;
      font-size: 1rem;
    }
  }
  
  
    
  

    
    

  
