/* [file name]: dashboard-fragment.css - FULLY UPDATED */
.db-fragment-wrapper { padding: 25px 15px; }

/* Section Header: Big & Bold */
.db-sec-head { 
    background: #0A66C2; color: white; padding: 20px 25px; 
    border-radius: 18px 18px 0 0; display: flex; justify-content: space-between; 
    align-items: center; font-size: 1.15rem; font-weight: 800;
}

/* Summary Items: Vertical Layout Fixed */
.db-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; padding: 20px; background: white; border-radius: 0 0 18px 18px; margin-bottom: 25px; }
.db-stat { 
    background: #fff; padding: 10px; border-radius: 20px; border: 1px solid #e2e8f0; 
    display: flex; 
    flex-direction: column; /* FIXED: Vertical Stack */
    align-items: flex-start;
    transition: 0.3s ease; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}
.db-stat:hover { transform: translateY(-5px); border-color: #0A66C2; box-shadow: 0 15px 30px rgba(10, 102, 194, 0.1); }
.db-val { font-size: 1.45rem; font-weight: 800; color: #2d3436; line-height: 1.2; }
.db-lbl { font-size: 0.7rem; color: #718096; text-transform: uppercase; font-weight: 700; margin-top: 4px; }
.db-pay-btn { margin-top: 12px; width: 100%; padding: 8px; background: #0A66C2; color: white; border: none; border-radius: 8px; font-weight: 700; cursor: pointer; }

/* Chart Styling */
.db-chart-wrapper { padding: 40px 20px 45px 55px; position: relative; background: white; border-radius: 0 0 18px 18px; margin-bottom: 25px; }
.db-chart-bars { height: 160px; border-left: 2px solid #cbd5e0; border-bottom: 2px solid #cbd5e0; display: flex; align-items: flex-end; justify-content: space-around; }
.db-chart-wrapper::before { content: 'Amount'; position: absolute; left: 10px; top: 50%; transform: rotate(-90deg) translateY(-50%); font-size: 0.7rem; font-weight: 700; color: #94a3b8; }
.db-bar-col { display: flex; flex-direction: column; align-items: center; flex: 1; height: 100%; justify-content: flex-end; position: relative; }
.db-bar { width: 32px; border-radius: 6px 6px 0 0; transition: 0.3s; }
.db-x-label { position: absolute; bottom: -30px; font-size: 0.65rem; font-weight: 700; color: #64748b; }

/* Profile Card */
.db-profile-card { background: white; padding: 20px; border-radius: 24px; display: flex; align-items: center; box-shadow: 0 10px 25px rgba(0,0,0,0.05); margin-bottom: 25px; }
.db-avatar-ring { width: 60px; height: 60px; border-radius: 50%; padding: 3px; background: linear-gradient(45deg, #0A66C2, #4facfe); margin-right: 15px; }
.db-img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 2px solid white; }
.db-notif-box { margin-left: auto; position: relative; width: 40px; height: 40px; border-radius: 50%; background: #f0f7ff; display: flex; align-items: center; justify-content: center; color: #0A66C2; }
.db-badge { position: absolute; top: -2px; right: -2px; background: #ff4757; color: white; font-size: 0.65rem; font-weight: 800; min-width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 2px solid white; }

/* List */
.db-box { background: white; border-radius: 0 0 18px 18px; margin-bottom: 25px; }
.db-list-item { display: flex; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid #f1f5f9; transition: 0.2s; cursor: pointer; background: white; }
.db-list-item:hover { background: #f8fbff; transform: translateX(5px); box-shadow: 0 5px 15px rgba(0,0,0,0.05); border-left: 4px solid #0A66C2; margin-left: -4px; }
.db-list-item:last-child { border-bottom: none; }

.db-status { font-size: 0.65rem; font-weight: 800; padding: 3px 8px; border-radius: 5px; margin-top: 5px; display: inline-block; }
.status-overdue { background: rgba(225,112,85,0.1); color: #e17055; }
.status-pending { background: rgba(253,203,110,0.1); color: #fdcb6e; }

/* Three-column layout styles */
.db-three-col-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding: 4px 0;
    min-height: 28px;
    width: 100%;
}

.db-col-left {
    flex: 1;
    text-align: left;
    min-width: 100px;
}

.db-col-middle {
    flex: 0 0 auto;
    text-align: center;
    margin: 0 10px;
    min-width: 80px;
    display: flex;
    justify-content: center;
}

.db-col-right {
    flex: 0 0 auto;
    text-align: right;
    min-width: 100px;
    display: flex;
    justify-content: flex-end;
}

/* Status badges with color coding */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 700;
    border: 1.5px solid;
    white-space: nowrap;
}

/* Color presets for status badges */
.status-badge.ticket-status.overdue {
    background: #fef2f2 !important;
    color: #dc2626 !important;
    border-color: #fca5a5 !important;
}

.status-badge.ticket-status.pending {
    background: #fffbeb !important;
    color: #d97706 !important;
    border-color: #fcd34d !important;
}

.status-badge.config-status.full {
    background: #d1fae5 !important;
    color: #059669 !important;
    border-color: #6ee7b7 !important;
}

.status-badge.config-status.partial {
    background: #dbeafe !important;
    color: #2563eb !important;
    border-color: #93c5fd !important;
}

.status-badge.config-status.not-configured {
    background: #f1f5f9 !important;
    color: #64748b !important;
    border-color: #e2e8f0 !important;
}

/* Configure button */
.configure-btn {
    background: #f1f5f9;
    color: #64748b;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 140px;
}

.configure-btn:hover {
    background: #0A66C2;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(10, 102, 194, 0.2);
}

.configure-btn.configured {
    background: #10b981;
    color: white;
}

.configure-btn.configured:hover {
    background: #059669;
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.2);
}

/* Professional Configure Button */
.configure-btn-pro {
    background: linear-gradient(135deg, #0A66C2 0%, #1d4ed8 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 6px 20px rgba(10, 102, 194, 0.2);
    min-width: 160px;
}

.configure-btn-pro:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(10, 102, 194, 0.3);
    background: linear-gradient(135deg, #1d4ed8 0%, #0A66C2 100%);
}

.configure-btn-pro:active {
    transform: translateY(-1px);
}

/* ========== PROFESSIONAL INLINE ABSTRACT ========== */
.abstract-inline-professional {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
    padding: 12px;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    justify-content: space-between;
}

.abstract-inline-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: white;
    border-radius: 10px;
    border: 1px solid #f1f5f9;
    transition: all 0.2s ease;
    min-width: 0;
    flex: 1;
    min-width: 90px;
    max-width: 120px;
}

.abstract-inline-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.05);
    border-color: #e2e8f0;
}

.abstract-inline-item.highlight {
    background: linear-gradient(135deg, #f0f7ff 0%, #e0f2fe 100%);
    border-color: #0A66C2;
    border-width: 2px;
    flex-grow: 1.2;
}

.abstract-inline-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
    flex-shrink: 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.abstract-inline-text {
    flex: 1;
    min-width: 0;
    text-align: center;
}

.abstract-inline-value {
    font-size: 0.9rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.abstract-inline-label {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
}

/* ENHANCED CONFIGURED VIEW */
.db-list-item.configured-view {
    background: linear-gradient(135deg, #f8fbff 0%, #f0f7ff 100%);
    border-left: 5px solid #0A66C2;
}

.abstract-inline-item.configured {
    background: rgba(16, 185, 129, 0.1);
    border-color: #10b981;
}

.abstract-inline-item.partial {
    background: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
}

/* Summary line alignment */
.summary-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.summary-label {
    flex: 1;
    text-align: left;
    min-width: 70px;
}

.summary-value {
    flex: 0 0 auto;
    text-align: right;
    min-width: 100px;
}

/* Professional Abstract Design */
.abstract-container-professional {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
    margin: 8px 0;
}

.abstract-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.abstract-row:last-child {
    margin-bottom: 0;
}

.abstract-item-pro {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: white;
    border-radius: 12px;
    border: 1px solid #f1f5f9;
    transition: all 0.3s ease;
    min-width: 0;
}

.abstract-item-pro:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
    border-color: #e2e8f0;
}

.abstract-item-pro.highlight {
    background: linear-gradient(135deg, #f0f7ff 0%, #e0f2fe 100%);
    border-color: #0A66C2;
    border-width: 2px;
}

.abstract-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.abstract-text {
    flex: 1;
    min-width: 0;
}

.abstract-value {
    font-size: 0.95rem;
    font-weight: 800;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.abstract-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Fixed Abstract Grid Layout */
.abstract-grid-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.abstract-grid-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
}

.abstract-grid-item {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: white;
    border-radius: 12px;
    border: 1px solid #f1f5f9;
    min-width: 0;
}

.abstract-grid-item.highlight-fixed {
    background: linear-gradient(135deg, #f0f7ff 0%, #e0f2fe 100%);
    border-color: #0A66C2;
    border-width: 2px;
}

.abstract-icon-fixed {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
    flex-shrink: 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.abstract-text-fixed {
    flex: 1;
    min-width: 0;
}

.abstract-value-fixed {
    font-size: 0.9rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.abstract-label-fixed {
    font-size: 0.65rem;
    font-weight: 700;
    color: inherit;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* Proceed button animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% { box-shadow: 0 15px 30px rgba(10, 102, 194, 0.15); }
    50% { box-shadow: 0 15px 30px rgba(10, 102, 194, 0.25); }
    100% { box-shadow: 0 15px 30px rgba(10, 102, 194, 0.15); }
}

#dashboard-proceed-btn {
    animation: slideUp 0.3s ease-out;
}

#dashboard-proceed-btn button:enabled {
    animation: pulse 2s infinite;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .abstract-inline-professional {
        gap: 6px;
    }
    
    .abstract-inline-item {
        min-width: calc(50% - 10px);
        flex: 1 1 calc(50% - 10px);
    }
    
    .abstract-inline-item.highlight {
        min-width: 100%;
        flex: 1 1 100%;
        order: 99;
    }
    
    .abstract-inline-icon {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }
    
    .abstract-inline-value {
        font-size: 0.8rem;
    }
    
    .abstract-row {
        flex-direction: column;
        gap: 8px;
    }
    
    .abstract-item-pro {
        width: 100%;
    }
    
    .db-three-col-row {
        flex-wrap: wrap;
    }
    
    .db-col-left,
    .db-col-middle,
    .db-col-right {
        min-width: auto;
        flex: 1 1 auto;
        margin-bottom: 4px;
    }
    
    .abstract-grid-row {
        flex-wrap: wrap;
    }
    
    .abstract-grid-item {
        flex: 1 1 calc(50% - 8px);
        min-width: 120px;
    }
}

@media (max-width: 360px) {
    .abstract-inline-item {
        min-width: 100%;
        flex: 1 1 100%;
    }
    
    .abstract-grid-item {
        flex: 1 1 100%;
    }
}

/* Ensure the abstract container has proper width */
.abstract-container-professional {
    width: 100%;
    box-sizing: border-box;
}

/* Amount color coding */
.amount-original {
    color: #1e293b;
    font-weight: 800;
}

.amount-paying {
    color: #2563eb;
    font-weight: 700;
}

.amount-paying.not-set {
    color: #94a3b8;
    font-weight: 500;
}

.amount-remaining {
    font-weight: 600;
}

.amount-remaining.positive {
    color: #dc2626;
}

.amount-remaining.zero {
    color: #059669;
}

/* View-only mode styles */
.view-only-indicator {
    background: #f8fafc;
    color: #64748b;
    border: 1px solid #e2e8f0;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.view-only-message {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin: 15px 0;
}

.view-only-icon {
    width: 50px;
    height: 50px;
    background: #e2e8f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    color: #94a3b8;
}

.view-only-header {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.view-only-text {
    color: #94a3b8;
    font-size: 0.8rem;
    line-height: 1.4;
}
/* [file name]: dashboard-fragment.css - ADD TO EXISTING FILE */
/* Add these animations at the end of the file */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulseHighlight {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* Highlight newly configured items */
.db-list-item.configured-view.newly-configured {
    animation: pulseHighlight 1.5s ease;
}

/* Pay Now button enhancement */
.db-pay-btn.pay-all-mode {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    font-weight: 700;
    position: relative;
    overflow: hidden;
}

.db-pay-btn.pay-all-mode::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(30deg);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) rotate(30deg);
    }
    100% {
        transform: translateX(100%) rotate(30deg);
    }
}
/* [file name]: dashboard-fragment.css - ADD THESE STYLES */

/* Updated summary card styles */
.db-stat.summary-updated {
    border-color: #10b981 !important;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.15) !important;
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%) !important;
}

@keyframes pulseHighlight {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
        transform: scale(1.02);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
        transform: scale(1);
    }
}

/* Summary label styling */
.db-stat:nth-child(2) .db-lbl[style*="color: #10b981"] {
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Server sync indicator */
.server-sync-time {
    font-size: 0.6rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

.server-sync-time i {
    font-size: 0.55rem;
}
/* [file name]: dashboard-fragment.css - ADD THESE STYLES */

/* Summary value containers */
.summary-value-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.summary-percentage {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
}

.summary-amount {
    font-weight: 700;
}

/* Color variations */
.summary-percentage.paid {
    color: #059669;
}

.summary-percentage.due {
    color: #dc2626;
}

.summary-percentage.zero {
    color: #10b981;
}