/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Resolution Page Iframe Styles */
#resolution-page {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0;
    margin: 0;
}

#resolution-page iframe {
    width: 87%;
    height: 93%;
    margin-left: 240px;
    margin-top: 65px;
    border: none;
    display: block;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: #f7f8fc;
    color: #333;
}

.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Header Styles */
.header {
    background-color: white;
    border-bottom: 1px solid #e1e8ed;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 30px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
}

.logo-image {
    height: 40px;
    width: auto;
    margin-left: 17px;
}

.logo i {
    color: #3498db;
}

.logo-rfid {
    color: #333;
}

.home-link {
    color: #666;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.3s;
}

.home-link:hover {
    background-color: #f0f4f8;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

#auditActionButtons {
    display: flex;
    gap: 12px;
}

.support-link {
    color: #4a90e2;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #666;
}

.user-info small {
    display: block;
    font-size: 12px;
    color: #999;
}

.dropdown-toggle {
    padding: 5px 8px;
    cursor: pointer;
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
}

.dropdown-toggle:hover {
    background: #f5f5f5;
    border-color: #4a90e2;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e1e8ed;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    min-width: 180px;
    margin-top: 2px;
    overflow: hidden;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    transition: background 0.2s;
    font-size: 14px;
}

.dropdown-item i {
    width: 16px;
    color: #666;
}

.dropdown-item:hover {
    background: #f0f6ff;
    color: #4a90e2;
}

.dropdown-item:hover i {
    color: #4a90e2;
}

/* Main Container */
.main-container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Sidebar Styles */
.sidebar {
    width: 240px;
    background-color: white;
    border-right: 1px solid #e1e8ed;
    padding: 20px 0;
    overflow-y: auto;
}

.demo-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    margin: 0 16px 20px;
    border-radius: 20px;
    font-size: 12px;
    text-align: center;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s;
    position: relative;
}

.nav-item:hover {
    background-color: #f0f4f8;
    color: #4a90e2;
}

.nav-item.active {
    background-color: #e8f2ff;
    color: #4a90e2;
    border-right: 3px solid #4a90e2;
}

.nav-item i {
    width: 20px;
    text-align: center;
}

.badge {
    background-color: #ff6b6b;
    color: white;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: auto;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    background-color: #f7f8fc;
    position: relative;
}

/* Page Styles */
.page {
    display: none;
}

.page.active {
    display: block;
}

/* Welcome Page Styles */
.welcome-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 200px);
    position: relative;
}

