/* (c) Adrian Ranta. All rights reserved. Unauthorised use, reproduction and or distribution is strictly prohibited. */
/* ========================================
   DASHBOARD & STATISTICS
   ======================================== */

/* Statistics Cards */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-number {
    font-size: 2em;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 5px;
}

.stat-label {
    color: #666;
    font-size: 0.9em;
}

/* ========================================
   NAVIGATION & CONTROLS
   ======================================== */

/* Dropdown Menu */
.dropdown-menu {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    padding: 12px 24px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 14px;
}

.dropdown-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.dropdown-content {
    display: none;
    position: absolute;
    background: white;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    z-index: 1000;
    margin-top: 5px;
    overflow: hidden;
}

.dropdown-content.show {
    display: block;
}

.dropdown-item {
    padding: 12px 20px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border: none;
    width: 100%;
    text-align: left;
    background: none;
    font-size: 14px;
}

.dropdown-item:hover {
    background-color: #f5f5f5;
}

/* View Toggle Buttons */
.view-toggle {
    display: flex;
    gap: 10px;
}

.view-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.view-btn.active {
    background: var(--primary-color);
    color: white;
}

.view-btn:not(.active) {
    background: #f0f0f0;
    color: #666;
}

.view-btn:hover {
    transform: translateY(-1px);
}

/* ========================================
   TICKET MANAGEMENT COMPONENTS
   ======================================== */


.ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.ticket-number-title h3 {
    margin: 0 0 5px 0;
    color: #2c3e50;
    font-size: 1.1rem;
}

.ticket-number-title h4 {
    margin: 0;
    color: #34495e;
    font-weight: 500;
    font-size: 1rem;
}

