/* Unified CRM Styles */
body {
    background: #f4f6fa;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.428;
    color: #2c3e50;
}

button,
input,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

.btn,
.form-control,
.input-group-addon,
.dropdown-menu,
.nav,
.navbar,
.table,
label {
    font-size: 1rem;
    line-height: 1.5;
}

.container {
    margin-top: 30px;
}

h1, h2, h3, h4 {
    font-weight: 600;
    color: #2c3e50;
}

/* Card Styles */
.stat-card, .customer-card, .filters-panel, .panel, .panel-default {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    margin-bottom: 24px;
    padding: 18px 22px;
    border: none;
}

.stat-card:hover, .customer-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.13);
}

.stat-icon {
    font-size: 2.2em;
    color: #007bff;
    margin-bottom: 10px;
}

.stat-value, .stat-label {
    display: block;
    text-align: center;
}

.stat-value {
    font-size: 2em;
    font-weight: bold;
    color: #222;
}

.stat-label {
    font-size: 1em;
    color: #7f8c8d;
}

.positive { color: #27ae60; }
.negative { color: #e74c3c; }

/* Table Styles */
.table {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    margin-bottom: 0;
}
.table th {
    background: #f8f9fa;
    color: #222;
    font-weight: 600;
    border-bottom: 2px solid #e9ecef;
}
.table td {
    vertical-align: middle;
}

/* Customer Table Styles */
#customersTable {
    border-collapse: separate;
    border-spacing: 0;
}

#customersTable thead th {
    padding: 12px 8px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.customer-row td {
    padding: 12px 8px;
}

.customer-row:hover {
    background-color: #f5f9ff;
}

.expand-details {
    width: 40px;
}

.expand-btn {
    background: transparent;
    border: none;
    padding: 5px;
    transition: all 0.2s ease;
}

.expand-btn:hover {
    background: rgba(0,0,0,0.05);
    border-radius: 50%;
}

.expand-btn i {
    transition: transform 0.3s ease;
}

.expand-btn[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.details-row {
    background-color: #f8f9fa;
}

.customer-details {
    padding: 20px;
    background: #fff;
    border-radius: 0 0 8px 8px;
    box-shadow: inset 0 3px 6px -3px rgba(0,0,0,0.1);
    margin: 0 10px 10px 10px;
}

.details-heading {
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}

.dl-horizontal dt {
    text-align: left;
    font-weight: 600;
    width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dl-horizontal dd {
    margin-left: 130px;
    margin-bottom: 8px;
}

.booking-table {
    margin-top: 15px;
    font-size: 13px;
}

.booking-table th {
    font-weight: 600;
    background: #f1f3f5;
}

.no-padding {
    padding: 0 !important;
}

.details-padding {
    padding: 15px !important;
}

.margin-bottom {
    margin-bottom: 15px !important;
}

.margin-top {
    margin-top: 20px !important;
}

/* Bookings and Customers Table Styles */
.expand-details {
    width: 40px;
    cursor: pointer;
}

.expand-btn {
    background: transparent;
    border: none;
    color: #007bff;
    padding: 0;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.2s;
}

.expand-btn:hover {
    color: #0056b3;
}

/* Compact panel styles */
.compact-panel {
    margin-bottom: 15px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.compact-panel .panel-heading {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
}

.compact-heading {
    padding: 10px 15px !important;
}

.compact-panel .input-group-sm {
    margin-bottom: 0;
}

.compact-panel .input-group-addon {
    background-color: #f8f9fa;
    border-color: #ddd;
    color: #666;
}

.compact-panel .form-control {
    border-color: #ddd;
}

.compact-panel .btn-sm {
    margin-left: 5px;
}

.expand-btn i.fa-chevron-up {
    transform: rotate(180deg);
}

.customer-row {
    cursor: pointer;
}

.customer-row:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

.details-row {
    background-color: #f8f9fa;
}

.details-heading {
    color: #495057;
    font-size: 18px;
    font-weight: 500;
    margin-top: 0;
    margin-bottom: 15px;
}

.btn-group .btn {
    margin-right: 3px;
}

/* Panel/Accordion for Customers */
.panel-group .panel {
    border-radius: 8px;
    margin-bottom: 14px;
}
.panel-heading {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    cursor: pointer;
    padding: 14px 18px;
}
.panel-title {
    font-size: 1.1em;
    font-weight: 500;
}

.customer-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 18px;
}

.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    color: white;
    font-size: 12px;
    font-weight: 600;
    text-shadow: 0 1px 1px rgba(0,0,0,0.2);
}

.badge-booking {
    background: #28a745;
    color: #fff;
    font-size: 13px;
    margin-left: 8px;
    border-radius: 10px;
    padding: 3px 8px;
}

.booking-item {
    border-left: 3px solid #007bff;
    background: #f8f9fa;
    padding: 9px 13px;
    margin-bottom: 10px;
}

.booking-date {
    color: #6c757d;
    font-size: 0.95em;
}
.booking-service {
    font-weight: 600;
}

.filters-panel {
    padding: 18px 22px;
    margin-bottom: 20px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
.filter-label {
    font-weight: 600;
    margin-bottom: 5px;
}

.chart-title {
    font-size: 1.15em;
    color: #2c3e50;
    margin-bottom: 14px;
    font-weight: 600;
}

/* Responsive tweaks */
@media (max-width: 768px) {
    .stat-card, .customer-card, .filters-panel, .panel, .panel-default {
        padding: 12px 8px;
    }
    .stat-value {
        font-size: 1.3em;
    }
    .chart-title {
        font-size: 1em;
    }
}
