/* ==========================================================================
   PMN Dashboard Statistics — KPI Cards
   ========================================================================== */

.pmnds-kpi-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 200px;
}

.pmnds-kpi-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.pmnds-kpi-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pmnds-kpi-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--pmnds-accent, #4F46E5) 12%, transparent);
    flex-shrink: 0;
}

.pmnds-kpi-icon svg {
    width: 22px;
    height: 22px;
}

.pmnds-kpi-title {
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    line-height: 1.3;
}

.pmnds-kpi-value {
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
}

.pmnds-kpi-trend {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
}

.pmnds-kpi-trend--up { color: #059669; }
.pmnds-kpi-trend--down { color: #DC2626; }
.pmnds-kpi-trend--flat { color: #9ca3af; }

.pmnds-kpi-arrow { font-size: 11px; }
.pmnds-kpi-pct { font-weight: 600; }
.pmnds-kpi-period-label { color: #9ca3af; font-weight: 400; }

/* ==========================================================================
   Chart Cards
   ========================================================================== */

.pmnds-chart-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
}

.pmnds-chart-title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 16px;
    line-height: 1.3;
}

.pmnds-chart-container {
    position: relative;
    width: 100%;
}

.pmnds-chart-container canvas {
    width: 100% !important;
}

/* ==========================================================================
   Data Tables
   ========================================================================== */

.pmnds-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.pmnds-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.pmnds-table thead th {
    text-align: left;
    padding: 10px 12px;
    font-weight: 600;
    color: #6b7280;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #e5e7eb;
    white-space: nowrap;
}

.pmnds-table tbody td {
    padding: 10px 12px;
    color: #374151;
    border-bottom: 1px solid #f3f4f6;
}

.pmnds-table tbody tr:last-child td {
    border-bottom: none;
}

.pmnds-table tbody tr:hover {
    background: #f9fafb;
}

.pmnds-table-rank {
    width: 40px;
    text-align: center !important;
    color: #9ca3af !important;
    font-weight: 500;
}

.pmnds-table-empty {
    text-align: center;
    padding: 24px 12px !important;
    color: #9ca3af;
}

/* ==========================================================================
   Customer Stats Grid
   ========================================================================== */

.pmnds-customer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    text-align: center;
}

.pmnds-customer-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 8px;
    background: #f9fafb;
    border-radius: 8px;
}

.pmnds-customer-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
}

.pmnds-customer-label {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

/* ==========================================================================
   Activity Feed
   ========================================================================== */

.pmnds-activity-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-height: 500px;
    overflow-y: auto;
}

.pmnds-activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

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

.pmnds-activity-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 5px;
}

.pmnds-activity-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.pmnds-activity-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

.pmnds-activity-title {
    font-size: 14px;
    color: #1f2937;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 300px;
}

.pmnds-activity-author {
    font-size: 12px;
    color: #9ca3af;
}

.pmnds-activity-time {
    font-size: 12px;
    color: #9ca3af;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ==========================================================================
   Date Filter
   ========================================================================== */

.pmnds-date-filter {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
    margin-bottom: 24px;
}

.pmnds-date-filter-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.pmnds-date-filter-icon {
    color: #4F46E5;
    display: flex;
    align-items: center;
}

.pmnds-date-filter-title {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
}

.pmnds-date-filter-body {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.pmnds-date-filter-presets {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.pmnds-filter-btn {
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #ffffff;
    color: #374151;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    line-height: 1.4;
}

.pmnds-filter-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.pmnds-filter-btn--active {
    background: #4F46E5;
    color: #ffffff;
    border-color: #4F46E5;
}

.pmnds-filter-btn--active:hover {
    background: #4338CA;
    border-color: #4338CA;
}

.pmnds-filter-btn--apply {
    background: #059669;
    color: #ffffff;
    border-color: #059669;
}

.pmnds-filter-btn--apply:hover {
    background: #047857;
    border-color: #047857;
}

.pmnds-date-filter-custom {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.pmnds-date-separator {
    color: #9ca3af;
    font-size: 14px;
}

.pmnds-date-input {
    padding: 6px 10px;
    font-size: 13px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    color: #374151;
    background: #ffffff;
    line-height: 1.4;
    width: 140px;
}

.pmnds-date-input:focus {
    outline: none;
    border-color: #4F46E5;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.15);
}

.pmnds-date-filter-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 13px;
    color: #6b7280;
}

.pmnds-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #e5e7eb;
    border-top-color: #4F46E5;
    border-radius: 50%;
    animation: pmnds-spin 0.6s linear infinite;
}

@keyframes pmnds-spin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   Booking List — Filter Bar
   ========================================================================== */

.pmnds-booking-filter {
    margin-bottom: 16px;
}

.pmnds-booking-filter-row {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}

.pmnds-booking-filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pmnds-booking-filter-group label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.pmnds-booking-filter-dates {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pmnds-booking-filter-group select {
    padding: 6px 10px;
    font-size: 13px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    color: #374151;
    background: #ffffff;
    line-height: 1.4;
    min-width: 120px;
}

.pmnds-booking-filter-group select:focus {
    outline: none;
    border-color: #4F46E5;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.15);
}

.pmnds-booking-filter-search {
    flex: 1;
    min-width: 200px;
}

.pmnds-booking-filter-search-row {
    display: flex;
    gap: 6px;
}

.pmnds-booking-filter-search-row input {
    flex: 1;
    padding: 6px 10px;
    font-size: 13px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    color: #374151;
    background: #ffffff;
    line-height: 1.4;
}

.pmnds-booking-filter-search-row input:focus {
    outline: none;
    border-color: #4F46E5;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.15);
}

/* ==========================================================================
   Booking List — Status & Payment Badges
   ========================================================================== */

.pmnds-status-badge,
.pmnds-payment-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}

/* ==========================================================================
   Booking List — Pagination
   ========================================================================== */

.pmnds-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
    flex-wrap: wrap;
}

.pmnds-pagination-info {
    font-size: 13px;
    color: #6b7280;
}

.pmnds-pagination-buttons {
    display: flex;
    gap: 4px;
}

.pmnds-page-btn {
    padding: 5px 12px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #ffffff;
    color: #374151;
    cursor: pointer;
    transition: all 0.15s ease;
    line-height: 1.4;
}

.pmnds-page-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.pmnds-page-btn--active {
    background: #4F46E5;
    color: #ffffff;
    border-color: #4F46E5;
}

.pmnds-page-btn--active:hover {
    background: #4338CA;
    border-color: #4338CA;
}

/* ==========================================================================
   Booking List — Title with Icon
   ========================================================================== */

.pmnds-booking-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pmnds-booking-title-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pmnds-booking-title-icon svg {
    width: 20px;
    height: 20px;
}

/* ==========================================================================
   Booking List — Summary Cards
   ========================================================================== */

.pmnds-booking-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.pmnds-booking-summary-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 16px 8px;
    background: #f9fafb;
    border-radius: 10px;
    text-align: center;
}

