/* History button is now inside profile dropdown */

/* Reports Panel */
.admin-reports {
    display: flex;
    gap: 1rem;
    height: calc(100vh - 200px);
    min-height: 400px;
}

.reports-sidebar {
    width: 300px;
    flex-shrink: 0;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    padding: 0.5rem;
    overflow: hidden;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid var(--border-color);
    margin-top: 0.5rem;
}

.sidebar-header h4 {
    font-weight: 600;
    margin: 0;
}

.days-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.25rem 0;
}

.day-item {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    margin-bottom: 0.25rem;
    transition: background 0.15s;
}

@media (hover: hover) {
.day-item:hover {
    background: var(--bg-color);
}
}

.day-item.selected {
    background: var(--primary-color);
    color: white;
}

.day-item.selected .day-status {
    color: rgba(255,255,255,0.8);
}

.day-date {
    font-weight: 500;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.day-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
}

.day-status {
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.day-status.open {
    background: #fef3c7;
    color: #92400e;
}

.day-status.closed {
    background: #d1fae5;
    color: #065f46;
}

.day-item.selected .day-status.open,
.day-item.selected .day-status.closed {
    background: rgba(255,255,255,0.2);
    color: white;
}

.reports-content {
    flex: 1;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.sub-tabs {
    display: flex;
    gap: 0.25rem;
}

.sub-tab-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.875rem;
    transition: background 0.15s;
}

@media (hover: hover) {
.sub-tab-btn:hover {
    background: var(--bg-color);
}
}

.sub-tab-btn.active {
    background: var(--primary-color);
    color: white;
}

.content-body {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
}

/* Summary Grid */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.summary-card {
    background: var(--bg-color);
    padding: 1rem;
    border-radius: 8px;
}

.summary-card.wide {
    grid-column: 1 / -1;
}

.summary-label {
    font-size: 0.875rem;
    color: var(--secondary-color);
    margin-bottom: 0.25rem;
}

.summary-value {
    font-size: 1.5rem;
    font-weight: 600;
}

.summary-value .badge {
    font-size: 0.625rem;
    background: var(--primary-color);
    color: white;
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    vertical-align: middle;
    margin-left: 0.5rem;
}

.summary-value.status-open {
    color: var(--warning-color);
}

.summary-value.status-closed {
    color: var(--success-color);
}

.summary-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
}

.summary-table th,
.summary-table td {
    padding: 0.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.summary-table th {
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--secondary-color);
}

.close-info {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--bg-color);
    border-radius: 8px;
}

.close-info p {
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}

/* Current Day Panel */
.current-day-panel {
    background: linear-gradient(135deg, var(--primary-color), #1d4ed8);
    color: white;
    padding: 1rem;
    border-radius: 8px 8px 0 0;
    margin: -0.5rem -0.5rem 0.5rem -0.5rem;
}

.current-day-header {
    margin-bottom: 0.75rem;
}

.current-day-header h4 {
    font-size: 0.875rem;
    font-weight: 500;
    opacity: 0.9;
    margin: 0;
}

.current-date {
    font-size: 1rem;
    font-weight: 600;
}

.current-day-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.current-day-stats .stat {
    flex: 1;
    text-align: center;
}

.current-day-stats .stat-label {
    display: block;
    font-size: 0.75rem;
    opacity: 0.8;
}

.current-day-stats .stat-value {
    display: block;
    font-size: 1.125rem;
    font-weight: 600;
}

.current-day-stats .stat-value.warning {
    color: #fbbf24;
}

.btn-close-day {
    width: 100%;
    padding: 0.75rem;
    font-weight: 600;
    background: white;
    color: var(--primary-color);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
}

@media (hover: hover) {
.btn-close-day:hover {
    background: #f1f5f9;
}
}

.current-day-closed {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: rgba(255,255,255,0.15);
    border-radius: 6px;
}

.badge-closed {
    background: var(--success-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-open {
    background: var(--warning-color, #f59e0b);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.unclosed-days-banner {
    margin: 0 0 0.75rem 0;
    padding: 0.75rem 1rem;
    background: #fef3c7;
    border-left: 4px solid var(--warning-color, #f59e0b);
    color: #92400e;
    border-radius: 4px;
    font-size: 0.875rem;
    line-height: 1.4;
}

.closed-time {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Day detail header */
.day-detail-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.day-detail-header h3 {
    margin: 0;
}

/* Day list improvements */
.day-orders {
    font-size: 0.75rem;
    color: var(--secondary-color);
}

/* PWA standalone mode: safe areas handled per element, not on body */
