/* Tenant portal should not use staff sidebar padding */

body {
    padding-left: 0 !important;
}

.mobile-menu-toggle {
    display: none !important;
}

.tenant-shell {
    max-width: 920px;
    margin: 0 auto;
    padding: 40px 16px;
}

.tenant-card {
    background: #fff;
    border-radius: 8px;
    padding: 22px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}

.tenant-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.tenant-brand .brand-title {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    color: var(--main-color);
    font-size: 1.4rem;
    line-height: 1.2;
}

.tenant-brand img {
    height: 44px;
}

/* Page head (matches screenshot-like spacing) */
.tenant-page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.tenant-h1 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--main-color);
    margin: 0;
}

.tenant-subtitle {
    color: rgba(0,0,0,0.7);
    font-size: 14px;
}

/* Submit form */
.tenant-form-card {
    background: #fff;
    border-radius: 8px;
    padding: 22px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.08);
}

.tenant-field-label {
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 6px;
}

.tenant-help {
    color: rgba(0,0,0,0.65);
    font-size: 12px;
    margin-top: 6px;
}

.tenant-unit-input {
    background: rgba(0,0,0,0.03) !important;
}

.upload-dropzone {
    border: 2px dashed rgba(0, 51, 102, 0.25);
    border-radius: 10px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: rgba(0,0,0,0.01);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.upload-dropzone:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
    border-color: rgba(0, 51, 102, 0.45);
}

.upload-dropzone:focus-visible {
    outline: 3px solid rgba(0, 51, 102, 0.35);
    outline-offset: 2px;
}

/* Drag/drop active state: make it unmistakable you can drop files */
.upload-dropzone.is-dragover {
    border-color: rgba(0, 51, 102, 0.9);
    background: rgba(0, 51, 102, 0.05);
    box-shadow: 0 10px 22px rgba(0, 51, 102, 0.18);
    transform: translateY(-1px);
}

.upload-dropzone.is-dragover::after {
    content: "Drop to attach";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    letter-spacing: 0.2px;
    color: var(--main-color);
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(2px);
    pointer-events: none;
}

/* When files are attached, show a more "selected" state */
.upload-dropzone.has-files {
    border-style: solid;
    border-color: rgba(0, 51, 102, 0.55);
    background: rgba(0, 51, 102, 0.03);
}

.upload-left {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(0,0,0,0.75);
}

.upload-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(0, 51, 102, 0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--main-color);
}

.upload-title {
    font-weight: 800;
    color: var(--text-color);
}

.upload-sub {
    font-size: 13px;
    color: rgba(0,0,0,0.7);
}

.upload-sub a {
    text-decoration: underline;
}

.file-list {
    margin-top: 10px;
    font-size: 13px;
    color: rgba(0,0,0,0.7);
}

.upload-attachments {
    margin-top: 12px;
    font-size: 13px;
    color: rgba(0,0,0,0.7);
}

.upload-attachments-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.upload-attachments-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    color: rgba(0,0,0,0.78);
}

.upload-attachments-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(0, 51, 102, 0.10);
    color: var(--main-color);
    font-weight: 900;
    font-size: 12px;
}

.upload-attachments-meta {
    margin-left: 4px;
    font-weight: 600;
    color: rgba(0,0,0,0.55);
    font-size: 12px;
}

.upload-clear-btn {
    border: 1px solid rgba(0,0,0,0.12);
    background: #fff;
    border-radius: 999px;
    padding: 6px 10px;
    font-weight: 700;
    font-size: 12px;
    color: rgba(0,0,0,0.75);
    cursor: pointer;
    transition: all 0.15s ease;
}

