
/* Alert Container */
.alert-custom {
    position: fixed;
    top: 60px;
    right: 20px;
    z-index: 1050;
    min-width: 300px;
    max-width: 400px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
}

/* Progress Bar */
.alert-custom .progress {
    height: 3px;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
}

.alert-custom .progress-bar {
    width: 100%;
    transition: width 3s linear;
}

 :root {
            --primary-color: #3f51b5;
            --secondary-color: #f5f7ff;
            --accent-color: #ff5722;
            --text-color: #333;
            --light-gray: #f8f9fa;
            --sidebar-width: 280px;
            --sidebar-collapsed-width: 80px;
            --header-height: 60px;
        }

        body {
            background-color: #f5f8fa;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            margin: 0;
            padding: 0;
            height: 100vh;
            overflow: hidden;
        }

        /* Header Styles */
        .main-header {
            background: white;
            height: var(--header-height);
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            position: fixed;
            top: 0;
            left: var(--sidebar-width);
            right: 0;
            z-index: 100;
            transition: left 0.3s ease;
            display: flex;
            align-items: center;
            padding: 0 20px;
            justify-content: space-between;
        }

        .header-title {
            font-size: 1.5rem;
            font-weight: 600;
            color: var(--primary-color);
        }

        .user-info {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        /* Sidebar Styles */
        .sidebar {
            background: var(--primary-color);
            color: white;
            width: var(--sidebar-width);
            height: 100vh;
            position: fixed;
            top: 0;
            left: 0;
            z-index: 1000;
            transition: width 0.3s ease;
            overflow-y: auto;
            padding-top: 30px;
        }

        .sidebar.collapsed {
            width: var(--sidebar-collapsed-width);
        }

        .sidebar-header {
            padding: 20px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .sidebar-toggle {
            background: rgba(255, 255, 255, 0.1);
            border: none;
            color: white;
            border-radius: 50%;
            width: 35px;
            height: 35px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.3s;
        }

        .sidebar-toggle:hover {
            background: rgba(255, 255, 255, 0.2);
        }

        .nav-item {
            margin: 5px 15px;
            border-radius: 8px;
            overflow: hidden;
        }

        .nav-link {
            color: rgba(255, 255, 255, 0.8);
            padding: 12px 15px;
            display: flex;
            align-items: center;
            gap: 12px;
            transition: all 0.3s;
            text-decoration: none;
            border-radius: 8px;
        }

        .nav-link:hover,
        .nav-link.active {
            color: white;
            background: rgba(255, 255, 255, 0.1);
        }

        .nav-link i {
            font-size: 1.2rem;
            width: 24px;
            text-align: center;
        }

        .sidebar.collapsed .nav-text {
            display: none;
        }

        .sidebar.collapsed .nav-link {
            justify-content: center;
            padding: 15px;
        }

        .sidebar.collapsed .nav-link i {
            font-size: 1.4rem;
        }

        /* Main Content */
        .main-content {
            margin-left: var(--sidebar-width);
            padding: 20px;
            padding-top: calc(var(--header-height) + 20px);
            height: 100vh;
            overflow-y: auto;
            transition: margin-left 0.3s ease;
        }

        .main-content.expanded {
            margin-left: var(--sidebar-collapsed-width);
        }

        /* Dashboard Cards */
        .stat-card {
            background: white;
            border-radius: 12px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
            padding: 20px;
            text-align: center;
            transition: transform 0.3s;
            height: 100%;
        }

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

        .stat-card i {
            font-size: 2.5rem;
            margin-bottom: 15px;
            color: var(--primary-color);
        }

        .stat-card h2 {
            font-size: 2.2rem;
            margin: 0;
            font-weight: 600;
        }

        .stat-card p {
            color: #6c757d;
            margin: 5px 0 0;
        }

        .stat-card a {
            color: var(--primary-color);
            text-decoration: none;
            font-weight: 500;
        }

        /* Table Styles */
        .data-table {
            background: white;
            border-radius: 12px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
            overflow: hidden;
        }

        .data-table th {
            background: #f8f9fa;
            font-weight: 600;
            color: #495057;
            border-top: none;
            padding: 15px;
        }

        .data-table td {
            padding: 15px;
            vertical-align: middle;
        }

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

        .status-open {
            background: #fff0f0;
            color: #dc3545;
        }

        .status-resolved {
            background: #f0fff4;
            color: #28a745;
        }

        .status-pending {
            background: #fff9e6;
            color: #ffc107;
        }

        .priority-high {
            color: #dc3545;
            font-weight: 600;
        }

        .priority-medium {
            color: #ffc107;
            font-weight: 600;
        }

        .priority-low {
            color: #28a745;
            font-weight: 600;
        }

        /* Alert Styles */
        .alert {
            border-radius: 10px;
            border: none;
            padding: 15px 20px;
            margin-bottom: 20px;
        }

        .alert-success {
            background: #e8f5e9;
            color: #2e7d32;
        }

        .alert-error {
            background: #ffebee;
            color: #c62828;
        }

        /* Footer */
        .main-footer {
            background: white;
            padding: 15px 20px;
            text-align: center;
            margin-left: var(--sidebar-width);
            transition: margin-left 0.3s ease;
            box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
        }

        .main-footer.expanded {
            margin-left: var(--sidebar-collapsed-width);
        }

        /* Responsive */
        @media (max-width: 992px) {
            .sidebar {
                transform: translateX(-100%);
                width: var(--sidebar-width);
            }

            .sidebar.mobile-active {
                transform: translateX(0);
            }

            .main-header {
                left: 0;
            }

            .main-content,
            .main-footer {
                margin-left: 0;
            }

            .sidebar.mobile-active+.main-header,
            .sidebar.mobile-active~.main-content,
            .sidebar.mobile-active~.main-footer {
                margin-left: 0;
                left: 0;
            }

            .mobile-menu-btn {
                display: block;
            }
        }




        /* replies and show css */
          .ticket-details-card {
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .status-badge {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
        border-radius: 50rem;
        font-weight: 500;
        transition: background-color 0.3s ease;
    }

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

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

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


    .detail-label {
        font-size: 0.9rem;
        color: #6c757d;
        margin-bottom: 0.2rem;
    }

    .detail-value {
        color: #212529;
        font-size: 1.1rem;
        line-height: 1.5;
        margin-bottom: 0;
    }

    .chat-container {
        background-color: #f8f9fa;
        border: 1px solid #dee2e6;
        border-radius: 12px;
        height: 470px;
        overflow-y: auto;   
        padding: 1rem;
        margin-bottom: 1rem;
        display: flex;
        flex-direction: column;
    }

    .chat-message {
        /*max-width: 75%; */
        width: 20%;
        margin-bottom: 1.5rem;
        padding: 0.75rem 1rem;
        border-radius: 18px;
        position: relative;
        word-wrap: break-word;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    }

    .chat-message.own {
        background: linear-gradient(135deg, #4077d1, #4370c5);
        color: white;
        align-self: flex-end;
        border-bottom-right-radius: 6px;
    }

    .chat-message.other {
        background-color: white;
        color: #212529;
        align-self: flex-start;
        border-bottom-left-radius: 6px;
        border: 1px solid #e9ecef;
    }

    .chat-message .sender {
        font-size: 0.75rem;
        font-weight: 600;
        margin-bottom: 0.4rem;
        display: flex;
        align-items: center;
    }

    .chat-message.own .sender {
        color: rgba(255, 255, 255, 0.85);
    }

    .chat-message.other .sender {
        color: #6c757d;
    }

    .chat-message .sender i {
        margin-right: 0.4rem;
        font-size: 0.7rem;
    }

    .chat-message .message-content {
        margin-bottom: 0.5rem;
        line-height: 1.5;
    }

    .chat-message .timestamp {
        font-size: 0.65rem;
        text-align: right;
        margin-top: 0.10rem;
        display: block;
    }

    .chat-message.own .timestamp {
        color: rgba(255, 255, 255, 0.75);
    }

    .chat-message.other .timestamp {
        color: #adb5bd;
    }

    .chat-message .media {
        margin-top: 0.75rem;
        border-radius: 12px;
        overflow: hidden;
    }

    .chat-message .media img {
        max-width: 200px;
        max-height: 150px;
        border-radius: 8px;
        object-fit: cover;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        transition: transform 0.2s ease;
    }

    .chat-message .media audio {
        width: 100%;
        max-width: 250px;
        border-radius: 20px;
        height: 32px;
    }

    .chat-input-container {
        background-color: #fff;
        border: 1px solid #dee2e6;
        border-radius: 12px;
        padding: 0.75rem;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }

    .chat-input {
        display: flex;
        align-items: flex-end;
        gap: 0.5rem;
    }

    .chat-input textarea {
        border: none;
        resize: none;
        flex-grow: 1;
        min-height: 40px;
        max-height: 120px;
        overflow-y: auto;
        padding: 0.6rem;
        border-radius: 8px;
        background-color: #f8f9fa;
        transition: background-color 0.2s ease;
    }

    .chat-input textarea:focus {
        background-color: #fff;
        box-shadow: 0 0 0 2px rgba(59, 120, 231, 0.25);
        outline: none;
    }

    .attachment-buttons {
        display: flex;
        gap: 0.5rem;
        margin-bottom: 0.5rem;
    }

    .btn-attachment {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: #f8f9fa;
        border: 1px solid #dee2e6;
        color: #6c757d;
        transition: all 0.2s ease;
    }

    .btn-send {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, #4a86e8, #3b78e7);
        border: none;
        color: white;
        transition: all 0.2s ease;
    }


    .action-buttons .btn {
        padding: 0.5rem 1.25rem;
        font-size: 0.9rem;
    }

    .date-divider {
        text-align: center;
        margin: 1.5rem 0;
        position: relative;
    }

    .date-divider span {
        background-color: #f8f9fa;
        padding: 0.4rem 1rem;
        border-radius: 20px;
        font-size: 0.75rem;
        color: #6c757d;
        position: relative;
        z-index: 1;
        border: 1px solid #e9ecef;
    }

    .date-divider:before {
        content: '';
        position: absolute;
        top: 50%;
        left: 0;
        right: 0;
        height: 1px;
        background-color: #dee2e6;
        z-index: 0;
    }

    .chat-typing-indicator {
        display: flex;
        align-items: center;
        margin-bottom: 1rem;
        align-self: flex-start;
        background-color: white;
        padding: 0.75rem 1rem;
        border-radius: 18px;
        border: 1px solid #e9ecef;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
        color: #6c757d;
        font-size: 0.85rem;
    }

    .chat-typing-indicator .dot {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background-color: #6c757d;
        margin: 0 1px;
        display: inline-block;
        animation: typingAnimation 1.4s infinite ease-in-out;
    }

    .chat-typing-indicator .dot:nth-child(1) {
        animation-delay: 0s;
    }

    .chat-typing-indicator .dot:nth-child(2) {
        animation-delay: 0.2s;
    }

    .chat-typing-indicator .dot:nth-child(3) {
        animation-delay: 0.4s;
    }

    @keyframes typingAnimation {

        0%,
        60%,
        100% {
            transform: translateY(0);
        }

        30% {
            transform: translateY(-5px);
        }
    }

    @media (max-width: 576px) {
        .action-buttons {
            flex-direction: column;
            gap: 0.5rem;
        }

        .action-buttons .btn {
            width: 100%;
        }

        .detail-value {
            font-size: 1rem;
        }

        .chat-container {
            height: 350px;
        }

        .chat-message {
            max-width: 85%;
        }

        .chat-message .media img {
            max-width: 160px;
            max-height: 120px;
        }

        .chat-message .media audio {
            max-width: 200px;
        }

        .chat-input {
            flex-wrap: wrap;
        }

        .attachment-buttons {
            order: 2;
            width: 100%;
            justify-content: center;
        }

        .chat-input textarea {
            order: 1;
        }

        .btn-send {
            order: 3;
        }
    }