169 lines
5.0 KiB
CSS
169 lines
5.0 KiB
CSS
@import "tailwindcss";
|
|
|
|
/* ─── TerManager2 Custom UI ─── */
|
|
|
|
/* Card hover lift effect */
|
|
.card-hover {
|
|
transition: transform 0.15s ease, box-shadow 0.15s ease;
|
|
}
|
|
.card-hover:hover {
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.1), 0 4px 10px -5px rgba(0, 0, 0, 0.04);
|
|
}
|
|
|
|
/* Colored left accent border for stat cards */
|
|
.card-accent-indigo { border-left: 4px solid #6366f1; }
|
|
.card-accent-green { border-left: 4px solid #22c55e; }
|
|
.card-accent-blue { border-left: 4px solid #3b82f6; }
|
|
.card-accent-red { border-left: 4px solid #ef4444; }
|
|
.card-accent-amber { border-left: 4px solid #f59e0b; }
|
|
|
|
/* Table zebra striping */
|
|
.table-striped tbody tr:nth-child(even) {
|
|
background-color: #f9fafb;
|
|
}
|
|
|
|
/* Action buttons */
|
|
.btn-action {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
padding: 4px 10px;
|
|
border-radius: 6px;
|
|
font-size: 12px;
|
|
font-weight: 600;
|
|
transition: all 0.15s ease;
|
|
border: none;
|
|
cursor: pointer;
|
|
text-decoration: none;
|
|
}
|
|
.btn-action-green { background: #dcfce7; color: #166534; }
|
|
.btn-action-green:hover { background: #bbf7d0; }
|
|
.btn-action-red { background: #fee2e2; color: #991b1b; }
|
|
.btn-action-red:hover { background: #fecaca; }
|
|
.btn-action-blue { background: #dbeafe; color: #1e40af; }
|
|
.btn-action-blue:hover { background: #bfdbfe; }
|
|
.btn-action-amber { background: #fef3c7; color: #92400e; }
|
|
.btn-action-amber:hover { background: #fde68a; }
|
|
.btn-action-gray { background: #f3f4f6; color: #374151; }
|
|
.btn-action-gray:hover { background: #e5e7eb; }
|
|
.btn-action-indigo { background: #e0e7ff; color: #4338ca; }
|
|
.btn-action-indigo:hover { background: #c7d2fe; }
|
|
|
|
/* Primary action buttons (filled) */
|
|
.btn-primary-green { background: #16a34a; color: #fff; }
|
|
.btn-primary-green:hover { background: #15803d; }
|
|
.btn-primary-red { background: #dc2626; color: #fff; }
|
|
.btn-primary-red:hover { background: #b91c1c; }
|
|
|
|
/* Gradient header */
|
|
.header-gradient {
|
|
background: linear-gradient(135deg, #4338ca 0%, #6366f1 50%, #818cf8 100%);
|
|
}
|
|
|
|
/* Sidebar active state */
|
|
.sidebar-active {
|
|
background: linear-gradient(90deg, #eef2ff, #e0e7ff);
|
|
border-right: 3px solid #6366f1;
|
|
color: #4338ca;
|
|
font-weight: 600;
|
|
}
|
|
|
|
/* Smooth page transitions */
|
|
.page-enter {
|
|
animation: fadeSlideIn 0.25s ease-out;
|
|
}
|
|
@keyframes fadeSlideIn {
|
|
from { opacity: 0; transform: translateY(8px); }
|
|
to { opacity: 1; transform: translateY(0); }
|
|
}
|
|
|
|
/* Empty state styling */
|
|
.empty-state {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: 8px;
|
|
padding: 2rem 1rem;
|
|
color: #9ca3af;
|
|
}
|
|
.empty-state svg {
|
|
width: 48px;
|
|
height: 48px;
|
|
opacity: 0.4;
|
|
}
|
|
|
|
/* Badge pulse for active items */
|
|
.badge-pulse {
|
|
animation: pulse 2s infinite;
|
|
}
|
|
@keyframes pulse {
|
|
0%, 100% { opacity: 1; }
|
|
50% { opacity: 0.7; }
|
|
}
|
|
|
|
/* ─── Responsive list tables ───────────────────────────────────────────────
|
|
Under 640px (a phone held in portrait; rotate to landscape and the width
|
|
grows past the breakpoint, restoring the normal table) every table with the
|
|
`table-cards` class reflows: the header is hidden and each row becomes a
|
|
card, with each cell shown as "LABEL … value" (the label comes from the
|
|
cell's data-label attribute). Cells with no data-label (the actions column,
|
|
marked `.cell-actions`) span the row full width. */
|
|
@media (max-width: 640px) {
|
|
table.table-cards,
|
|
table.table-cards tbody {
|
|
display: block;
|
|
width: 100%;
|
|
}
|
|
table.table-cards thead {
|
|
display: none;
|
|
}
|
|
table.table-cards tr {
|
|
display: block;
|
|
border: 1px solid #e5e7eb;
|
|
border-radius: 10px;
|
|
margin-bottom: 12px;
|
|
padding: 4px 2px;
|
|
background: #fff;
|
|
}
|
|
/* zebra striping would fight the card borders */
|
|
table.table-cards.table-striped tbody tr:nth-child(even) {
|
|
background: #fff;
|
|
}
|
|
table.table-cards td {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 12px;
|
|
width: 100%;
|
|
text-align: right;
|
|
padding: 6px 12px;
|
|
border: none !important;
|
|
}
|
|
table.table-cards td[data-label]::before {
|
|
content: attr(data-label);
|
|
flex: 0 0 auto;
|
|
margin-right: auto;
|
|
text-align: left;
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
color: #6b7280;
|
|
text-transform: uppercase;
|
|
letter-spacing: .3px;
|
|
}
|
|
/* Actions row: full width, buttons wrapped to the right */
|
|
table.table-cards td.cell-actions {
|
|
justify-content: flex-end;
|
|
flex-wrap: wrap;
|
|
margin-top: 2px;
|
|
padding-top: 10px;
|
|
border-top: 1px solid #f3f4f6 !important;
|
|
}
|
|
/* Cells spanning all columns (empty state, inline edit form) stay full
|
|
width and block, so their inner layout isn't squeezed by the flex row. */
|
|
table.table-cards td[colspan] {
|
|
display: block;
|
|
text-align: center;
|
|
}
|
|
}
|