* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #d9bd7d 0%, #c4a05a 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    text-align: center;
}

header h1 {
    color: #2d3748;
    font-size: 2.5em;
    margin-bottom: 10px;
}

.user-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 15px 0;
    padding: 10px;
    background: #f7fafc;
    border-radius: 5px;
}

.user-info span {
    color: #4a5568;
    font-weight: 600;
}

.btn-logout {
    padding: 8px 16px;
    background: #e53e3e;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background 0.3s;
}

.btn-logout:hover {
    background: #c53030;
}

.subtitle {
    color: #718096;
    font-size: 1.1em;
    margin-bottom: 20px;
}

nav {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.nav-link {
    padding: 10px 20px;
    background: #f7fafc;
    color: #4a5568;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s;
}

.nav-link:hover {
    background: #edf2f7;
}

.nav-link.active {
    background: #d9bd7d;
    color: white;
}

.form-container, .dashboard-container {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.form-container h2, .dashboard-container h2 {
    color: #2d3748;
    margin-bottom: 25px;
}

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

.form-group label {
    display: block;
    color: #4a5568;
    font-weight: 600;
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 5px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #d9bd7d;
}

.readonly-input {
    background-color: #f7fafc;
    cursor: not-allowed;
    color: #4a5568;
    font-weight: 600;
}

.file-input {
    padding: 10px !important;
    cursor: pointer;
}

.file-hint {
    display: block;
    margin-top: 5px;
    color: #718096;
    font-size: 0.85em;
}

.image-preview {
    margin-top: 15px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.preview-container {
    position: relative;
    display: inline-block;
}

.preview-container img {
    max-width: 200px;
    max-height: 200px;
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    display: block;
}

.btn-remove-image {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #e53e3e;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background 0.3s;
}

.btn-remove-image:hover {
    background: #c53030;
}

.image-number {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 600;
}

.btn-submit {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #d9bd7d 0%, #c4a05a 100%);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-submit:hover {
    transform: translateY(-2px);
}

.message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 5px;
    display: none;
}

.message.success {
    background: #c6f6d5;
    color: #22543d;
    border: 1px solid #9ae6b4;
    display: block;
}

.message.error {
    background: #fed7d7;
    color: #742a2a;
    border: 1px solid #fc8181;
    display: block;
}

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

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    border-left: 4px solid #d9bd7d;
}

.stat-card.stat-open {
    border-left-color: #3182ce;
}

.stat-card.stat-progress {
    border-left-color: #dd6b20;
}

.stat-card.stat-resolved {
    border-left-color: #38a169;
}

.stat-card.stat-critical {
    border-left-color: #e53e3e;
}

.stat-number {
    font-size: 2.5em;
    font-weight: bold;
    color: #2d3748;
    margin-bottom: 5px;
}

.stat-label {
    color: #718096;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.status-summary {
    width: 100%;
    margin-top: 4px;
    font-size: 0.95em;
    color: #4a5568;
}

.status-summary .summary-open { color: #2b6cb0; font-weight: 600; }
.status-summary .summary-progress { color: #b7791f; font-weight: 600; }
.status-summary .summary-resolved { color: #276749; font-weight: 600; }

.ticket-status-line {
    margin-bottom: 10px;
    font-size: 0.95em;
    color: #4a5568;
}

.ticket-status-line .badge {
    margin-left: 6px;
}

.filter-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.search-input {
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 5px;
    font-size: 0.9em;
    min-width: 200px;
    transition: border-color 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #d9bd7d;
}

.filter-select {
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 5px;
    font-size: 0.9em;
}

.btn-refresh {
    padding: 8px 16px;
    background: #d9bd7d;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background 0.3s;
}

.btn-refresh:hover {
    background: #c4a05a;
}

.tickets-container {
    display: grid;
    gap: 20px;
}

.tickets-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
    padding: 15px 0;
    border-top: 1px solid #e2e8f0;
}

.pagination-info {
    color: #718096;
    font-size: 0.95em;
}

.pagination-buttons {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.btn-page {
    padding: 8px 14px;
    border: 2px solid #e2e8f0;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    color: #4a5568;
    transition: background 0.2s, border-color 0.2s;
}

.btn-page:hover:not(:disabled) {
    background: #f7fafc;
    border-color: #c4a05a;
}

.btn-page.active {
    background: #c4a05a;
    border-color: #c4a05a;
    color: #fff;
}

.btn-page:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ticket-card {
    background: #f7fafc;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #cbd5e0;
    transition: transform 0.2s, box-shadow 0.2s;
}

.ticket-card:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.ticket-card.priority-critical {
    border-left-color: #e53e3e;
    background: #fff5f5;
}

.ticket-card.priority-high {
    border-left-color: #dd6b20;
    background: #fffaf0;
}

.ticket-card.priority-medium {
    border-left-color: #d69e2e;
}

.ticket-card.priority-low {
    border-left-color: #38a169;
}

/* Resolved tickets - green background to easily identify */
.ticket-card.status-resolved {
    background: #c6f6d5 !important;
    border-left-color: #22543d !important;
}

.ticket-card.status-resolved:hover {
    background: #9ae6b4 !important;
}

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

.ticket-id {
    font-size: 0.9em;
    color: #718096;
    font-weight: 600;
}

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

.badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}

.badge.status-open {
    background: #bee3f8;
    color: #2c5282;
}

.badge.status-in-progress {
    background: #fbd38d;
    color: #7c2d12;
}

.badge.status-resolved {
    background: #c6f6d5;
    color: #22543d;
}

.badge.priority-critical {
    background: #fc8181;
    color: #742a2a;
}

.badge.priority-high {
    background: #f6ad55;
    color: #7c2d12;
}

.badge.priority-medium {
    background: #faf089;
    color: #744210;
}

.badge.priority-low {
    background: #9ae6b4;
    color: #22543d;
}

.badge.badge-overdue {
    background: #fc8181;
    color: #fff;
    font-weight: 600;
}

.badge.badge-at-risk {
    background: #ed8936;
    color: #fff;
    font-weight: 600;
}

.ticket-due-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    padding: 10px 0;
    border-top: 1px solid #e2e8f0;
}

.ticket-due-row .due-label {
    font-weight: 600;
    color: #4a5568;
}

.ticket-due-row .due-input {
    padding: 6px 10px;
    border: 2px solid #e2e8f0;
    border-radius: 5px;
    font-size: 0.95em;
}

.ticket-due-row .due-quick {
    display: inline-flex;
    gap: 6px;
    flex-wrap: wrap;
}

.btn-due-quick,
.btn-due-clear {
    padding: 6px 12px;
    border-radius: 5px;
    font-size: 0.85em;
    cursor: pointer;
    border: 1px solid #cbd5e0;
    background: #f7fafc;
    color: #4a5568;
}

.btn-due-quick:hover {
    background: #edf2f7;
    border-color: #a0aec0;
}

.btn-due-clear {
    color: #718096;
}

.btn-due-clear:hover {
    background: #fed7d7;
    color: #c53030;
    border-color: #fc8181;
}

.ticket-comments-section {
    margin: 14px 0;
    padding: 12px 0;
    border-top: 1px solid #e2e8f0;
}

.ticket-comments-section > strong {
    display: block;
    margin-bottom: 8px;
    color: #2d3748;
}

.comments-list {
    min-height: 24px;
    margin-bottom: 10px;
    font-size: 0.95em;
}

.comment-item {
    padding: 8px 12px;
    margin-bottom: 8px;
    background: #f7fafc;
    border-radius: 6px;
    border-left: 3px solid #c4a05a;
}

.comment-meta {
    display: block;
    font-size: 0.85em;
    color: #718096;
    margin-bottom: 4px;
}

.comment-body {
    color: #2d3748;
    white-space: pre-wrap;
    word-break: break-word;
}

.comment-form-wrap {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.comment-form-wrap .comment-input {
    flex: 1;
    min-width: 200px;
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.95em;
    font-family: inherit;
    resize: vertical;
}

.comment-form-wrap .comment-input:focus {
    outline: none;
    border-color: #c4a05a;
}

.btn-add-comment {
    padding: 8px 16px;
    background: #c4a05a;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
}

.btn-add-comment:hover {
    background: #b8924a;
}

.comments-none,
.comments-error {
    font-size: 0.9em;
    color: #718096;
}

.comments-error {
    color: #e53e3e;
}

.ticket-subject {
    font-size: 1.2em;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 10px;
}

.ticket-description {
    color: #4a5568;
    margin-bottom: 15px;
    line-height: 1.6;
}

.ticket-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
    font-size: 0.9em;
    color: #718096;
}

.ticket-meta strong {
    color: #4a5568;
}

.ticket-attachment {
    margin-top: 15px;
    margin-bottom: 15px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
}

.ticket-attachment strong {
    display: block;
    margin-bottom: 10px;
    color: #4a5568;
}

.attachment-gallery {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.attachment-link {
    position: relative;
    display: inline-block;
    text-decoration: none;
    transition: transform 0.3s;
}

.attachment-link:hover {
    transform: scale(1.05);
}

.attachment-thumbnail {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 5px;
    border: 2px solid #e2e8f0;
    transition: border-color 0.3s;
}

.attachment-link:hover .attachment-thumbnail {
    border-color: #d9bd7d;
}

.attachment-number {
    position: absolute;
    top: 5px;
    left: 5px;
    background: rgba(217, 189, 125, 0.9);
    color: white;
    padding: 3px 7px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 600;
}

/* Login Page Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 450px;
    width: 100%;
}

.login-box h2 {
    color: #2d3748;
    margin-bottom: 10px;
    text-align: center;
}

.login-subtitle {
    text-align: center;
    color: #718096;
    margin-bottom: 30px;
}

.login-info {
    margin-top: 30px;
    padding: 20px;
    background: #f7fafc;
    border-radius: 5px;
    border-left: 4px solid #d9bd7d;
}

.login-info p {
    margin: 5px 0;
    color: #4a5568;
    font-size: 0.95em;
}

.login-info code {
    background: #e2e8f0;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    color: #2d3748;
}

.login-info .warning {
    color: #e53e3e;
    font-weight: 600;
    margin-top: 10px;
}

.ticket-upload-it {
    margin: 12px 0;
    padding: 12px;
    background: #f0fdf4;
    border-radius: 8px;
    border: 1px solid #bbf7d0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.ticket-upload-it .upload-it-label {
    font-weight: 600;
    color: #166534;
    font-size: 0.9em;
}

.ticket-upload-it .file-input-it {
    font-size: 0.9em;
    max-width: 220px;
}

.ticket-upload-it .btn-upload-it {
    padding: 6px 14px;
    background: #22c55e;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
}

.ticket-upload-it .btn-upload-it:hover {
    background: #16a34a;
}

.ticket-upload-it .file-hint-it {
    width: 100%;
    font-size: 0.8em;
    color: #15803d;
    margin-top: 4px;
}

.it-preview-list {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.it-preview-list .it-preview-item img {
    max-width: 80px;
    max-height: 80px;
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #bbf7d0;
}

.ticket-attachment.it-attachments {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.ticket-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.ticket-actions select {
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 5px;
    font-size: 0.9em;
}

.ticket-actions .it-incharge-select {
    min-width: 130px;
}

.btn-update {
    padding: 8px 16px;
    background: #48bb78;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background 0.3s;
}

.btn-update:hover {
    background: #38a169;
}

.btn-delete {
    padding: 8px 16px;
    background: #f56565;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background 0.3s;
}

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

.loading {
    text-align: center;
    color: #718096;
    padding: 40px;
}

.no-tickets {
    text-align: center;
    color: #718096;
    padding: 40px;
    font-size: 1.1em;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8em;
    }
    
    .form-container, .dashboard-container {
        padding: 20px;
    }
    
    .dashboard-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-controls {
        flex-direction: column;
    }
    
    .search-input {
        width: 100%;
        min-width: auto;
    }
    
    .ticket-header {
        flex-direction: column;
    }
    
    .ticket-actions {
        flex-direction: column;
    }
    
    .ticket-actions select,
    .ticket-actions button {
        width: 100%;
    }
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    background: white;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.tab-btn {
    padding: 12px 24px;
    background: #f7fafc;
    color: #4a5568;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s;
}

.tab-btn:hover {
    background: #edf2f7;
}

.tab-btn.active {
    background: #d9bd7d;
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* KPI tab */
.kpi-subtitle {
    color: #718096;
    font-size: 0.95em;
    margin-top: 4px;
}

.kpi-container {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.kpi-table-wrap {
    overflow-x: auto;
}

.kpi-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
}

.kpi-table th,
.kpi-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.kpi-table th {
    background: #f7fafc;
    color: #4a5568;
    font-weight: 600;
}

.kpi-table tbody tr:hover {
    background: #f7fafc;
}

.kpi-table .kpi-resolved {
    color: #276749;
    font-weight: 600;
}

.kpi-table .kpi-progress {
    color: #b7791f;
}

.kpi-table .kpi-open {
    color: #2b6cb0;
}

#tab-kpi .dashboard-header {
    flex-wrap: wrap;
}

#tab-kpi .dashboard-header .btn-refresh {
    margin-left: auto;
}

.kpi-date-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.kpi-date-controls .filter-select {
    min-width: 140px;
}

.kpi-custom-range {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.kpi-custom-range input[type="date"] {
    padding: 6px 10px;
    border: 2px solid #e2e8f0;
    border-radius: 5px;
    font-size: 0.95em;
}

.kpi-date-sep {
    color: #718096;
    font-size: 0.9em;
}

.kpi-range-label {
    color: #718096;
    font-size: 0.9em;
    margin: -10px 0 15px 0;
}

.kpi-charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.kpi-chart-box {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.kpi-chart-box h3 {
    margin: 0 0 15px 0;
    color: #2d3748;
    font-size: 1.1em;
    text-align: center;
}

.kpi-chart-box canvas {
    max-height: 300px;
}

/* User Management Styles */
.btn-add-user {
    padding: 8px 16px;
    background: #48bb78;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background 0.3s;
}

.btn-add-user:hover {
    background: #38a169;
}

.user-form-container {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.user-form-container h3 {
    margin-bottom: 15px;
    color: #2d3748;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.form-group-inline {
    flex: 1;
    min-width: 180px;
}

.form-group-inline label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #4a5568;
    font-size: 0.9em;
}

.form-group-inline input,
.form-group-inline select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 5px;
    font-size: 0.95em;
}

.form-group-inline input:focus,
.form-group-inline select:focus {
    border-color: #d9bd7d;
    outline: none;
}

.users-container {
    overflow-x: auto;
}

.users-table-wrap {
    overflow-x: auto;
}

.btn-edit-user {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1em;
    padding: 4px 8px;
    margin-right: 4px;
}

.btn-edit-user:hover {
    background: #e6fffa;
}

.btn-delete-user {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1em;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.btn-delete-user:hover {
    background: #fed7d7;
}

.user-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
}

.user-status.status-active {
    background: #c6f6d5;
    color: #276749;
}

.user-status.status-inactive {
    background: #fed7d7;
    color: #c53030;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.users-table thead {
    background: #f7fafc;
}

.users-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #2d3748;
    border-bottom: 2px solid #e2e8f0;
    position: relative;
}

.users-table th::after {
    content: '▼';
    position: absolute;
    right: 10px;
    font-size: 0.7em;
    color: #718096;
    opacity: 0.5;
}

.users-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e2e8f0;
    color: #4a5568;
}

