/* HMO Management v2 UI */

.hmo-page {
    background: #f5f7fb;
    padding: 20px;
}

.hmo-card {
    background: #ffffff;
    border: 1px solid #e3e8ef;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.hmo-card h2,
.hmo-card h3 {
    margin-top: 0;
}

.hmo-actions {
    margin-bottom: 15px;
}

.hmo-actions .btn {
    margin-right: 8px;
}

.hmo-property-title {
    font-size: 28px;
    font-weight: 600;
    margin: 10px 0;
}

.hmo-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.hmo-meta-item {
    background: #f8fafc;
    border: 1px solid #e3e8ef;
    border-radius: 8px;
    padding: 15px;
}

.hmo-meta-label {
    font-size: 12px;
    text-transform: uppercase;
    color: #667085;
    font-weight: 600;
    margin-bottom: 6px;
}

.hmo-photo-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.hmo-photo-card {
    width: 180px;
    background: #ffffff;
    border: 1px solid #e3e8ef;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.hmo-photo-card img {
    max-width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
}

.hmo-photo-actions {
    margin-top: 10px;
}

.hmo-photo-actions .btn,
.hmo-photo-actions .label {
    margin-top: 5px;
    display: inline-block;
}

.hmo-tabs {
    margin-top: 20px;
}

.hmo-tabs .nav-tabs {
    border-bottom: 1px solid #d0d7de;
}

.hmo-tabs .nav-tabs > li > a {
    border-radius: 8px 8px 0 0;
    font-weight: 600;
}

.hmo-tabs .tab-content {
    background: #ffffff;
    border: 1px solid #d0d7de;
    border-top: none;
    padding: 20px;
    border-radius: 0 0 10px 10px;
}

.table {
    background: #ffffff;
}

.table > thead > tr > th {
    color: #344054;
    font-size: 13px;
    text-transform: uppercase;
}

.alert {
    border-radius: 8px;
}
/* Upload bar */

.hmo-upload-bar{
    display:flex;
    align-items:center;
    gap:20px;
    padding:20px;
    background:#fff;
    border:1px solid #e5e7eb;
    border-radius:10px;
    margin-bottom:25px;
}

.hmo-upload-bar input[type=file]{
    flex:1;
}

.hmo-upload-bar .btn{
    margin:0;
    min-width:170px;
}
/* Photo upload and gallery polish */

.hmo-upload-bar {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 16px 18px;
    background: #ffffff;
    border: 1px solid #dce3ec;
    border-radius: 12px;
    margin-bottom: 32px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.hmo-upload-bar input[type=file] {
    flex: 1;
    padding: 8px;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    background: #fff;
}

.hmo-upload-bar .btn {
    margin: 0;
    min-width: 170px;
    height: 38px;
    font-weight: 600;
}

.hmo-photo-grid {
    gap: 22px;
}

.hmo-photo-card {
    width: 205px;
    min-height: 250px;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid #dce3ec;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.06);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.hmo-photo-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.10);
}

.hmo-photo-card img {
    width: 100%;
    height: 145px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 12px;
}

.hmo-photo-actions {
    margin-top: 8px;
}

.hmo-photo-actions .btn,
.hmo-photo-actions .label {
    min-width: 110px;
    padding: 6px 10px;
    font-size: 13px;
    border-radius: 6px;
    font-weight: 600;
}
/* Property header */

.hmo-property-header {
    padding: 24px;
}

.hmo-property-header-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.hmo-property-title {
    margin: 0;
    font-size: 30px;
    line-height: 1.25;
}

.hmo-property-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.hmo-inspection-age {
    margin-top: 8px;
    font-weight: 700;
}

.hmo-inspection-ok {
    color: #2e7d32;
}

.hmo-inspection-warning {
    color: #f57c00;
}

.hmo-inspection-overdue {
    color: #c62828;
}
/* Edit property page */

.hmo-edit-page {
    max-width: 1200px;
    margin: 0 auto;
}

.hmo-edit-page h1 {
    margin-bottom: 20px;
    font-size: 30px;
    font-weight: 600;
}

.hmo-edit-page form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    align-items: start;
}

.hmo-edit-page .panel {
    border: 1px solid #dce3ec;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.06);
    overflow: hidden;
    margin-bottom: 0;
}

.hmo-edit-page .panel-heading {
    padding: 14px 18px;
    font-size: 15px;
}

.hmo-edit-page .panel-body {
    padding: 18px;
}

.hmo-edit-page .form-control {
    border-radius: 6px;
}

.hmo-edit-page input[type="submit"] {
    grid-column: 1 / -1;
    width: 220px;
    padding: 10px 18px;
    font-weight: 600;
}

.hmo-edit-page .alert {
    grid-column: 1 / -1;
}

@media (max-width: 900px) {
    .hmo-edit-page form {
        grid-template-columns: 1fr;
    }

    .hmo-edit-page input[type="submit"] {
        width: 100%;
    }
}
.hmo-edit-page .panel-success {
    grid-column: 1 / -1;
}

.hmo-edit-page .panel-success .panel-body {
    display: flex;
    align-items: center;
    gap: 25px;
    flex-wrap: wrap;
}

.hmo-edit-page .panel-success .form-group {
    margin-bottom: 0;
}

.hmo-edit-page .panel-success + input[type="submit"] {
    grid-column: 1 / -1;
}

/* Double Occupancy switch */

.form-group .bootstrap-switch {
    display: block;
    margin-top: 6px;
}

.bootstrap-switch + label,
.bootstrap-switch ~ label {
    display: none !important;
}

/* Property Information widths */

.hmo-edit-page .panel-body .form-control,
.hmo-edit-page .panel-body .select2-container,
.hmo-edit-page .panel-body .bootstrap-switch {
    max-width: 520px;
}

.hmo-edit-page .panel-body .select2-container {
    width: 520px !important;
}
/* Publishing & Management */

.hmo-publishing-options {
    display: flex;
    align-items: flex-start;
    gap: 35px;
    flex-wrap: wrap;
}

.hmo-publishing-options .form-group {
    margin-bottom: 0;
    min-width: 220px;
}

.hmo-publishing-options .bootstrap-switch {
    margin-bottom: 8px;
}

.hmo-managed-sync {
    width: 100%;
    margin-top: 20px;
}
/* Sprint 3 Dashboard */

.hmo-dashboard {
    background: #f5f7fb;
    padding: 22px;
    border-radius: 12px;
}

.hmo-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
}

