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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f8fafc;
    color: #333333;
    line-height: 1.6;
    font-weight: 400;
}

.header {
    background: #ffffff;
    color: #333333;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.logo i {
    font-size: 1.5rem;
    color: #3b82f6;
}

.logo h1 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
}

.nav-tabs {
    display: flex;
    background: #f8fafc;
    border-radius: 8px;
    padding: 4px;
    gap: 2px;
}

.nav-tab {
    background: transparent;
    border: none;
    color: #6b7280;
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    border-radius: 6px;
    white-space: nowrap;
}

.nav-tab:hover {
    color: #374151;
    background: rgba(59, 130, 246, 0.1);
}

.nav-tab.active {
    background: #3b82f6;
    color: white;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.nav-tab i {
    font-size: 0.875rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.notification-bell {
    position: relative;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 8px;
    transition: background-color 0.2s ease;
    color: #6b7280;
    background: #f8fafc;
}

.notification-bell:hover {
    background: #e5e7eb;
    color: #374151;
}

.notification-bell i {
    font-size: 1.125rem;
}

.notification-count {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    border: 2px solid white;
}

.notification-count.hidden {
    display: none;
}

.reset-demo-btn {
    background: #f59e0b;
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.reset-demo-btn:hover {
    background: #d97706;
    transform: translateY(-1px);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background: #f8fafc;
    cursor: pointer;
    transition: background-color 0.2s ease;
    color: #6b7280;
}

.user-profile:hover {
    background: #e5e7eb;
    color: #374151;
}

.user-profile i {
    font-size: 1.5rem;
    color: #9ca3af;
}

.user-name {
    font-weight: 600;
    color: #1f2937;
    font-size: 0.875rem;
}

.user-role {
    font-size: 0.75rem;
    color: #6b7280;
    background: #e5e7eb;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

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

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.btn {
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    text-decoration: none;
    font-size: 0.875rem;
    min-height: 40px;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-primary {
    background: #3b82f6;
    color: white;
    border: 1px solid #3b82f6;
}

.btn-primary:hover {
    background: #2563eb;
    border-color: #2563eb;
}

.btn-secondary {
    background: #ffffff;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.btn-secondary:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.btn-danger {
    background: #ef4444;
    color: white;
    border: 1px solid #ef4444;
}

.btn-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
}

.btn-success {
    background: #10b981;
    color: white;
    border: 1px solid #10b981;
}

.btn-success:hover {
    background: #059669;
    border-color: #059669;
}

.btn-warning {
    background: #f59e0b;
    color: white;
    border: 1px solid #f59e0b;
}

.btn-warning:hover {
    background: #d97706;
    border-color: #d97706;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

.card:hover {
    border-color: #d1d5db;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
    font-size: 0.875rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background: white;
    color: #374151;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.table-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e5e7eb;
}

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

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #f3f4f6;
}

th {
    background: #f8fafc;
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
}

tr:hover {
    background: #f8fafc;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
    backdrop-filter: blur(4px);
}

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

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

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

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

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: #6b7280;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: #f3f4f6;
    color: #374151;
}

.modal-form {
    padding: 1.5rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.search-box {
    position: relative;
    display: inline-block;
}

.search-box input {
    padding-right: 2.5rem;
    min-width: 250px;
}

.search-box i {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
}

.filter-select {
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: white;
    font-size: 0.875rem;
    cursor: pointer;
    color: #374151;
}

.status-badge,
.priority-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
    letter-spacing: 0.025em;
}

.status-open { 
    background: #dbeafe; 
    color: #1d4ed8; 
}

.status-in-progress { 
    background: #fef3c7; 
    color: #d97706; 
}

.status-resolved { 
    background: #d1fae5; 
    color: #065f46; 
}

.status-closed { 
    background: #f1f5f9; 
    color: #475569; 
}

.priority-critical { 
    background: #fee2e2; 
    color: #991b1b; 
}

.priority-high { 
    background: #fed7aa; 
    color: #9a3412; 
}

.priority-medium { 
    background: #fde68a; 
    color: #92400e; 
}

.priority-low { 
    background: #dbeafe; 
    color: #1e40af; 
}

.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.9);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.loading-overlay.active {
    display: flex;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

@media (max-width: 1024px) {
    .header-content {
        padding: 1rem 1.5rem;
    }
    
    .main-content {
        padding: 1.5rem;
    }
    
    .nav-tab {
        padding: 0.625rem 1rem;
        font-size: 0.8rem;
    }
    
    .nav-tab i {
        display: none;
    }
}

@media (max-width: 768px) {
    .header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
    
    .header-content {
        padding: 0.5rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
        max-width: none;
        margin: 0;
        flex-wrap: nowrap;
    }
    
    .logo {
        flex-shrink: 0;
        order: 1;
    }
    
    .logo h1 {
        display: none;
    }
    
    .logo i {
        font-size: 1.25rem;
        background: #3b82f6;
        color: white;
        padding: 0.5rem;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .nav-tabs {
        order: 2;
        background: transparent !important;
        padding: 0;
        gap: 0.5rem;
        display: flex !important;
        flex-shrink: 0;
    }
    
    .nav-tab {
        background: #3b82f6 !important;
        color: white !important;
        border-radius: 8px !important;
        width: 40px !important;
        height: 40px !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border: none !important;
        transition: all 0.2s ease !important;
        box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3) !important;
    }
    
    .nav-tab span {
        display: none !important;
    }
    
    .nav-tab i {
        font-size: 1rem !important;
        color: white !important;
        display: block !important;
    }
    
    .nav-tab.active {
        background: #1d4ed8 !important;
        transform: scale(1.05) !important;
        box-shadow: 0 4px 12px rgba(29, 78, 216, 0.4) !important;
    }
    
    .nav-tab:hover {
        background: #2563eb !important;
        transform: translateY(-1px) !important;
    }
    
    .user-info {
        order: 3;
        gap: 0.5rem;
        display: flex;
        align-items: center;
        flex-shrink: 0;
    }
    
    .notification-bell {
        width: 40px;
        height: 40px;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #3b82f6;
        border: none;
        padding: 0;
        box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    }
    
    .notification-bell i {
        font-size: 1rem;
        color: white;
    }
    
    .user-profile {
        width: 40px;
        height: 40px;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #3b82f6;
        border: none;
        padding: 0;
        box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
        position: relative;
    }
    
    .user-profile i {
        font-size: 1rem !important;
        color: white !important;
    }
    
    .user-profile .user-details {
        display: none;
    }
    
    .user-profile-dropdown {
        position: absolute;
        top: 100%;
        right: 0;
        background: white;
        border-radius: 12px;
        box-shadow: 0 10px 25px rgba(0,0,0,0.15);
        border: 1px solid #e5e7eb;
        min-width: 200px;
        z-index: 1001;
        opacity: 0;
        transform: translateY(-10px);
        pointer-events: none;
        transition: all 0.2s ease;
        margin-top: 8px;
    }
    
    .user-profile-dropdown.active {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }
    
    .user-profile-info {
        padding: 1rem;
        text-align: center;
        border-bottom: 1px solid #f3f4f6;
    }
    
    .user-profile-info .user-name {
        font-weight: 600;
        color: #1f2937;
        font-size: 0.875rem;
        margin-bottom: 0.25rem;
        display: block;
    }
    
    .user-profile-info .user-email {
        color: #6b7280;
        font-size: 0.75rem;
        margin-bottom: 0.5rem;
        display: block;
    }
    
    .user-profile-info .user-role {
        background: #e5e7eb;
        color: #374151;
        padding: 0.25rem 0.5rem;
        border-radius: 4px;
        font-size: 0.75rem;
        display: inline-block;
    }
    
    .reset-demo-btn {
        background: #f59e0b;
        border-radius: 8px;
        width: 40px;
        height: 40px;
        padding: 0;
        border: none;
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
    }
    
    .reset-demo-btn i {
        font-size: 1rem;
    }
    
    .reset-demo-btn span {
        display: none;
    }
    
    .reset-demo-btn:hover {
        background: #d97706;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3);
    }
    
    .notification-dropdown {
        position: fixed !important;
        top: 60px !important;
        right: 0.5rem !important;
        left: auto !important;
        transform: none !important;
        min-width: 320px;
        max-width: 90vw;
        border-radius: 12px;
        box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    }
    
    body {
        padding-top: 60px;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
        max-height: 85vh;
        border-radius: 12px;
    }
    
    .modal-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .modal-actions .btn {
        width: 100%;
        justify-content: center;
        min-height: 48px;
    }
    
    .search-box {
        width: 100%;
        margin-bottom: 0.75rem;
    }
    
    .search-box input {
        min-width: 100%;
        width: 100%;
        min-height: 48px;
        padding: 0.875rem 2.5rem 0.875rem 0.875rem;
    }
    
    .filter-select {
        width: 100%;
        min-height: 48px;
        padding: 0.875rem;
        font-size: 0.875rem;
        margin-bottom: 0.75rem;
    }
    
    .btn {
        min-height: 48px;
        padding: 0.875rem 1.25rem;
        font-size: 0.875rem;
        justify-content: center;
        border-radius: 12px;
    }
    
    .card {
        padding: 1rem;
        border-radius: 12px;
    }
    
    th, td {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 0.375rem;
        gap: 0.375rem;
    }
    
    .nav-tabs {
        gap: 0.375rem;
    }
    
    .nav-tab,
    .notification-bell,
    .user-profile,
    .reset-demo-btn,
    .logo i {
        width: 36px !important;
        height: 36px !important;
    }
    
    .nav-tab i,
    .notification-bell i,
    .user-profile i,
    .reset-demo-btn i,
    .logo i {
        font-size: 0.9rem !important;
    }
    
    body {
        padding-top: 56px;
    }
    
    .main-content {
        padding: 0.75rem;
    }
    
    .modal-content {
        width: 100%;
        margin: 0;
        border-radius: 0;
        height: 100vh;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 1rem;
        font-size: 1rem;
        min-height: 48px;
    }
    
    .btn {
        padding: 1rem;
        font-size: 0.875rem;
        min-height: 52px;
    }
}

@media (max-width: 360px) {
    .header-content {
        padding: 0.25rem;
        gap: 0.25rem;
    }
    
    .nav-tabs {
        gap: 0.25rem;
    }
    
    .nav-tab,
    .notification-bell,
    .user-profile,
    .reset-demo-btn,
    .logo i {
        width: 32px !important;
        height: 32px !important;
    }
    
    .nav-tab i,
    .notification-bell i,
    .user-profile i,
    .reset-demo-btn i,
    .logo i {
        font-size: 0.8rem !important;
    }
    
    body {
        padding-top: 52px;
    }
}

@media (hover: none) {
    .btn:hover {
        transform: none;
        box-shadow: none;
    }
    
    .card:hover {
        transform: none;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    }
    
    .nav-tab:hover {
        background: transparent;
    }
    
    .nav-tab:active {
        background: rgba(59, 130, 246, 0.1);
    }
    
    .btn:active {
        transform: scale(0.98);
    }
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.hidden { display: none !important; }
.visible { display: block; }