/* Dialpad — same static header + scroll-body model as Sprint Tasks / FP&A Backlog */
.dialpad-page {
    min-height: 0;
}

.dialpad-header-stack {
    padding-bottom: 0;
}

.dialpad-header-stack .page-header {
    margin-bottom: 0.75rem !important;
}

.dialpad-header {
    color: #fff;
    padding: 0.9rem 1.5rem;
    border-radius: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    overflow: hidden;
    min-height: fit-content;
}

.dialpad-header-overview {
    background: linear-gradient(135deg, #0f766e 0%, #14b8a6 55%, #0891b2 100%);
    box-shadow: 0 18px 45px rgba(20, 184, 166, 0.28);
}

.dialpad-header-company {
    background: linear-gradient(135deg, #047857 0%, #059669 50%, #0d9488 100%);
    box-shadow: 0 18px 45px rgba(5, 150, 105, 0.3);
}

.dialpad-header-offices {
    background: linear-gradient(135deg, #0d9488 0%, #0891b2 55%, #0284c7 100%);
    box-shadow: 0 18px 45px rgba(8, 145, 178, 0.3);
}

.dialpad-header-departments {
    background: linear-gradient(135deg, #0369a1 0%, #0891b2 50%, #14b8a6 100%);
    box-shadow: 0 18px 45px rgba(3, 105, 161, 0.3);
}

.dialpad-header-users {
    background: linear-gradient(135deg, #1d4ed8 0%, #0ea5e9 55%, #2dd4bf 100%);
    box-shadow: 0 18px 45px rgba(14, 165, 233, 0.3);
}

.dialpad-header-calls {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #06b6d4 100%);
    box-shadow: 0 18px 45px rgba(37, 99, 235, 0.3);
}

.dialpad-header .header-content {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    min-width: 0;
}

.dialpad-header .header-icon {
    color: #fff;
}

.dialpad-header .header-text h1 {
    margin: 0;
    font-size: 1.55rem;
    font-weight: 600;
    color: #fff;
}

.dialpad-header .header-text p {
    margin: 0.15rem 0 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.88);
}

.dialpad-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.dialpad-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.6rem;
    flex-wrap: wrap;
}

.dialpad-card-header .chart-title {
    margin-bottom: 0;
}

.dialpad-top-people-search {
    min-width: min(100%, 16rem);
    margin-left: auto;
}

.dialpad-top-people-search .dialpad-person-select {
    min-width: min(100%, 16rem);
    height: 32px;
    font-size: 0.78rem;
}

.dialpad-period-select {
    height: 34px;
    min-width: 11.5rem;
    padding: 0 0.65rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #f8fafc;
    background-color: rgba(15, 23, 42, 0.55);
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    cursor: pointer;
    color-scheme: dark;
}

.dialpad-period-select:hover:not(:disabled) {
    background-color: rgba(15, 23, 42, 0.75);
    border-color: rgba(255, 255, 255, 0.65);
}

.dialpad-period-select:disabled {
    opacity: 0.65;
    cursor: wait;
}

.dialpad-period-select option {
    background-color: #1e293b;
    color: #f8fafc;
}

.dialpad-period-select:focus {
    outline: none;
    background-color: rgba(15, 23, 42, 0.8);
    border-color: rgba(255, 255, 255, 0.7);
    box-shadow: 0 0 0 2px rgba(45, 212, 191, 0.35);
}

.dialpad-scroll-body {
    flex: 1;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-bottom: 2rem;
}

.dialpad-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.85rem;
}

.dialpad-summary-card {
    background: var(--bg-card, #1e293b);
    border: 1px solid var(--border, #334155);
    border-radius: 12px;
    padding: 1rem;
}

.dialpad-summary-card h3 {
    margin: 0;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary, #94a3b8);
}

.dialpad-summary-card .value {
    margin-top: 0.35rem;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary, #f8fafc);
}

.dialpad-summary-card.coming-soon .value {
    font-size: 0.95rem;
    font-weight: 600;
    color: #fbbf24;
}

.dialpad-page .stat-card {
    background: #1e293b;
    border-radius: 10px;
    padding: 0.9rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    border: 1px solid #334155;
    height: 100%;
}

.dialpad-page .stat-label {
    font-size: 0.72rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.dialpad-page .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #f1f5f9;
    line-height: 1.1;
}

.dialpad-page .stat-sub {
    font-size: 0.7rem;
    color: #64748b;
}

.dialpad-page .chart-card {
    background: #1e293b;
    border-radius: 10px;
    padding: 0.9rem 1rem;
    border: 1px solid #334155;
    height: 100%;
    min-width: 0;
    overflow: hidden;
}

.dialpad-page .chart-title {
    font-size: 0.78rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.6rem;
    font-weight: 600;
}

.dialpad-page .chart-canvas-wrap {
    position: relative;
    height: 220px;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

.dialpad-page .chart-canvas-wrap-lg {
    height: 260px;
}

.dialpad-page .row {
    --bs-gutter-x: 0.5rem;
    margin-left: 0;
    margin-right: 0;
}

.dialpad-dashboard-meta {
    margin-top: 0.85rem;
    font-size: 0.78rem;
    color: #64748b;
}

.dialpad-dashboard-empty {
    font-size: 0.85rem;
    color: #94a3b8;
    padding: 0.5rem 0;
}

.dialpad-stats-table-wrap {
    overflow-x: auto;
    max-width: 100%;
}

.dialpad-stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.84rem;
}

.dialpad-stats-table th,
.dialpad-stats-table td {
    padding: 0.55rem 0.65rem;
    border-bottom: 1px solid #334155;
    text-align: left;
    white-space: nowrap;
}

.dialpad-stats-table th {
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 0.72rem;
    font-weight: 600;
}

.dialpad-stats-table th.num,
.dialpad-stats-table td.num {
    text-align: right;
}

.dialpad-stats-table tbody tr:hover {
    background: rgba(20, 184, 166, 0.08);
}

.dialpad-person-link {
    color: #5eead4;
    text-decoration: none;
    font-weight: 600;
}

.dialpad-person-link:hover {
    color: #99f6e4;
    text-decoration: underline;
}

.dialpad-person-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.dialpad-back-link {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.85rem;
}

.dialpad-back-link:hover {
    color: #e2e8f0;
}

.dialpad-person-picker {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: min(100%, 22rem);
}

.dialpad-person-picker label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #94a3b8;
}

.dialpad-person-search {
    position: relative;
}

.dialpad-person-select {
    min-width: min(100%, 22rem);
    width: 100%;
}

.dialpad-person-suggestions {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    right: 0;
    z-index: 20;
    max-height: 260px;
    overflow-y: auto;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(2, 6, 23, 0.45);
}

.dialpad-person-suggestion {
    display: block;
    width: 100%;
    text-align: left;
    background: transparent;
    border: 0;
    color: #e2e8f0;
    padding: 0.65rem 0.8rem;
    font-size: 0.88rem;
    cursor: pointer;
}

.dialpad-person-suggestion:hover,
.dialpad-person-suggestion.active {
    background: rgba(20, 184, 166, 0.16);
    color: #5eead4;
}

.dialpad-person-suggestion.empty {
    color: #94a3b8;
    cursor: default;
}

.dialpad-page .stat-value.dialpad-stat-phone {
    font-size: 1.05rem;
    line-height: 1.25;
    word-break: break-word;
}

.dialpad-panel {
    background: var(--bg-card, #1e293b);
    border: 1px solid var(--border, #334155);
    border-radius: 14px;
    overflow: hidden;
}

.dialpad-alert {
    padding: 0.85rem 1rem;
    border-radius: 10px;
    background: rgba(20, 184, 166, 0.12);
    border: 1px solid rgba(45, 212, 191, 0.35);
    color: var(--text-primary, #f8fafc);
}

.dialpad-alert-error {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(248, 113, 113, 0.35);
}

.dialpad-table-page-body {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding-bottom: 0;
}

.dialpad-panel-table {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.dialpad-table-layout {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.dialpad-table-layout-fixed {
    flex: 1;
    min-height: 0;
}

.dialpad-table-layout-fixed .dialpad-table-shell {
    flex: 1;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.dialpad-panel-table .dialpad-table-shell {
    padding-top: 0;
}

.dialpad-table-layout-fixed .dialpad-table-meta {
    flex-shrink: 0;
}

.dialpad-table-shell {
    overflow-x: auto;
}

.dialpad-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.84rem;
}

.dialpad-table th,
.dialpad-table td {
    padding: 0.55rem 0.7rem;
    border-bottom: 1px solid var(--border, #334155);
    text-align: left;
    vertical-align: top;
    white-space: nowrap;
}

.dialpad-table th {
    color: var(--text-secondary, #94a3b8);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 0.72rem;
}

.dialpad-table-layout-fixed .dialpad-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--bg-secondary, #0f172a);
}

.dialpad-table tbody tr:hover {
    background: rgba(20, 184, 166, 0.08);
}

.dialpad-table-meta {
    padding: 0.65rem 1rem;
    font-size: 0.78rem;
    color: var(--text-secondary, #94a3b8);
}

.dialpad-table-layout-fixed .dialpad-table-shell-hours-grouped {
    overflow-x: hidden;
}

.dialpad-table-hours-grouped {
    table-layout: fixed;
    width: 100%;
    max-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.dialpad-table-hours-grouped th,
.dialpad-table-hours-grouped td {
    box-sizing: border-box;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    max-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dialpad-table-hours-grouped [data-column="ID"] {
    padding-left: 0.35rem;
    padding-right: 0.2rem;
}

.dialpad-table-hours-grouped [data-column="DIALPAD_ID"] {
    padding-left: 0.2rem;
    padding-right: 0.35rem;
}

.dialpad-table-hours-grouped [data-column="RING_SECONDS"] {
    padding-left: 0.3rem;
    padding-right: 0.2rem;
}

.dialpad-table-hours-grouped [data-column="MONDAY_HOURS"] {
    padding-left: 0.2rem;
    padding-right: 0;
    font-size: 0.78rem;
}

.dialpad-table-hours-grouped [data-column="TUESDAY_HOURS"],
.dialpad-table-hours-grouped [data-column="WEDNESDAY_HOURS"],
.dialpad-table-hours-grouped [data-column="THURSDAY_HOURS"],
.dialpad-table-hours-grouped [data-column="FRIDAY_HOURS"],
.dialpad-table-hours-grouped [data-column="SATURDAY_HOURS"],
.dialpad-table-hours-grouped [data-column="SUNDAY_HOURS"] {
    padding-left: 15px;
    padding-right: 0;
    font-size: 0.78rem;
}

.dialpad-table-hours-grouped thead.dialpad-table-head-grouped .dialpad-th-spacer {
    padding: 0;
    border-bottom: none;
}

.dialpad-table-hours-grouped thead.dialpad-table-head-grouped .dialpad-th-group {
    text-align: center;
    border-bottom: 1px solid var(--border, #334155);
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
}

.dialpad-table-hours-grouped thead.dialpad-table-head-grouped tr:nth-child(2) th {
    font-size: 0.72rem;
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
    vertical-align: bottom;
}

.dialpad-table-hours-grouped thead.dialpad-table-head-grouped .dialpad-th-sub {
    font-size: inherit;
    padding-top: inherit;
    padding-bottom: inherit;
}

.dialpad-table-layout-fixed .dialpad-table-hours-grouped thead.dialpad-table-head-grouped {
    position: sticky;
    top: 0;
    z-index: 3;
    background: var(--bg-secondary, #0f172a);
}

.dialpad-table-layout-fixed .dialpad-table-hours-grouped thead.dialpad-table-head-grouped th {
    position: static;
    top: auto;
    background: var(--bg-secondary, #0f172a);
}

.dialpad-table-layout-fixed .dialpad-table-shell-users {
    overflow-x: hidden;
}

.dialpad-table-users {
    table-layout: fixed;
    width: 100%;
    max-width: 100%;
}

.dialpad-table-users th,
.dialpad-table-users td {
    box-sizing: border-box;
    max-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0.55rem 0.4rem;
}

.dialpad-table-users [data-column="ID"] {
    width: 3.75rem;
    min-width: 3.75rem;
    max-width: 3.75rem;
}

.dialpad-table-users [data-column="DIALPAD_ID"] {
    width: 10.5rem;
    min-width: 10.5rem;
    max-width: 10.5rem;
}

.dialpad-table-users [data-column="EXTENSION"] {
    width: 3.75rem;
    min-width: 3.75rem;
    max-width: 3.75rem;
}

.dialpad-table-users [data-column="JOB_TITLE"] {
    width: 22rem;
    min-width: 22rem;
    max-width: 22rem;
}

.dialpad-table-users [data-column="PHONE_NUMBERS"] {
    width: 9.5rem;
    min-width: 9.5rem;
    max-width: 9.5rem;
}
