/* Dashboard-style detail panels: scoped layout (.dashboard-panels-scope) and job summary shell (.dashboard-panels-job-scope). */

.modal-dialog-offset-top {
    margin: 40px auto 0 auto !important;
}

/* Timeline note icons (shared with contacts/support older class names) */
.note-icon-muted,
.genralnote-icon {
    min-width: 38px;
    height: 38px;
    border-radius: 10px;
    background: darkgrey;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

@keyframes detail-panel-fade-in {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Shared: two-column card shell --- */
.dashboard-panels-scope .main-grid,
.dashboard-panels-job-scope .main-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    align-items: start;
}

.dashboard-panels-scope .card,
.dashboard-panels-job-scope .card {
    background: #fff;
    border: 1px solid #e3e6ea;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

/* Stack cards with bottom margin so the first visible card stays flush when optional cards (Tasks, Appointments) are omitted. */
.dashboard-panels-job-scope .dashboard-panels-job-col--main > .card {
    margin-bottom: 20px;
}

.dashboard-panels-job-scope .dashboard-panels-job-col--main > .job-details-appointments-refresh-root {
    margin-bottom: 20px;
}

/* Side column may include hidden fields / style before the first .card; target cards in the stack only. */
.dashboard-panels-job-scope .dashboard-panels-job-col--side .card {
    margin-bottom: 20px;
}

.dashboard-panels-scope .card.dashboard-panel-overflow {
    overflow: visible;
}

.dashboard-panels-scope .card-header,
.dashboard-panels-job-scope .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: -20px -20px 15px -20px;
    padding: 15px 20px;
    width: auto;
    box-sizing: border-box;
    background: #f0f2f6;
    border-bottom: 1px solid #e3e6ea;
    border-radius: 12px 12px 0 0;
}

.dashboard-panels-scope .card-header h3,
.dashboard-panels-job-scope .card-header h3 {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
    color: #1e2a3b;
}

.dashboard-panels-scope .btn,
.dashboard-panels-job-scope .card-header .btn {
    border: 1px solid #94a0b0;
    padding: 6px 14px;
    border-radius: 8px;
    background: #f1f3f7;
    font-size: 13px;
    cursor: pointer;
    color: #1e2a3b;
    transition: 0.2s;
}

.dashboard-panels-scope .card-header .btn,
.dashboard-panels-job-scope .card-header .btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.dashboard-panels-scope .card-header .btn:hover,
.dashboard-panels-job-scope .card-header .btn:hover {
    border-color: #7d8a9c;
    background: #e6eaf0;
}

.dashboard-panels-scope .card-header .btn svg,
.dashboard-panels-job-scope .card-header .btn svg {
    flex-shrink: 0;
}

.dashboard-panels-scope .btn:hover {
    background: #f0f2f5;
    border-color: #7d8a9c;
}

.dashboard-panels-scope .btn.primary {
    background: #f0f3f8;
    font-weight: 500;
}

.dashboard-panels-scope .details-grid,
.dashboard-panels-job-scope .details-grid {
    display: grid;
    gap: 20px;
}

.dashboard-panels-scope .details-grid {
    grid-template-columns: repeat(4, 1fr);
}

.dashboard-panels-job-scope .details-grid {
    grid-template-columns: repeat(3, 1fr);
}

.dashboard-panels-scope .details-grid h5,
.dashboard-panels-job-scope .details-grid h5 {
    font-size: 12px;
    color: #8b95a5;
    margin-bottom: 8px;
}

.dashboard-panels-scope .details-grid p,
.dashboard-panels-job-scope .details-grid p {
    font-size: 14px;
    margin-bottom: 6px;
}

.dashboard-panels-job-scope .dashboard-panel-field-label {
    font-size: 12px;
    color: #8b95a5;
    margin-bottom: 8px;
    font-weight: 600;
}

.dashboard-panels-job-scope .dashboard-panel-summary-body {
    padding-top: 4px;
}

@media (max-width: 992px) {
    .dashboard-panels-scope .main-grid,
    .dashboard-panels-job-scope .main-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-panels-scope .details-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-panels-job-scope .details-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .dashboard-panels-scope .details-grid,
    .dashboard-panels-job-scope .details-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Scoped dashboard panels (detail pages, entity summary) --- */
.dashboard-panels-scope .container {
    max-width: none;
    margin: auto;
}

.dashboard-panels-scope .fullform {
    margin: 5px;
    padding: 10px;
}

.dashboard-panels-scope .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.dashboard-panels-scope .dashboard-panel-intro h2 {
    font-size: 22px;
    font-weight: 600;
    color: #1c2b3a;
}

.dashboard-panels-scope .dashboard-panel-intro p {
    font-size: 14px;
    color: #6c7a89;
    margin-top: 5px;
}

.dashboard-panels-scope .actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.dashboard-panels-scope .summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 25px;
}

.dashboard-panels-scope .summary .card {
    background: white;
    border-radius: 12px;
    padding: 18px;
    border: 1px solid #e4e7ec;
    box-shadow: none;
}

.dashboard-panels-scope .card-title {
    font-size: 12px;
    color: #8b95a5;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.dashboard-panels-scope .card-value {
    font-size: 22px;
    font-weight: 600;
    color: #1e2a3b;
}

.dashboard-panels-scope .tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.dashboard-panels-scope .tab {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #5f6c7b;
    cursor: pointer;
    padding: 6px 14px;
    border-radius: 20px;
    background: #f0f2f6;
    transition: 0.2s;
}

.dashboard-panels-scope .tab.active {
    background: #0f1b2d;
    color: #fff;
}

.dashboard-panels-scope .tabs .badge {
    background: #e3e7ef;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 12px;
}

.dashboard-panels-scope .tab.active .badge {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

@media (max-width: 992px) {
    .dashboard-panels-scope .summary {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .dashboard-panels-scope .header {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-panels-scope .summary {
        grid-template-columns: 1fr;
    }
}

/* Composed modal-style form block */
.dashboard-panels-scope .dashboard-panel-stack-form {
    background: #ffffff;
    border: 1px solid #e3e6ea;
    border-radius: 18px;
    padding: 25px;
    max-width: 1000px;
    margin: auto;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
}

.dashboard-panels-scope .dashboard-panel-stack-form-heading {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #1e2a3b;
}

.dashboard-panels-scope .dashboard-panel-stack-form label {
    font-size: 14px;
    color: #6c7a89;
    display: block;
    margin-bottom: 8px;
}

.dashboard-panels-scope .select-wrapper {
    margin-bottom: 20px;
}

.dashboard-panels-scope .dashboard-panel-stack-form select {
    width: 100%;
    max-width: 320px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid #d9dee5;
    background: #fff;
    font-size: 14px;
    outline: none;
    cursor: pointer;
}

.dashboard-panels-scope .dashboard-panel-stack-form textarea {
    width: 100%;
    min-height: 120px;
    border-radius: 16px;
    border: 1px solid #d9dee5;
    padding: 15px;
    font-size: 14px;
    resize: vertical;
    outline: none;
}

.dashboard-panels-scope .button-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

.dashboard-panels-scope .send-btn {
    background: #0f1b2d;
    color: #fff;
    border: none;
    padding: 10px 22px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: 0.2s;
}

.dashboard-panels-scope .send-btn:hover {
    opacity: 0.9;
}

@media (max-width: 600px) {
    .dashboard-panels-scope .dashboard-panel-stack-form {
        padding: 18px;
    }

    .dashboard-panels-scope .dashboard-panel-stack-form select {
        max-width: 100%;
    }

    .dashboard-panels-scope .button-row {
        justify-content: center;
    }

    .dashboard-panels-scope .send-btn {
        width: 100%;
    }
}

.dashboard-panels-scope .action-message {
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    display: none;
    width: fit-content;
    animation: detail-panel-fade-in 0.3s ease;
}

.dashboard-panels-scope .action-message.success {
    background: #e6f7ec;
    color: #1a7f37;
}

.dashboard-panels-scope .action-message.error {
    background: #fdeaea;
    color: #b42318;
}

/* Searchable listing block (embedded partials) */
.dashboard-panels-scope .data-section {
    padding: 20px;
}

.dashboard-panels-scope .data-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.dashboard-panels-scope .data-toolbar input {
    flex: 1;
    min-width: 250px;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #d0d5dd;
}

.dashboard-panels-scope .data-table-wrapper {
    overflow-x: auto;
}

.dashboard-panels-scope .data-table {
    width: 100%;
    border-collapse: collapse;
}

.dashboard-panels-scope .data-table th {
    text-align: left;
    font-size: 12px;
    color: #667085;
    padding: 12px 8px;
}

.dashboard-panels-scope .data-table td {
    padding: 14px 8px;
    border-top: 1px solid #e4e7ec;
    font-size: 14px;
}

.dashboard-panels-scope .data-empty-state {
    padding: 30px 20px;
    text-align: center;
    color: #667085;
    font-size: 15px;
    border-top: 1px solid #eaecf0;
}

.dashboard-panels-scope .data-action-btn {
    padding: 6px 12px;
    border-radius: 16px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.dashboard-panels-scope .data-action-btn:hover {
    background-color: #0f1b2d;
    color: #fff;
    border-color: #0f1b2d;
}

@media (max-width: 768px) {
    .dashboard-panels-scope .data-table thead {
        display: none;
    }

    .dashboard-panels-scope .data-table,
    .dashboard-panels-scope .data-table tbody,
    .dashboard-panels-scope .data-table tr,
    .dashboard-panels-scope .data-table td {
        display: block;
        width: 100%;
    }

    .dashboard-panels-scope .data-table tr {
        margin-bottom: 16px;
        border: 1px solid #e4e7ec;
        border-radius: 12px;
        padding: 12px;
        background: #fff;
    }

    .dashboard-panels-scope .data-table td {
        border: none;
        padding: 6px 0;
        display: flex;
        justify-content: space-between;
    }

    .dashboard-panels-scope .data-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #667085;
    }
}

.dashboard-panels-scope .category {
    margin-bottom: 15px;
}

.dashboard-panels-scope .category span {
    font-size: 12px;
    color: #8b95a5;
}

.dashboard-panels-scope .category strong {
    display: block;
    margin-top: 4px;
}

.dashboard-panels-scope .toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.dashboard-panels-scope .toggle {
    width: 40px;
    height: 20px;
    background: #e0e3e8;
    border-radius: 20px;
    position: relative;
}

.dashboard-panels-scope .toggle::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    top: 2px;
    left: 2px;
}

.dashboard-panels-scope .timeline-item {
    border: 1px solid #e3e6ea;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
}

.dashboard-panels-scope .timeline-item small {
    color: #8b95a5;
    font-size: 12px;
}

.dashboard-panels-scope .timeline-item p {
    margin: 10px 0;
    font-size: 14px;
}

.dashboard-panels-scope .timeline-actions button {
    padding: 5px 12px;
    font-size: 12px;
    border-radius: 20px;
    border: 1px solid #d6dae0;
    background: #fff;
    cursor: pointer;
}

.dashboard-panels-scope .note-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.dashboard-panels-scope .note-row:last-child {
    border-bottom: none;
}

.dashboard-panels-scope .add-note {
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 6px;
    border: 1px solid #d6dae0;
    background: #f0f3f8;
    cursor: pointer;
}

.dashboard-panels-scope .note-card {
    background: #fff;
    border: 1px solid #e3e6ea;
    border-radius: 16px;
    padding: 18px;
    display: flex;
    gap: 15px;
    margin-bottom: 18px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.dashboard-panels-scope .note-icon {
    min-width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #f2f4f7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.dashboard-panels-scope .note-content {
    flex: 1;
}

.dashboard-panels-scope .note-title {
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.dashboard-panels-scope .note-date {
    font-size: 12px;
    color: #8b95a5;
    font-weight: 400;
}

.dashboard-panels-scope .note-text {
    font-size: 14px;
    color: #1e2a3b;
    line-height: 1.5;
}

@media (max-width: 600px) {
    .dashboard-panels-scope .note-card {
        flex-direction: column;
    }

    .dashboard-panels-scope .note-icon {
        width: 38px;
    }
}

@media (max-width: 600px) {
    .note-icon-muted,
    .genralnote-icon {
        width: 38px;
    }
}

.dashboard-panels-scope .appointment-card {
    background: #fff;
    border: 1px solid #e3e6ea;
    border-radius: 16px;
    padding: 18px;
    display: flex;
    gap: 15px;
    margin-bottom: 18px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.dashboard-panels-scope .appointment-icon {
    min-width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #e8f7ef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.dashboard-panels-scope .appointment-content {
    flex: 1;
}

.dashboard-panels-scope .appointment-header {
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.dashboard-panels-scope .appointment-date {
    font-size: 12px;
    color: #8b95a5;
    font-weight: 400;
}

.dashboard-panels-scope .appointment-type {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.dashboard-panels-scope .appointment-details {
    font-size: 14px;
    color: #4a5568;
}

.dashboard-panels-scope .appointment-title {
    font-weight: 600;
}

.dashboard-panels-scope .upcoming-appointments-list .timeline-card.timeline-appointment:last-child {
    margin-bottom: 0;
}

.dashboard-panels-scope .timeline-card.timeline-appointment {
    align-items: flex-start;
}

.dashboard-panels-scope .timeline-card.timeline-appointment .appointment-timeline-icon {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    color: #047857;
    border: 1px solid #a7f3d0;
}

.dashboard-panels-scope .timeline-card.timeline-appointment .timeline-message {
    margin-bottom: 0;
}

.dashboard-panels-scope .action-required-items {
    padding: 0;
}

.dashboard-panels-scope .action-required-items .appointment-card {
    align-items: flex-start;
}

.dashboard-panels-scope .action-required-items .appointment-card:last-child {
    margin-bottom: 0;
}

.dashboard-panels-scope .action-required-actions {
    align-self: center;
    flex-shrink: 0;
    margin-left: auto;
}

.dashboard-panels-scope .action-required-items .action-required-sublist {
    margin: 8px 0 0 0;
    padding-left: 18px;
    font-size: 13px;
    color: #4a5568;
}

.dashboard-panels-scope .action-required-items .action-required-sublist li {
    margin: 4px 0;
}

@media (max-width: 576px) {
    .dashboard-panels-scope .action-required-items .appointment-card {
        flex-wrap: wrap;
    }

    .dashboard-panels-scope .action-required-actions {
        width: 100%;
        margin-left: 0;
        justify-content: flex-end;
        display: flex;
        padding-top: 4px;
    }
}

.dashboard-panels-scope .timeline-card {
    display: flex;
    gap: 16px;
    background: #f9fafb;
    border: 1px solid #eaecf0;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    align-items: flex-start;
}

.dashboard-panels-scope .timeline-card-clickable {
    cursor: pointer;
}

.dashboard-panels-scope .timeline-card-clickable:hover {
    border-color: #d0d5dd;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
}

.dashboard-panels-scope .timeline-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.dashboard-panels-scope .received-icon {
    background-color: #16a34a;
    color: white;
}

.dashboard-panels-scope .sent-icon {
    background-color: #d1e9ff;
    color: #1570ef;
}

.dashboard-panels-scope .timeline-content {
    flex: 1;
}

.dashboard-panels-scope .timeline-header {
    font-size: 14px;
    margin-bottom: 6px;
}

.dashboard-panels-scope .timeline-date {
    color: #667085;
    font-weight: 400;
}

.dashboard-panels-scope .timeline-message {
    font-size: 14px;
    color: #344054;
    margin-bottom: 12px;
}

.dashboard-panels-scope .timeline-actions {
    display: flex;
    gap: 10px;
}

.dashboard-panels-scope .timeline-btn {
    background: white;
    border: 1px solid #d0d5dd;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 13px;
    cursor: pointer;
}

.dashboard-panels-scope .timeline-btn:hover {
    background: #f2f4f7;
}

.dashboard-panels-scope .email-received-icon {
    background-color: #16a34a;
    color: white;
}

.dashboard-panels-scope .email-sent-icon {
    background-color: #d1e9ff;
    color: #1570ef;
}

.dashboard-panels-scope .timeline-subject {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
    color: #101828;
}

.dashboard-panels-scope .timeline-media {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.dashboard-panels-scope .timeline-image {
    max-width: 160px;
    max-height: 160px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.dashboard-panels-scope .timeline-image:hover {
    transform: scale(1.05);
}

.dashboard-panels-scope .customer-details-subscriptions-tile-body {
    padding: 0 4px 16px 4px;
}

.dashboard-panels-scope .customer-details-subscriptions-tile-row {
    padding: 10px 16px;
    border-bottom: 1px solid #eaecf0;
    font-size: 13px;
    color: #344054;
}

.dashboard-panels-scope .customer-details-subscriptions-tile-row:last-child {
    border-bottom: none;
}

.dashboard-panels-scope .customer-details-subscriptions-tile-title {
    font-weight: 600;
    font-size: 14px;
    color: #101828;
    margin-bottom: 4px;
}

.dashboard-panels-scope .customer-details-subscriptions-tile-meta {
    font-size: 12px;
    color: #667085;
    margin-top: 4px;
}

.dashboard-panels-scope .customer-details-subscriptions-tile-link {
    text-decoration: none;
    padding: 6px 10px;
    min-width: auto;
}

.dashboard-panels-scope .customer-details-subscriptions-tile-link .icon {
    display: block;
}

.dashboard-panels-scope .card.customer-details-rail-card-after-tile {
    margin-top: 20px;
}

@media (max-width: 768px) {
    /*
     * Base .main-grid uses align-items: start (grid). When we switch to flex column here, that
     * align-items value still applies: cross-axis is horizontal, so items shrink to content width
     * and cards look "narrow" on mobile. Stretch so cards span the full content width.
     */
    .dashboard-panels-scope .main-grid {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        max-width: 100%;
    }

    .dashboard-panels-scope .main-grid > div {
        display: contents;
    }

    .dashboard-panels-scope .dashboard-panel-timeline {
        order: 99;
    }

    .dashboard-panels-scope .dashboard-panel-mobile-stack {
        display: flex;
        flex-direction: column;
    }

    .dashboard-panels-scope .dashboard-panel-lead-slot {
        order: -1;
    }
}

@media (max-width: 768px) {
    .dashboard-panels-scope .dashboard-panel-metrics-wrap table,
    .dashboard-panels-scope .dashboard-panel-metrics-wrap tbody,
    .dashboard-panels-scope .dashboard-panel-metrics-wrap tr {
        display: block;
        width: 100%;
    }

    .dashboard-panels-scope .dashboard-panel-metrics-wrap tr:first-child {
        display: flex;
        flex-direction: column;
    }

    .dashboard-panels-scope .dashboard-panel-category-slot {
        order: -1;
    }
}

/* Tag chips (dashboard panel bodies; optional .tag-* aliases) */
.dashboard-panel-chip-row,
.tag-chip-row {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    margin: 0 0 12px 0 !important;
}

.dashboard-panel-chip-row .dashboard-panel-chip,
.tag-chip-row .tag-chip {
    padding: 5px 12px !important;
    border-radius: 999px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06) !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
}
