/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: #1a1a2e;
    color: white;
    padding: 1rem 2rem;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
}

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

.nav a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.nav a:hover {
    color: white;
}

.nav-user {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
}

/* Main content */
.main {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

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

.page-header h1 {
    font-size: 1.75rem;
}

/* Flash messages */
.flash-messages {
    margin-bottom: 1.5rem;
}

.flash {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.flash-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flash-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.flash-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Cards */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.filter-card {
    padding: 1rem 1.5rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: background 0.2s;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
}

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

.btn-secondary:hover {
    background: #4b5563;
}

.btn-outline {
    background: transparent;
    border: 1px solid #d1d5db;
    color: #374151;
}

.btn-outline:hover {
    background: #f3f4f6;
}

.btn-loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-spinner {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-spinner::before {
    content: "";
    width: 1rem;
    height: 1rem;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn-google {
    background: white;
    color: #333;
    border: 1px solid #d1d5db;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
}

.btn-google:hover {
    background: #f3f4f6;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.375rem;
    font-weight: 500;
    font-size: 0.875rem;
}

.form-input, .form-select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 1rem;
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

textarea.form-input {
    resize: vertical;
}

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

.form-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

/* Filter form */
.filter-form {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

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

.filter-group label {
    font-size: 0.75rem;
    color: #6b7280;
}

.filter-group .form-select {
    min-width: 150px;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

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

.badge-acknowledged {
    background: #dbeafe;
    color: #1e40af;
}

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

.badge-archived {
    background: #e5e7eb;
    color: #374151;
}

.badge-employee_feedback {
    background: #ede9fe;
    color: #5b21b6;
}

.badge-customer_feedback {
    background: #fce7f3;
    color: #9d174d;
}

.badge-store_issue {
    background: #ffedd5;
    color: #9a3412;
}

.badge-suggestion {
    background: #ecfdf5;
    color: #047857;
}

.severity-badge {
    font-weight: 700;
}

.severity-low { background: #d1fae5; color: #065f46; }
.severity-medium { background: #fef3c7; color: #92400e; }
.severity-high { background: #fee2e2; color: #991b1b; }
.severity-critical { background: #991b1b; color: white; }

/* Logs list */
.logs-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.log-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
}

.log-item:hover {
    background: #f9fafb;
}

.log-severity {
    width: 4px;
    border-radius: 2px;
    flex-shrink: 0;
}

.log-severity.severity-low { background: #10b981; }
.log-severity.severity-medium { background: #f59e0b; }
.log-severity.severity-high { background: #ef4444; }
.log-severity.severity-critical { background: #991b1b; }

.log-info {
    flex: 1;
}

.log-header {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.log-subject {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.log-meta {
    font-size: 0.75rem;
    color: #6b7280;
    display: flex;
    gap: 1rem;
}

/* Log type options */
.log-type-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.log-type-option {
    cursor: pointer;
}

.log-type-option input {
    display: none;
}

.log-type-card {
    display: block;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s;
}

.log-type-card strong {
    display: block;
    margin-bottom: 0.25rem;
}

.log-type-card small {
    color: #6b7280;
}

.log-type-option input:checked + .log-type-card {
    border-color: #2563eb;
    background: #eff6ff;
}

/* Log detail */
.log-detail-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.log-detail-meta {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.log-detail-content {
    background: #f9fafb;
    padding: 1rem;
    border-radius: 8px;
    white-space: pre-wrap;
}

.log-detail-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.log-detail-section h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.status-form {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.status-form .form-group {
    margin-bottom: 0;
}

/* Login */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.login-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 400px;
    width: 100%;
}

.login-card h1 {
    margin-bottom: 0.5rem;
}

.login-card .text-muted {
    margin-bottom: 2rem;
}

.login-note {
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #6b7280;
}

/* Footer */
.footer {
    background: #1a1a2e;
    color: rgba(255, 255, 255, 0.6);
    padding: 1rem 2rem;
    text-align: center;
    font-size: 0.875rem;
}

/* Announcements */
.announcements-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.announcement-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
}

.announcement-item:hover {
    background: #f9fafb;
}

.announcement-item.unread {
    background: #fffbeb;
    border-color: #fcd34d;
}

.announcement-priority {
    width: 4px;
    border-radius: 2px;
    flex-shrink: 0;
}

.announcement-priority.priority-low { background: #6b7280; }
.announcement-priority.priority-normal { background: #3b82f6; }
.announcement-priority.priority-high { background: #f59e0b; }
.announcement-priority.priority-urgent { background: #ef4444; }

.announcement-info {
    flex: 1;
}

.announcement-header {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
    flex-wrap: wrap;
}

.announcement-title {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.announcement-meta {
    font-size: 0.75rem;
    color: #6b7280;
    display: flex;
    gap: 1rem;
}

/* Announcement badges */
.badge-priority-low { background: #e5e7eb; color: #374151; }
.badge-priority-normal { background: #dbeafe; color: #1e40af; }
.badge-priority-high { background: #fef3c7; color: #92400e; }
.badge-priority-urgent { background: #fee2e2; color: #991b1b; }
.badge-company { background: #dbeafe; color: #1e40af; }
.badge-location { background: #e5e7eb; color: #374151; }
.badge-unread { background: #fcd34d; color: #78350f; font-weight: 700; }

/* Announcement detail */
.announcement-detail-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.announcement-detail-meta {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.announcement-detail-content {
    background: #f9fafb;
    padding: 1.5rem;
    border-radius: 8px;
    white-space: pre-wrap;
    line-height: 1.8;
}

.announcement-expires {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: #fef3c7;
    border-radius: 4px;
    font-size: 0.875rem;
    color: #92400e;
}

/* Checkbox label */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
}

/* Comments */
.comments-list {
    padding: 0 1rem;
}

.comment {
    padding: 1rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.comment:last-child {
    border-bottom: none;
}

.comment-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.comment-content {
    background: #f9fafb;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    white-space: pre-wrap;
}

.comment-form {
    padding: 1rem;
    border-top: 1px solid #e5e7eb;
    margin-top: 1rem;
}

/* Audit Timeline */
.audit-timeline {
    padding: 1rem;
}

.audit-event {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.audit-event:last-child {
    border-bottom: none;
}

.audit-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    background: #f3f4f6;
    color: #6b7280;
}

.audit-icon-new {
    background: #dcfce7;
    color: #16a34a;
    font-weight: bold;
}

.audit-icon-status {
    background: #dbeafe;
    color: #2563eb;
}

.audit-icon-comment {
    background: #fef3c7;
    color: #d97706;
}

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

.audit-description {
    font-size: 0.875rem;
    line-height: 1.4;
}

.audit-description .badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem;
    vertical-align: middle;
}

.audit-time {
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* Page actions */
.page-actions {
    display: flex;
    gap: 0.5rem;
}

/* Filter rows */
.filter-row {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
    width: 100%;
    margin-bottom: 0.75rem;
}

.filter-row:last-child {
    margin-bottom: 0;
}

.search-group {
    flex: 1;
    min-width: 250px;
}

.search-group .form-input {
    width: 100%;
}

.filter-actions {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}

/* Results count */
.results-count {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

/* Flash warning */
.flash-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

/* Dashboard */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #e5e7eb;
}

.stat-card-warning { border-left-color: #f59e0b; }
.stat-card-danger { border-left-color: #ef4444; }
.stat-card-info { border-left-color: #3b82f6; }
.stat-card-success { border-left-color: #10b981; }

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-card-warning .stat-value { color: #92400e; }
.stat-card-danger .stat-value { color: #991b1b; }
.stat-card-info .stat-value { color: #1e40af; }
.stat-card-success .stat-value { color: #065f46; }

.stat-label {
    font-weight: 600;
    color: #374151;
}

.stat-sublabel {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.dashboard-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.type-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

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

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

.type-count {
    font-weight: 600;
    font-size: 1.25rem;
    color: #374151;
}

.quick-filters {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    flex-wrap: wrap;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

.recent-logs {
    display: flex;
    flex-direction: column;
}

.recent-log-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
}

.recent-log-item:hover {
    background: #f9fafb;
    margin: 0 -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
}

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

.recent-log-indicator {
    width: 4px;
    border-radius: 2px;
    flex-shrink: 0;
}

.recent-log-indicator.severity-low { background: #10b981; }
.recent-log-indicator.severity-medium { background: #f59e0b; }
.recent-log-indicator.severity-high { background: #ef4444; }
.recent-log-indicator.severity-critical { background: #991b1b; }

.recent-log-info {
    flex: 1;
    min-width: 0;
}

.recent-log-subject {
    font-weight: 500;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recent-log-meta {
    display: flex;
    gap: 0.5rem;
    font-size: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

/* Employee profile link */
.employee-link {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.employee-link:hover {
    text-decoration: underline;
}

.employee-link::after {
    content: " ↗";
    font-size: 0.75em;
    opacity: 0.7;
}

/* Utility classes */
.text-muted { color: #6b7280; }
.text-small { font-size: 0.875rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }

/* =============================================================================
   PRODUCT TOUR STYLES (Shepherd.js customization)
   ============================================================================= */

/* Tour button in header */
.tour-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.8);
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.tour-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: rgba(255, 255, 255, 0.5);
}

/* Custom Shepherd theme */
.shepherd-theme-custom {
    max-width: 400px;
}

/* Centered tour popup - override Shepherd's positioning */
.shepherd-theme-custom.shepherd-element {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
}

/* Hide the arrow since we're centering */
.shepherd-theme-custom .shepherd-arrow {
    display: none !important;
}

.shepherd-theme-custom .shepherd-content {
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.shepherd-theme-custom .shepherd-header {
    background: #1a1a2e;
    padding: 1rem 1.25rem 0.75rem;
    border-radius: 8px 8px 0 0;
}

.shepherd-theme-custom .shepherd-title {
    color: white;
    font-size: 1rem;
    font-weight: 600;
}

.shepherd-theme-custom .shepherd-cancel-icon {
    color: rgba(255, 255, 255, 0.6);
}

.shepherd-theme-custom .shepherd-cancel-icon:hover {
    color: white;
}

.shepherd-theme-custom .shepherd-text {
    padding: 1rem 1.25rem;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #374151;
}

.shepherd-theme-custom .shepherd-footer {
    padding: 0.75rem 1.25rem 1rem;
    border-top: 1px solid #e5e7eb;
}

.shepherd-theme-custom .shepherd-button {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.shepherd-theme-custom .shepherd-button:not(.shepherd-button-secondary) {
    background: #2563eb;
    color: white;
    border: none;
}

.shepherd-theme-custom .shepherd-button:not(.shepherd-button-secondary):hover {
    background: #1d4ed8;
}

.shepherd-theme-custom .shepherd-button-secondary {
    background: transparent;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.shepherd-theme-custom .shepherd-button-secondary:hover {
    background: #f3f4f6;
    color: #374151;
}

/* Tour progress indicator */
.shepherd-progress {
    display: flex;
    gap: 4px;
    justify-content: center;
    padding: 0.5rem 1.25rem 0;
}

.shepherd-progress-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #d1d5db;
}

.shepherd-progress-dot.active {
    background: #2563eb;
}

/* Modal overlay */
.shepherd-modal-overlay-container {
    fill: rgba(0, 0, 0, 0.5);
}

/* Mobile tour adjustments */
@media (max-width: 768px) {
    .shepherd-theme-custom {
        max-width: calc(100vw - 2rem);
        margin: 0 1rem;
    }

    .shepherd-theme-custom .shepherd-content {
        max-height: 80vh;
        overflow-y: auto;
    }

    .shepherd-theme-custom .shepherd-text {
        font-size: 0.85rem;
    }

    .shepherd-theme-custom .shepherd-footer {
        flex-direction: column;
        gap: 0.5rem;
    }

    .shepherd-theme-custom .shepherd-button {
        width: 100%;
        justify-content: center;
    }
}

/* =============================================================================
   MOBILE RESPONSIVE STYLES
   ============================================================================= */

/* Tablet breakpoint */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-columns {
        grid-template-columns: 1fr;
    }
}

/* Mobile breakpoint */
@media (max-width: 768px) {
    /* Header */
    .header {
        padding: 0.75rem 1rem;
    }

    .header-content {
        flex-direction: column;
        gap: 0.75rem;
    }

    .logo {
        font-size: 1.25rem;
    }

    .nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem 1rem;
    }

    .nav-user {
        width: 100%;
        text-align: center;
        order: -1;
    }

    /* Main content */
    .main {
        padding: 1rem;
    }

    /* Page header */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }

    .page-actions {
        width: 100%;
        justify-content: flex-start;
    }

    /* Stats grid */
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-value {
        font-size: 1.75rem;
    }

    /* Cards */
    .card {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .card-title {
        font-size: 1.1rem;
    }

    /* Filter form */
    .filter-form {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-row {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        width: 100%;
    }

    .filter-group .form-select,
    .filter-group .form-input {
        width: 100%;
    }

    .search-group {
        min-width: auto;
    }

    .filter-actions {
        flex-direction: column;
    }

    .filter-actions .btn {
        width: 100%;
    }

    /* Log items */
    .log-item {
        padding: 0.75rem;
    }

    .log-header {
        flex-wrap: wrap;
    }

    .log-subject {
        font-size: 0.9rem;
    }

    .log-meta {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    /* Announcement items */
    .announcement-item {
        padding: 0.75rem;
    }

    .announcement-header {
        flex-direction: column;
        gap: 0.25rem;
    }

    /* Log detail */
    .log-detail-title,
    .announcement-detail-title {
        font-size: 1.25rem;
    }

    .log-detail-content,
    .announcement-detail-content {
        padding: 0.75rem;
    }

    /* Status form */
    .status-form {
        flex-direction: column;
        align-items: stretch;
    }

    .status-form .form-group {
        width: 100%;
    }

    .status-form .btn {
        width: 100%;
    }

    /* Comments */
    .comment-meta {
        flex-direction: column;
        gap: 0.25rem;
    }

    /* Form rows */
    .form-row {
        grid-template-columns: 1fr;
    }

    /* Log type options */
    .log-type-options {
        grid-template-columns: 1fr;
    }

    /* Form actions */
    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }

    /* Quick filters */
    .quick-filters {
        flex-direction: column;
    }

    .quick-filters .btn {
        width: 100%;
        text-align: center;
    }

    /* Recent logs */
    .recent-log-subject {
        font-size: 0.9rem;
    }

    .recent-log-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-value {
        font-size: 2rem;
    }

    .badge {
        font-size: 0.65rem;
        padding: 0.2rem 0.4rem;
    }

    .btn {
        padding: 0.625rem 1rem;
        font-size: 0.9rem;
    }

    .footer {
        padding: 0.75rem 1rem;
        font-size: 0.75rem;
    }
}

/* =============================================================================
   AI ASSISTANT STYLES
   ============================================================================= */

/* AI assist bar below textarea */
.ai-assist-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
}

.btn-ai {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.btn-ai:hover:not(:disabled) {
    background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-ai:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.ai-icon {
    font-size: 1rem;
}

.ai-hint {
    font-size: 0.75rem;
    color: #6b7280;
}

/* AI Analysis Card */
.ai-analysis-card {
    background: linear-gradient(135deg, #f5f3ff 0%, #eef2ff 100%);
    border: 1px solid #c7d2fe;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.ai-analysis-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #c7d2fe;
    cursor: pointer;
}

.ai-analysis-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-collapse {
    background: transparent;
    border: 1px solid #c7d2fe;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    color: #6366f1;
    transition: all 0.2s;
}

.btn-collapse:hover {
    background: #eef2ff;
}

.collapse-icon {
    display: inline-block;
    transition: transform 0.2s;
    font-size: 0.75rem;
}

/* Collapsed state */
.ai-analysis-card.collapsed .ai-analysis-header {
    border-bottom: none;
}

.ai-analysis-card.collapsed .ai-analysis-content {
    display: none;
}

.ai-analysis-card.collapsed .collapse-icon {
    transform: rotate(180deg);
}

.ai-analysis-card.collapsed #refresh-analysis {
    display: none;
}

.ai-analysis-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #4338ca;
}

.ai-analysis-content {
    padding: 1rem;
}

.ai-summary {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #374151;
    margin-bottom: 1rem;
}

.ai-trends {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.ai-trend-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #4b5563;
}

.ai-trend-icon {
    color: #6366f1;
    flex-shrink: 0;
}

.ai-recommendations {
    background: white;
    border-radius: 6px;
    padding: 0.75rem 1rem;
}

.ai-recommendations h4 {
    font-size: 0.8rem;
    font-weight: 600;
    color: #4338ca;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ai-recommendations ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ai-recommendations li {
    font-size: 0.85rem;
    color: #374151;
    padding: 0.25rem 0;
    padding-left: 1rem;
    position: relative;
}

.ai-recommendations li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: #6366f1;
}

.ai-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid #c7d2fe;
}

.ai-highlight {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.ai-highlight-urgent {
    background: #fee2e2;
    color: #991b1b;
}

.ai-highlight-positive {
    background: #d1fae5;
    color: #065f46;
}

.ai-highlight-info {
    background: #dbeafe;
    color: #1e40af;
}

.ai-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: #6366f1;
    gap: 0.5rem;
}

.ai-loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #c7d2fe;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.ai-error {
    padding: 1rem;
    text-align: center;
    color: #6b7280;
    font-size: 0.875rem;
}

/* Mobile AI styles */
@media (max-width: 768px) {
    .ai-assist-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn-ai {
        width: 100%;
        justify-content: center;
    }

    .ai-analysis-header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .ai-highlights {
        flex-direction: column;
    }
}

/* =============================================================================
   SETTINGS PAGE STYLES
   ============================================================================= */

.settings-section {
    padding: 1.5rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.settings-section:last-of-type {
    border-bottom: none;
}

.settings-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.settings-toggles {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toggle-option {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.toggle-option:hover {
    background: #f9fafb;
}

.toggle-option.highlight {
    background: #fef3c7;
    border-color: #fcd34d;
}

.toggle-option.highlight:hover {
    background: #fef9c3;
}

.toggle-option.digest {
    background: linear-gradient(135deg, #f5f3ff 0%, #eef2ff 100%);
    border-color: #c7d2fe;
}

.toggle-option.digest:hover {
    background: linear-gradient(135deg, #ede9fe 0%, #e0e7ff 100%);
}

.toggle-option input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.125rem;
    flex-shrink: 0;
    cursor: pointer;
}

.toggle-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.toggle-label {
    font-weight: 500;
    color: #374151;
}

.toggle-desc {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Mobile settings */
@media (max-width: 768px) {
    .toggle-option {
        padding: 0.75rem;
    }

    .toggle-label {
        font-size: 0.9rem;
    }

    .toggle-desc {
        font-size: 0.8rem;
    }
}

/* =============================================================================
   TEMPLATE STYLES
   ============================================================================= */

/* Template badges */
.badge-shared {
    background: #dbeafe;
    color: #1e40af;
}

.badge-personal {
    background: #e5e7eb;
    color: #374151;
}

/* Template selector on new log form */
.template-selector {
    background: #f9fafb;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.template-select-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.template-select-row .form-select {
    flex: 1;
    max-width: 400px;
}

.section-divider {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 1.5rem 0;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state h3 {
    margin-bottom: 0.5rem;
    color: #374151;
}

.empty-state p {
    margin-bottom: 1.5rem;
}

/* Small button variant */
.btn-small {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

/* Danger button variant */
.btn-danger {
    color: #dc2626;
    border-color: #fecaca;
}

.btn-danger:hover {
    background: #fee2e2;
    color: #991b1b;
}

/* Checkbox label */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 1.125rem;
    height: 1.125rem;
}

/* Form hint text */
.form-hint {
    display: block;
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* Mobile template styles */
@media (max-width: 768px) {
    .template-select-row {
        flex-direction: column;
        align-items: stretch;
    }

    .template-select-row .form-select {
        max-width: none;
    }

    .template-select-row .btn {
        align-self: flex-start;
    }
}

/* =============================================================================
   ATTACHMENT STYLES
   ============================================================================= */

/* Attachments grid */
.attachments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    padding: 1rem;
}

/* Attachment card */
.attachment-card {
    position: relative;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s;
}

.attachment-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Attachment preview */
.attachment-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 120px;
    background: #e5e7eb;
    text-decoration: none;
    color: inherit;
}

.attachment-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.attachment-preview.attachment-video {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
}

.attachment-preview.attachment-doc {
    background: linear-gradient(135deg, #065f46 0%, #10b981 100%);
}

.attachment-icon {
    font-size: 2.5rem;
    color: white;
    opacity: 0.9;
}

/* Attachment info */
.attachment-info {
    padding: 0.75rem;
    background: white;
}

.attachment-name {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.25rem;
}

.attachment-meta {
    font-size: 0.75rem;
    color: #6b7280;
}

/* Attachment delete button */
.attachment-delete {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.attachment-card:hover .attachment-delete {
    opacity: 1;
}

.attachment-delete:hover {
    background: #dc2626;
}

/* Attachment upload area */
.attachment-upload-area {
    padding: 1rem;
    border-top: 1px solid #e5e7eb;
}

/* Attachment dropzone */
.attachment-dropzone {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
}

.attachment-dropzone:hover {
    border-color: #9ca3af;
    background: #f9fafb;
}

.attachment-dropzone.dragover {
    border-color: #2563eb;
    background: #eff6ff;
}

.attachment-dropzone p {
    margin: 0;
    color: #6b7280;
}

.attachment-dropzone p:first-child {
    margin-bottom: 0.5rem;
}

/* Upload progress */
#upload-progress {
    padding: 1rem 0;
}

.progress-bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2563eb 0%, #3b82f6 100%);
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s;
    animation: progress-pulse 1.5s ease-in-out infinite;
}

@keyframes progress-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.progress-text {
    font-size: 0.8125rem;
    color: #6b7280;
}

/* Attachment note on new log form */
.attachment-note {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    margin-top: 1rem;
    font-size: 0.875rem;
    color: #0369a1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.attachment-note-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* Mobile attachment styles */
@media (max-width: 768px) {
    .attachments-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.75rem;
        padding: 0.75rem;
    }

    .attachment-preview {
        height: 100px;
    }

    .attachment-info {
        padding: 0.5rem;
    }

    .attachment-name {
        font-size: 0.75rem;
    }

    .attachment-delete {
        opacity: 1;
        width: 1.5rem;
        height: 1.5rem;
    }

    .attachment-dropzone {
        padding: 1rem;
    }
}

/* =============================================================================
   @MENTION STYLES
   ============================================================================= */

/* Mention text in comments */
.mention {
    color: #2563eb;
    font-weight: 500;
    background: #eff6ff;
    padding: 0 4px;
    border-radius: 3px;
}

/* Mention input container */
.mention-input-container {
    position: relative;
}

/* Autocomplete dropdown */
.mention-autocomplete {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: 4px;
}

/* Autocomplete item */
.mention-item {
    display: flex;
    flex-direction: column;
    padding: 0.625rem 0.875rem;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.1s;
}

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

.mention-item:hover,
.mention-item.selected {
    background: #eff6ff;
}

.mention-name {
    font-weight: 500;
    color: #374151;
    font-size: 0.875rem;
}

.mention-email {
    color: #6b7280;
    font-size: 0.75rem;
}

/* Mobile mention styles */
@media (max-width: 768px) {
    .mention-autocomplete {
        max-height: 180px;
    }

    .mention-item {
        padding: 0.5rem 0.75rem;
    }
}

/* =============================================================================
   BULK ACTIONS STYLES
   ============================================================================= */

/* Bulk actions toolbar */
.bulk-actions-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1e40af;
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(30, 64, 175, 0.3);
}

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

.bulk-actions-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bulk-actions-toolbar .form-select {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    min-width: 160px;
}

.bulk-actions-toolbar .form-select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.bulk-actions-toolbar .form-select option {
    background: #1e40af;
    color: white;
}

.bulk-actions-toolbar .btn {
    background: white;
    color: #1e40af;
    border: none;
    padding: 0.375rem 1rem;
    font-weight: 600;
}

.bulk-actions-toolbar .btn:hover:not(:disabled) {
    background: #f0f9ff;
}

.bulk-actions-toolbar .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#selection-count {
    font-weight: 500;
    font-size: 0.875rem;
}

/* Custom checkbox styling */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    user-select: none;
}

.checkbox-wrapper input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    width: 1.25rem;
    height: 1.25rem;
    background: white;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    transition: all 0.15s;
}

.checkbox-wrapper:hover .checkmark {
    border-color: #9ca3af;
}

.checkbox-wrapper input:checked ~ .checkmark {
    background: #2563eb;
    border-color: #2563eb;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-wrapper input:checked ~ .checkmark:after {
    display: block;
}

/* Indeterminate state for select all */
.checkbox-wrapper input:indeterminate ~ .checkmark {
    background: #2563eb;
    border-color: #2563eb;
}

.checkbox-wrapper input:indeterminate ~ .checkmark:after {
    display: block;
    left: 4px;
    top: 7px;
    width: 10px;
    height: 0;
    border-width: 0 0 2px 0;
    transform: none;
}

/* Select all in toolbar */
.select-all-wrapper .checkmark {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
}

.select-all-wrapper:hover .checkmark {
    border-color: rgba(255, 255, 255, 0.8);
}

.select-all-wrapper input:checked ~ .checkmark,
.select-all-wrapper input:indeterminate ~ .checkmark {
    background: white;
    border-color: white;
}

.select-all-wrapper .checkmark:after {
    border-color: #1e40af;
}

/* Log item with checkbox */
.log-item.has-checkbox {
    padding-left: 0.75rem;
}

.log-checkbox {
    flex-shrink: 0;
    padding: 0.25rem;
    margin-right: 0.25rem;
}

.log-item-link {
    display: flex;
    gap: 1rem;
    flex: 1;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}

/* Selected log item state */
.log-item.selected {
    background: #eff6ff;
    border-color: #93c5fd;
}

.log-item.selected:hover {
    background: #dbeafe;
}

/* Mobile bulk action styles */
@media (max-width: 768px) {
    .bulk-actions-toolbar {
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem;
    }

    .bulk-actions-left,
    .bulk-actions-right {
        width: 100%;
        justify-content: space-between;
    }

    .bulk-actions-toolbar .form-select {
        flex: 1;
    }

    .bulk-actions-toolbar .btn {
        flex-shrink: 0;
    }
}

/* =============================================================================
   ANALYTICS PAGE STYLES
   ============================================================================= */

/* Period selector */
.analytics-period-selector {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

/* Analytics columns */
.analytics-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Chart containers */
.chart-container {
    height: 300px;
    padding: 1rem 0;
}

.chart-container-small {
    height: 220px;
}

/* Metrics grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 1rem 0;
}

.metric-item {
    text-align: center;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
}

.metric-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e40af;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.metric-label {
    font-size: 0.8125rem;
    color: #6b7280;
}

/* Analytics table */
.table-responsive {
    overflow-x: auto;
}

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

.analytics-table th,
.analytics-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.analytics-table th {
    background: #f9fafb;
    font-weight: 600;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
}

.analytics-table .text-center {
    text-align: center;
}

/* Mobile analytics styles */
@media (max-width: 768px) {
    .analytics-period-selector {
        flex-wrap: wrap;
    }

    .analytics-period-selector .btn {
        flex: 1;
        text-align: center;
    }

    .analytics-columns {
        grid-template-columns: 1fr;
    }

    .chart-container {
        height: 250px;
    }

    .metrics-grid {
        grid-template-columns: 1fr 1fr;
    }

    .metric-value {
        font-size: 1.5rem;
    }

    .analytics-table th,
    .analytics-table td {
        padding: 0.5rem;
        font-size: 0.875rem;
    }
}

/* =============================================================================
   PRINT STYLES
   ============================================================================= */

/* Page actions bar for detail page */
.page-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Print header - hidden on screen */
.print-header {
    display: none;
}

/* Print button styling */
.print-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

@media print {
    /* Hide non-print elements */
    .header,
    .footer,
    .nav,
    .page-actions,
    .page-actions-bar,
    .status-form,
    .comment-form,
    .attachment-upload-area,
    .attachment-delete,
    .tour-btn,
    .btn,
    .flash-messages,
    form,
    #upload-progress {
        display: none !important;
    }

    /* Show print header */
    .print-header {
        display: block !important;
        text-align: center;
        margin-bottom: 2rem;
        padding-bottom: 1rem;
        border-bottom: 2px solid #1a1a2e;
    }

    .print-logo {
        font-size: 1.5rem;
        font-weight: 700;
        color: #1a1a2e;
    }

    .print-meta {
        font-size: 0.875rem;
        color: #6b7280;
        margin-top: 0.25rem;
    }

    /* Reset body and backgrounds */
    body {
        background: white !important;
        color: black !important;
        font-size: 12pt;
        line-height: 1.5;
    }

    .main {
        max-width: none;
        padding: 0;
        margin: 0;
    }

    /* Cards */
    .card {
        box-shadow: none !important;
        border: 1px solid #ccc;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .card-header {
        background: #f9fafb !important;
    }

    /* Log content */
    .log-detail-content {
        background: white !important;
        border: 1px solid #ddd;
        padding: 1rem;
    }

    .log-detail-title {
        font-size: 1.25rem;
    }

    /* Badges - ensure they print with background */
    .badge {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        border: 1px solid currentColor;
    }

    /* Severity indicators */
    .log-severity,
    .severity-badge {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* Attachments - show as simple list */
    .attachments-grid {
        display: block !important;
    }

    .attachment-card {
        display: flex;
        align-items: center;
        gap: 1rem;
        margin-bottom: 0.5rem;
        padding: 0.5rem;
        border: 1px solid #ddd;
        break-inside: avoid;
    }

    .attachment-preview {
        width: 60px;
        height: 60px;
        flex-shrink: 0;
    }

    .attachment-preview img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* Comments */
    .comment {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .comment-content {
        background: #f9fafb !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* Links */
    a {
        color: black !important;
        text-decoration: none !important;
    }

    a[href]::after {
        content: none !important;
    }

    /* Page settings */
    @page {
        margin: 1.5cm;
    }
}
