/* ============================================
   INSURANCE CLAIMS DASHBOARD
   Multi-claim management interface
   ============================================ */

/* Dashboard container */
#insDashboardContainer {
    min-height: 100vh;
    background: linear-gradient(180deg, #0a0a0f 0%, #0d0d14 100%);
    padding: 40px 20px;
}

.ins-dash-content {
    max-width: 1100px;
    margin: 0 auto;
}

/* ---- Header ---- */
.ins-dash-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    gap: 16px;
}

.ins-dash-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.ins-dash-back-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.ins-dash-back-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.2);
}

.ins-dash-back-btn svg {
    width: 14px;
    height: 14px;
}

.ins-dash-title {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    line-height: 1.2;
}

.ins-dash-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.45);
    margin: 4px 0 0 0;
}

.ins-dash-new-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #4384ff, #7b42ff);
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    white-space: nowrap;
}

.ins-dash-new-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(67, 132, 255, 0.35);
}

.ins-dash-new-btn:active {
    transform: translateY(0);
}

.ins-dash-new-btn svg {
    width: 16px;
    height: 16px;
}

/* ---- Stats Bar ---- */
.ins-dash-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    align-items: stretch;
}

.ins-dash-stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 20px 24px;
    min-width: 130px;
    text-align: center;
}

.ins-dash-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.1;
}

.ins-dash-stat-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ins-dash-stat-total .ins-dash-stat-value {
    color: #a78bfa;
}

.ins-dash-stat-score .ins-dash-stat-value {
    color: #34d399;
}

.ins-dash-stat-attention .ins-dash-stat-value {
    color: #f59e0b;
}

.ins-dash-stat-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    align-content: center;
}

.ins-dash-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    color: var(--badge-color);
    background: color-mix(in srgb, var(--badge-color) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--badge-color) 25%, transparent);
    white-space: nowrap;
}

.ins-dash-badge strong {
    font-weight: 700;
}

/* ---- Filter Bar ---- */
.ins-dash-filters {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.ins-dash-filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ins-dash-select {
    padding: 9px 32px 9px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23888' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: border-color 0.2s;
}

.ins-dash-select:hover {
    border-color: rgba(255, 255, 255, 0.25);
}

.ins-dash-select:focus {
    outline: none;
    border-color: #4384ff;
    box-shadow: 0 0 0 2px rgba(67, 132, 255, 0.2);
}

.ins-dash-select option {
    background: #1a1a2e;
    color: #e0e0ff;
}

.ins-dash-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.ins-dash-search-wrap svg {
    position: absolute;
    left: 12px;
    width: 14px;
    height: 14px;
    color: rgba(255, 255, 255, 0.35);
    pointer-events: none;
}

.ins-dash-search {
    padding: 9px 14px 9px 34px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    width: 220px;
    transition: border-color 0.2s, width 0.3s;
}

.ins-dash-search::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.ins-dash-search:focus {
    outline: none;
    border-color: #4384ff;
    box-shadow: 0 0 0 2px rgba(67, 132, 255, 0.2);
    width: 280px;
}

.ins-dash-sort-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ins-dash-sort-select {
    min-width: 140px;
}

.ins-dash-sort-dir {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.2s;
}

.ins-dash-sort-dir:hover {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
}

/* ---- Claim Cards ---- */
.ins-dash-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ins-dash-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-left: 3px solid var(--status-color, #6b7280);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.ins-dash-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateX(2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.ins-dash-card-left {
    flex: 1;
    min-width: 0;
}

.ins-dash-card-type {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.ins-dash-type-icon {
    font-size: 16px;
}

.ins-dash-type-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 600;
}

.ins-dash-card-ref {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ins-dash-card-summary {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ins-dash-card-center {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    min-width: 200px;
}

.ins-dash-card-status {
    display: flex;
    align-items: center;
}

/* ---- Status Badge ---- */
.ins-dash-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--badge-color);
    background: color-mix(in srgb, var(--badge-color) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--badge-color) 25%, transparent);
}

.ins-dash-status-badge svg {
    width: 12px;
    height: 12px;
}

/* ---- Score Bar ---- */
.ins-dash-card-score {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.ins-dash-score-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
}

