.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    line-height: 1.2;
    table-layout: fixed;
    min-width: 100%;
}

.data-table th,
.data-table td {
    padding: 5px 3px;
    border: 1px solid #dee2e6;
    vertical-align: middle;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
    text-align: center;
}

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 10;
    height: 50px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.3;
    padding: 3px 2px;
}

.data-table th > .header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    text-align: center;
    word-break: break-word;
    flex-direction: column;
    padding: 2px 0;
}

.data-table th .header-title {
    font-weight: 600;
    font-size: 12px;
    line-height: 1.2;
    margin-bottom: 2px;
}

.data-table th .header-unit {
    font-size: 10px;
    color: #666;
    line-height: 1.2;
    font-weight: normal;
    margin-top: 1px;
}

.data-table tbody tr:hover {
    background-color: #f8f9fa;
}

.data-table td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 6px 3px;
    height: 32px;
}

.data-table .number-cell {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

.table-responsive {
    overflow-x: auto;
    margin: 0;
    padding: 0;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    min-height: 200px;
    width: 100%;
}

.filter-bar {
    background: #f8f9fa;
    padding: 10px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    margin-bottom: 10px;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-end;
    width: 100%;
}

.filter-group {
    flex: 1;
    min-width: 120px;
}

.filter-group label {
    display: block;
    margin-bottom: 3px;
    font-size: 12px;
    font-weight: 500;
    color: #555;
}

.filter-group .form-control {
    height: 30px;
    padding: 4px 8px;
    font-size: 12px;
}

.filter-group.search-group {
    flex: 2;
    min-width: 180px;
}

.filter-group.checkbox-group {
    flex: 0 0 auto;
    min-width: 0;
    width: auto;
    text-align: center;
}
.filter-group.checkbox-group label {
    text-align: center;
}
.filter-group.checkbox-group .checkbox-wrapper {
    width: 30px;
    height: 30px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-sizing: border-box;
}
.filter-group.checkbox-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
}

.filter-group.perpage-group {
    flex: 1;
    min-width: 100px;
}

.filter-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    align-items: flex-end;
    margin-left: auto;
}
.filter-actions .btn {
    height: 30px;
    line-height: 1.2;
    padding: 4px 12px;
}

.warning-level-select {
    height: 24px;
    padding: 2px 6px;
    font-size: 12px;
    line-height: 1.2;
    width: 100%;
    border-radius: 3px;
    border: 1px solid #ced4da;
    background-color: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    text-align: center;
}

.warning-level-select:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.warning-level-select option {
    padding: 4px 8px;
    font-size: 12px;
    text-align: center;
}

.pagination {
    margin-top: 10px;
    text-align: center;
    font-size: 12px;
    padding: 5px 0;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 4px 8px;
    margin: 0 2px;
    border: 1px solid #dee2e6;
    border-radius: 3px;
    text-decoration: none;
    color: #007bff;
    background: white;
    min-width: 28px;
    text-align: center;
    line-height: 1.2;
}

.pagination a:hover {
    background: #f8f9fa;
}

.pagination .current {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.pagination-info {
    text-align: center;
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
    padding: 3px 0;
}

.btn {
    padding: 4px 8px;
    font-size: 12px;
    line-height: 1.2;
    min-height: 28px;
}

.btn-sm {
    padding: 2px 6px;
    font-size: 12px;
    min-height: 24px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    border-radius: 4px 4px 0 0;
    flex-wrap: wrap;
    gap: 10px;
}

.card-header h2 {
    font-size: 15px;
    margin: 0;
    font-weight: 600;
    flex-shrink: 0;
}

.card-header > div {
    flex-shrink: 0;
}

.id-card-link {
    color: #0066cc;
    text-decoration: none;
    font-size: 12px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    text-align: center;
    display: block;
}

.id-card-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

.code-link {
    color: #0066cc;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    display: block;
}

.code-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

.visit-count {
    font-size: 12px;
    font-weight: 500;
}

.empty-data {
    text-align: center;
    padding: 20px;
    color: #6c757d;
    font-style: italic;
}

.card {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background: #fff;
    margin-bottom: 20px;
    overflow: hidden;
}

.export-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
    text-decoration: none;
    flex-shrink: 0;
}

.export-btn:hover {
    background-color: #218838;
    color: white;
    text-decoration: none;
}

.deadline-alert-bar {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #fff9e6, #ffeaa7);
    border: 1px solid #ffc107;
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    margin-right: 15px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.deadline-alert-bar:hover {
    background: linear-gradient(135deg, #ffeaa7, #ffd966);
    border-color: #e0a800;
}

.deadline-alert-bar span,
.deadline-alert-bar .badge,
.deadline-alert-bar #nearestDeadlineText {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    max-width: 100%;
}

.deadline-alert-bar .badge {
    flex-shrink: 0;
}

#nearestDeadlineText {
    flex-shrink: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.deadline-alert-bar .fa-chevron-down {
    flex-shrink: 0;
    margin-left: 8px;
}

#deadlineDetailPanel {
    position: absolute;
    top: 40px;
    right: 150px;
    z-index: 1000;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    min-width: 350px;
    max-width: 450px;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    animation: fadeInUp 0.2s ease-out;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.complete-btn {
    padding: 2px 8px;
    font-size: 10px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-left: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.complete-btn:hover {
    background-color: #218838;
}

.complete-btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

.reminder-alert-container {
    display: flex;
    align-items: center;
    margin: 0 15px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    position: relative;
    max-height: 40px;
    min-height: 32px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    padding: 2px 8px;
}

.reminder-track-wrapper {
    flex: 1;
    overflow: hidden;
    position: relative;
    min-width: 0;
    height: 28px;
    display: flex;
    align-items: center;
}

.reminder-track {
    display: flex;
    align-items: center;
    white-space: nowrap;
    transition: transform 0.3s ease;
    min-width: 100%;
    padding: 0 5px;
}

.reminder-track.scrolling {
    animation: scrollHorizontal 30s linear infinite;
}

.reminder-track.paused {
    animation-play-state: paused;
}

.reminder-item {
    display: inline-flex;
    align-items: center;
    margin-right: 15px;
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 11px;
    line-height: 1.2;
    flex-shrink: 0;
    height: 22px;
}

.reminder-item.overdue {
    background-color: #ffe6e6;
    border-left: 3px solid #dc3545;
    color: #721c24;
}

.reminder-item.today {
    background-color: #fff9e6;
    border-left: 3px solid #ffc107;
    color: #856404;
}

.reminder-item.future {
    background-color: #e6f3ff;
    border-left: 3px solid #17a2b8;
    color: #004085;
}

.reminder-item.notification {
    background-color: #fff3cd;
    border-left: 3px solid #fd7e14;
    color: #856404;
    font-weight: 500;
}

.reminder-prefix {
    font-weight: 600;
    margin-right: 5px;
    white-space: nowrap;
    font-size: 11px;
}

.reminder-link {
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
    margin: 0 2px;
    cursor: pointer;
    white-space: nowrap;
    font-size: 11px;
}

.reminder-link:hover {
    text-decoration: underline;
    color: #0056b3;
}

@keyframes scrollHorizontal {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.reminder-track.centered {
    justify-content: center;
    width: 100%;
}

.card-body {
    padding: 0;
    margin: 0;
}

.delete-petition-btn {
    padding: 2px 8px;
    font-size: 11px;
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.delete-petition-btn:hover {
    background-color: #c82333;
}