:root {
    --primary-color: #4a90e2;
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-color: #f5f6fa;
    --text-color: #2d3436;
    --bg-color: #eef2f5;
    --card-bg: #ffffff;
    --border-color: #dfe6e9;
    --success: #00b894;
    --danger: #d63031;
    --warning: #fdcb6e;
    --info: #0984e3;
    --critical: #d63031;
    --high: #e17055;
    --medium: #fdcb6e;
    --low: #00b894;
    --sidebar-bg: #4a69bd; /* Logix blue-ish */
    --sidebar-text: #ffffff;
    --sidebar-active: rgba(255, 255, 255, 0.2);
    
    /* Status Colors */
    --status-open: #e74c3c;
    --status-closed: #7f8c8d;
    --status-grey: #95a5a6;
    --status-na: #95a5a6;
}

.badge-status-open { background-color: var(--status-open); color: white; }
.badge-status-closed { background-color: var(--status-closed); color: white; }
.badge-status-not_fixable { background-color: var(--status-grey); color: white; }
.badge-status-intended { background-color: var(--status-grey); color: white; }
.badge-status-not_applicable { background-color: var(--status-grey); color: white; }
.badge-status-resolved { background-color: var(--success); color: white; }
.badge-status-in_progress { background-color: var(--info); color: white; }

/* Markdown Toolbar */
.markdown-toolbar {
    display: flex;
    gap: 5px;
    margin-bottom: 5px;
    background: #f8f9fa;
    padding: 5px;
    border: 1px solid #ced4da;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
}
.md-btn {
    background: white;
    border: 1px solid #ced4da;
    cursor: pointer;
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 3px;
    color: #333;
}
.md-btn:hover {
    background: #e9ecef;
}
.form-control.markdown-editor {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}
/* Tag User Style */
.user-tag {
    background: #e3f2fd;
    color: #1976d2;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
    text-decoration: none;
}


