/* ─────────────────────────────────────────
   Shell
───────────────────────────────────────── */
.production-meeting-shell {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 3rem;
    font-family: var(--pm-font-ui);
}

/* ─────────────────────────────────────────
   Page header
───────────────────────────────────────── */
.pm-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.pm-page-header-left h1 {
    font-family: var(--pm-font-ui);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--pm-text);
    margin: 0 0 0.15rem;
    letter-spacing: -0.01em;
}

.pm-page-header-left p {
    font-size: 0.85rem;
    color: var(--pm-muted);
    margin: 0;
}

/* ─────────────────────────────────────────
   Sync / toolbar bar
───────────────────────────────────────── */
.pm-sync-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    background: var(--pm-surface);
    border: 1px solid var(--pm-border);
    border-radius: 0.5rem;
    padding: 0.6rem 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
}

.pm-sync-bar--stale {
    border-color: #ffc107;
    background: #fffdf0;
}

.pm-sync-bar-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.2rem 0.75rem;
}

.pm-sync-refreshed {
    font-family: var(--pm-font-data);
    font-size: 0.75rem;
    color: var(--pm-text);
    font-weight: 500;
    padding-right: 0.5rem;
    border-right: 1px solid var(--pm-border);
}

.pm-sync-source {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--pm-muted);
}

.pm-sync-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--pm-color-teal);
    flex-shrink: 0;
}

.pm-sync-dot--stale {
    background: #ffc107;
}

.pm-sync-source-label {
    font-weight: 600;
    color: var(--pm-text);
}

.pm-sync-source-time {
    font-family: var(--pm-font-data);
    font-size: 0.72rem;
}

.pm-sync-bar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.pm-sync-bar-actions .btn {
    font-family: var(--pm-font-ui);
    font-size: 0.8rem;
    border-radius: 999px;
    padding: 0.3rem 0.9rem;
    line-height: 1.4;
}

.pm-sync-bar-actions .btn-primary {
    background: var(--pm-color-pink);
    border-color: var(--pm-color-pink);
}

.pm-sync-bar-actions .btn-primary:hover:not(:disabled) {
    background: #b36b93;
    border-color: #b36b93;
}

.pm-sync-message {
    font-size: 0.78rem;
    padding: 0.25rem 0.6rem;
    border-radius: 0.35rem;
    font-family: var(--pm-font-ui);
}

.pm-sync-message.alert-info    { background: #e8f4f8; color: #0c5460; border: 1px solid #bee5eb; }
.pm-sync-message.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.pm-sync-message.alert-danger  { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.pm-sync-message.alert-warning { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }

/* ─────────────────────────────────────────
   Summary / stat cards
───────────────────────────────────────── */
.production-meeting-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.production-meeting-stat {
    background: var(--pm-surface);
    border: 1px solid var(--pm-border);
    border-top: 3px solid transparent;
    border-radius: 0.5rem;
    padding: 0.85rem 1.1rem;
    min-width: 150px;
    flex: 1 1 0;
}

.production-meeting-stat:nth-child(1) { border-top-color: var(--pm-color-teal); }
.production-meeting-stat:nth-child(2) { border-top-color: var(--pm-color-red); }
.production-meeting-stat:nth-child(3) { border-top-color: var(--pm-color-pink); }
.production-meeting-stat:nth-child(4) { border-top-color: var(--pm-color-gray); }

.production-meeting-stat-value {
    font-family: var(--pm-font-data);
    font-size: 1.7rem;
    font-weight: 600;
    line-height: 1.1;
    color: var(--pm-text);
    letter-spacing: -0.02em;
    margin-bottom: 0.25rem;
}

.production-meeting-stat-value.pm-stat-overdue {
    color: var(--pm-color-red);
}

.production-meeting-stat-label {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--pm-muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.production-meeting-stat-label::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.production-meeting-stat:nth-child(1) .production-meeting-stat-label::before { background: var(--pm-color-teal); }
.production-meeting-stat:nth-child(2) .production-meeting-stat-label::before { background: var(--pm-color-red); }
.production-meeting-stat:nth-child(3) .production-meeting-stat-label::before { background: var(--pm-color-pink); }
.production-meeting-stat:nth-child(4) .production-meeting-stat-label::before { background: var(--pm-color-gray); }

/* ─────────────────────────────────────────
   Section heading row (label + expand/collapse)
───────────────────────────────────────── */
.pm-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.6rem;
}

.pm-section-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--pm-muted);
}