.pmnds-booking-summary-value {
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
}

.pmnds-booking-summary-label {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

/* ==========================================================================
   Booking List — Status Breakdown Row
   ========================================================================== */

.pmnds-booking-status-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
    padding: 10px 14px;
    background: #f9fafb;
    border-radius: 8px;
}

.pmnds-booking-status-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
}

.pmnds-booking-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

/* ==========================================================================
   Booking List — Expand/Collapse Button
   ========================================================================== */

.pmnds-booking-list-container {
    position: relative;
}

.pmnds-booking-expand {
    position: absolute;
    top: 20px;
    right: 24px;
}

.pmnds-booking-expand-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 600;
    color: #4F46E5;
    background: transparent;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.pmnds-booking-expand-btn:hover {
    background: #EEF2FF;
    border-color: #C7D2FE;
}

.pmnds-booking-expand-btn--open {
    color: #6b7280;
}

.pmnds-booking-expand-arrow {
    font-size: 14px;
    line-height: 1;
}

/* ==========================================================================
   Booking List — Detail Area
   ========================================================================== */

.pmnds-booking-detail {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

/* ==========================================================================
   Booking List — Loading State
   ========================================================================== */

.pmnds-booking-list-content {
    transition: opacity 0.2s ease;
}

.pmnds-booking-list-content.pmnds-loading {
    opacity: 0.45;
    pointer-events: none;
}

/* Shortcode Wrapper — Loading State */

.pmnds-shortcode-wrap {
    transition: opacity 0.2s ease;
}

.pmnds-shortcode-wrap.pmnds-loading {
    opacity: 0.45;
    pointer-events: none;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .pmnds-kpi-card {
        padding: 18px;
        gap: 10px;
    }

    .pmnds-kpi-value { font-size: 28px; }

    .pmnds-kpi-icon {
        width: 36px;
        height: 36px;
    }

    .pmnds-kpi-icon svg {
        width: 18px;
        height: 18px;
    }

    .pmnds-kpi-title { font-size: 13px; }
    .pmnds-kpi-trend { font-size: 12px; }

    .pmnds-chart-card { padding: 16px; }
    .pmnds-chart-title { font-size: 15px; }

    .pmnds-customer-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .pmnds-customer-value { font-size: 24px; }

    .pmnds-activity-title { max-width: 180px; }
    .pmnds-activity-time { display: none; }

    .pmnds-date-filter-body {
        flex-direction: column;
        align-items: stretch;
    }

    .pmnds-date-filter-custom {
        margin-left: 0;
        flex-wrap: wrap;
    }

    .pmnds-date-input { width: 120px; }

    .pmnds-booking-filter-row {
        flex-direction: column;
        align-items: stretch;
    }

    .pmnds-booking-filter-search {
        min-width: 0;
    }

    .pmnds-pagination {
        flex-direction: column;
        align-items: center;
    }

    .pmnds-booking-summary {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .pmnds-booking-summary-value { font-size: 24px; }

    .pmnds-booking-status-row {
        gap: 8px;
    }

    .pmnds-booking-expand {
        position: static;
        text-align: center;
        margin-top: 12px;
    }
}

@media (max-width: 480px) {
    .pmnds-kpi-card {
        padding: 14px;
        border-radius: 10px;
    }

    .pmnds-kpi-value { font-size: 24px; }

    .pmnds-chart-card {
        padding: 12px;
        border-radius: 10px;
    }

    .pmnds-table { font-size: 13px; }
    .pmnds-table thead th { padding: 8px; font-size: 11px; }
    .pmnds-table tbody td { padding: 8px; }
}