* {
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* Login Page Specifics - Modern Split Design */
.login-body {
    background: #f0f2f5; /* Light background as requested */
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
    padding: 20px; /* Added padding for smaller screens */
}

.login-card {
    display: flex;
    background: white;
    width: 900px;
    max-width: 100%; /* Responsive */
    height: 550px;
    max-height: 90vh; /* Responsive */
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    overflow: hidden;
    position: relative;
}

/* Left Side - Form */
.login-left {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 2;
    background: white;
    overflow-y: auto; /* Scroll if needed */
}

/* Right Side - Welcome & Decoration */
.login-right {
    flex: 1;
    background: var(--primary-gradient);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px;
    position: relative;
    /* Diagonal Clip Path Concept */
    clip-path: polygon(15% 0, 100% 0, 100% 100%, 0% 100%);
    margin-left: -50px; /* Overlap slightly */
}

.login-right h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.login-right p {
    font-size: 1rem;
    opacity: 0.9;
    max-width: 300px;
}

/* Monsters Animation Container */
.monsters-container {
    width: 200px;
    height: 160px;
    margin: 0 auto 20px;
    position: relative;
    /* overflow: hidden; */ /* Allow some overflow if needed */
}

.monster {
    position: absolute;
    transition: all 0.3s ease;
}

.monster .eyes {
    display: flex;
    justify-content: center;
    gap: 8px;
    position: relative;
    z-index: 5;
}

.monster .eye {
    background: white;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.monster .pupil {
    background: #2d3436;
    border-radius: 50%;
    position: absolute;
    transition: all 0.1s;
}

/* Purple Monster */
.monster.purple {
    width: 90px;
    height: 120px;
    background: #8e44ad; /* Purple */
    left: 20px;
    top: 10px;
    border-radius: 12px 12px 0 0;
    z-index: 1;
}
.monster.purple .eyes { margin-top: 35px; gap: 10px; }
.monster.purple .eye { width: 14px; height: 14px; }
.monster.purple .pupil { width: 6px; height: 6px; }
.monster.purple .mouth {
    width: 20px; height: 6px; background: rgba(0,0,0,0.2); border-radius: 10px;
    margin: 40px auto 0;
}

/* Orange Monster */
.monster.orange {
    width: 100px;
    height: 80px;
    background: #ff7675; /* Orange */
    bottom: 0;
    left: 0;
    border-radius: 50px 50px 0 0;
    z-index: 2;
}
.monster.orange .eyes { margin-top: 25px; gap: 12px; }
.monster.orange .eye { width: 12px; height: 12px; }
.monster.orange .pupil { width: 5px; height: 5px; }
.monster.orange .mouth {
    width: 15px; height: 4px; background: rgba(0,0,0,0.2); border-radius: 10px;
    margin: 15px auto 0;
}

/* Black Monster */
.monster.black {
    width: 50px;
    height: 70px;
    background: #2d3436; /* Black */
    bottom: 0;
    left: 85px;
    border-radius: 12px 12px 0 0;
    z-index: 3;
}
.monster.black .eyes { margin-top: 20px; gap: 6px; }
.monster.black .eye { width: 16px; height: 16px; }
.monster.black .pupil { width: 6px; height: 6px; }

/* Yellow Monster */
.monster.yellow {
    width: 70px;
    height: 100px;
    background: #ffeaa7; /* Yellow */
    bottom: 0;
    right: 15px;
    border-radius: 35px 35px 0 0;
    z-index: 1;
}
.monster.yellow .eyes { margin-top: 30px; }
.monster.yellow .eye { width: 12px; height: 12px; }
.monster.yellow .pupil { width: 4px; height: 4px; }
.monster.yellow .mouth {
    width: 20px; height: 4px; background: rgba(0,0,0,0.2); border-radius: 10px;
    margin: 25px auto 0;
}

/* Password Focus State - Close eyes */
.monsters-container.password-active .eye {
    height: 3px !important;
    border-radius: 2px;
    background: #333; /* Eyelash color */
    margin-top: 5px; /* Adjust to keep position */
    box-shadow: none;
}
.monsters-container.password-active .pupil {
    opacity: 0;
}
/* Shocked State (Password Visible) */
.monsters-container.monsters-shocked .eye {
    height: 20px !important; /* Open wide */
    width: 20px !important;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.monsters-container.monsters-shocked .pupil {
    width: 8px !important;
    height: 8px !important;
    background: #000;
}
.monsters-container.monsters-shocked .monster {
    transform: translateY(-5px); /* Jump up slightly */
}

/* Special adjustments for closed eyes per monster */
.monsters-container.password-active .monster.purple .eyes { margin-top: 40px; }
.monsters-container.password-active .monster.orange .eyes { margin-top: 30px; }
.monsters-container.password-active .monster.black .eyes { margin-top: 26px; }
.monsters-container.password-active .monster.yellow .eyes { margin-top: 35px; }



/* Modern Form Styles */
.form-title {
    font-size: 2rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 30px;
    text-align: center;
}

.modern-input-group {
    position: relative;
    margin-bottom: 25px;
}

.modern-input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0a0a0;
    transition: color 0.3s;
}

.modern-input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: none;
    background: #f4f7f6;
    border-radius: 30px;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
    box-sizing: border-box;
}

.modern-input:focus {
    background: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.modern-input:focus + i {
    color: #764ba2;
}

.btn-modern {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 30px;
    background: var(--primary-gradient);
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-modern:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(118, 75, 162, 0.3);
}

/* Dashboard Layout */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: 260px;
    background: var(--primary-gradient);
    color: var(--sidebar-text);
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 10px rgba(0,0,0,0.1);
    flex-shrink: 0; /* Prevent sidebar from shrinking */
    height: 100vh;
    position: sticky;
    top: 0;
    overflow-y: auto;
    transition: all 0.3s ease;
}

.sidebar-header {
    padding: 0 25px 30px;
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 20px;
}

.nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
}

.nav-links li {
    margin-bottom: 5px;
}

.nav-links a {
    display: flex;
    align-items: center;
    padding: 12px 25px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.nav-links a:hover, .nav-links a.active {
    background: rgba(255,255,255,0.2);
    color: white;
    border-right: 4px solid white;
}

.nav-links i {
    width: 25px;
    margin-right: 10px;
    font-size: 1.1rem;
}

.user-info {
    padding: 20px 25px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    background-color: var(--bg-color);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap; /* Responsive */
    gap: 10px;
}

.page-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
}

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

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.2s;
}

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

.stat-info h3 {
    margin: 0;
    font-size: 2.2rem;
    color: #333;
    font-weight: 700;
}