.pm-expand-controls {
    display: flex;
    align-items: center;
    gap: 0.1rem;
}

.pm-expand-btn {
    background: none;
    border: none;
    padding: 0.15rem 0.4rem;
    font-size: 0.75rem;
    color: var(--pm-muted);
    cursor: pointer;
    font-family: var(--pm-font-ui);
    border-radius: 0.25rem;
    transition: color 0.12s, background 0.12s;
}

.pm-expand-btn:hover { color: var(--pm-text); background: var(--pm-border); }

.pm-expand-sep {
    color: var(--pm-border);
    font-size: 0.75rem;
    user-select: none;
}

/* ─────────────────────────────────────────
   Client card
───────────────────────────────────────── */
.production-meeting-client {
    background: var(--pm-surface);
    border: 1px solid var(--pm-border);
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    overflow: hidden;
    transition: border-color 0.15s;
}

.production-meeting-client:hover {
    border-color: #c8cdd4;
}

.production-meeting-client-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    transition: background 0.12s;
}

.production-meeting-client-header:hover {
    background: #f8f9fa;
}

/* Rotating chevron */
.pm-client-chevron {
    flex-shrink: 0;
    font-size: 0.7rem;
    color: var(--pm-muted);
    transition: transform 0.18s ease;
}

.production-meeting-client-header[aria-expanded="true"] .pm-client-chevron {
    transform: rotate(90deg);
}

/* 3-column grid inside button */
.pm-client-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 0.5rem 1.25rem;
    width: 100%;
    align-items: center;
}

/* Left: name + badges */
.pm-client-left {
    min-width: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.55rem;
}

.pm-client-logo {
    width: 22px;
    height: 22px;
    object-fit: contain;
    border-radius: 3px;
    flex-shrink: 0;
}

.pm-client-left-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.pm-client-name-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.pm-client-ids {
    font-family: var(--pm-font-mono);
    font-size: 0.68rem;
    color: var(--pm-text-muted);
    letter-spacing: 0.01em;
    margin-top: 0.15rem;
}

.production-meeting-client-name {
    font-family: var(--pm-font-ui);
    font-weight: 600;
    font-size: 0.975rem;
    color: var(--pm-text);
    letter-spacing: -0.005em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 18rem;
}

.pm-task-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-family: var(--pm-font-data);
    font-weight: 500;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.pm-task-badge--tasks {
    background: #e9ecef;
    color: #495057;
    border: 1px solid #ced4da;
}

.pm-task-badge--overdue {
    background: #fef4f4;
    color: #c0392b;
    border: 1px solid #f5c6cb;
}

.pm-task-badge--internal {
    background: #eef5e8;
    color: #4a7a2e;
    border: 1px solid #b8d9a0;
}

/* Internal company card */
.production-meeting-client.pm-client-internal {
    background: #f6faf2;
    border-color: #b8d9a0;
}

.production-meeting-client.pm-client-internal .production-meeting-client-header {
    border-left: 3px solid #A3C18A;
}

.production-meeting-client.pm-client-internal:hover {
    border-color: #A3C18A;
}

.production-meeting-client-meta {
    font-size: 0.75rem;
    color: var(--pm-muted);
    margin-top: 0.1rem;
    font-style: italic;
}

/* Center: clock */
.pm-client-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    min-width: 0;
}

.pm-clock-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.pm-clock-icon {
    font-size: 0.75rem;
    color: var(--pm-muted);
    flex-shrink: 0;
}

.production-meeting-flipclock-wrap {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
}

.production-meeting-flipclock-day {
    font-family: var(--pm-font-ui);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--pm-muted);
    line-height: 1;
}

.production-meeting-flipclock {
    display: inline-flex;
    justify-content: center;
    line-height: 1;
}

/* FlipClock IBM Plex Mono override */
.production-meeting-flipclock * {
    font-family: var(--pm-font-data) !important;
}

.production-meeting-flipclock .flip-clock {
    gap: 0.12rem;
}

.production-meeting-flipclock .flip-clock-divider {
    font-size: 0.85em;
}

.pm-tz-badge {
    font-family: var(--pm-font-data);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #495057;
    background: #f1f3f5;
    border: 1px solid var(--pm-border);
    border-radius: 0.2rem;
    padding: 0.1rem 0.35rem;
    line-height: 1.2;
}

.pm-client-local-time-text {
    font-size: 0.78rem;
    color: var(--pm-muted);
    font-style: italic;
    text-align: center;
    max-width: 13rem;
}

