/* Navigation Styles */
.nav-container {
    background-color: #2b2b2b;
    padding: 0;
    color: white;
    border-bottom: 1px solid #3d3d3d;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
}

.nav-left, .nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-container a {
    color: #e0e0e0;
    text-decoration: none;
    padding: 0.5rem 1rem;
    transition: color 0.2s;
    font-size: 0.95rem;
}

.nav-container a:hover {
    color: white;
}

.nav-container a.active {
    color: white;
    background-color: #0d6efd;
}

.user-name {
    color: #e0e0e0;
    margin-right: 0.5rem;
}

/* Profile Styles */
.profile-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.profile-container h1 {
    margin-bottom: 2rem;
    color: #333;
}

.profile-container form > div {
    margin-bottom: 1.5rem;
}

.profile-container label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
}

.profile-container input,
.profile-container select:not([multiple]),
.profile-container textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

/* Departments multi-select styling */
.profile-container select[multiple] {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    min-height: 150px;
}

.profile-container select[multiple] option {
    padding: 0.5rem;
    margin: 2px 0;
    border-radius: 2px;
}

.profile-container select[multiple] option:checked {
    background-color: #800000;
    color: white;
}

.profile-container select[multiple] option:hover {
    background-color: #f8f9fa;
}

.profile-container small {
    display: block;
    margin-top: 0.5rem;
    color: #6c757d;
    font-size: 0.875rem;
}

.profile-container input[readonly] {
    background-color: #f8f9fa;
    cursor: not-allowed;
}

.profile-container textarea {
    min-height: 100px;
    resize: vertical;
}

.profile-container button {
    background-color: #800000;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.profile-container button:hover {
    background-color: #600000;
}

/* Message Styles */
.error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 4px;
}

.success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 4px;
}

/* Dark Theme */
html.dark {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

html.dark .profile-container {
    background-color: #2b2b2b;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

html.dark .profile-container h1 {
    color: #e0e0e0;
}

html.dark .profile-container label {
    color: #ccc;
}

html.dark .profile-container input,
html.dark .profile-container select,
html.dark .profile-container textarea {
    background-color: #333;
    border-color: #444;
    color: #e0e0e0;
}

html.dark .profile-container select[multiple] option:hover {
    background-color: #404040;
}

html.dark .profile-container small {
    color: #adb5bd;
}

html.dark .profile-container input[readonly] {
    background-color: #2b2b2b;
}

:root {
    --mynoda-color: #f7f7f7;
    --dominate-color: #f7f7f7;
    --queue-color: #f7f7f7;
    --other-color: #f7f7f7;
}

/* Product Colors */
.product-mynoda {
    background-color: var(--mynoda-color) !important;
    color: #000 !important;
}
.product-dominate {
    background-color: var(--dominate-color) !important;
    color: #fff !important;
}
.product-queue {
    background-color: var(--queue-color) !important;
    color: #fff !important;
}
.product-other {
    background-color: var(--other-color) !important;
    color: #000 !important;
}

/* Product Select Highlight */
select#product option[value="MyNoda"] {
    background-color: var(--mynoda-color) !important;
    color: #000 !important;
}

select#product option[value="Dominate"] {
    background-color: Fffffff !important;
    color: #333 !important;
}

select#product option[value="Queue"] {
    background-color: var(--queue-color) !important;
    color: #333 !important;
}

select#product option[value="Other"] {
    background-color: var(--other-color) !important;
    color: #000 !important;
}

/* Override Bootstrap's default states */
select#product option:checked {
    box-shadow: none !important;
}

select#product {
    background-color: #fff !important;
    color: #333 !important;
}

html.dark select#product {
    background-color: #333 !important;
    color: #e0e0e0 !important;
}

/* Dub Reports Styles */
.dub-report-container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 2rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dub-report-container h1 {
    margin-bottom: 2rem;
    color: #333;
    font-size: 1.8rem;
}

.dub-report-container h2 {
    font-size: 1.5rem;
    color: #444;
    margin-bottom: 1rem;
}

.dub-report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.dub-report-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.dub-report-meta-item {
    display: flex;
    flex-direction: column;
}

.dub-report-meta-label {
    font-weight: 600;
    color: #666;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dub-report-description {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    white-space: pre-wrap;
}

.dub-report-description h5 {
    color: #444;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.dub-report-screenshots {
    margin-bottom: 2rem;
}

.dub-report-screenshots h5 {
    color: #444;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.screenshot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.screenshot-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
}

.screenshot-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
    cursor: pointer;
}

.screenshot-item img:hover {
    transform: scale(1.05);
}

.dub-report-comments {
    margin-top: 2rem;
}

.dub-report-comments h5 {
    color: #444;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.comment-list {
    margin-bottom: 2rem;
}