.stat-info p {
    margin: 5px 0 0;
    color: #888;
    font-size: 0.9rem;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.bg-blue { background: #e3f2fd; color: #1976d2; }
.bg-green { background: #e8f5e9; color: #388e3c; }
.bg-red { background: #ffebee; color: #d32f2f; }
.bg-orange { background: #fff3e0; color: #f57c00; }

/* Tables */
.table-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    padding: 20px;
    overflow-x: auto;
}

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

.modern-table th {
    text-align: left;
    padding: 15px;
    color: #888;
    font-weight: 600;
    border-bottom: 1px solid #eee;
}

.modern-table td {
    padding: 15px;
    border-bottom: 1px solid #f9f9f9;
    color: #444;
}

.modern-table tr:last-child td {
    border-bottom: none;
}

.badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-critical { background: #ffebee; color: #d32f2f; }
.badge-high { background: #fff3e0; color: #f57c00; }
.badge-medium { background: #fff8e1; color: #ffa000; }
.badge-low { background: #e8f5e9; color: #388e3c; }

/* Forms */
.form-container {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    max-width: 800px;
}

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

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

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.form-control:focus {
    border-color: #4a90e2;
    outline: none;
}

/* Comments */
.comments-section {
    margin-top: 30px;
}

.comment {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    border-left: 4px solid var(--primary-color);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: #666;
}

.comment-body {
    color: #333;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s;
}

.modal.active {
    display: flex;
}

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

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

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

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

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

/* Action Buttons */
.action-btns {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.action-btns .btn-modern {
    padding: 6px 15px;
    font-size: 0.85rem;
    width: auto;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Smooth Transitions */
* {
    transition: background-color 0.2s, color 0.2s, transform 0.2s;
}

/* Improved Sidebar Header for Logo */
.sidebar-header {
    flex-direction: column;
    align-items: flex-start;
}

.sidebar-header img {
    max-width: 40px;
    height: auto;
    margin-bottom: 5px;
}

/* Better table row hover */
.modern-table tr {
    transition: background-color 0.2s;
}

.modern-table tr:hover {
    background-color: #f8f9fa;
}

/* Improved form inputs */
.form-control:focus {
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading states */
.btn-modern:active {
    transform: translateY(0);
}

/* Better badge styles for new statuses */
.badge-intended { background: #e3f2fd; color: #1976d2; }
.badge-not_fixable { background: #fce4ec; color: #c2185b; }


/* =========================================
   RESPONSIVE DESIGN (Mobile & Tablets)
   ========================================= */

@media (max-width: 992px) {
    /* Tablet Portrait */
    .login-card {
        width: 95%;
        height: auto;
        min-height: 600px;
    }
    
    .sidebar {
        width: 70px; /* Collapsed sidebar */
        padding: 15px 0;
    }
    
    .sidebar-header {
        padding: 0 15px 20px;
        justify-content: center;
    }
    
    .sidebar-header span {
        display: none; /* Hide text */
    }
    
    .nav-links a {
        padding: 12px;
        justify-content: center;
    }
    
    .nav-links i {
        margin-right: 0;
        font-size: 1.4rem;
    }
    
    .nav-links span {
        display: none;
    }
    
    .user-info {
        justify-content: center;
        padding: 20px 10px;
    }
    
    .user-info span {
        display: none;
    }
    
    .main-content {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    /* Mobile Landscape & Large Phones */
    .login-card {
        flex-direction: column;
        height: auto;
        max-height: none;
        overflow: visible;
    }
    
    .login-left {
        padding: 30px 20px;
        order: 2; /* Form comes second on mobile usually, or first? Let's keep form first for access */
        order: 1;
    }
    
    .login-right {
        display: none; /* Hide decorative side on mobile to save space */
    }
    
    /* If you want to show it, you can unhide it but style it differently
    .login-right {
        display: block;
        padding: 20px;
        clip-path: none;
        margin-left: 0;
        order: 0;
        flex: 0 0 auto;
    } 
    */
    
    .dashboard-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        flex-direction: row;
        position: relative;
        overflow-x: auto;
        padding: 10px;
        align-items: center;
    }
    
    .sidebar-header {
        margin-bottom: 0;
        padding: 0 15px;
        border-bottom: none;
        border-right: 1px solid rgba(255,255,255,0.1);
    }
    
    .nav-links {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
    }
    
    .nav-links li {
        margin-bottom: 0;
    }
    
    .nav-links a {
        border-right: none;
        border-bottom: 4px solid transparent;
        padding: 10px 15px;
    }
    
    .nav-links a:hover, .nav-links a.active {
        border-right: none;
        border-bottom: 4px solid white;
    }
    
    .user-info {
        display: none; /* Hide user info on mobile header to save space */
    }
    
    .stats-grid {
        grid-template-columns: 1fr; /* Stack cards */
    }
    
    .table-card {
        padding: 10px;
    }
    
    .modern-table th, .modern-table td {
        padding: 10px 5px;
        font-size: 0.9rem;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    /* Small Mobile */
    .login-left {
        padding: 20px;
    }
    
    .monsters-container {
        transform: scale(0.8);
        margin-bottom: 10px;
    }
    
    .form-title {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }
    
    .modern-input {
        padding: 12px 12px 12px 40px;
    }
    
    .btn-modern {
        padding: 12px;
    }
}