.ins-dash-score-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease-out;
}

.ins-dash-score--high .ins-dash-score-fill,
.ins-dash-score-fill.ins-dash-score--high {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.ins-dash-score--medium .ins-dash-score-fill,
.ins-dash-score-fill.ins-dash-score--medium {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.ins-dash-score--low .ins-dash-score-fill,
.ins-dash-score-fill.ins-dash-score--low {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

.ins-dash-score-label {
    font-size: 13px;
    font-weight: 600;
    min-width: 42px;
    text-align: right;
}

.ins-dash-score-label.ins-dash-score--high {
    color: #34d399;
}

.ins-dash-score-label.ins-dash-score--medium {
    color: #fbbf24;
}

.ins-dash-score-label.ins-dash-score--low {
    color: #f87171;
}

.ins-dash-score-label.ins-dash-score--none {
    color: rgba(255, 255, 255, 0.3);
    font-weight: 400;
    font-size: 12px;
}

/* ---- Card Meta ---- */
.ins-dash-card-meta {
    display: flex;
    align-items: center;
    gap: 14px;
}

.ins-dash-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.35);
}

.ins-dash-meta-item svg {
    width: 12px;
    height: 12px;
}

/* ---- Card Actions ---- */
.ins-dash-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.ins-dash-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.2s;
}

.ins-dash-action-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.2);
}

.ins-dash-action-view:hover {
    color: #4384ff;
    border-color: rgba(67, 132, 255, 0.3);
}

.ins-dash-action-delete:hover {
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.3);
}

.ins-dash-action-btn svg {
    width: 14px;
    height: 14px;
}

.ins-dash-action-status {
    padding: 6px 24px 6px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23666' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    transition: all 0.2s;
}

.ins-dash-action-status:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background-color: rgba(255, 255, 255, 0.06);
}

.ins-dash-action-status option {
    background: #1a1a2e;
    color: #e0e0ff;
}

/* ---- Empty State ---- */
.ins-dash-empty {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.4);
}

.ins-dash-empty-icon {
    margin-bottom: 16px;
}

.ins-dash-empty-icon svg {
    width: 48px;
    height: 48px;
    opacity: 0.3;
}

.ins-dash-empty h3 {
    font-size: 18px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 8px 0;
}

.ins-dash-empty p {
    font-size: 14px;
    margin: 0 0 24px 0;
}

.ins-dash-empty-btn {
    margin: 0 auto;
}

/* ---- Pagination ---- */
.ins-dash-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 24px;
    padding: 16px 0;
}

.ins-dash-page-info {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
}

.ins-dash-page-controls {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ins-dash-page-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.ins-dash-page-btn:hover:not([disabled]) {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.ins-dash-page-btn.active {
    background: linear-gradient(135deg, #4384ff, #7b42ff);
    color: #fff;
    border-color: transparent;
    font-weight: 600;
}

.ins-dash-page-btn[disabled] {
    opacity: 0.3;
    cursor: not-allowed;
}

.ins-dash-page-btn svg {
    width: 14px;
    height: 14px;
}

.ins-dash-page-ellipsis {
    padding: 0 6px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 13px;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    #insDashboardContainer {
        padding: 20px 12px;
    }

    .ins-dash-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .ins-dash-header-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .ins-dash-new-btn {
        width: 100%;
        justify-content: center;
    }

    .ins-dash-stats {
        flex-direction: column;
    }

    .ins-dash-stat-card {
        min-width: auto;
    }

    .ins-dash-stat-badges {
        justify-content: center;
    }

    .ins-dash-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .ins-dash-filter-group {
        flex-wrap: wrap;
    }

    .ins-dash-select,
    .ins-dash-search {
        flex: 1;
        min-width: 0;
    }

    .ins-dash-search:focus {
        width: auto;
    }

    .ins-dash-card {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .ins-dash-card-center {
        min-width: auto;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 12px;
    }

    .ins-dash-card-score {
        flex: 1;
        min-width: 120px;
    }

    .ins-dash-card-actions {
        justify-content: flex-end;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
        padding-top: 12px;
    }

    .ins-dash-pagination {
        flex-direction: column;
        gap: 12px;
    }
}