.comment-item {
    padding: 1.5rem;
    margin-bottom: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    border-left: 4px solid #dee2e6;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    color: #666;
    font-size: 0.9rem;
}

.comment-author {
    font-weight: 600;
    color: #333;
}

.comment-content {
    white-space: pre-wrap;
    color: #444;
    line-height: 1.5;
}

.comment-form {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.comment-form textarea {
    width: 100%;
    min-height: 100px;
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    resize: vertical;
    font-size: 0.95rem;
}

/* Priority and Status Badges */
.badge {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

/* Priority Colors */
.priority-Critical {
    background-color: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.priority-Priority {
    background-color: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

.priority-Moderate, .priority-Medium {
    background-color: #fff7ed;
    color: #ea580c;
    border: 1px solid #fed7aa;
}

.priority-Low {
    background-color: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

/* Status Colors */
.status-Open {
    background-color: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.status-InProgress {
    background-color: #fff7ed;
    color: #ea580c;
    border: 1px solid #fed7aa;
}

.status-Completed, .status-Closed {
    background-color: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

.status-Rejected {
    background-color: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

/* Form Controls */
.dub-report-form {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    margin-bottom: 2rem;
}

.form-select {
    padding: 0.5rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background-color: #fff;
    font-size: 0.95rem;
}

.form-select:focus {
    border-color: #800000;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(128, 0, 0, 0.25);
}

.input-group {
    margin-bottom: 1rem;
}

.input-group .btn {
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    background-color: #800000;
    color: white;
    border: none;
}

.input-group .btn:hover {
    background-color: #600000;
    color: white;
}

/* Select2 Custom Styling */
.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #800000 !important;
    color: white !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #800000 !important;
    color: white !important;
    border: 1px solid #600000 !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: white !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #ddd !important;
}

/* Create Ticket Button */
.btn-primary {
    background-color: #800000 !important;
    border-color: #600000 !important;
    color: white !important;
}

.btn-primary:hover {
    background-color: #600000 !important;
    border-color: #400000 !important;
}

/* Dark Theme Support */
html.dark .dub-report-container {
    background-color: #2b2b2b;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

html.dark .dub-report-container h1 {
    color: #e0e0e0;
}

html.dark .dub-report-meta,
html.dark .dub-report-description,
html.dark .comment-item,
html.dark .comment-form {
    background-color: #333;
}

html.dark .dub-report-meta-label {
    color: #adb5bd;
}

html.dark .comment-author {
    color: #e0e0e0;
}

html.dark .comment-header {
    color: #adb5bd;
}

html.dark .comment-form textarea {
    background-color: #2b2b2b;
    border-color: #444;
    color: #e0e0e0;
}

/* Edit User Form Styles */
.edit-user-container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.edit-user-container h1 {
    margin-bottom: 2rem;
    color: #333;
}

.edit-user-container form > div {
    margin-bottom: 1.5rem;
}

.edit-user-container label {
    display: block;
    margin-bottom: 0.5rem;
    color: #555;
    font-weight: 500;
}

.edit-user-container input,
.edit-user-container select,
.edit-user-container textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    color: #333;
}

.edit-user-container textarea {
    min-height: 100px;
    resize: vertical;
}

.edit-user-container button[type="submit"] {
    background-color: #800000;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    margin-bottom: 1rem;
}

.edit-user-container button[type="submit"]:hover {
    background-color: #600000;
}

.edit-user-container .actions {
    margin-top: 2rem;
    text-align: center;
}

/* Dark theme support */
html.dark .edit-user-container {
    background-color: #2b2b2b;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

html.dark .edit-user-container h1 {
    color: #e0e0e0;
}

html.dark .edit-user-container label {
    color: #ccc;
}

html.dark .edit-user-container input,
html.dark .edit-user-container select,
html.dark .edit-user-container textarea {
    background-color: #333;
    border-color: #444;
    color: #e0e0e0;
}

html.dark .edit-user-container input[readonly] {
    background-color: #2b2b2b;
}

/* Readonly field styles */
.edit-user-container .readonly-field {
    display: inline-block;
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
}

html.dark .edit-user-container .readonly-field {
    background-color: #2b2b2b;
    border-color: #444;
    color: #adb5bd;
}

.select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option {
    padding: .375rem .75rem;
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.0;
}

/* ============================================
   RESPONSIVE MOBILE STYLES
   ============================================ */

/* Base Mobile Styles - Phones (< 576px) */
@media (max-width: 575.98px) {
    /* General Layout */
    body {
        font-size: 14px;
    }

    .container {
        padding: 0 10px;
        margin: 10px auto;
    }

    /* Typography */
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    h4 { font-size: 1.1rem; }
    h5 { font-size: 1rem; }

    /* Buttons - Touch-friendly sizing */
    .btn,
    button,
    input[type="submit"],
    input[type="button"] {
        min-height: 44px;
        min-width: 44px;
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .btn-sm {
        min-height: 38px;
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }

    /* Forms */
    .form-control,
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="tel"],
    select,
    textarea {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 0.75rem;
        min-height: 44px;
    }

    /* Tables - Horizontal scroll */
    .table-responsive {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        font-size: 0.85rem;
    }

    table th,
    table td {
        padding: 0.5rem 0.25rem;
        white-space: nowrap;
    }

    /* Cards */
    .card {
        margin-bottom: 1rem;
    }

    .card-body {
        padding: 1rem;
    }

    /* Modals */
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }

    .modal-content {
        border-radius: 8px;
    }

    .modal-header,
    .modal-footer {
        padding: 0.75rem;
    }

    .modal-body {
        padding: 1rem;
    }

    /* Profile Container */
    .profile-container,
    .edit-user-container {
        margin: 1rem auto;
        padding: 1rem;
    }

    /* Utility Classes */
    .d-mobile-none {
        display: none !important;
    }

    .d-mobile-block {
        display: block !important;
    }
}

/* Small Tablets (576px - 767.98px) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .container {
        max-width: 540px;
        padding: 0 15px;
    }

    /* Tables */
    table {
        font-size: 0.9rem;
    }

    table th,
    table td {
        padding: 0.6rem 0.4rem;
    }

    /* Cards */
    .card-body {
        padding: 1.25rem;
    }

    /* Modals */
    .modal-dialog {
        max-width: 500px;
        margin: 1rem auto;
    }
}

/* Tablets (768px - 991.98px) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .container {
        max-width: 720px;
    }

    /* Adjust Bootstrap grid for tablets */
    .col-md-6 {
        width: 50%;
    }

    .col-md-4 {
        width: 50%;
    }

    /* Tables */
    table {
        font-size: 0.95rem;
    }

    /* Forms */
    .form-control {
        font-size: 15px;
    }

    /* Modals */
    .modal-dialog {
        max-width: 600px;
    }
}

/* Large Tablets / Small Desktops (992px - 1199.98px) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .container {
        max-width: 960px;
    }
}

/* Touch-friendly improvements for all touch devices */
@media (hover: none) and (pointer: coarse) {
    /* Increase tap target sizes */
    a,
    button,
    .btn,
    input[type="button"],
    input[type="submit"],
    label {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    /* Remove hover effects on touch devices */
    *:hover {
        -webkit-tap-highlight-color: transparent;
    }

    /* Better touch feedback */
    a:active,
    button:active,
    .btn:active {
        opacity: 0.7;
        transform: scale(0.98);
    }
}

/* Print Styles */
@media print {
    .navbar,
    .nav-container,
    .sidebar,
    .btn,
    button,
    .nav-right,
    .dropdown,
    .navbar-toggler {
        display: none !important;
    }

    body {
        margin: 0;
        padding: 0;
    }

    .container {
        max-width: 100%;
        margin: 0;
    }

    a[href]:after {
        content: none !important;
    }
}

/* Landscape orientation optimizations */
@media (max-width: 767.98px) and (orientation: landscape) {
    /* Reduce padding in landscape to maximize screen space */
    .container {
        padding: 0 5px;
    }

    .modal-dialog {
        max-height: 90vh;
        overflow-y: auto;
    }

    .card-body {
        padding: 0.75rem;
    }
}

/* ============================================
   PROJECTS & TIMELINE PAGE RESPONSIVE STYLES
   ============================================ */

/* Projects timeline improvements */
@media (max-width: 991.98px) {
    /* Ensure full width when sidebar is hidden */
    body.hide-sidebar .container,
    body.hide-sidebar .container-fluid {
        max-width: 100%;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Timeline specific styles */
    .timeline-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Make project cards stack better on smaller screens */
    .project-card {
        margin-bottom: 1rem;
    }

    /* Gantt chart responsiveness */
    .gantt-chart,
    .timeline-chart {
        min-width: 800px; /* Allow horizontal scroll */
    }
}

@media (max-width: 767.98px) {
    /* Full width on mobile */
    body.hide-sidebar .container,
    body.hide-sidebar .container-fluid {
        padding-left: 10px;
        padding-right: 10px;
    }

    /* Timeline header adjustments */
    .timeline-header h1,
    .timeline-header h2 {
        font-size: 1.5rem;
    }

    /* Filter buttons stack vertically */
    .timeline-filters .btn-group {
        flex-direction: column;
        width: 100%;
    }

    .timeline-filters .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    /* Project details in timeline */
    .project-details {
        font-size: 0.85rem;
        padding: 0.5rem;
    }
}