.users-table tbody tr:hover {
    background: #f7fafc;
}

.users-table tbody tr:nth-child(even) {
    background: #fafafa;
}

.users-table tbody tr:nth-child(even):hover {
    background: #f0f0f0;
}

.department-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    color: white;
}

.department-badge.finance {
    background: #e53e3e;
}

.department-badge.qc {
    background: #dd6b20;
}

.department-badge.public-relationship {
    background: #4299e1;
}

.department-badge.maintenance {
    background: #d69e2e;
}

.department-badge.marketing {
    background: #38a169;
}

.department-badge.gm {
    background: #3182ce;
}

.department-badge.human-resource {
    background: #805ad5;
}

.department-badge.customer-service {
    background: #b7791f;
}

.department-badge.project-develop {
    background: #4a5568;
}

.department-badge.ceo {
    background: #22543d;
}

.department-badge.it {
    background: #2c5282;
}

.department-badge.other {
    background: #718096;
}

.status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    background: #4299e1;
    color: white;
    position: relative;
    padding-right: 30px;
}

.status-badge::after {
    content: '▼';
    position: absolute;
    right: 8px;
    font-size: 0.7em;
    opacity: 0.7;
}

.user-actions {
    display: flex;
    gap: 8px;
}

.btn-edit {
    padding: 6px 12px;
    background: #4299e1;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
    transition: background 0.3s;
}