.ticket-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.priority-badge, .status-badge, .sla-indicator {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.priority-critical { background: #e74c3c; color: white; }
.priority-high { background: #f39c12; color: white; }
.priority-medium { background: #f1c40f; color: #2c3e50; }
.priority-low { background: #27ae60; color: white; }

.status-open { background: #3498db; color: white; }
.status-progress { background: #9b59b6; color: white; }
.status-pending { background: #f39c12; color: white; }
.status-resolved { background: #27ae60; color: white; }
.status-closed { background: #95a5a6; color: white; }
.status-escalated { background: #e74c3c; color: white; }

.sla-overdue { background: #e74c3c; color: white; }
.sla-critical { background: #fd79a8; color: white; }
.sla-warning { background: #fdcb6e; color: #2c3e50; }
.sla-good { background: #00b894; color: white; }

.ticket-details {
    margin-bottom: 15px;
}

.ticket-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

.meta-item {
    display: flex;
    gap: 5px;
}

.meta-label {
    font-weight: 600;
    color: #7f8c8d;
}

.meta-value {
    color: #2c3e50;
}

.ticket-description {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 6px;
    color: #5a6c7d;
    font-style: italic;
    margin-bottom: 10px;
}

.ticket-times {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    font-size: 0.9rem;
}

.time-item {
    display: flex;
    gap: 5px;
}

.time-label {
    font-weight: 600;
    color: #7f8c8d;
}

.time-value {
    color: #2c3e50;
}

.ticket-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ecf0f1;
}

.btn-view, .btn-edit, .btn-comment, .btn-resolve, .btn-reopen {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.btn-view { background: #3498db; color: white; }
.btn-edit { background: #f39c12; color: white; }
.btn-comment { background: #9b59b6; color: white; }
.btn-resolve { background: #27ae60; color: white; }
.btn-reopen { background: #e67e22; color: white; }

.btn-view:hover { background: #2980b9; }
.btn-edit:hover { background: #e68900; }
.btn-comment:hover { background: #8e44ad; }
.btn-resolve:hover { background: #229954; }
.btn-reopen:hover { background: #d35400; }


.ticket-header .ticket-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    gap: 5px;
    align-items: center;
}

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

.stat-value {
    font-weight: 600;
    color: #2c3e50;
}

.stat-info { color: #3498db; }
.stat-good { color: #27ae60; }
.stat-warning { color: #f39c12; }
.stat-danger { color: #e74c3c; }

/* ========================================
   ASSET CARDS & DISPLAY
   ======================================== */

/* Asset Cards */
.asset-card {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    user-select: none;
}

.asset-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.asset-card.selected {
    border-color: var(--secondary-color);
    background: linear-gradient(135deg, #e8ebff 0%, #dde0ff 100%);
}

/* Asset Card Grid Layout */
.asset-card-grid {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
    align-items: center;
}

/* Asset Fields */
.asset-field {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9em;
}

.asset-name-field {
    font-weight: 600;
    color: #333;
    font-size: 1.1em;
}

.asset-name-field .field-value {
    font-weight: 600;
}

.field-label {
    color: #666;
    font-weight: 500;
    min-width: fit-content;
}

.field-value {
    color: #333;
}

/* Positioning for middle column items in asset card grid */
.asset-card-grid > div:nth-child(2),
.asset-card-grid > div:nth-child(5) {
    justify-content: flex-start;
    padding-left: 0px;
	margin-left: -150px;/* Adjust this to control distance from LEFT column */
}

/* Positioning for right column items in asset card grid */
.asset-card-grid > div:nth-child(3),
.asset-card-grid > div:nth-child(6) {
    margin-left: -150px;  /* Adjust this to control distance from middle column */
}

/* Asset Labels Row */
.asset-labels-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 5px;
    overflow: hidden;
    white-space: nowrap;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* Labels */
.label {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
}

/* Asset type icon */
.asset-type-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    min-width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Ensure proper alignment */
.asset-name-field {
    display: flex;
    align-items: center;
    gap: 0;
}

/* Custom image icons */
.asset-type-icon-img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 8px;
}

/* ========================================
   FORMS & INPUT COMPONENTS
   ======================================== */

/* Forms */
.asset-form {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(115, 102, 239, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(115, 102, 239, 0.4);
    background: var(--secondary-color);
}

.btn-small {
    padding: 8px 15px;
    font-size: 0.9em;
}

/* Floating Action Button - Hidden */
.fab, #addAssetBtn, #addAccountBtn, #addVendorBtn, #addInventoryBtn, #addLicenseBtn, #addTicketBtn, #addUserBtn {
    display: none;
}

.btn-danger {
    background: linear-gradient(45deg, #f56565, #e53e3e);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(245, 101, 101, 0.3);
}

/* Read-only field display for view-only mode */
.field-value-display {
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    color: #333;
    min-height: 38px;
    display: flex;
    align-items: center;
}

.labels-display {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    min-height: 38px;
}

.labels-display .label {
    margin: 0;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

/* Config items */
.config-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-gradient);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.9em;
    font-weight: 500;
}

/* Field toggle active */
.field-toggle.active {
    background: var(--primary-color);
}

/* Labels and Connections Containers */
.labels-container,
.connections-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    min-height: 40px;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #f9f9f9;
}

.label-item,
.connection-item {
    display: flex;
    align-items: center;
    gap: 5px;
    background: var(--primary-gradient);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.85em;
    font-weight: 500;
}

.connection-item {
    background: linear-gradient(45deg, #48bb78, #38a169);
}

.remove-btn {
    background: rgba(255, 255, 255, 0.3);
    border: none;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    cursor: pointer;
    font-size: 12px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-btn:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Add containers */
.add-label-container,
.add-connection-container {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.add-label-container input,
.add-connection-container select {
    flex: 1;
    padding: 8px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
}

/* Floating Add Button */
.add-asset-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    z-index: 100;
}

.add-asset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

/* Button styles to match new design */
button.primary {
    background: #6c5ce7;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

button.primary:hover {
    background: #5f50e4;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
}

.clear-btn {
    background: #e0e0e0;
    color: #666;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.clear-btn:hover {
    background: #d0d0d0;
}

/* Context Menu */
.context-menu {
    position: fixed;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border: 1px solid #e0e0e0;
    padding: 8px 0;
    z-index: 2000;
    min-width: 180px;
    display: none;
}

.context-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 14px;
    color: #333;
}

.context-menu-item:hover {
    background-color: #f5f5f5;
}

.context-menu-item.danger:hover {
    background-color: #fee;
    color: #e53e3e;
}

.context-menu-separator {
    height: 1px;
    background-color: #e0e0e0;
    margin: 4px 0;
}

.context-menu-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Search Input */
.search-input {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 13px;
    transition: all 0.3s ease;
    flex: 1;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.2);
}

/* Account Details Display */
.contact-display-section {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.contact-display-section h5 {
    margin: 0 0 10px 0;
    color: #667eea;
}

.contact-display-fields {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.contact-display-fields div {
    color: #333;
}

.field-value-display.tall {
    min-height: 80px;
    white-space: pre-wrap;
}

/* Asset card animations */
.asset-card {
    transition: all 0.3s ease;
}

.asset-card.highlighted {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #f59e0b;
}

.asset-card.flash {
    animation: flash 1s ease-in-out;
}

@keyframes flash {
    0%, 100% {
        background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
    }
    50% {
        background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    }
}

/* Loading spinner */
.loading-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 20px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error state */
.no-data.error {
    color: #dc2626;
    background: #fee2e2;
    padding: 20px;
    border-radius: 8px;
}

/* Search and filter controls */
.search-container {
    display: flex;
    gap: 15px;
    flex: 1;
    min-width: 300px;
    align-items: center;
}

.search-input {
    flex: 1;
    position: relative;
}

.search-input:focus {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

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

/* Filter active indicator */
.filter-select:not([value=""]) {
    border-color: #667eea;
    background-color: #f0f4ff;
}

/* Search highlighting */
mark {
    background-color: #fef3c7;
    color: inherit;
    padding: 0 2px;
    border-radius: 2px;
}

/* Filter stats badge */
.filter-stats {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    background: #e0e7ff;
    color: #4338ca;
    border-radius: 15px;
    font-size: 0.85em;
    font-weight: 500;
}

.filter-stats .clear-filters {
    cursor: pointer;
    margin-left: 5px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.filter-stats .clear-filters:hover {
    opacity: 1;
}

/* Collapsed filter panel */
.controls.collapsed .search-container {
    display: none;
}

.controls.collapsed .view-toggle {
    margin-left: auto;
}

/* Quick filter buttons */
.quick-filter {
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-filter:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* No results message */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.no-results h3 {
    color: #374151;
    margin-bottom: 10px;
}

.no-results .suggestions {
    margin-top: 20px;
}

.no-results .suggestions button {
    margin: 5px;
}

/* Ensure button spacing in view toggle */
.view-toggle {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* ========================================
   ACCOUNT MANAGEMENT
   ======================================== */

/* Accounts List */
.accounts-list {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    max-height: calc(100vh - 250px);
    overflow-y: auto;
}

/* Account Cards */

.account-name {
    font-weight: 600;
    color: #333;
    font-size: 1.2em;
    margin-bottom: 8px;
}


/* Contact sections */
.contact-section {
    margin-bottom: 20px;
}

.contact-section h5 {
    color: #667eea;
    margin-bottom: 10px;
}

.contact-fields {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
}

.form-group-inline {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.form-group-inline input {
    flex: 1;
}

.form-group-inline:last-child {
    margin-bottom: 0;
}

/* Wide Account Form */
.account-form-wide {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.account-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.account-main-info {
    padding-right: 20px;
    border-right: 1px solid #e0e0e0;
}

.account-side-info {
    padding-left: 0;
}

.account-contacts-section {
    padding-left: 0;
}

.contacts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.contacts-header h4 {
    margin: 0;
    color: #333;
}

.add-contact-container {
    display: flex;
    gap: 10px;
}

.add-contact-container select {
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
}

/* Contact sections */
.contact-section {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.contact-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.contact-section h5 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.contact-fields {
    background: white;
    padding: 15px;
    border-radius: 8px;
}

.form-group-inline {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.form-group-inline input {
    flex: 1;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-group-inline input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group-inline input.error {
    border-color: #dc2626;
}

.form-group-inline input::placeholder {
    color: #999;
    font-style: italic;
}

.form-group-inline:last-child {
    margin-bottom: 0;
}

/* Small danger button */
.btn-small.btn-danger {
    background: #dc2626;
    color: white;
    padding: 6px 12px;
    font-size: 12px;
}

.btn-small.btn-danger:hover {
    background: #b91c1c;
}

/* Responsive */
@media (max-width: 1024px) {
    .account-form-grid {
        grid-template-columns: 1fr;
    }
    
    .account-main-info {
        padding-right: 0;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        padding-bottom: 20px;
    }
    
    .account-contacts-section {
        padding-left: 0;
        padding-top: 20px;
    }
}

/* ========================================
   ADMINISTRATION & SETTINGS
   ======================================== */

/* Administration Styles */
.admin-container {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.admin-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.admin-tab {
    padding: 12px 20px;
    border: none;
    background: none;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    font-weight: 500;
    transition: all 0.3s ease;
}

.admin-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.admin-section {
    padding: 20px 0;
}

.file-operations {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.branding-group {
    margin-bottom: 30px;
}

.logo-upload-area {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.logo-preview {
    width: 200px;
    height: 60px;
    border: 2px dashed #e0e0e0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.logo-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.logo-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.color-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.color-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.color-item input[type="color"] {
    width: 100%;
    height: 40px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
}

.header-logo {
    height: 40px;
    max-width: 200px;
    object-fit: contain;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
}

.label {
    background: var(--primary-gradient);
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
}

.icon-upload-section {
    margin-bottom: 20px;
    text-align: center;
}

.icon-upload-note {
    display: block;
    font-size: 0.85em;
    color: #666;
    margin-top: 5px;
}

/* ========================================
   LAYOUT COMPONENTS
   ======================================== */

/* Resize Handle with Toggle */
.resize-handle {
    width: 5px;
    height: 100%;
    background: #e0e0e0;
    cursor: col-resize;
    position: relative;
    transition: background 0.2s;
    flex-shrink: 0;
}

/* Compact Toggle Button */
.compact-toggle {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 40px;
    background: #667eea;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: white;
    font-size: 10px;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.compact-toggle:hover {
    background: #5a67d8;
    width: 24px;
}

.toggle-arrow {
    display: inline-block;
    transition: transform 0.3s ease;
}

/* Compact Mode Styles */
.left-pane {
    transition: width 0.3s ease;
}

.left-pane.compact {
    width: 60px !important;
    min-width: 60px !important;
}

.left-pane.compact .pane-header h2 {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.left-pane.compact .nav-btn {
    padding: 12px;
    justify-content: center;
}

.left-pane.compact .nav-btn::after {
    content: attr(title);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    margin-left: 15px;
    z-index: 1000;
    font-size: 14px;
}

.left-pane.compact .nav-btn:hover::after {
    opacity: 1;
}

/* When compact, rotate the arrow */
.left-pane.compact ~ .resize-handle .toggle-arrow {
    transform: rotate(180deg);
}

/* Disable resize when in compact mode */
.left-pane.compact ~ .resize-handle {
    cursor: default;
}

/* ========================================
   CONFIG COMPONENTS
   ======================================== */

.config-item .config-item-icon {
    margin-right: 8px;
    font-size: 1em;
    display: inline-block;
}

/* Ensure all config items have consistent sizing */
.config-list .config-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-gradient);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.9em;
    font-weight: 500;
    max-height: 32px;
    line-height: 1.2;
}

/* ========================================
   VENDOR MANAGEMENT
   ======================================== */

/* Vendors Container */
.vendors-container {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.vendors-header {
    margin-bottom: 30px;
}

.vendors-header h1 {
    margin: 0 0 8px 0;
    color: #212529;
    font-size: 2em;
    font-weight: 500;
}

.vendors-header p {
    margin: 0;
    color: #6c757d;
    font-size: 1.1em;
}

.vendors-content {
    min-height: 400px;
}

/* View Controls */
.view-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.view-toggle {
    display: flex;
    gap: 5px;
}

.view-btn {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-btn:hover {
    background: #f5f5f5;
}

.view-btn.active {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
}

.vendor-count {
    color: #666;
    font-size: 0.9em;
}

/* Vendors Grid View */
.vendors-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 10px 0;
}

.vendor-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e5e5e5;
}

.vendor-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Vendor Bar Layout */

.vendor-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.vendor-name {
    font-size: 1.2em;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.vendor-badges {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: flex-end;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
    text-transform: uppercase;
}

.status-active {
    background: #e8f5e8;
    color: #4caf50;
}

.status-inactive {
    background: #ffeaa7;
    color: #f39c12;
}

.preferred-badge {
    background: #fff3cd;
    color: #856404;
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 0.75em;
    font-weight: 500;
}

.vendor-details {
    margin-bottom: 15px;
}

.vendor-code {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 10px;
}

.contact-info {
    margin-bottom: 10px;
}

.contact-name {
    font-weight: 500;
    color: #333;
}

.contact-email {
    color: #666;
    font-size: 0.9em;
}

.rating {
    color: #ffc107;
    margin-bottom: 8px;
}

.contract-info {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 8px;
}

.agreement-type {
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.85em;
    color: #495057;
    display: inline-block;
}

.vendor-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.btn-edit, .btn-view, .btn-delete {
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-edit {
    background: #ffc107;
    color: #212529;
}

.btn-edit:hover {
    background: #e0a800;
}

.btn-view {
    background: #17a2b8;
    color: white;
}

.btn-view:hover {
    background: #138496;
}

.btn-delete {
    background: #dc3545;
    color: white;
}

.btn-delete:hover {
    background: #c82333;
}

/* Vendors Table View */
.vendors-table-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

.vendors-table th {
    background: #f8f9fa;
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    position: relative;
}

/* Sortable column headers — shared across all list tables */
.vendors-table th.sortable,
.compact-list-table th.sortable {
    cursor: pointer;
    user-select: none;
}

.vendors-table th.sortable:hover,
.compact-list-table th.sortable:hover {
    background: #e9ecef;
}

/* Sortable div-based headers (assets, users) */
.asset-list-header .sortable,
.user-list-header .sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
}

.asset-list-header .sortable:hover,
.user-list-header .sortable:hover {
    background: rgba(0,0,0,0.04);
    border-radius: 4px;
}

.sort-indicator {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.3;
}

.sort-indicator.active {
    opacity: 1;
}

.sort-indicator.asc::after {
    content: '▲';
}

.sort-indicator.desc::after {
    content: '▼';
}

.vendors-table td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
    vertical-align: middle;
}

.vendor-row:hover {
    background: #f8f9fa;
}

.vendor-row.selected {
    background: #f0f2ff;
}

.vendor-row {
    cursor: pointer;
}

.vendors-table .actions {
    white-space: nowrap;
}

.btn-small {
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8em;
    margin: 0 2px;
    transition: all 0.3s ease;
}

/* Vendor Forms */
.vendor-form-modal {
    max-width: 95% !important;
    width: 95% !important;
    max-height: 90vh;
    overflow-y: auto;
}

/* Override modal-content for vendor forms specifically */
#vendorFormModal .modal-content {
    max-width: 95% !important;
    width: 95% !important;
}

.vendor-form {
    max-height: 70vh;
    overflow-y: auto;
}

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

.form-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.form-section h3 {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 1.1em;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 8px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #495057;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 0.9em;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.25);
}

.form-group input[readonly],
.form-group textarea[readonly] {
    background: #e9ecef;
    cursor: not-allowed;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.checkbox-group label {
    margin-bottom: 0;
    cursor: pointer;
}

/* No Data State */
.no-data {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.no-data-icon {
    font-size: 4em;
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-data-title {
    font-size: 1.4em;
    font-weight: 600;
    margin-bottom: 10px;
    color: #495057;
}

.no-data-message {
    font-size: 1em;
    line-height: 1.5;
}

/* Generic View Containers */
.inventory-container,
.licenses-container,
.tickets-container {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.inventory-header h1,
.licenses-header h1,
.tickets-header h1 {
    margin: 0 0 8px 0;
    color: #212529;
    font-size: 2em;
    font-weight: 500;
}

.inventory-header p,
.licenses-header p,
.tickets-header p {
    margin: 0;
    color: #6c757d;
    font-size: 1.1em;
}

.inventory-content,
.licenses-content,
.tickets-content {
    min-height: 400px;
}

/* ========================================
   INVENTORY MANAGEMENT
   ======================================== */

/* Inventory Header and Stats */
.inventory-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.inventory-stats {
    display: flex;
    gap: 20px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat-label {
    font-size: 0.8em;
    color: #666;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 1.2em;
    font-weight: 600;
    color: #333;
}

.stat-good {
    color: #4caf50;
}

.stat-warning {
    color: #ff9800;
}

.stat-danger {
    color: #f44336;
}

/* Inventory Grid View */
.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 20px;
    padding: 10px 0;
}


.inventory-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.item-name {
    font-size: 1.2em;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.item-badges {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: flex-end;
}

.stock-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
    text-transform: uppercase;
}

.stock-good {
    background: #e8f5e8;
    color: #4caf50;
}

.stock-low {
    background: #fff3cd;
    color: #856404;
}

.stock-out {
    background: #f8d7da;
    color: #721c24;
}

.inventory-details {
    margin-bottom: 15px;
}

.item-sku {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.item-category {
    background: #f8f9fa;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.85em;
    color: #495057;
    display: inline-block;
    margin-bottom: 8px;
}

.item-manufacturer {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 10px;
}

.stock-info, .cost-info {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 10px;
}

.stock-row, .cost-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.stock-row:last-child, .cost-row:last-child {
    margin-bottom: 0;
}

.stock-label, .cost-label {
    font-size: 0.85em;
    color: #666;
}

.stock-value, .cost-value {
    font-weight: 500;
    color: #333;
}

.stock-value.in-stock {
    color: #4caf50;
}

.stock-value.low-stock {
    color: #ff9800;
}

.stock-value.out-of-stock {
    color: #f44336;
}

.inventory-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.btn-check-out, .btn-check-in {
    padding: 6px 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-check-out {
    background: #2196f3;
    color: white;
}

.btn-check-out:hover {
    background: #1976d2;
}

.btn-check-in {
    background: #4caf50;
    color: white;
}

.btn-check-in:hover {
    background: #388e3c;
}

/* Inventory Table View */
.inventory-table-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

.inventory-table th {
    background: #f8f9fa;
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    position: relative;
}

.inventory-table th.sortable {
    cursor: pointer;
    user-select: none;
}

.inventory-table th.sortable:hover,
.compact-list-table th.sortable:hover {
    background: #e9ecef;
}

.inventory-table td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
    vertical-align: middle;
}

.inventory-row:hover {
    background: #f8f9fa;
}

.inventory-table .actions {
    white-space: nowrap;
}

.quantity-available.stock-good {
    color: #4caf50;
    font-weight: 500;
}

.quantity-available.stock-low {
    color: #ff9800;
    font-weight: 500;
}

.quantity-available.stock-out {
    color: #f44336;
    font-weight: 500;
}

/* ========================================
   LICENSE MANAGEMENT
   ======================================== */

/* License Header and Stats */
.license-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.license-stats {
    display: flex;
    gap: 20px;
}

/* License Grid View */
.licenses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
    padding: 10px 0;
}

.license-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e5e5e5;
}

.license-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.license-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.software-name {
    font-size: 1.2em;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.license-badges {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: flex-end;
}

.license-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
    text-transform: uppercase;
}

.license-active {
    background: #e8f5e8;
    color: #4caf50;
}

.license-expiring {
    background: #fff3cd;
    color: #856404;
}

.license-expired {
    background: #f8d7da;
    color: #721c24;
}

.compliance-badge {
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 0.75em;
    font-weight: 500;
}

.compliance-good {
    background: #d4edda;
    color: #155724;
}

.compliance-warning {
    background: #f8d7da;
    color: #721c24;
}

.license-details {
    margin-bottom: 15px;
}

.license-type {
    background: #f8f9fa;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.85em;
    color: #495057;
    display: inline-block;
    margin-bottom: 8px;
    text-transform: capitalize;
}

.license-vendor {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.license-key {
    color: #666;
    font-size: 0.85em;
    margin-bottom: 12px;
    font-family: monospace;
}

.license-usage, .license-financial {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 10px;
}

.usage-row, .financial-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.usage-row:last-child, .financial-row:last-child {
    margin-bottom: 0;
}

.usage-label, .financial-label {
    font-size: 0.85em;
    color: #666;
}

.usage-value, .financial-value {
    font-weight: 500;
    color: #333;
}

.usage-value.over-allocated {
    color: #f44336;
    font-weight: 600;
}

.license-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.btn-assign {
    padding: 6px 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    background: #9c27b0;
    color: white;
}

.btn-assign:hover {
    background: #7b1fa2;
}

/* ========================================
   MODAL STYLES
   ======================================== */

.modal-overlay {
    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: 9999;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-height: 90vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    color: #333;
    font-size: 1.5em;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
}

.close-btn:hover {
    color: #333;
}

.form-content {
    padding: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-column h3 {
    margin: 0 0 20px 0;
    color: #555;
    font-size: 1.1em;
}

/* ========================================
   AUTHENTICATION STYLES
   ======================================== */

.auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.auth-modal {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.auth-header {
    text-align: center;
    margin-bottom: 25px;
}

.auth-header h2 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 1.8em;
}

.auth-header p {
    margin: 0;
    color: #666;
    font-size: 0.9em;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.auth-form input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.auth-form input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.25);
}

.form-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 25px;
}

.btn-primary, .btn-secondary, .btn-tertiary {
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f5f5f5;
    color: #666;
    border: 1px solid #e0e0e0;
}

.btn-secondary:hover {
    background: #e9e9e9;
    border-color: #d0d0d0;
}

.btn-tertiary {
    background: transparent;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.btn-tertiary:hover {
    background: #f8f9fa;
    color: #495057;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 6px;
    margin-top: 15px;
    text-align: center;
}

.loading-message {
    background: #d1ecf1;
    color: #0c5460;
    padding: 10px;
    border-radius: 6px;
    margin-top: 15px;
    text-align: center;
}

.auth-footer {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    text-align: center;
    font-size: 0.85em;
    color: #666;
}

.auth-footer p {
    margin: 3px 0;
}

/* ========================================
   TICKET MANAGEMENT
   ======================================== */

/* Ticket Header and Stats */
.ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ticket-stats {
    display: flex;
    gap: 20px;
}


.ticket-number-title {
    flex: 1;
}

.ticket-number {
    font-size: 1em;
    font-weight: 600;
    color: #667eea;
    margin: 0 0 5px 0;
}

.ticket-title {
    font-size: 1.1em;
    font-weight: 500;
    color: #333;
    margin: 0;
}

.ticket-badges {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: flex-end;
}

.priority-badge, .status-badge, .sla-indicator {
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 0.75em;
    font-weight: 500;
}

.priority-critical {
    background: #f8d7da;
    color: #721c24;
}

.priority-high {
    background: #fff3cd;
    color: #856404;
}

.priority-medium {
    background: #d1ecf1;
    color: #0c5460;
}

.priority-low {
    background: #d4edda;
    color: #155724;
}

.status-open {
    background: #d4edda;
    color: #155724;
}

.status-progress {
    background: #d1ecf1;
    color: #0c5460;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-resolved {
    background: #e2e3e5;
    color: #383d41;
}

.status-closed {
    background: #f8f9fa;
    color: #6c757d;
}

.status-escalated {
    background: #f8d7da;
    color: #721c24;
}

.sla-good {
    background: #d4edda;
    color: #155724;
}

.sla-warning {
    background: #fff3cd;
    color: #856404;
}

.sla-critical {
    background: #ffeaa7;
    color: #b8860b;
}

.sla-overdue {
    background: #f8d7da;
    color: #721c24;
}

.ticket-meta {
    margin: 15px 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.meta-item {
    display: flex;
    justify-content: space-between;
}

.meta-label {
    font-size: 0.85em;
    color: #666;
}

.meta-value {
    font-size: 0.85em;
    font-weight: 500;
    color: #333;
}

.ticket-description {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 6px;
    margin: 15px 0;
    font-size: 0.9em;
    color: #555;
    line-height: 1.4;
}

.ticket-times {
    display: flex;
    justify-content: space-between;
    margin: 15px 0;
    font-size: 0.8em;
    color: #666;
}

.time-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.time-label {
    font-weight: 500;
}

.ticket-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.btn-comment, .btn-resolve, .btn-reopen {
    padding: 6px 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-comment {
    background: #17a2b8;
    color: white;
}

.btn-comment:hover {
    background: #138496;
}

.btn-resolve {
    background: #28a745;
    color: white;
}

.btn-resolve:hover {
    background: #218838;
}

.btn-reopen {
    background: #fd7e14;
    color: white;
}

.btn-reopen:hover {
    background: #e0650e;
}

/* ========================================
   FIX 91: Cross-Module Font & Spacing Standardization
   Normalizes font sizes across all card, table, and badge components.
   (c) Adrian Ranta. All rights reserved. Unauthorised use, reproduction and or distribution is strictly prohibited.
   ======================================== */

/* --- Card Title Standardization: 14px, weight 600 --- */
.vendor-name,
.item-name,
.software-name,
.ticket-title,
.account-name,
.ticket-number {
    font-size: 14px;
    font-weight: 600;
}

/* --- Card Body Text Standardization: 13px --- */
.vendor-code,
.contact-email,
.contact-name,
.item-sku,
.item-manufacturer,
.meta-value,
.meta-label,
.stock-label,
.stock-value,
.cost-label,
.cost-value,
.usage-label,
.usage-value,
.financial-label,
.financial-value,
.time-label,
.time-value,
.contract-info,
.rating {
    font-size: 13px;
}

/* --- Table Header Standardization: 13px, weight 600 --- */
.vendors-table th,
.inventory-table th {
    font-size: 13px;
    font-weight: 600;
}

/* --- Table Body Standardization: 13px --- */
.vendors-table td,
.inventory-table td {
    font-size: 13px;
}

/* --- Badge/Pill Standardization: 11px --- */
.status-badge,
.stock-badge,
.license-badge,
.priority-badge,
.sla-indicator,
.preferred-badge,
.compliance-badge {
    font-size: 11px;
}

/* --- Category/Type Tag Standardization: 12px --- */
.item-category,
.license-type,
.agreement-type {
    font-size: 12px;
}

/* --- Card Action Button Standardization: 13px --- */
.vendor-actions .btn-edit,
.vendor-actions .btn-view,
.vendor-actions .btn-delete,
.inventory-actions .btn-edit,
.inventory-actions .btn-view,
.inventory-actions .btn-delete,
.inventory-actions .btn-check-out,
.inventory-actions .btn-check-in,
.license-actions .btn-edit,
.license-actions .btn-view,
.license-actions .btn-delete,
.license-actions .btn-assign,
.ticket-actions .btn-edit,
.ticket-actions .btn-view,
.ticket-actions .btn-comment,
.ticket-actions .btn-resolve,
.ticket-actions .btn-reopen {
    font-size: 13px;
}

/* --- Ticket Number Title Standardization --- */
.ticket-number-title h3 {
    font-size: 14px;
}

.ticket-number-title h4 {
    font-size: 13px;
}
/* --- Inventory Row Styles (Fix 122) --- */
.inventory-row {
    cursor: pointer;
}

.inventory-row.selected {
    background: #f0f2ff;
}


/* --- License Row Styles (Fix 123) --- */
.license-row {
    cursor: pointer;
}

.license-row:hover {
    background: #f8f9fa;
}

.license-row.selected {
    background: #f0f2ff;
}


/* --- Ticket Row Styles (Fix 124) --- */
.ticket-row {
    cursor: pointer;
}

.ticket-row:hover {
    background: #f8f9fa;
}

.ticket-row.selected {
    background: #f0f2ff;
}


/* Bulk Operations */
.bulk-selected-row {
    background-color: #ebf8ff;
}
.bulk-select-cb, .bulk-select-all {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #4299e1;
}
#bulkActionToolbar button:hover {
    opacity: 0.9;
    filter: brightness(1.05);
}

/* Stock Movement History badges (MED-13) */
.movement-badge-in {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    background: #dcfce7;
    color: #166534;
}
.movement-badge-out {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    background: #fef2f2;
    color: #991b1b;
}
.movement-badge-adjust {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    background: #eff6ff;
    color: #1e40af;
}
.movement-badge-return {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    background: #f0fdf4;
    color: #14532d;
}

/* Low Stock Alert indicators (MED-14) */
.stock-alert-low {
    background: #fef3c7;
    color: #92400e;
}
.stock-alert-out {
    background: #fee2e2;
    color: #991b1b;
}
.stock-alert-ok {
    background: #dcfce7;
    color: #166534;
}
