:root {
    /* Theme-aware tints */
    --color-primary: #3598dc;
    --color-success: #26a69a;
    --color-info: #3598dc;
    --color-warning: #f29a12;
    --color-danger: #e7505a;
    --color-dark: #2f353b;
    --color-light: #f3f6f9;
    --color-border: #ebedf3;
}

/* Dashboard stats */
.dashboard-stat2 {
    border-radius: 4px;
    background: #fff;
    padding: 15px 15px 30px;
    margin-bottom: 20px;
    position: relative;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
}

.dashboard-stat2 .display {
    margin-bottom: 20px;
}

.dashboard-stat2 .display .number {
    float: left;
    display: inline-block;
}

.dashboard-stat2 .display .number h3 {
    margin: 0;
    font-size: 34px;
    font-weight: 300;
    color: #333;
}

.dashboard-stat2 .display .number small {
    font-size: 14px;
    color: #888;
    font-weight: 600;
    text-transform: uppercase;
}

.dashboard-stat2 .display .icon {
    float: right;
    padding: 7px 0 0;
}

.dashboard-stat2 .display .icon > i {
    color: #cbd4e0;
    font-size: 26px;
}

.dashboard-stat2 .progress-info {
    clear: both;
}

.dashboard-stat2 .progress {
    margin: 0;
    height: 4px;
    clear: both;
    display: block;
}

.dashboard-stat2 .progress-info .status {
    margin-top: 5px;
    font-size: 11px;
    color: #aaa;
    display: inline-block;
    float: left;
}

.dashboard-stat2 .progress-info .status-number {
    float: right;
    display: inline-block;
}

/* Dashboard stat color variations */
.dashboard-stat2.blue {
    background-color: #fff;
}

.dashboard-stat2.blue .progress {
    background: rgba(53, 152, 220, 0.1);
}

.dashboard-stat2.blue .progress-bar {
    background: #3598dc;
}

.dashboard-stat2.blue .display .number {
    color: #3598dc;
}

.dashboard-stat2.red {
    background-color: #fff;
}

.dashboard-stat2.red .progress {
    background: rgba(231, 80, 90, 0.1);
}

.dashboard-stat2.red .progress-bar {
    background: #e7505a;
}

.dashboard-stat2.red .display .number {
    color: #e7505a;
}

.dashboard-stat2.green {
    background-color: #fff;
}

.dashboard-stat2.green .progress {
    background: rgba(38, 166, 154, 0.1);
}

.dashboard-stat2.green .progress-bar {
    background: #26a69a;
}

.dashboard-stat2.green .display .number {
    color: #26a69a;
}

.dashboard-stat2.purple {
    background-color: #fff;
}

.dashboard-stat2.purple .progress {
    background: rgba(142, 68, 173, 0.1);
}

.dashboard-stat2.purple .progress-bar {
    background: #8e44ad;
}

.dashboard-stat2.purple .display .number {
    color: #8e44ad;
}

/* Next due date alert */
.next-due-alert {
    background: #fff3e0;
    border-left: 4px solid #f29a12;
    border-radius: 3px;
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
}

.next-due-alert .icon {
    width: 40px;
    height: 40px;
    background: #f29a12;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: white;
}

.next-due-alert .text {
    flex: 1;
}

.next-due-alert .text h4 {
    margin: 0 0 3px 0;
    color: #333;
}

.next-due-alert .text p {
    margin: 0;
    color: #666;
}

.next-due-alert .date {
    font-size: 18px;
    font-weight: 700;
    color: #f29a12;
    padding: 0 15px;
}

/* Payment portlet styling */
.payment-portlet {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    border: 1px solid var(--color-border);
    background: #fff;
    transition: all .25s ease-in-out;
    margin-bottom: 30px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
}

.payment-portlet:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, .15);
}

/* Left border color indicator */
.payment-portlet.income-type {
    border-left: 4px solid var(--color-success);
}

.payment-portlet.expense-type {
    border-left: 4px solid var(--color-danger);
}

.payment-portlet.overdue {
    border: 1px solid var(--color-danger);
    border-left: 4px solid var(--color-danger);
}

.payment-portlet.overdue .portlet-title {
    background-color: #fff6f6;
}

/* Title styling */
.payment-portlet .portlet-title {
    padding: 12px 25px !important;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-light);
    /*display: flex;*/
    /*align-items: center;*/
    justify-content: space-between;
}

.payment-portlet .portlet-title .caption > i {
    font-size: 20px;
    margin-right: 6px;
    vertical-align: middle;
}

.payment-portlet .portlet-title .caption-subject {
    font-size: 18px;
    font-weight: 600;
}

.payment-portlet .portlet-title .caption-helper {
    color: #888;
    margin-left: 5px;
}

/* Body styling */
.payment-portlet .portlet-body {
    padding: 20px;
}

/* Paid status styling */
.payment-status {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.payment-status .status-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
}

.payment-status.paid .status-icon {
    background: #d3f9d9;
    color: var(--color-success);
}

.payment-status.pending .status-icon {
    background: #fff3e0;
    color: var(--color-warning);
}

.payment-status.overdue .status-icon {
    background: #fbe9e7;
    color: var(--color-danger);
}

.payment-status .status-text {
    font-weight: 600;
}

.payment-status.paid .status-text {
    color: var(--color-success);
}

.payment-status.pending .status-text {
    color: var(--color-warning);
}

.payment-status.overdue .status-text {
    color: var(--color-danger);
}

/* Badge */
.badge-payment {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 10px;
}

.badge-payment.income {
    background: #ebf5eb;
    color: var(--color-success);
}

.badge-payment.expense {
    background: #fbe9e7;
    color: var(--color-danger);
}