.hmo-dashboard-header h1 {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
}

.hmo-dashboard-header p {
    margin: 6px 0 0;
    color: #667085;
}

.hmo-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
    margin-bottom: 22px;
}

.hmo-dashboard-card {
    background: #ffffff;
    border: 1px solid #dce3ec;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.06);
}

.hmo-dashboard-card-label {
    font-size: 13px;
    font-weight: 700;
    color: #667085;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.hmo-dashboard-card-number {
    font-size: 34px;
    font-weight: 700;
    color: #1f2937;
}

.hmo-dashboard-card-text {
    margin-top: 6px;
    color: #667085;
}

.hmo-dashboard-actions .btn {
    margin-right: 8px;
    margin-bottom: 8px;
}
.hmo-dashboard-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.hmo-dashboard-card-link:hover,
.hmo-dashboard-card-link:focus {
    color: inherit;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.10);
}
/* Sticky footer layout */

html,
body {
    min-height: 100%;
}

body {
    min-height: 100vh;
}

.wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page-body {
    flex: 1 0 auto;
}

footer {
    flex-shrink: 0;
}
/* Quick Actions */

.hmo-quick-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hmo-quick-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-radius: 8px;
    font-weight: 600;
    color: #1f2937;
    background: #ffffff;
    border: 1px solid #dce3ec;
    text-decoration: none;
}

.hmo-quick-action:hover,
.hmo-quick-action:focus {
    background: #f5f7fb;
    color: #1f2937;
    text-decoration: none;
}

.hmo-quick-action-arrow {
    color: #98a2b3;
    font-size: 18px;
}
.hmo-activity-feed {
    margin-top: 10px;
}

.hmo-activity-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 20px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #ececec;
}

.hmo-activity-item:last-child {
    border-bottom: none;
}

.hmo-activity-left {
    flex: 1;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hmo-activity-left strong {
    margin-right: 6px;
}

.hmo-activity-right {
    white-space: nowrap;
    font-size: 12px;
    color: #777;
    overflow: hidden;
    text-overflow: ellipsis;
}
.page-body.hmo-dashboard-container {
    max-width: 1450px !important;
    width: 95% !important;
}
.hmo-dashboard-row {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 22px;
    margin-bottom: 22px;
}

.hmo-dashboard-row .hmo-card {
    margin-bottom: 0;
}
.hmo-repairs-header {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(160px, 0.6fr) minmax(160px, 0.6fr) minmax(0, 1.4fr);
    align-items: center;
    gap: 24px;
    margin-bottom: 22px;
    padding: 16px 20px;
    background: #f5f7fb;
    border: 1px solid #dce3ec;
    border-radius: 12px;
}

.hmo-repairs-header h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
}

.hmo-repairs-header p {
    margin: 2px 0 0;
    color: #667085;
}
.hmo-repairs-right .pagination__container {
    text-align: right;
    margin-bottom: 0;
}

.hmo-repairs-right .pagination__container .text {
    white-space: nowrap;
}