.icon-cloud {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.cloud-icon {
    position: absolute;
    font-size: 48px;
    color: #e0e9f5;
    opacity: 0.6;
}

.cloud-icon:nth-child(1) { top: 10%; left: 15%; }
.cloud-icon:nth-child(2) { top: 20%; right: 20%; }
.cloud-icon:nth-child(3) { bottom: 30%; left: 10%; }
.cloud-icon:nth-child(4) { top: 40%; left: 35%; }
.cloud-icon:nth-child(5) { bottom: 20%; right: 15%; }
.cloud-icon:nth-child(6) { top: 15%; left: 60%; }
.cloud-icon:nth-child(7) { bottom: 40%; right: 40%; }
.cloud-icon:nth-child(8) { top: 50%; right: 10%; }

.welcome-card {
    background: linear-gradient(135deg, #4a90e2 0%, #5ca0f2 100%);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(74, 144, 226, 0.3);
    color: white;
    text-align: center;
    z-index: 10;
}

.welcome-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.welcome-card h1 {
    font-size: 36px;
    font-weight: 300;
}

.welcome-message {
    text-align: center;
    margin-top: 30px;
    z-index: 10;
}

.welcome-message h2 {
    font-size: 28px;
    color: #333;
    margin-bottom: 10px;
}

.welcome-message p {
    color: #666;
    font-size: 16px;
}

/* Filter Bar Styles */
.filter-bar {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.quick-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.filter-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.status-filter-container {
    min-width: 180px;
}

.inline-filters {
    display: flex;
    gap: 12px;
    align-items: center;
}

.filter-select {
    min-width: 140px;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    background: white;
}

.filter-btn {
    padding: 8px 14px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.filter-btn i {
    font-size: 12px;
}

.filter-btn:hover {
    background: #f5f5f5;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.filter-btn.active {
    background: #4a90e2;
    color: white;
    border-color: #4a90e2;
}

.filter-btn.draft {
    color: #6b7280;
    border-color: #d1d5db;
}

.filter-btn.draft.active {
    background: #4a90e2;
    color: white;
    border-color: #4a90e2;
}

.advanced-filter-panel {
    border-top: 1px solid #e0e0e0;
    padding-top: 15px;
    margin-top: 15px;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    font-size: 14px;
}

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.filter-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.audit-metrics {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0;
    padding: 0;
    background: #fafbfc;
    border-radius: 6px;
    margin-top: 12px;
    border: 1px solid #f1f3f4;
    overflow: hidden;
}

.metric-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 50px;
    padding: 12px 8px;
    border-right: 1px solid #e8eaed;
    position: relative;
}

.metric-group:last-child {
    border-right: none;
}

.metric-group.unmatched {
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-height: 50px;
    text-align: center;
}

.metric-group.unmatched .metric-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.metric-group.unmatched .metric-detail {
    display: flex;
    flex-direction: row;
    gap: 4px;
    justify-content: center;
    margin-top: 2px;
}

.audit-metrics .inflated {
    color: #f57f17;
    font-weight: 500;
    background: #fffbf0;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 9px;
    border: 1px solid #ffeaa7;
    white-space: nowrap;
    min-width: fit-content;
}

.audit-metrics .deflated {
    color: #ff9800;
    font-weight: 500;
    background: #fff8f0;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 9px;
    border: 1px solid #ffcc80;
    white-space: nowrap;
    min-width: fit-content;
}

/* Template Management Modal Styles */
.template-modal-header {
    margin-bottom: 20px;
    text-align: right;
}

.template-modal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.template-modal-card {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: box-shadow 0.2s ease;
}

.template-modal-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.template-modal-card h3 {
    margin: 0 0 8px 0;
    color: #1a1d29;
    font-size: 18px;
    font-weight: 600;
}

.template-modal-card p {
    margin: 0 0 15px 0;
    color: #5f6368;
    font-size: 14px;
    line-height: 1.4;
}

.template-criteria {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.criteria-tag {
    background: #f1f3f4;
    color: #5f6368;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.template-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* Audit Page Styles */
.audit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.audit-title-section h3 {
    margin: 0 0 5px 0;
    font-size: 18px;
}

.audit-date {
    color: #666;
    font-size: 14px;
}

.audit-date .timestamp {
    font-weight: 500;
}

.status {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background-color: #f0f0f0;
}

.status-scheduled {
    color: #ffa10ba8; /* orange */
}

.status-open {
    color: #16a73894; /* green */
}

.status-completed {
    color: #333333; /* black */
}

.status-cancelled {
    color: #fc3636be; /* black */
}

.status-draft {
    color: #6b7280; /* grey */
}

.page-header {
    margin-bottom: 25px;
}

.header-title-section {
    margin-bottom: 2rem;
}

.title-and-actions {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.title-left h1 {
    font-size: 2rem;
    color: #333;
    margin: 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.audit-subtitle {
    color: #666;
    margin: 0.5rem 0 0 0;
    font-size: 1rem;
    font-weight: 400;
}

.title-right {
    display: none;
}

.back-and-actions-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-left: 0;
}

.inline-action-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.page-header h1 i {
    color: #4a90e2;
}

.page-actions {
    display: flex;
    gap: 12px;
}

/* Button Styles */
.btn {
    margin-left: 5px;
    padding: 12px 20px;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    min-height: 44px;
    box-sizing: border-box;
}

.btn-primary {
    background-color: #4a90e2;
    color: white;
}

.btn-primary:hover {
    background-color: #357abd;
    border-color: #357abd;
    transform: none;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
    border-color: #6c757d;
}

.btn-secondary:hover {
    background-color: #545b62;
    border-color: #545b62;
    transform: none;
}

.btn-outline {
    background-color: transparent;
    border-color: #dee2e6;
    color: #495057;
}

.btn-outline:hover {
    background-color: #f8f9fa;
    border-color: #4a90e2;
    color: #4a90e2;
    transform: none;
}

.btn-success {
    background-color: #28a745;
    color: white;
    border-color: #28a745;
    font-weight: 600;
}

.btn-success:hover {
    background-color: #218838;
    border-color: #218838;
    transform: none;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
    border-color: #dc3545;
    font-weight: 600;
}

.btn-danger:hover {
    background-color: #c82333;
    border-color: #c82333;
    color: white;
    transform: none;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    height: 36px;
    min-height: 36px;
}

/* Audit Section Styles */
.audit-section {
    padding: 0;
    margin-bottom: 25px;
}

.audit-section h2 {
    font-size: 20px;
    color: #333;
    margin-bottom: 20px;
    border-bottom: 2px solid #4a90e2;
    padding-bottom: 10px;
}

.audit-info {
    flex: 1;
}

.audit-info h3 {
    margin: 0 0 12px 0;
    font-size: 18px;
    color: #2c3e50;
    font-weight: 600;
}

.audit-details {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
    align-items: center;
}

.audit-details > span:not(.status) {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: #666;
    padding: 3px 8px;
    background: #f8f9fa;
    border-radius: 12px;
}

.audit-details span i {
    color: #4a90e2;
    font-size: 11px;
}

.audit-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Audit Card Styles */
.audit-card {
    background: white;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    position: relative;
}

.audit-card:hover {
    box-shadow: 0 3px 6px rgba(0,0,0,0.12);
    transform: translateY(-1px);
}

.audit-card[data-status="closed"] {
    display: none;
    opacity: 0.8;
}

.audit-card.scheduled {
    border-left: 4px solid #ff9800;
}

.audit-card.open {
    border-left: 4px solid #28a745;
}

.audit-card.closed {
    border-left: 4px solid #000000;
    background-color: #f8f9fa;
}

.audit-status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.scheduled .audit-status-badge {
    background-color: #fff3cd;
    color: #856404;
}

.open .audit-status-badge {
    background-color: #cce5ff;
    color: #004085;
}

.closed .audit-status-badge {
    background-color: #d4edda;
    color: #155724;
}

.audit-info {
    flex: 1;
}

.audit-info h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 12px;
}

.audit-details {
    display: flex;
    gap: 20px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.audit-details span {
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.audit-details i {
    color: #999;
}

/* Status icon colors - more muted versions */
.status-draft i {
    color: #6b7280 !important;  /* grey */
}

.status-scheduled i {
    color: #ffa10ba8 !important; /* orange */
}

.status-open i {
    color: #16a73894 !important; /* green */
}

.status-completed i, .status-closed i {
    color: #333333  !important; /* black */
}

.status-cancelled i {
    color: #fc3636be !important; /* red */
}

/* Progress Bar */
.progress-container {
    background-color: #e9ecef;
    border-radius: 10px;
    height: 20px;
    overflow: hidden;
    margin-top: 12px;
}

.progress-bar {
    background: linear-gradient(90deg, #4a90e2 0%, #5ca0f2 100%);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: width 0.3s ease;
}

.progress-text {
    color: white;
    font-size: 11px;
    font-weight: 600;
}

/* Audit Summary */
.audit-summary {
    display: flex;
    gap: 20px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e1e8ed;
}

.summary-item {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

.audit-actions {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    position: absolute;
    top: 20px;
    right: 20px;
    flex-shrink: 0;
}

.audit-actions .btn-sm {
    white-space: nowrap;
}

/* Template Section */
.template-section {
    background-color: white;
    border-radius: 8px;
    padding: 25px;
    margin-top: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.template-section h2 {
    font-size: 20px;
    color: #333;
    margin-bottom: 20px;
    border-bottom: 2px solid #4a90e2;
    padding-bottom: 10px;
}

.template-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.template-card {
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s;
}

.template-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.template-card h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
}

.template-card p {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

.template-criteria {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.criteria-tag {
    background-color: #e8f2ff;
    color: #4a90e2;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
}

.template-actions {
    display: flex;
    gap: 8px;
}

/* Detailed Audit Page Styles */
#audit-detail-page {
    display: none;
    padding: 20px;
}

.detail-header {
    margin-bottom: 30px;
}

.detail-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.detail-title h1 {
    margin: 0;
    font-size: 28px;
}

.detail-actions {
    display: flex;
    gap: 10px;
    position: relative;
}

.detail-content {
    max-width: 1200px;
}

.detail-info-section {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
}

.detail-report-section {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
}

.detail-info-section h2 {
    margin: 0 0 20px 0;
    font-size: 20px;
    color: #333;
}

.detail-report-section h2 {
    margin: 0 0 20px 0;
    font-size: 20px;
    color: #333;
}

.detail-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.info-item label {
    display: block;
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.info-item span {
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

.metric-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.metric-label {
    font-size: 10px;
    color: #8e9297;
    text-transform: uppercase;
    margin-bottom: 4px;
    font-weight: 500;
    letter-spacing: 0.5px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    text-align: center;
    width: 100%;
}

.metric-value {
    font-size: 16px;
    font-weight: 600;
    color: #1a1d29;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.3;
    text-align: center;
    width: 100%;
}

.metric-value.success {
    color: #155724;
}

.metric-value.warning {
    color: #721c24;
}

.metric-breakdown {
    margin-top: 5px;
    font-size: 14px;
}

.report-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
}

.report-table th {
    background: #f8f9fa;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
}

.report-table td {
    padding: 12px;
    border-bottom: 1px solid #e0e0e0;
}

.variance-positive {
    color: #856404;
    font-weight: 600;
}

.variance-negative {
    color: #721c24;
    font-weight: 600;
}

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

.type-badge.inflated {
    background: #fff3e0;
    color: #ff9800;
}

.type-badge.deflated {
    background: #ffebee;
    color: #f44336;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    width: 600px;
    max-width: 90%;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    max-height: 90vh;
    max-width: 600px;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e1e8ed;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 20px;
    color: #333;
}

.close-modal {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.modal-body {
    padding: 20px;
}

.modal-section {
    margin-bottom: 25px;
}

.modal-section h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #333;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.filter-section {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
}

.filter-section h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #666;
}

.filter-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.filter-row select,
.filter-row input {
    flex: 1;
}

.filter-row button {
    padding: 6px 12px;
}

.template-selector {
    display: flex;
    gap: 10px;
    align-items: center;
}

.template-selector select {
    flex: 1;
}

.custom-filters {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 14px;
}

.form-control.inline {
    width: auto;
    display: inline-block;
}

textarea.form-control {
    min-height: 80px;
    resize: vertical;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
}

.price-range {
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #e1e8ed;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.mb-3 {
    margin-bottom: 1rem;
}

/* Audit Details View */
#audit-details-view {
    background: #f8fafc;
    min-height: 100vh;
}

.audit-details-header {
    margin-bottom: 2rem;
    padding: 0;
}

.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    color: #495057;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    height: 44px;
    min-height: 44px;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.btn-back:hover {
    background: #f8f9fa;
    border-color: #4a90e2;
    color: #4a90e2;
    transform: none;
}

.audit-details-title h1 {
    margin: 0 0 12px 0;
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.audit-subtitle {
    margin: 0;
    color: #666;
    font-size: 16px;
    font-weight: 500;
}

/* Audit Metrics Container */
.audit-metrics-container {
    margin-bottom: 20px;
}

.metrics-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.metrics-info-row {
    grid-template-columns: repeat(5, 1fr);
}

.metrics-highlight-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas: 
        "skus skus"
        "discrepancies discrepancies"
        "accuracy accuracy"
        "scan items"
        "permin permin";
}

.metrics-highlight-row .metric-card:nth-child(1) {
    grid-area: skus;
}

.metrics-highlight-row .metric-card:nth-child(2) {
    grid-area: discrepancies;
}

.metrics-highlight-row .metric-card:nth-child(3) {
    grid-area: accuracy;
}

.metrics-highlight-row .metric-card:nth-child(4) {
    grid-area: scan;
}

.metrics-highlight-row .metric-card:nth-child(5) {
    grid-area: items;
}

.metrics-highlight-row .metric-card:nth-child(6) {
    grid-area: permin;
}

@media screen and (max-width: 768px) {
    .metrics-info-row {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .metrics-highlight-row {
        grid-template-columns: 1fr 1fr;
        grid-template-areas: 
            "skus skus"
            "discrepancies discrepancies"
            "accuracy accuracy"
            "scan items"
            "permin permin";
    }
}

.metric-card.performance-metric {
    background-color: #f8f9fa;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.metric-card {
    background: white;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.metric-card.highlight {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    border: none;
}

.metric-card.highlight.warning {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
}

.metric-card.highlight.success {
    background: linear-gradient(135deg, #00c853 0%, #00a040 100%);
}

.metric-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.metric-icon i {
    font-size: 18px;
    color: white;
}

.metric-card.highlight .metric-icon {
    background: rgba(255, 255, 255, 0.2);
}

.metric-content {
    flex: 1;
    min-width: 0;
}

.metric-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 4px;
}

.metric-card.highlight .metric-label {
    color: rgba(255, 255, 255, 0.9);
}

.metric-value {
    font-size: 16px;
    color: #1a1a1a;
    font-weight: 600;
    word-break: break-word;
}

.metric-value.large {
    font-size: 20px;
    font-weight: 700;
}

.metric-card.highlight .metric-value {
    color: white;
}

.discrepancy-breakdown {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.breakdown-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.breakdown-count {
    font-size: 16px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 6px;
    min-width: 36px;
    text-align: center;
    background: rgba(255, 255, 255, 0.15);
}

.breakdown-count.inflated {
    color: #ffeb3b; /* Yellow */
}

.breakdown-count.deflated {
    color: #ff9a00; /* Orange */
}

.breakdown-label {
    font-size: 10px;
    margin-top: 2px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.metrics-divider {
    display: none; /* Hide dividers since we're using grid areas now */
}

/* KPI Metrics Container */
.kpi-metrics-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.kpi-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Details Card Styling */
.details-column {
    flex: 1;
}

.details-card {
    height: auto !important;
    min-height: 380px;
}

.details-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.details-pills {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.detail-pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.detail-pill:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.pill-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.pill-value {
    font-size: 0.875rem;
    font-weight: 500;
    color: #1e293b;
    text-align: right;
}

.kpi-card {
    background: white;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #f1f5f9;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #e5e7eb;
}

.kpi-card.primary::before {
    background: #3b82f6;
}

.kpi-card.warning::before {
    background: #ef4444;
}

.kpi-card.success::before {
    background: #10b981;
}

.kpi-card.info::before {
    background: #8b5cf6;
}


.kpi-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #f8fafc;
    flex-shrink: 0;
}

.kpi-icon i {
    font-size: 1.25rem;
    color: #64748b;
}

.kpi-card.primary .kpi-icon {
    background: #dbeafe;
}

.kpi-card.primary .kpi-icon i {
    color: #3b82f6;
}

.kpi-card.warning .kpi-icon {
    background: #fecaca;
}

.kpi-card.warning .kpi-icon i {
    color: #ef4444;
}

.kpi-card.success .kpi-icon {
    background: #d1fae5;
}

.kpi-card.success .kpi-icon i {
    color: #10b981;
}

.kpi-card.info .kpi-icon {
    background: #ede9fe;
}

.kpi-card.info .kpi-icon i {
    color: #8b5cf6;
}

.kpi-content-inline {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.kpi-text {
    flex: 1;
}

.kpi-label {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

.kpi-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
    margin-left: auto;
}

.kpi-chips {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.chip {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.chip.inflated {
    background: #fef3c7;
    color: #92400e;
}

.chip.deflated {
    background: #fed7aa;
    color: #9a3412;
}

.chip i {
    font-size: 0.75rem;
}

.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin: 2rem 0;
}

.chart-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e1e8ed;
}

.chart-section h4 {
    margin: 0 0 1.5rem 0;
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
}

.chart-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1rem 0;
}

.pie-chart-container {
    height: 400px;
    width: 400px;
    margin: 0 auto;
    position: relative;
}

.bar-chart-container {
    height: 350px;
    width: 100%;
    position: relative;
}

#inventoryPieChart {
    display: block;
    box-shadow: none !important;
}

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

.chart-full-width {
    grid-column: 1 / -1;
    margin-top: 2rem;
    width: 100%;
}

.line-chart-container {
    height: 300px;
    width: 100%;
    position: relative;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.legend-color.matched {
    background-color: #4CAF50; /* Green */
}

.legend-color.inflated {
    background-color: #FFC107; /* Yellow */
}

.legend-color.deflated {
    background-color: #FF9800; /* Orange */
}

.tab-bar {
    display: flex;
    background: linear-gradient(to bottom, #fafbfc, #f6f7f9);
    border-bottom: 2px solid #e5e7eb;
    padding: 0;
}

.sticky-tabs {
    position: static;
    background: white;
}

.tab-button {
    padding: 18px 32px;
    background: none;
    border: none;
    color: #666;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
}

.tab-button:hover {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.08);
}

.tab-button.active {
    color: #2563eb;
    background: white;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #2563eb 0%, #1d4ed8 100%);
}

.tab-content {
    display: none;
    padding: 20px;
}

.tab-content.active {
    display: block;
}

/* Ensure charts tab content is properly contained */
#charts-tab {
    display: none !important;
    padding: 1.5rem;
    flex-direction: column;
    align-items: center;
    background-color: white;
}

#charts-tab.active {
    display: flex !important;
}

/* Calendar Modal Styles */
.calendar-modal {
    max-width: 800px;
    width: 95%;
    max-height: 90vh;
}

/* Tooltip styles */
.audit-tooltip {
    position: fixed;
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    max-width: 250px;
}

.audit-tooltip::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border: 6px solid transparent;
}

.audit-tooltip.tooltip-above::after {
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-top-color: #333;
}

.audit-tooltip.tooltip-below::after {
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-bottom-color: #333;
}

/* Calendar Actions */
.calendar-page-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.header-title-row {
    margin-bottom: 1rem;
}

.header-button-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.left-buttons {
    display: flex;
    gap: 0.75rem;
}

.right-buttons {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.header-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.calendar-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.calendar-actions .btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.calendar-container {
    padding: 1rem;
}

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

.calendar-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.calendar-header-actions {
    display: flex;
    gap: 0.5rem;
}

.calendar-header-actions .btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.calendar-nav-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #4f46e5;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.calendar-nav-btn:hover {
    background-color: rgba(79, 70, 229, 0.1);
}

#currentMonth {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.calendar-grid {
    background: white;
    border-radius: 12px;
    overflow: visible;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.weekday {
    padding: 1.2rem;
    text-align: center;
    font-weight: 600;
    color: #6c757d;
    font-size: 1rem;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.calendar-day {
    position: relative;
    padding: 1.2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid #f1f3f4;
    border-right: 1px solid #f1f3f4;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.calendar-day:nth-child(7n) {
    border-right: none;
}

.calendar-day:hover {
    background-color: #f8f9ff;
}

.calendar-day.other-month {
    color: #ccc;
    background-color: #fafafa;
}

.calendar-day.today {
    background-color: #e3f2fd;
    font-weight: 600;
    color: #1976d2;
}

.calendar-day.selected {
    background-color: #4f46e5;
    color: white;
    font-weight: 600;
}

.audit-markers {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 2px;
}

.audit-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    position: relative;
    cursor: pointer;
}

.audit-dot.scheduled {
    background-color: #ff9800; /* Orange */
}

.audit-dot.open {
    background-color: #28a745; /* Green */
}

.audit-dot.closed {
    background-color: #333; /* Black */
}

.audit-dot.cancelled {
    background-color: #dc3545; /* Red */
}

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

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

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.legend-dot.scheduled {
    background-color: #ff9800; /* Orange */
}

.legend-dot.open {
    background-color: #28a745; /* Green */
}

.legend-dot.closed {
    background-color: #333; /* Black */
}

.legend-dot.cancelled {
    background-color: #dc3545; /* Red */
}

/* Filter indicator styles */
.filter-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #e3f2fd;
    border: 1px solid #1976d2;
    border-radius: 20px;
    font-size: 0.875rem;
    color: #1976d2;
    margin-top: 0.5rem;
}

.clear-date-filter {
    background: none;
    border: none;
    color: #1976d2;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clear-date-filter:hover {
    background-color: rgba(25, 118, 210, 0.1);
}

/* Table Toolbar */
.table-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 20px;
    background: linear-gradient(to bottom, #fafbfc, #f6f7f9);
    border-radius: 12px;
    flex-wrap: wrap;
    gap: 16px;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    flex-direction: row;
}

.toolbar-right {
    display: flex;
    gap: 8px;
}

.search-input {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    width: 250px;
    max-width: 250px;
    transition: all 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.filter-group {
    display: flex;
    gap: 8px;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
}

.filter-chip {
    padding: 8px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 24px;
    background: white;
    color: #666;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.filter-chip:hover {
    border-color: #4a90e2;
    color: #4a90e2;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(74, 144, 226, 0.15);
}

.filter-chip.active {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.25);
}

/* Audit Tables */
.table-container {
    overflow-x: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.audit-table {
    width: 100%;
    border-collapse: collapse;
}

.audit-table thead {
    background: #f9fafb;
}

.audit-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e5e7eb;
}

.audit-table th.sortable {
    cursor: pointer;
    user-select: none;
}

.audit-table th.sortable:hover {
    color: #4f46e5;
}

.audit-table th.sortable i {
    margin-left: 4px;
    font-size: 10px;
    color: #9ca3af;
}

.audit-table tbody tr {
    border-bottom: 1px solid #f3f4f6;
}

.audit-table tbody tr:hover {
    background: #f9fafb;
}

.audit-table td {
    padding: 12px 16px;
    font-size: 14px;
    color: #1a1a1a;
}

.expand-col {
    width: 40px;
    text-align: center;
}

.expand-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #666;
    transition: color 0.2s;
}

.expand-btn:hover {
    color: #4f46e5;
}

.font-mono {
    font-family: 'Courier New', monospace;
}

.text-right {
    text-align: right;
}

.text-success {
    color: #059669;
}

.text-danger {
    color: #dc2626;
}

.text-warning {
    color: #f59e0b;
}

.text-muted {
    color: #9ca3af;
}

.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.status-badge.status-matched {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.status-inflated {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge.status-deflated {
    background: #fef3c7;
    color: #92400e;
}

/* Expandable Row Details */
.detail-row td {
    padding: 0;
    background: #f9fafb;
}

.tag-table-container {
    padding: 20px;
}

.tag-table-container h4 {
    margin: 0 0 16px 0;
    font-size: 16px;
    color: #1a1a1a;
}

.tag-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
}

.tag-table thead {
    background: #f3f4f6;
}

.tag-table th {
    padding: 8px 12px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tag-table td {
    padding: 8px 12px;
    font-size: 13px;
    border-top: 1px solid #f3f4f6;
}

/* Pagination */
.table-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.pagination-info {
    color: #666;
    font-size: 14px;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-info {
    color: #666;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    #audit-details-view {
        padding: 12px;
    }

    .audit-info-grid {
        grid-template-columns: 1fr;
    }
    
    .table-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .toolbar-left {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-input {
        width: 100%;
    }
    
    .filter-group {
        flex-wrap: wrap;
    }
    
    .table-pagination {
        flex-direction: column;
        gap: 16px;
        align-items: center;
    }

    .header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}