.badge-payment.overdue {
    background: #ffe8e8;
    color: var(--color-danger);
    font-weight: 700;
}

/* Progress bar styling */
.payment-progress {
    margin: 15px 0;
}

.payment-progress .progress {
    height: 8px;
    margin-bottom: 5px;
    box-shadow: none;
    background-color: #f5f5f5;
}

.payment-progress .progress-bar-success {
    background-color: var(--color-success);
}

.payment-progress .progress-bar-danger {
    background-color: var(--color-danger);
}

.payment-progress .progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
}

/* Detail boxes */
.info-box {
    background-color: #f8f9fa;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 15px;
}

.info-box h4 {
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.info-label {
    color: #666;
    font-size: 13px;
}

.info-value {
    font-weight: 600;
    color: #333;
}


/* For overdue dates */
.text-danger {
    color: #e7505a;
}

/* Colorbox */
.colorbox {
    float: left;
    width: 30px;
    height: 20px;
    margin-right: 10px;
    border-radius: 3px;
}

/* Summary card */
.summary-card {
    margin-top: 20px;
    background-color: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 15px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.summary-header {
    background-color: var(--color-primary);
    color: white;
    padding: 15px;
    font-size: 16px;
    font-weight: 600;
}

.summary-body {
    padding: 0;
}

.summary-table {
    margin-bottom: 0;
}

.summary-table td {
    padding: 12px 15px !important;
    font-weight: 600;
}

.debt-row td {
    background-color: #fff3f3;
}

.receivable-row td {
    background-color: #f0fff0;
}

/* Overdue badge on portlet */
.overdue-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--color-danger);
    color: white;
    border-radius: 50% !important;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Modern Payment Information Box Styling */
.payment-details-box {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 25px;
    border: 1px solid #ebedf3;
    transition: all 0.3s ease;
}

.payment-details-box:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

/* Header */
.payment-details-header {
    background: linear-gradient(135deg, #3598dc 0%, #2972a9 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    font-weight: 600;
}

.payment-details-header i {
    font-size: 24px;
    margin-right: 10px;
}

.payment-details-header h4 {
    margin: 0;
    font-size: 18px;
    line-height: 1.4;
}

/* Main content */
.payment-details-content {
    padding: 0;
}

/* Section styling */
.details-section {
    padding: 20px;
    border-bottom: 1px solid #eef0f5;
}

.details-section:last-child {
    border-bottom: none;
}

.details-section-title {
    margin-bottom: 15px;
    color: #3598dc;
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
}

.details-section-title i {
    margin-right: 8px;
    font-size: 18px;
}

/* Info rows */
.info-row {
    display: flex;
    margin-bottom: 12px;
    align-items: flex-start;
}

.info-label {
    width: 40%;
    color: #5c6873;
    font-size: 13px;
    position: relative;
    padding-left: 22px;
}

.info-label i {
    position: absolute;
    left: 0;
    top: 2px;
    color: #8c98a5;
}

.info-value {
    width: 60%;
    font-weight: 600;
    color: #333;
}

.text-primary {
    color: #3598dc;
}

.text-danger {
    color: #e7505a;
}

.pulse {
    animation: pulse-animation 2s infinite;
}

@keyframes pulse-animation {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.4;
    }
    100% {
        opacity: 1;
    }
}

/* Invoice badge */
.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background-color: #26a69a;
    color: white;
}

.badge-default {
    background-color: #bdc3c7;
    color: white;
}

.invoice-date {
    margin-left: 8px;
    font-size: 12px;
    color: #7f8c8d;
}

/* Overdue alert */
.overdue-alert {
    background: linear-gradient(135deg, #fff4f4 0%, #ffecec 100%);
    border-left: 4px solid #e7505a;
    border-radius: 4px;
    padding: 12px;
    margin: 15px 0;
    display: flex;
    align-items: center;
}

.overdue-alert-icon {
    color: #e7505a;
    font-size: 24px;
    margin-right: 12px;
}

.overdue-title {
    font-weight: 600;
    color: #e7505a;
    margin-bottom: 3px;
}

.overdue-days {
    color: #e7505a;
    font-size: 13px;
}

/* Payment number */
.payment-number {
    background-color: #3598dc;
    color: white;
    display: inline-block;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 15px;
}

/* Payment Card */
.payment-card {
    background-color: #f9fafb;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.payment-card-header {
    background-color: #f1f3f9;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e9ecef;
}

.payment-id {
    font-weight: 600;
    color: #5e6c84;
}

.payment-amount {
    font-weight: 700;
    font-size: 16px;
    color: #26a69a;
}

.payment-card-body {
    padding: 15px;
}

/* Receipt section */
.receipt-section {
    padding: 15px;
    border-top: 1px dashed #e9ecef;
    background-color: #f8f9fa;
}

.receipt-header {
    font-weight: 600;
    color: #5e6c84;
    margin-bottom: 12px;
}

.receipt-list {
    max-height: 200px;
    overflow-y: auto;
}

.receipt-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.receipt-details a {
    color: #3598dc;
}

.receipt-number {
    font-weight: 600;
}

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

.shared-receipt-warning {
    background-color: #fff8e1;
    border-left: 3px solid #ffc107;
    padding: 8px 12px;
    margin: 8px 0;
    font-size: 12px;
    color: #856404;
}

.shared-receipt-note {
    font-style: italic;
    opacity: 0.8;
}

/* Payment divider */
.payment-divider {
    text-align: center;
    margin: 20px 0;
    display: flex;
    justify-content: center;
    color: #bdc3c7;
}

.payment-divider span {
    margin: 0 5px;
}
