Files
tinker_tickets/assets/css/dashboard.css

607 lines
12 KiB
CSS

/* ===== CSS VARIABLES ===== */
:root {
--bg-primary: #f5f7fa;
--bg-secondary: #ffffff;
--text-primary: #2c3e50;
--text-secondary: #4a5568;
--border-color: #eee;
--shadow: 0 2px 4px rgba(0,0,0,0.1);
--hover-bg: #f8f9fa;
--priority-1: #ff4d4d;
--priority-2: #ffa726;
--priority-3: #42a5f5;
--priority-4: #66bb6a;
--priority-5: #9e9e9e;
/* Status Colors */
--status-open: #28a745;
--status-in-progress: #ffc107;
--status-closed: #dc3545;
/* Spacing */
--spacing-xs: 0.5rem;
--spacing-sm: 1rem;
--spacing-md: 1.5rem;
--spacing-lg: 2rem;
/* Transitions */
--transition-default: all 0.3s ease;
}
/* Dark theme */
[data-theme="dark"] {
--bg-primary: #1a202c;
--bg-secondary: #2d3748;
--text-primary: #f7fafc;
--text-secondary: #e2e8f0;
--border-color: #4a5568;
--shadow: 0 2px 4px rgba(0,0,0,0.3);
--hover-bg: #374151;
}
/* ===== BASE ELEMENTS ===== */
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
margin: 0;
padding: var(--spacing-md);
background-color: var(--bg-primary);
color: var(--text-primary);
transition: var(--transition-default);
}
body.menu-open {
padding-left: 260px;
}
h1 {
color: var(--text-primary);
margin: 0;
}
/* ===== LAYOUT COMPONENTS ===== */
.dashboard-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: var(--spacing-md);
margin-left: 3.75rem;
}
.table-controls {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 15px;
padding: 10px;
background: var(--bg-secondary);
border-radius: 8px;
box-shadow: var(--shadow);
}
.ticket-count {
font-weight: 500;
color: var(--text-secondary);
}
.table-actions {
display: flex;
gap: 15px;
align-items: center;
}
/* ===== BUTTON STYLES ===== */
.btn-base {
padding: var(--spacing-sm) var(--spacing-md);
border-radius: 6px;
border: none;
cursor: pointer;
transition: var(--transition-default);
}
.btn-primary {
background: #3b82f6;
color: white;
}
.create-ticket {
background: #3b82f6;
color: white;
padding: 0.625rem 1.25rem;
border-radius: 0.375rem;
border: none;
cursor: pointer;
font-weight: 500;
transition: background-color 0.3s ease;
margin-right: 3.75rem;
}
.create-ticket:hover {
background: #2563eb;
}
/* ===== TABLE STYLES ===== */
table {
width: 100%;
border-collapse: separate;
border-spacing: 0;
background: var(--bg-secondary);
border-radius: 12px;
box-shadow: var(--shadow);
overflow: hidden;
}
th, td {
padding: 16px;
text-align: left;
border-bottom: 1px solid var(--border-color);
color: var(--text-primary);
}
th {
background-color: var(--bg-secondary);
font-weight: 600;
text-transform: uppercase;
font-size: 0.9em;
letter-spacing: 0.05em;
position: relative;
cursor: pointer;
}
tr:hover {
background-color: var(--hover-bg);
}
tbody tr td:first-child {
border-left: 6px solid;
}
/* Priority row colors */
tbody tr.priority-1 td:first-child { border-left-color: var(--priority-1); }
tbody tr.priority-2 td:first-child { border-left-color: var(--priority-2); }
tbody tr.priority-3 td:first-child { border-left-color: var(--priority-3); }
tbody tr.priority-4 td:first-child { border-left-color: var(--priority-4); }
tbody tr.priority-5 td:first-child { border-left-color: var(--priority-5); }
/* Priority number styling */
td:nth-child(2) {
text-align: center;
}
td:nth-child(2) span {
font-weight: bold;
font-family: 'Courier New', monospace;
padding: 4px 8px;
border-radius: 4px;
display: inline-block;
background: var(--hover-bg);
}
.priority-1 td:nth-child(2) { color: var(--priority-1); }
.priority-2 td:nth-child(2) { color: var(--priority-2); }
.priority-3 td:nth-child(2) { color: var(--priority-3); }
.priority-4 td:nth-child(2) { color: var(--priority-4); }
.priority-5 td:nth-child(2) { color: var(--priority-5); }
/* ===== STATUS STYLES ===== */
.status-Open {
background-color: var(--status-open) !important;
color: white !important;
padding: 4px 8px;
border-radius: 4px;
font-size: 0.875rem;
font-weight: 500;
}
.status-In-Progress {
background-color: var(--status-in-progress) !important;
color: #212529 !important;
padding: 4px 8px;
border-radius: 4px;
font-size: 0.875rem;
font-weight: 500;
}
.status-Closed {
background-color: var(--status-closed) !important;
color: white !important;
padding: 4px 8px;
border-radius: 4px;
font-size: 0.875rem;
font-weight: 500;
}
/* ===== SEARCH AND FILTER STYLES ===== */
.search-box {
padding: 0.5rem 0.75rem;
border: 1px solid var(--border-color);
border-radius: 0.375rem;
background: var(--bg-secondary);
color: var(--text-primary);
margin-left: 1.25rem;
width: 40%;
}
.search-box:focus {
outline: none;
border-color: #3b82f6;
box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}
/* Status Filter Dropdown */
.status-filter-container {
position: relative;
display: inline-block;
margin-right: 15px;
}
.status-dropdown {
position: relative;
display: inline-block;
}
.dropdown-header {
padding: 8px 15px;
background: var(--bg-secondary);
border: 1px solid var(--border-color);
border-radius: 4px;
cursor: pointer;
min-width: 120px;
}
.dropdown-content {
display: none;
position: absolute;
top: 100%;
left: 0;
background: var(--bg-secondary);
min-width: 160px;
box-shadow: var(--shadow);
border-radius: 4px;
padding: 10px;
z-index: 100;
border: 1px solid var(--border-color);
}
.status-dropdown.active .dropdown-content {
display: block;
}
.dropdown-content label {
display: block;
padding: 8px;
cursor: pointer;
transition: background 0.2s;
}
.dropdown-content label:hover {
background: var(--hover-bg);
}
.dropdown-content .save-filter {
margin-top: 10px;
width: 100%;
padding: 8px;
background: #3b82f6;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
}
/* ===== HAMBURGER MENU STYLES ===== */
.hamburger-menu {
position: absolute;
top: 20px;
left: 20px;
z-index: 100;
}
.hamburger-icon {
cursor: pointer;
font-size: 24px;
background: var(--bg-secondary);
padding: 10px;
border-radius: 4px;
box-shadow: var(--shadow);
}
.hamburger-content {
position: fixed;
top: 0;
left: -250px;
width: 200px;
height: 100%;
background: var(--bg-secondary);
box-shadow: 2px 0 5px rgba(0,0,0,0.1);
transition: left 0.3s ease;
padding: 40px 20px 20px;
overflow-y: auto;
z-index: 99;
}
.hamburger-content.open {
left: 0;
}
.close-hamburger {
position: absolute;
top: 10px;
right: 10px;
cursor: pointer;
font-size: 24px;
background: var(--bg-secondary);
padding: 10px;
border-radius: 4px;
box-shadow: var(--shadow);
}
/* Hamburger menu inline editing styles */
.ticket-info-editable {
padding: 10px 0;
}
.editable-field, .info-field {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 12px;
position: relative;
}
.editable-field label, .info-field label {
flex: 0 0 auto;
margin-right: 10px;
}
.editable-value {
flex: 1;
text-align: right;
min-height: 20px;
display: inline-block;
cursor: pointer;
padding: 4px 8px;
border-radius: 4px;
transition: background-color 0.2s;
}
.editable-value:hover {
background-color: var(--hover-bg) !important;
}
.edit-dropdown {
position: absolute;
top: 100%;
right: 0;
background: var(--bg-primary);
border: 1px solid var(--border-color);
border-radius: 4px;
padding: 8px;
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
z-index: 1000;
min-width: 150px;
}
.field-select {
width: 100%;
padding: 4px 8px;
border: 1px solid var(--border-color);
border-radius: 4px;
margin-bottom: 8px;
background: var(--bg-primary);
color: var(--text-primary);
}
.edit-actions {
display: flex;
gap: 4px;
justify-content: flex-end;
}
.save-btn, .cancel-btn {
padding: 4px 8px;
border: none;
border-radius: 3px;
cursor: pointer;
font-size: 12px;
min-width: 24px;
}
.save-btn {
background: #28a745;
color: white;
}
.save-btn:hover {
background: #218838;
}
.cancel-btn {
background: #dc3545;
color: white;
}
.cancel-btn:hover {
background: #c82333;
}
.info-field span {
flex: 1;
text-align: right;
color: var(--text-secondary);
}
/* ===== UTILITY STYLES ===== */
.theme-toggle {
position: absolute;
top: 20px;
right: 20px;
z-index: 100;
padding: 12px;
border-radius: 50%;
background: var(--bg-secondary);
border: 1px solid var(--border-color);
cursor: pointer;
box-shadow: var(--shadow);
font-size: 1.2em;
transition: transform 0.3s ease;
}
.theme-toggle:hover {
transform: scale(1.1);
}
.ticket-link {
font-family: 'Courier New', monospace;
font-weight: bold;
color: var(--text-primary) !important;
text-decoration: none;
background: var(--hover-bg);
padding: 4px 8px;
border-radius: 4px;
display: inline-block;
}
.ticket-link:hover {
background: var(--border-color);
}
/* ===== PAGINATION STYLES ===== */
.pagination {
display: flex;
gap: 0.5rem;
align-items: center;
}
.pagination button {
padding: 0.5rem 0.75rem;
border: 1px solid var(--border-color);
background: var(--bg-secondary);
color: var(--text-primary);
border-radius: 0.375rem;
cursor: pointer;
transition: all 0.2s ease;
}
.pagination button:hover {
background: var(--hover-bg);
}
.pagination button.active {
background: #3b82f6;
color: white;
border-color: #3b82f6;
}
/* ===== SORTING STYLES ===== */
th::after {
content: '';
position: absolute;
right: 8px;
top: 50%;
transform: translateY(-50%);
width: 0;
height: 0;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
opacity: 0.5;
}
th.sort-asc::after {
border-bottom: 7px solid var(--text-primary);
opacity: 1;
}
th.sort-desc::after {
border-top: 7px solid var(--text-primary);
opacity: 1;
}
/* ===== SETTINGS MODAL STYLES ===== */
.settings-modal-backdrop {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
display: flex;
justify-content: center;
align-items: center;
z-index: 1000;
}
.settings-modal {
background: var(--bg-secondary);
border-radius: 12px;
width: 500px;
max-width: 90%;
box-shadow: var(--shadow);
padding: 20px;
}
.settings-modal-header {
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1px solid var(--border-color);
padding-bottom: 15px;
margin-bottom: 15px;
}
.settings-modal-header h2 {
margin: 0;
color: var(--text-primary);
}
.close-modal {
background: none;
border: none;
font-size: 24px;
cursor: pointer;
color: var(--text-secondary);
}
.setting-group {
margin-bottom: 15px;
}
.setting-group label {
display: block;
margin-bottom: 8px;
color: var(--text-primary);
}
.setting-group select {
width: 100%;
padding: 10px;
border: 1px solid var(--border-color);
border-radius: 6px;
background: var(--bg-primary);
color: var(--text-primary);
}
.settings-modal-footer {
display: flex;
justify-content: flex-end;
gap: 10px;
border-top: 1px solid var(--border-color);
padding-top: 15px;
}
.save-settings, .cancel-settings {
padding: 10px 20px;
border-radius: 6px;
border: none;
cursor: pointer;
transition: background-color 0.3s ease;
}
.save-settings {
background: #3b82f6;
color: white;
}
.cancel-settings {
background: var(--hover-bg);
color: var(--text-primary);
}