.upload-clear-btn:hover {
    border-color: rgba(0, 51, 102, 0.35);
    color: var(--main-color);
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.upload-attachments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.upload-attachment {
    display: grid;
    grid-template-columns: 56px 1fr 34px;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid rgba(0,0,0,0.10);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.upload-thumb {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.upload-thumb-fallback {
    color: rgba(0,0,0,0.55);
    font-size: 18px;
}

.upload-file-meta {
    min-width: 0;
}

.upload-file-name {
    font-weight: 800;
    color: rgba(0,0,0,0.78);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.upload-file-size {
    font-size: 12px;
    color: rgba(0,0,0,0.55);
    margin-top: 2px;
}

.upload-remove-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.12);
    background: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(0,0,0,0.55);
    transition: all 0.15s ease;
}

.upload-remove-btn:hover {
    border-color: rgba(220, 53, 69, 0.35);
    color: rgba(220, 53, 69, 1);
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.tenant-form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
}

.tenant-signed-in {
    color: rgba(0,0,0,0.7);
    font-size: 12px;
}

/* Tenant portal landing page */
.tenant-portal-header {
    background: linear-gradient(135deg, var(--main-color), var(--hover-color));
    color: #fff;
    border-radius: 12px;
    padding: 32px 28px;
    margin-bottom: 28px;
    box-shadow: 0 4px 12px rgba(0, 51, 102, 0.15);
}

.tenant-portal-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.tenant-portal-logo {
    display: flex;
    align-items: center;
    gap: 14px;
}

.tenant-portal-logo img {
    height: 52px;
    filter: brightness(0) invert(1);
}

.tenant-portal-logo-title {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 1.6rem;
    line-height: 1.2;
}

.tenant-portal-welcome {
    font-size: 15px;
    opacity: 0.95;
}

.tenant-portal-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-white-outline {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.8);
    color: #fff;
    border-radius: 6px;
    padding: 8px 16px;
    font-weight: 600;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-white-outline:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #fff;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-white-solid {
    background: #fff;
    border: none;
    color: var(--main-color);
    border-radius: 6px;
    padding: 10px 18px;
    font-weight: 700;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-white-solid:hover {
    background: rgba(255, 255, 255, 0.95);
    color: var(--main-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
}

.tenant-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.tenant-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
}

.tenant-section-subtitle {
    color: rgba(0,0,0,0.7);
    font-size: 14px;
    margin-top: 4px;
}

.tenant-status-label {
    font-weight: 800;
    color: rgba(0,0,0,0.70);
}

.tenant-status-badge {
    margin-left: 10px;
}

.tenant-status-note {
    margin-left: 10px;
    font-size: 12px;
    font-weight: 800;
    color: rgba(0,0,0,0.60);
}

.tenant-submitted {
    font-size: 12px;
    font-weight: 700;
    color: rgba(0,0,0,0.55);
}

/* -----------------------------
   Tenant request tracker + feed
   ----------------------------- */

.tenant-tracker {
    position: relative;
    display: grid;
    grid-template-columns: repeat(var(--tenant-tracker-cols, 7), minmax(0, 1fr));
    align-items: flex-start;
    gap: 8px;
    padding: 12px 10px 8px;
    border: 1px solid rgba(0,0,0,0.10);
    border-radius: 12px;
    background: rgba(0,0,0,0.015);
    overflow: hidden;
}

.tenant-tracker::before {
    content: "";
    position: absolute;
    left: 18px;
    right: 18px;
    top: 23px;
    height: 4px;
    border-radius: 999px;
    background: rgba(0,0,0,0.10);
}

.tenant-tracker-step {
    position: relative;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 6px 4px;
    z-index: 1;
}

.tenant-tracker-dot {
    width: 16px;
    height: 16px;
    border-radius: 999px;
    background: #fff;
    border: 3px solid rgba(0,0,0,0.25);
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    margin-bottom: 8px;
}

.tenant-tracker-label {
    font-size: 11px;
    font-weight: 800;
    color: rgba(0,0,0,0.62);
    line-height: 1.2;
}

.tenant-tracker-step.is-complete .tenant-tracker-dot {
    border-color: rgba(25, 135, 84, 0.95); /* bootstrap success-ish */
    background: rgba(25, 135, 84, 0.10);
}

.tenant-tracker-step.is-complete .tenant-tracker-label {
    color: rgba(25, 135, 84, 0.95);
}

.tenant-tracker-step.is-active .tenant-tracker-dot {
    border-color: rgba(13, 110, 253, 0.95); /* bootstrap primary-ish */
    background: rgba(13, 110, 253, 0.12);
}

.tenant-tracker-step.is-active .tenant-tracker-label {
    color: rgba(13, 110, 253, 0.95);
}

.tenant-activity {
    border: 1px solid rgba(0,0,0,0.10);
    border-radius: 12px;
    background: rgba(0,0,0,0.01);
    overflow: hidden;
}

.tenant-activity-scroll {
    max-height: 320px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 10px 12px;
}

.tenant-activity-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tenant-activity-row {
    padding: 8px 10px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.08);
    line-height: 1.35;
}

.tenant-activity-time {
    font-size: 12px;
    font-weight: 800;
    color: rgba(0,0,0,0.55);
    margin-right: 10px;
}

.tenant-activity-text {
    font-size: 13px;
    color: rgba(0,0,0,0.75);
}

.tenant-activity-detail-inline {
    font-weight: 700;
    color: rgba(0,0,0,0.65);
    white-space: pre-wrap;
}

/* Tenant chat (shared work order thread) */
.tenant-chat {
    border: 1px solid rgba(0,0,0,0.10);
    border-radius: 12px;
    background: rgba(0,0,0,0.01);
    overflow: hidden;
}

.tenant-chat--prominent {
    border-color: rgba(13, 110, 253, 0.25);
    box-shadow: 0 8px 22px rgba(13, 110, 253, 0.10);
}

.tenant-chat-head {
    padding: 12px 12px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    background: rgba(13, 110, 253, 0.06);
}

.tenant-chat-head-title {
    font-weight: 900;
    color: rgba(0,0,0,0.80);
}

.tenant-chat-thread {
    max-height: 520px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #fff;
}

.tenant-chat-msg {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tenant-chat-msg.is-mine {
    align-items: flex-end;
}

.tenant-chat-meta {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: 12px;
    color: rgba(0,0,0,0.55);
    font-weight: 800;
}

.tenant-chat-bubble {
    max-width: 78%;
    border: 1px solid rgba(0,0,0,0.10);
    border-radius: 14px;
    padding: 10px 12px;
    background: rgba(0,0,0,0.02);
    color: rgba(0,0,0,0.82);
    white-space: pre-wrap;
    line-height: 1.45;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.tenant-chat-bubble.is-mine {
    background: rgba(13, 110, 253, 0.10);
    border-color: rgba(13, 110, 253, 0.20);
}

.tenant-chat-composer {
    padding: 12px;
    border-top: 1px solid rgba(0,0,0,0.08);
    background: rgba(0,0,0,0.01);
}

.tenant-chat-input {
    position: relative;
}

.tenant-chat-composer textarea {
    min-height: 86px;
    padding-right: 58px; /* room for icon send button */
    padding-bottom: 14px;
}

.tenant-chat-send {
    position: absolute;
    right: 10px;
    bottom: 10px;
    padding: 8px 14px;
    border-radius: 6px;
    font-weight: 800;
    box-shadow: 0 6px 14px rgba(0,0,0,0.10);
}

.tenant-chat-send--inbox {
    width: 42px;
    height: 42px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tenant-chat-send.is-sending i {
    opacity: 0.2;
}

.tenant-chat-send.is-sending::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 2px solid rgba(255,255,255,0.55);
    border-top-color: rgba(255,255,255,1);
    animation: tenantSpin 0.8s linear infinite;
}

@keyframes tenantSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Photo thumbnails */
.tenant-photo-card {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.10);
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.tenant-photo-thumb {
    width: 64px;
    height: 48px;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tenant-photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tenant-photo-thumb--file {
    color: rgba(0,0,0,0.55);
    font-size: 18px;
}

.tenant-photo-meta {
    min-width: 0;
}

.tenant-photo-name {
    font-size: 12px;
    font-weight: 800;
    color: rgba(0,0,0,0.80);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tenant-photo-size {
    margin-top: 2px;
    font-size: 12px;
    color: rgba(0,0,0,0.60);
}

@media (max-width: 820px) {
    /* Fit without horizontal scrolling on small screens */
    .tenant-tracker {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        row-gap: 12px;
    }

    /* Connector line doesn't make sense across wrapped rows */
    .tenant-tracker::before {
        display: none;
    }
}