.hmo-repairs-primary {
    justify-self: center;
}
.hmo-repairs-secondary {
    justify-self: center;
}
.hmo-repairs-right {
    justify-self: end;
    text-align: right;
}

.hmo-repairs-right .pagination {
    margin-top: 0;
    margin-bottom: 4px;
}

.hmo-repairs-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.hmo-create-repair {
    padding: 10px 24px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
}
.hmo-repairs-table {
    background: #ffffff;
    border: 1px solid #dce3ec;
    border-radius: 10px;
    overflow: hidden;
}

.hmo-repairs-table > thead > tr:first-child > th {
    background: #eef2f6;
    color: #344054;
    font-weight: 700;
    padding: 10px 8px;
    border-bottom: 1px solid #d0d5dd;
}

.hmo-repairs-table > thead > tr:nth-child(2) > td {
    background: #f8fafc;
    padding: 8px;
    vertical-align: middle;
}

.hmo-repairs-table > tbody > tr > td {
    padding: 7px 8px;
    vertical-align: middle;
}

.hmo-repairs-table > tbody > tr:hover {
    background: #f6f8fb;
}
.hmo-repairs-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.hmo-repairs-summary-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: #ffffff;
    border: 1px solid #dce3ec;
    border-radius: 10px;
}

.hmo-repairs-summary-label {
    color: #667085;
    font-weight: 600;
}

.hmo-repairs-summary-card strong {
    font-size: 24px;
    color: #1f2937;
}
.hmo-repairs-summary-link {
    color: inherit;
    text-decoration: none;
}

.hmo-repairs-summary-link:hover,
.hmo-repairs-summary-link:focus {
    color: inherit;
    text-decoration: none;
    border-color: #b8c2cf;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}
.hmo-tenant-details-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
}

.hmo-tenant-detail {
    padding: 14px 16px;
    background: #f8fafc;
    border: 1px solid #dce3ec;
    border-radius: 8px;
}

.hmo-tenant-detail .hmo-meta-label {
    margin-bottom: 5px;
}

@media (max-width: 1100px) {
    .hmo-tenant-details-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .hmo-tenant-details-grid {
        grid-template-columns: 1fr;
    }
}
.hmo-property-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.hmo-property-summary-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 92px;
    padding: 14px 16px;
    background: #ffffff;
    border: 1px solid #dce3ec;
    border-radius: 10px;
}

.hmo-property-summary-label {
    margin-bottom: 6px;
    color: #667085;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.hmo-property-summary-card strong {
    color: #1f2937;
    font-size: 18px;
}

.hmo-property-summary-card small {
    margin-top: 4px;
    color: #667085;
}

.hmo-property-summary-link {
    color: inherit;
    text-decoration: none;
}

.hmo-property-summary-link:hover,
.hmo-property-summary-link:focus {
    color: inherit;
    text-decoration: none;
    border-color: #b8c2cf;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

@media (max-width: 1100px) {
    .hmo-property-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .hmo-property-summary {
        grid-template-columns: 1fr;
    }
}
.hmo-double-occupancy {
    margin-top: 10px;
}

.hmo-double-occupancy .hmo-status-indicator {
    display: inline-block !important;
    width: 11px !important;
    height: 11px !important;
    margin-right: 6px;
    border-radius: 50%;
    vertical-align: middle;
    font-size: 0;
}

.hmo-double-occupancy .hmo-status-indicator-green {
    background-color: #2e9d52 !important;
}

.hmo-double-occupancy .hmo-status-indicator-red {
    background-color: #d64545 !important;
}
.hmo-status-indicator {
    display: inline-block;
    margin-right: 5px;
    font-size: 15px;
    line-height: 1;
    vertical-align: middle;
}

.hmo-status-indicator-green {
    color: #2e9d52 !important;
}

.hmo-status-indicator-red {
    color: #d64545 !important;
}
.hmo-area-manager-name {
    display: inline-block;
    margin: 0;
    padding: 0;
    font-weight: 600;
}

.hmo-double-occupancy {
    margin-top: 8px;
}
.hmo-tenant-summary-name {
    margin-bottom: 5px;
    font-weight: 600;
    color: #1f2937;
}
.hmo-certificates-summary {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hmo-certificates-summary strong {
    color: #1f2937;
    font-size: 14px;
}

.hmo-certificates-summary span {
    color: #667085;
    font-size: 12px;
}
.hmo-properties-header {
    display: grid;
        grid-template-columns:
        minmax(280px, 1.3fr)
        minmax(240px, 0.8fr)
        minmax(220px, 0.7fr)
        minmax(320px, 1.2fr);
    align-items: center;
    gap: 24px;
    margin-bottom: 22px;
    padding: 16px 20px;
    background: #f5f7fb;
    border: 1px solid #dce3ec;
    border-radius: 12px;
}

.hmo-properties-header h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
}

.hmo-properties-header p {
    margin: 2px 0 0;
    color: #667085;
}

.hmo-properties-managed {
    justify-self: center;
    text-align: center;
}

.hmo-properties-toggle-label {
    margin: 0;
    font-weight: 600;
    cursor: pointer;
}

.hmo-properties-toggle-label input {
    margin-right: 7px;
    vertical-align: middle;
}

.hmo-properties-primary {
    justify-self: center;
}

.hmo-add-property {
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 600;
}

.hmo-properties-pagination {
    justify-self: end;
    text-align: right;
}

.hmo-properties-pagination .pagination__container {
    margin-bottom: 0;
    text-align: right;
}

.hmo-properties-pagination .pagination__container .text {
    white-space: nowrap;
}
.hmo-properties-summary {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 22px 0;
}
.hmo-properties-summary-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 95px;
    padding: 18px;
    background: #ffffff;
    border: 1px solid #dce3ec;
    border-radius: 10px;
    text-align: center;
}

