/* Analytics Dashboard Styles */
.analytics-section {
    background: #f8fafc;
    padding: 2rem 0;
    margin: 2rem 0;
    border-radius: 12px;
}

.analytics-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.analytics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.analytics-header h2 {
    color: #1e293b;
    font-size: 1.5rem;
    margin: 0;
}

.analytics-period {
    display: flex;
    gap: 0.5rem;
}

.period-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.period-btn.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.stat-label {
    color: #64748b;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
}

.stat-change {
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.stat-change.positive {
    color: #10b981;
}

.stat-change.negative {
    color: #ef4444;
}

.chart-container {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.chart-title {
    font-size: 1.125rem;
    color: #1e293b;
    font-weight: 600;
}

.chart-wrapper {
    position: relative;
    height: 300px;
}

.visitor-chart {
    width: 100%;
    height: 100%;
}

.chart-bar {
    fill: #2563eb;
    transition: fill 0.2s;
}

.chart-bar:hover {
    fill: #1d4ed8;
}

.chart-bar.current {
    fill: #10b981;
}

.chart-label {
    font-size: 12px;
    fill: #64748b;
}

.chart-value {
    font-size: 14px;
    fill: #1e293b;
    font-weight: 600;
}

.duration-stats {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.duration-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.duration-item {
    text-align: center;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 6px;
}

.duration-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2563eb;
}

.duration-label {
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 0.25rem;
}

.click-analytics {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.click-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e2e8f0;
}

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

.click-element {
    font-weight: 500;
    color: #1e293b;
}

.click-count {
    background: #2563eb;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
}

.analytics-toggle {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: #2563eb;
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 9999;
    transition: all 0.2s;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    display: block;
}

.analytics-toggle:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
}

.analytics-section.hidden {
    display: none;
}

/* Rating System Styles */
.rating-section {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.rating-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.rating-title {
    font-size: 1.125rem;
    color: #1e293b;
    font-weight: 600;
}

.rating-summary {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.rating-average {
    font-size: 2.5rem;
    font-weight: 700;
    color: #f59e0b;
}

.rating-stars {
    display: flex;
    gap: 0.25rem;
}

.star {
    font-size: 1.25rem;
    color: #d1d5db;
    transition: color 0.2s;
}

.star.filled {
    color: #f59e0b;
}

.star.half {
    background: linear-gradient(90deg, #f59e0b 50%, #d1d5db 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.rating-count {
    color: #64748b;
    font-size: 0.875rem;
}

.rating-distribution {
    margin-top: 1rem;
}

.rating-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.rating-bar-label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    min-width: 60px;
    font-size: 0.875rem;
    color: #64748b;
}

.rating-bar-track {
    flex: 1;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.rating-bar-fill {
    height: 100%;
    background: #f59e0b;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.rating-bar-count {
    min-width: 40px;
    text-align: right;
    font-size: 0.875rem;
    color: #64748b;
}

.recent-ratings {
    margin-top: 1.5rem;
}

.recent-rating-item {
    display: flex;
    flex-direction: column;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.recent-rating-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.recent-rating-item:last-child {
    border-bottom: none;
}

.recent-rating-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.recent-rating-phone {
    font-family: monospace;
    color: #64748b;
    font-size: 0.875rem;
}

.recent-rating-stars {
    display: flex;
    gap: 0.125rem;
}

.recent-rating-stars .star {
    font-size: 1rem;
}

.recent-rating-date {
    color: #64748b;
    font-size: 0.875rem;
}

.recent-rating-comment {
    color: #475569;
    font-size: 0.875rem;
    line-height: 1.4;
    font-style: italic;
    padding-left: 0.5rem;
    border-left: 3px solid #e2e8f0;
}

.rating-input {
    background: #f8fafc;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.rating-input-stars {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.rating-input-stars .star {
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.2s;
}

.rating-input-stars .star:hover {
    color: #f59e0b;
    transform: scale(1.1);
}

.rating-input-stars .star.selected {
    color: #f59e0b;
}

.rating-input-phone {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-family: monospace;
    margin-bottom: 1rem;
}

.rating-submit {
    background: #2563eb;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    width: 100%;
    transition: background 0.2s;
}

.rating-submit:hover {
    background: #1d4ed8;
}

/* MSISDN Statistics Styles */
.msisdn-stats {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.msisdn-stats h3 {
    color: #1e293b;
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.msisdn-summary {
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.msisdn-total {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.msisdn-number {
    font-size: 3rem;
    font-weight: 700;
    color: white;
}

.msisdn-label {
    font-size: 1rem;
    color: rgba(255,255,255,0.9);
    margin-top: 0.5rem;
}

.msisdn-monthly h4 {
    color: #1e293b;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.msisdn-month-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
}

.msisdn-month {
    color: #1e293b;
}

.msisdn-count {
    background: #2563eb;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
}

.msisdn-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem 0 1rem 0;
}

.msisdn-item {
    background: #f1f5f9;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.75rem;
    color: #64748b;
}

/* MSISDN Monthly Graph Styles */
.msisdn-monthly-graph {
    margin-top: 1.5rem;
}

.msisdn-monthly-graph h4 {
    color: #1e293b;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.msisdn-chart-wrapper {
    width: 100%;
    overflow-x: auto;
    margin-bottom: 1rem;
}

.msisdn-chart {
    width: 100%;
    height: 250px;
}

.msisdn-bar {
    fill: #8b5cf6;
    transition: fill 0.2s;
}

.msisdn-bar:hover {
    fill: #7c3aed;
}

.msisdn-bar.current {
    fill: #10b981;
}

.msisdn-chart-label {
    font-size: 11px;
    fill: #64748b;
}

.msisdn-chart-value {
    font-size: 12px;
    fill: #1e293b;
    font-weight: 600;
}

.msisdn-details {
    border-top: 1px solid #e2e8f0;
    padding-top: 1rem;
}

.msisdn-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.msisdn-detail-row:last-child {
    border-bottom: none;
}

.detail-month {
    font-weight: 600;
    color: #1e293b;
    min-width: 80px;
}

.detail-phones {
    color: #64748b;
    font-size: 0.875rem;
    font-family: monospace;
    text-align: right;
}

/* Charts Row Layout */
.charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .charts-row {
        grid-template-columns: 1fr;
    }
}

/* Employee Presence Styles */
.employee-stats {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.employee-stats h3 {
    color: #1e293b;
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.employee-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.employee-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    border-radius: 8px;
    background: #f8fafc;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.employee-card.present {
    border-color: #10b981;
    background: #d1fae5;
}

.employee-card.absent {
    border-color: #ef4444;
    background: #fee2e2;
    opacity: 0.7;
}

.employee-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.employee-info {
    text-align: center;
}

.employee-name {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.9rem;
}

.employee-role {
    color: #64748b;
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
}

.employee-status {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-weight: 500;
}

.employee-status.on-duty {
    background: #10b981;
    color: white;
}

.employee-status.off-duty,
.employee-status.on-break {
    background: #ef4444;
    color: white;
}

.business-hours {
    text-align: center;
    padding: 0.75rem;
    background: #f1f5f9;
    border-radius: 6px;
    color: #475569;
}

/* Hourly Traffic Styles */
.hourly-traffic-stats,
.weekly-overview-stats {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.hourly-traffic-stats h3,
.weekly-overview-stats h3 {
    color: #1e293b;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.traffic-chart-wrapper,
.weekly-chart-wrapper {
    width: 100%;
    overflow-x: auto;
}

.traffic-chart,
.weekly-chart {
    width: 100%;
    height: 250px;
}

.traffic-bar {
    fill: #3b82f6;
    transition: fill 0.2s;
}

.traffic-bar.peak {
    fill: #f59e0b;
}

.traffic-bar:hover {
    fill: #2563eb;
}

.traffic-label,
.weekly-label {
    font-size: 10px;
    fill: #64748b;
}

.traffic-value,
.weekly-value {
    font-size: 11px;
    fill: #1e293b;
    font-weight: 600;
}

.traffic-legend {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #64748b;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

.legend-color.peak {
    background: #f59e0b;
}

.legend-color.normal {
    background: #3b82f6;
}

/* Weekly Overview Styles */
.weekly-bar {
    fill: #3b82f6;
    transition: fill 0.2s;
}

.weekly-bar.weekend {
    fill: #8b5cf6;
}

.weekly-bar:hover {
    fill: #2563eb;
}

@media (max-width: 768px) {
    .analytics-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-wrapper {
        height: 250px;
    }
    
    .duration-grid {
        grid-template-columns: 1fr;
    }
    
    .employee-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