.btn-edit:hover {
    background: #3182ce;
}

.btn-delete-user {
    padding: 6px 12px;
    background: #f56565;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
    transition: background 0.3s;
}

.btn-delete-user:hover {
    background: #e53e3e;
}

.never-logged-in {
    color: #e53e3e;
    font-style: italic;
}

.never-logged-in::before {
    content: '⚠ ';
    font-size: 0.9em;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s;
}

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

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

.modal-header h2 {
    margin: 0;
    color: #2d3748;
}

.modal-close {
    font-size: 2em;
    color: #718096;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #2d3748;
}

.modal-content form {
    padding: 30px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.btn-cancel {
    padding: 10px 20px;
    background: #e2e8f0;
    color: #4a5568;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background 0.3s;
}

.btn-cancel:hover {
    background: #cbd5e0;
}

.btn-save {
    padding: 10px 20px;
    background: #38a169;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background 0.3s;
}

.btn-save:hover {
    background: #2f855a;
}

.modal-header h3 {
    margin: 0;
    color: #2d3748;
    font-size: 1.25em;
}

/* Responsive for User Management */
@media (max-width: 768px) {
    .users-table {
        font-size: 0.85em;
    }
    
    .users-table th,
    .users-table td {
        padding: 8px;
    }
    
    .tab-navigation {
        flex-direction: column;
    }
    
    .tab-btn {
        width: 100%;
    }
}

