/* css/audit-trail.css */

/* Import Inter font */
@import url('https://fonts.googleapis.com/css2?family=Inter:opsz@14..32&display=swap');

* {
    font-family: 'Inter', system-ui, sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body { 
    background-color: #f4f7fb;
}

/* custom navy/teal palette */
.bg-navy-sidebar { background-color: #0c2538; }
.bg-navy-deep { background-color: #0b1f33; }
.text-teal-logo { color: #5ee0d0; }
.border-teal-light { border-color: #2aa79b33; }

/* hover effect for nav items */
.hover-nav:hover { background-color: #1f4e5e; color: white; }

/* active navigation item */
.active-nav {
    background-color: #1a4450;
    border-left: 4px solid #2aa79b;
}

/* stat card styles */
.stat-card {
    transition: all 0.2s ease;
    border: 1px solid #eef2f6;
    background-color: white;
    border-radius: 0.75rem;
}
.stat-card:hover { box-shadow: 0 8px 20px -8px rgba(18, 79, 86, 0.15); }

/* dashboard background */
.bg-dashboard-bg { background-color: #f4f7fb; }

/* action badge colors */
.bg-green-100 { background-color: #dcfce7; }
.text-green-700 { color: #15803d; }
.bg-blue-100 { background-color: #dbeafe; }
.text-blue-700 { color: #1d4ed8; }
.bg-yellow-100 { background-color: #fef3c7; }
.text-yellow-700 { color: #b45309; }
.bg-purple-100 { background-color: #f3e8ff; }
.text-purple-700 { color: #7e22ce; }
.bg-red-100 { background-color: #fee2e2; }
.text-red-700 { color: #b91c1c; }
.bg-gray-100 { background-color: #f3f4f6; }
.text-gray-700 { color: #374151; }
.bg-indigo-100 { background-color: #e0e7ff; }
.text-indigo-700 { color: #4338ca; }
.bg-amber-100 { background-color: #fef3c7; }
.text-amber-700 { color: #b45309; }

/* user avatar initials */
.w-6.h-6, .w-8.h-8 {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border-radius: 9999px;
}
.w-6.h-6 { width: 1.5rem; height: 1.5rem; }
.w-8.h-8 { width: 2rem; height: 2rem; }

/* button styling */
.bg-teal-700 { background-color: #0f766e; }
.bg-teal-700:hover { background-color: #115e59; }

/* view toggle buttons */
.view-toggle { 
    transition: all 0.2s ease; 
    cursor: pointer; 
}
.view-toggle.active-view { 
    background-color: #0f766e; 
    color: white; 
}

/* table styling */
table { 
    width: 100%; 
    border-collapse: collapse; 
}
th { 
    font-weight: 600; 
    text-align: left; 
    font-size: 0.7rem; 
    color: #6b7280; 
    padding: 0.875rem 1rem;
    background-color: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    letter-spacing: 0.3px;
}
td { 
    padding: 0.875rem 1rem; 
    font-size: 0.85rem; 
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}

/* audit row hover */
.audit-row:hover { background-color: #f9fafb; }

/* timeline styling */
.border-l-2 { border-left-width: 2px; }
.border-teal-200 { border-color: #99f6e4; }
.border-blue-200 { border-color: #bfdbfe; }
.border-amber-200 { border-color: #fde68a; }
.border-purple-200 { border-color: #e9d5ff; }
.border-green-200 { border-color: #bbf7d0; }

/* view details button */
.view-details-btn {
    transition: all 0.2s ease;
}
.view-details-btn:hover {
    background-color: #f3f4f6;
}

/* mobile header spacer */
.mobile-header-spacer { height: 60px; width: 100%; }

/* ============================================ */
/* RESPONSIVE DESIGN */
/* ============================================ */

/* Sidebar - Mobile */
@media (max-width: 768px) {
    .w-72 {
        width: 280px;
        position: fixed;
        left: -280px;
        top: 0;
        bottom: 0;
        z-index: 1000;
        transition: left 0.3s ease;
        overflow-y: auto;
    }
    .w-72.open { left: 0; }
    main { width: 100%; margin-left: 0; }
    .menu-toggle { 
        display: block; 
        position: fixed; 
        top: 14px; 
        left: 14px; 
        z-index: 1001; 
        background: #0c2538; 
        color: white; 
        border: none; 
        border-radius: 8px; 
        padding: 8px 12px; 
        cursor: pointer; 
        font-size: 1.25rem; 
    }
    .sidebar-overlay { 
        display: none; 
        position: fixed; 
        top: 0; 
        left: 0; 
        right: 0; 
        bottom: 0; 
        background: rgba(0,0,0,0.5); 
        z-index: 999; 
    }
    .sidebar-overlay.active { display: block; }
}

@media (min-width: 769px) {
    .menu-toggle { display: none; }
    .sidebar-overlay { display: none !important; }
    .w-72 { position: relative; left: 0 !important; }
    .mobile-header-spacer { display: none; }
}

/* Stats cards responsive */
@media (max-width: 640px) {
    .grid-cols-1.sm\:grid-cols-2.lg\:grid-cols-4 { grid-template-columns: 1fr; }
    .stat-card { padding: 1rem; }
    .stat-card .text-2xl.md\:text-3xl { font-size: 1.5rem; }
}

/* Filter bar responsive */
@media (max-width: 768px) {
    .flex-wrap { flex-direction: column; }
    select, .flex-1 input { width: 100%; }
}

/* Header responsive */
@media (max-width: 640px) {
    h1 { font-size: 1.5rem; }
    .text-sm.text-gray-500.mt-1 { font-size: 0.75rem; }
}

/* Table responsive */
@media (max-width: 768px) {
    .overflow-x-auto { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    table td, table th { padding: 0.75rem 0.5rem; }
    .text-sm { font-size: 0.7rem; }
}

/* Timeline responsive */
@media (max-width: 640px) {
    .flex.flex-col.sm\:flex-row.sm\:items-start { flex-direction: column; gap: 0.5rem; }
    .pl-4 { padding-left: 0.75rem; }
    .w-8.h-8 { width: 1.75rem; height: 1.75rem; font-size: 0.65rem; }
    .text-sm { font-size: 0.75rem; }
    .text-xs { font-size: 0.65rem; }
}

/* Pagination responsive */
@media (max-width: 640px) {
    .flex.flex-col.sm\:flex-row { flex-direction: column; align-items: center; gap: 0.75rem; }
    .flex.flex-wrap.gap-2 { justify-content: center; }
}

/* Touch-friendly */
@media (max-width: 768px) {
    button, a, .view-details-btn { min-height: 44px; min-width: 44px; }
    body { font-size: 14px; }
    input, select { font-size: 16px !important; }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb {
    background: #0d9488;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #0f766e;
}

/* Print styles */
@media print {
    .sidebar, nav, .menu-toggle, button {
        display: none !important;
    }
    main {
        margin: 0;
        padding: 0;
    }
    .stat-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}