.hmo-properties-summary-label {
    display: block;
    margin-bottom: 8px;
    color: #667085;
    font-size: 13px;
    font-weight: 600;
}

.hmo-properties-summary-card strong {
    font-size: 34px;
    line-height: 1;
    color: #1f2937;
}

@media (max-width: 1000px) {
    .hmo-properties-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .hmo-properties-summary {
        grid-template-columns: 1fr;
    }
}
.label.hmo-type-room {
    background-color: #337ab7 !important;
    color: #ffffff !important;
}

.label.hmo-type-studio {
    background-color: #5cb85c !important;
    color: #ffffff !important;
}

.label.hmo-type-hmo {
    background-color: #f0ad4e !important;
    color: #ffffff !important;
}

.label.hmo-type-house {
    background-color: #d9822b !important;
    color: #ffffff !important;
}

.label.hmo-type-flat {
    background-color: #7a5db0 !important;
    color: #ffffff !important;
}

.label.hmo-type-office {
    background-color: #5f6b76 !important;
    color: #ffffff !important;
}

.label.hmo-type-shop {
    background-color: #2f8f9d !important;
    color: #ffffff !important;
}
.hmo-repairs-table .label,
table .label.hmo-type-room,
table .label.hmo-type-studio,
table .label.hmo-type-hmo,
table .label.hmo-type-house,
table .label.hmo-type-flat,
table .label.hmo-type-office,
table .label.hmo-type-shop {
    color: #333333 !important;
    background-color: #eeeeee !important;
}
.hmo-properties-table > thead > tr > th,
.hmo-properties-table > tbody > tr > td {
    vertical-align: middle;
}

.hmo-properties-table > tbody > tr > td {
    padding: 6px 7px;
}

.hmo-properties-table > thead > tr:first-child > th {
    padding: 9px 7px;
}

.hmo-properties-table > thead > tr > th:nth-last-child(-n+3),
.hmo-properties-table > tbody > tr > td:nth-last-child(-n+3) {
    width: 100px;
    text-align: center;
}

.hmo-properties-table > tbody > tr > td:nth-last-child(-n+3) .btn {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center;
    justify-content: center;
    white-space: nowrap !important;
    min-width: 88px;
    padding: 5px 8px;
}

.hmo-properties-table > tbody > tr > td:nth-last-child(-n+3) .btn .glyphicon {
    display: inline-block;
    margin-right: 6px;
}
.hmo-properties-summary-link {
    color: inherit;
    text-decoration: none;
}

.hmo-properties-summary-link:hover,
.hmo-properties-summary-link:focus {
    color: inherit;
    text-decoration: none;
    border-color: #b8c2cf;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}
.hmo-properties-table > tbody > tr > td:nth-last-child(-n+3) .btn > .glyphicon {
    display: inline-block !important;
    flex: 0 0 auto;
    width: auto;
    margin-right: 6px;
}
/* Properties table sticky header */
.hmo-properties-table > thead > tr:first-child > th {
    position: sticky;
    top: 0;
    z-index: 12;
    background: #ffffff;
}

.hmo-properties-table > thead > tr:nth-child(2) > td {
    position: sticky;
    top: 38px;
    z-index: 11;
    background: #ffffff;
}

/* Properties table sticky column headings */
.hmo-properties-table > thead > tr:first-child > th {
    position: sticky;
    top: 0;
    z-index: 12;
    background: #ffffff;
}

/* Properties table sticky filter row */
.hmo-properties-table > thead > tr:nth-child(2) > td {
    position: sticky;
    top: 37px;
    z-index: 11;
    background: #ffffff;
}
/* Properties table wrapper */
.hmo-properties-table-wrapper {
    overflow: visible !important;
}