/* Right: address */
.pm-client-right {
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
    justify-content: flex-end;
    min-width: 0;
}

.pm-location-icon {
    font-size: 0.72rem;
    color: var(--pm-muted);
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.production-meeting-client-address {
    font-size: 0.78rem;
    color: var(--pm-muted);
    line-height: 1.35;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 14rem;
}

.production-meeting-client-address--unset {
    font-style: italic;
}

/* ─────────────────────────────────────────
   Client body / task lists
───────────────────────────────────────── */
.production-meeting-client-body {
    border-top: 1px solid var(--pm-border);
}

.production-meeting-tasklist-groups {
    background: #f8f9fa;
}

.production-meeting-tasklist-group + .production-meeting-tasklist-group {
    border-top: 1px solid var(--pm-border);
}

.production-meeting-tasklist-group-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.55rem 1rem 0.55rem 2rem;
    border: none;
    background: transparent;
    text-align: left;
    cursor: pointer;
    transition: background 0.12s;
    border-left: 3px solid var(--pm-color-sage);
}

.production-meeting-tasklist-group-header:hover {
    background: #eef0f3;
}

.production-meeting-tasklist-group-title {
    font-family: var(--pm-font-ui);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--pm-text);
}

.production-meeting-tasklist-group-header .badge {
    font-family: var(--pm-font-data);
    font-size: 0.65rem;
    padding: 0.2rem 0.45rem;
    border-radius: 999px;
}

.production-meeting-tasklist-group-chevron {
    margin-left: auto;
    color: var(--pm-muted);
    font-size: 0.7rem;
}

.production-meeting-tasklist-group-body {
    background: var(--pm-surface);
    padding-left: 2rem;
    border-left: 3px solid #e2e8e7;
    margin-left: 1.25rem;
}

/* ─────────────────────────────────────────
   Task table
───────────────────────────────────────── */
.production-meeting-task-table {
    margin-bottom: 0;
    font-size: 0.85rem;
    font-family: var(--pm-font-ui);
}

.production-meeting-task-table th {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--pm-muted);
    white-space: nowrap;
    padding: 0.5rem 0.75rem;
    border-bottom-width: 1px;
}

.production-meeting-task-table td {
    padding: 0.45rem 0.75rem;
    vertical-align: middle;
    font-size: 0.85rem;
    color: var(--pm-text);
}

.production-meeting-task-table td:nth-child(3) {
    font-family: var(--pm-font-data);
    font-size: 0.78rem;
}

.production-meeting-task-table .badge {
    font-family: var(--pm-font-ui);
    font-size: 0.67rem;
}

/* ─────────────────────────────────────────
   Empty states
───────────────────────────────────────── */
.production-meeting-empty {
    padding: 1rem 1.25rem;
    color: var(--pm-muted);
    font-size: 0.875rem;
}

/* ─────────────────────────────────────────
   Archived accordion
───────────────────────────────────────── */
.production-meeting-archived-accordion {
    margin-top: 2rem;
    border: 1px solid var(--pm-border);
    border-radius: 0.5rem;
    background: var(--pm-surface);
    overflow: hidden;
}

.production-meeting-archived-accordion-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    background: #f1f3f5;
    text-align: left;
    cursor: pointer;
    transition: background 0.12s;
}

.production-meeting-archived-accordion-header:hover {
    background: #e9ecef;
}

.production-meeting-archived-accordion-title {
    font-family: var(--pm-font-ui);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--pm-text);
}

.production-meeting-archived-accordion-meta {
    flex: 1 1 auto;
    font-size: 0.8rem;
    color: var(--pm-muted);
}

.production-meeting-archived-accordion-chevron {
    margin-left: auto;
    color: var(--pm-muted);
}

.production-meeting-archived-accordion-body {
    padding: 1rem;
}

/* ─────────────────────────────────────────
   Responsive
───────────────────────────────────────── */
@media (max-width: 900px) {
    .pm-client-grid {
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
    }

    .pm-client-left  { grid-column: 1; grid-row: 1; }
    .pm-client-center { grid-column: 2; grid-row: 1; }
    .pm-client-right  { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; }
}

@media (max-width: 600px) {
    .pm-client-grid {
        grid-template-columns: 1fr;
    }

    .pm-client-center, .pm-client-right {
        grid-column: 1;
        align-items: flex-start;
        justify-content: flex-start;
    }

    .production-meeting-client-address {
        text-align: left;
    }
}
