openWa / dashboard /src /pages /Logs.css
harsh
Deploy: Initial commit without binaries
525d39f
Raw History Blame Contribute Delete
6.63 kB
.logs-page {
padding: 2rem;
width: 100%;
box-sizing: border-box;
}
.page-header {
margin-bottom: 1.5rem;
}
.header-content {
display: flex;
justify-content: space-between;
align-items: center;
}
/* H1 inherited from global */
.btn-secondary {
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.75rem 1.25rem;
background: var(--bg-white);
color: var(--text-primary);
border: 1px solid var(--border);
border-radius: var(--radius);
font-size: 0.9375rem;
font-weight: 500;
cursor: pointer;
transition: all 0.2s;
}
.btn-secondary:hover {
background: var(--bg-light);
}
.filters-bar {
display: flex;
gap: 1rem;
margin-bottom: 1.5rem;
}
.search-input {
display: flex;
align-items: center;
gap: 0.75rem;
flex: 1;
max-width: 400px;
padding: 0.75rem 1rem;
background: var(--bg-white);
border: 1px solid var(--border);
border-radius: var(--radius);
}
.search-input svg {
color: var(--text-muted);
}
.search-input input {
flex: 1;
border: none;
background: none;
font-size: 0.9375rem;
color: var(--text-primary);
}
.search-input input:focus {
outline: none;
}
.filter-group {
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0 1rem;
background: var(--bg-white);
border: 1px solid var(--border);
border-radius: var(--radius);
}
.filter-group svg {
color: var(--text-muted);
}
.filter-group select {
padding: 0.75rem 0;
border: none;
background: none;
font-size: 0.9375rem;
color: var(--text-primary);
cursor: pointer;
}
.filter-group select:focus {
outline: none;
}
.logs-table-container {
background: var(--bg-white);
border-radius: 12px;
box-shadow: var(--shadow-sm);
border: 1px solid var(--border);
overflow-x: auto;
}
.logs-table {
display: flex;
flex-direction: column;
width: 100%;
font-size: 0.875rem;
}
/* Unified row styling - same class for header and data */
.logs-table .table-row {
display: grid;
grid-template-columns: 180px 200px 150px 150px 150px 1fr 120px;
gap: 1rem;
padding: 1rem 1.5rem;
align-items: center;
border-bottom: 1px solid var(--border);
}
.logs-table .table-row:last-child {
border-bottom: none;
}
.logs-table .table-row.header {
background: var(--bg-light);
font-size: 0.7rem;
font-weight: 700;
color: var(--text-secondary);
text-transform: uppercase;
letter-spacing: 0.05em;
border-bottom: 1px solid var(--border);
}
.logs-table .table-row:not(.header):hover {
background: rgba(37, 211, 102, 0.05);
}
.timestamp {
font-family: monospace;
font-size: 0.8125rem;
color: var(--text-muted);
white-space: nowrap;
}
.action {
font-weight: 600;
color: var(--text-primary);
font-size: 0.8125rem;
white-space: nowrap;
}
.api-key {
font-family: monospace;
font-size: 0.8125rem;
white-space: nowrap;
}
.ip {
font-family: monospace;
font-size: 0.8125rem;
white-space: nowrap;
}
.details {
font-size: 0.875rem;
color: var(--text-secondary);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.severity-badge {
display: inline-block;
padding: 0.25rem 0.625rem;
border-radius: 6px;
font-size: 0.6875rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.025em;
white-space: nowrap;
}
.logs-table .table-row > span:last-child {
justify-self: end;
}
.severity-badge.info {
background: #dbeafe;
color: #1d4ed8;
}
.severity-badge.warn {
background: #fef3c7;
color: #d97706;
}
.severity-badge.error {
background: #fee2e2;
color: #dc2626;
}
.pagination {
display: flex;
justify-content: center;
align-items: center;
gap: 0.5rem;
margin-top: 1.5rem;
}
.pagination button {
padding: 0.5rem 1rem;
font-size: 0.875rem;
background: var(--bg-white);
border: 1px solid var(--border);
border-radius: 6px;
cursor: pointer;
color: var(--text-secondary);
transition: all 0.2s;
}
.pagination button:hover:not(:disabled) {
background: var(--bg-light);
}
.pagination button:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.page-numbers {
display: flex;
gap: 0.25rem;
}
.page-numbers button {
min-width: 36px;
padding: 0.5rem;
}
.page-numbers button.active {
background: var(--primary);
border-color: var(--primary);
color: white;
}
/* Empty Table State */
.empty-table-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 4rem 2rem;
text-align: center;
color: var(--text-muted);
}
.empty-table-state svg {
margin-bottom: 1rem;
opacity: 0.4;
color: var(--text-muted);
}
.empty-table-state h3 {
font-size: 1.125rem;
font-weight: 600;
color: var(--text-secondary);
margin: 0 0 0.5rem;
}
.empty-table-state p {
margin: 0;
font-size: 0.875rem;
max-width: 300px;
}
/* Mobile Responsive */
@media (max-width: 768px) {
.logs-page {
padding: 1rem;
}
.filters-bar {
flex-direction: column;
gap: 0.75rem;
}
.search-input {
max-width: none;
}
.filter-group {
width: 100%;
justify-content: space-between;
}
.filter-group select {
flex: 1;
padding: 0.75rem 0;
}
.logs-table-container {
overflow-x: visible;
border: none;
background: transparent;
box-shadow: none;
}
.logs-table {
display: block;
}
.logs-table .table-row.header {
display: none;
}
.logs-table .table-row:not(.header) {
display: flex;
flex-direction: column;
gap: 0.5rem;
padding: 1rem;
background: var(--bg-white);
border: 1px solid var(--border);
border-radius: 12px;
box-shadow: var(--shadow-sm);
margin-bottom: 0.75rem;
}
.logs-table .table-row:not(.header):hover {
background: var(--bg-white);
}
/* Action label prominent at top */
.logs-table .table-row .action {
font-size: 0.9375rem;
font-weight: 600;
order: 1;
margin-bottom: 0.25rem;
}
/* Timestamp secondary */
.logs-table .table-row .timestamp {
order: 2;
font-size: 0.75rem;
}
/* Session, API Key, IP - inline info */
.logs-table .table-row > span:nth-child(3),
.logs-table .table-row > span:nth-child(4),
.logs-table .table-row > span:nth-child(5) {
display: none;
}
/* Severity badge stays visible */
.logs-table .table-row > span:last-child {
order: 3;
justify-self: flex-start;
}
.pagination {
flex-wrap: wrap;
gap: 0.5rem;
}
.pagination button {
padding: 0.5rem 0.75rem;
font-size: 0.8125rem;
}
.page-numbers button {
min-width: 32px;
padding: 0.5rem 0.25rem;
}
}
@media (max-width: 480px) {
.logs-page {
padding: 0.75rem;
}
}