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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: radial-gradient(circle at 0% 0%, #e9eef5 0%, #cfd8e6 100%);
    min-height: 100vh;
    color: #333;
}

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

.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100vw;
}

.login-left, .login-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.logo-image {
    max-width: 420px;
    width: 80%;
    min-width: 250px;
    height: auto;
    object-fit: contain;
    background: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
}

.login-container, .login-logo-outside {
    display: none !important;
}

.login-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    padding: 40px 32px;
    min-width: 350px;
    max-width: 400px;
    width: 100%;
    text-align: center;
}

.login-content-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    flex: 1 0 auto;
}

.login-logo {
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
}

.login-card h1 {
    color: #2c3e50;
    margin-bottom: 12px;
    font-size: 26px;
    font-weight: 600;
}

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

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

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.btn {
    background: #2980b9;
    color: #fff;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 10px;
}

.btn:hover {
    background: #2366a8;
    color: #fff;
}

.btn-secondary {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
}

.btn-secondary:hover {
    box-shadow: 0 5px 15px rgba(149, 165, 166, 0.3);
}


.dashboard {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
    overflow: hidden;
}

.dashboard-header {
    background: #2980b9;
    color: #fff;
    padding: 30px;
    text-align: center;
    border-radius: 15px 15px 0 0;
}

.dashboard-header h1 {
    font-size: 32px;
    margin-bottom: 10px;
}

.dashboard-header p {
    opacity: 0.9;
    font-size: 16px;
}

.dashboard-content {
    padding: 30px;
    background: none;
    border-radius: 0;
    margin: 0;
    max-width: none;
    box-shadow: none;
}

.dashboard-content > .user-info,
.dashboard-content > form,
.dashboard-content > .message {
    background: #f8f9fa;
    border-radius: 10px;
    box-shadow: none;
    padding: 20px;
    margin-bottom: 30px;
}

.user-info {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
}

.user-info h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.info-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.info-item strong {
    color: #555;
    display: block;
    margin-bottom: 5px;
}

.info-item span {
    color: #2c3e50;
    font-weight: 500;
}


.sidebar.modern-admin-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    height: 100vh;
    background: #101c36;
    box-shadow: 2px 0 16px rgba(16,28,54,0.10);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.sidebar-logo {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    padding: 32px 0 24px 36px;
    margin-bottom: 8px;
}

.sidebar-nav {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 12px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 0 12px 36px;
    color: #e5eaf5;
    text-decoration: none;
    font-size: 17px;
    font-weight: 500;
    border-radius: 8px;
    margin: 2px 14px;
    transition: background 0.18s, color 0.18s;
    position: relative;
}

.nav-item i {
    font-size: 20px;
    width: 24px;
    min-width: 24px;
    text-align: center;
    color: #b6c3e6;
    transition: color 0.18s;
}

.nav-item:hover {
    background: #1e293b;
    color: #fff;
}

.nav-item:hover i {
    color: #fff;
}

.nav-item.active {
    background: #2563eb;
    color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(37,99,235,0.10);
}

.nav-item.active i {
    color: #fff;
}


.modern-admin-sidebar-user {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 22px 0 22px 36px;
    border-top: 1px solid #182447;
    background: #101c36;
    margin-top: auto;
    position: relative;
}

.sidebar-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(37,99,235,0.10);
    overflow: hidden;
}

.sidebar-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.sidebar-user-avatar svg {
    width: 100%;
    height: 100%;
}

.sidebar-user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.sidebar-user-name {
    font-weight: 700;
    color: #fff;
    font-size: 1.08rem;
    line-height: 1.2;
    margin-bottom: 2px;
    text-align: left;
}

.sidebar-user-role {
    font-size: 13px;
    color: #b6c3e6;
    text-align: left;
    font-weight: 400;
}

.sidebar-logout {
    color: #b6c3e6;
    font-size: 1.2rem;
    margin-left: auto;
    margin-right: 18px;
    transition: color 0.18s;
    display: flex;
    align-items: center;
}

.sidebar-logout:hover {
    color: #ff5c5c;
}




@media (min-width: 576px) and (max-width: 767px) {
    .tickets-container {
        flex-direction: column;
        height: auto;
        gap: 12px;
        padding: 16px;
        margin: -16px;
    }
    
    .tickets-list {
        flex: none;
        max-height: 300px;
        order: 1;
    }
    
    .chat-area {
        min-height: 500px;
        order: 2;
    }
    
    .chat-messages {
        padding: 12px;
        gap: 12px;
        min-height: 350px;
    }
    
    .chat-input {
        padding: 12px;
        min-height: 70px;
    }
    
    .input-wrapper textarea {
        min-height: 44px;
    }
}


@media (min-width: 1000px) and (max-width: 1100px) and (max-height: 700px) {
    .tickets-container {
        height: calc(100vh - 80px);
        min-height: 450px;
        gap: 12px;
        padding: 12px;
        margin: -12px;
    }
    
    .tickets-list {
        flex: 0 0 280px;
    }
    
    .chat-area {
        min-height: 350px;
    }
    
    .chat-messages {
        min-height: 150px;
        max-height: 250px;
        padding: 12px;
    }
    
    .chat-input {
        min-height: 60px;
        padding: 12px;
        flex-shrink: 0;
    }
    
    .input-wrapper textarea {
        min-height: 36px;
        font-size: 0.9rem;
    }
    
    .btn-send {
        width: 36px;
        height: 36px;
    }
    
    .list-header {
        padding: 12px;
    }
    
    .chat-header {
        padding: 8px 12px;
    }
    
    .title-left h3 {
        font-size: 0.95rem;
        max-width: 200px;
    }
    
    .btn-sm {
        padding: 4px 8px;
        font-size: 0.7rem;
    }
}


@media (min-width: 1000px) and (max-width: 1200px) and (max-height: 750px) {
    .tickets-container {
        height: calc(100vh - 90px);
        min-height: 480px;
    }
    
    .tickets-list {
        flex: 0 0 300px;
    }
    
    .chat-area {
        min-height: 380px;
    }
    
    .chat-messages {
        min-height: 180px;
        max-height: 280px;
    }
    
    .chat-input {
        min-height: 65px;
        flex-shrink: 0;
    }
    
    .input-wrapper textarea {
        min-height: 40px;
    }
    
    .btn-send {
        width: 40px;
        height: 40px;
    }
}

@media (min-width: 800px) and (max-height: 600px) {
    .tickets-container {
        height: calc(100vh - 80px);
        min-height: 450px;
    }
    
    .chat-area {
        min-height: 350px;
    }
    
    .chat-messages {
        min-height: 150px;
        max-height: 250px;
    }
    
    .tickets-list {
        flex: 0 0 300px;
    }
    
    .chat-input {
        min-height: 60px;
        padding: 12px;
    }
    
    .input-wrapper textarea {
        min-height: 36px;
    }
    
    .btn-send {
        width: 36px;
        height: 36px;
    }
}


@media (max-width: 575px) {
    .tickets-container {
        flex-direction: column;
        height: auto;
        gap: 8px;
        padding: 12px;
        margin: -12px;
    }
    
    .tickets-list {
        flex: none;
        max-height: 250px;
        order: 1;
    }
    
    .chat-area {
        min-height: 450px;
        order: 2;
    }
    
    .chat-messages {
        padding: 8px;
        gap: 10px;
        min-height: 300px;
    }
    
    .chat-input {
        padding: 8px;
        min-height: 60px;
    }
    
    .input-wrapper textarea {
        min-height: 40px;
        font-size: 0.9rem;
    }
    
    .btn-send {
        width: 36px;
        height: 36px;
    }
}


@media (max-width: 374px) {
    .tickets-container {
        padding: 8px;
        margin: -8px;
    }
    
    .tickets-list {
        max-height: 200px;
    }
    
    .chat-area {
        min-height: 400px;
    }
    
    .chat-messages {
        padding: 6px;
        min-height: 250px;
    }
    
    .chat-input {
        padding: 6px;
        min-height: 55px;
    }
    
    .input-wrapper textarea {
        min-height: 36px;
        font-size: 0.85rem;
    }
    
    .btn-send {
        width: 32px;
        height: 32px;
    }
}


@media (max-height: 600px) {
    .tickets-container {
        height: calc(100vh - 60px);
        min-height: 400px;
    }
    
    .chat-area {
        min-height: 300px;
    }
    
    .chat-messages {
        min-height: 120px;
        max-height: 200px;
    }
    
    .chat-input {
        min-height: 60px;
        padding: 12px;
    }
    
    .input-wrapper textarea {
        min-height: 36px;
    }
    
    .btn-send {
        width: 36px;
        height: 36px;
    }
}


@media (max-height: 500px) {
    .tickets-container {
        height: calc(100vh - 40px);
        min-height: 350px;
    }
    
    .chat-area {
        min-height: 250px;
    }
    
    .chat-messages {
        min-height: 100px;
        max-height: 150px;
    }
    
    .chat-input {
        min-height: 50px;
        padding: 8px;
    }
    
    .input-wrapper textarea {
        min-height: 32px;
        font-size: 0.85rem;
    }
    
    .btn-send {
        width: 32px;
        height: 32px;
    }
    
    .list-header {
        padding: 12px;
    }
    
    .chat-header {
        padding: 8px 12px;
    }
}


@media (min-width: 1024px) and (max-width: 1600px) {
    .tickets-container {
        height: calc(100vh - 100px);
        min-height: 500px;
        gap: 16px;
        padding: 16px;
        margin: -16px;
    }
    
    .tickets-list {
        flex: 0 0 320px;
    }
    
    .chat-header {
        padding: 10px 16px;
    }
    
    .title-left h3 {
        font-size: 1rem;
        max-width: 280px;
    }
    
    .chat-messages {
        padding: 16px;
        min-height: 350px;
    }
    
    .chat-input {
        padding: 16px;
        min-height: 70px;
    }
    
    .input-wrapper textarea {
        min-height: 44px;
        font-size: 0.9rem;
    }
    
    .btn-send {
        width: 44px;
        height: 44px;
    }
}


@media (min-width: 1024px) and (max-width: 1600px) and (max-height: 800px) {
    .tickets-container {
        height: calc(100vh - 90px);
        min-height: 480px;
        gap: 14px;
        padding: 14px;
        margin: -14px;
    }
    
    .tickets-list {
        flex: 0 0 300px;
    }
    
    .chat-header {
        padding: 8px 14px;
    }
    
    .title-left h3 {
        font-size: 0.95rem;
        max-width: 260px;
    }
    
    .chat-messages {
        padding: 14px;
        min-height: 320px;
    }
    
    .chat-input {
        padding: 14px;
        min-height: 68px;
    }
    
    .input-wrapper textarea {
        min-height: 42px;
        font-size: 0.88rem;
    }
    
    .btn-send {
        width: 42px;
        height: 42px;
    }
}

@media (min-width: 1024px) and (max-width: 1600px) and (max-height: 700px) {
    .tickets-container {
        height: calc(100vh - 80px);
        min-height: 450px;
        gap: 12px;
        padding: 12px;
        margin: -12px;
    }
    
    .tickets-list {
        flex: 0 0 280px;
    }
    
    .chat-header {
        padding: 8px 12px;
    }
    
    .title-left h3 {
        font-size: 0.9rem;
        max-width: 240px;
    }
    
    .chat-messages {
        padding: 12px;
        min-height: 280px;
    }
    
    .chat-input {
        padding: 12px;
        min-height: 65px;
    }
    
    .input-wrapper textarea {
        min-height: 40px;
        font-size: 0.85rem;
    }
    
    .btn-send {
        width: 40px;
        height: 40px;
    }
}

@media (min-width: 1024px) and (max-width: 1600px) and (max-height: 600px) {
    .tickets-container {
        height: calc(100vh - 70px);
        min-height: 400px;
        gap: 10px;
        padding: 10px;
        margin: -10px;
    }
    
    .tickets-list {
        flex: 0 0 260px;
    }
    
    .chat-header {
        padding: 6px 10px;
    }
    
    .title-left h3 {
        font-size: 0.85rem;
        max-width: 220px;
    }
    
    .chat-messages {
        padding: 10px;
        min-height: 250px;
    }
    
    .chat-input {
        padding: 10px;
        min-height: 60px;
    }
    
    .input-wrapper textarea {
        min-height: 38px;
        font-size: 0.83rem;
    }
    
    .btn-send {
        width: 38px;
        height: 38px;
    }
}


@media (min-width: 900px) and (max-width: 1600px) {
    .tickets-container {
        height: calc(100vh - 95px);
        min-height: 490px;
        gap: 15px;
        padding: 15px;
        margin: -15px;
    }
    
    .tickets-list {
        flex: 0 0 310px;
    }
    
    .chat-header {
        padding: 9px 15px;
    }
    
    .title-left h3 {
        font-size: 0.98rem;
        max-width: 270px;
    }
    
    .chat-messages {
        padding: 15px;
        min-height: 330px;
    }
    
    .chat-input {
        padding: 15px;
        min-height: 69px;
    }
    
    .input-wrapper textarea {
        min-height: 43px;
        font-size: 0.89rem;
    }
    
    .btn-send {
        width: 43px;
        height: 43px;
    }
}


@media (min-width: 768px) and (max-width: 1600px) {
    .tickets-container {
        height: calc(100vh - 90px);
        min-height: 470px;
        gap: 14px;
        padding: 14px;
        margin: -14px;
    }
    
    .tickets-list {
        flex: 0 0 300px;
    }
    
    .chat-header {
        padding: 8px 14px;
    }
    
    .title-left h3 {
        font-size: 0.95rem;
        max-width: 260px;
    }
    
    .chat-messages {
        padding: 14px;
        min-height: 320px;
    }
    
    .chat-input {
        padding: 14px;
        min-height: 68px;
    }
    
    .input-wrapper textarea {
        min-height: 42px;
        font-size: 0.88rem;
    }
    
    .btn-send {
        width: 42px;
        height: 42px;
    }
}

/* NEW: 13-inch laptops (1280px - 1440px) - Most common 13" resolution */
@media (min-width: 1280px) and (max-width: 1440px) {
    .tickets-container {
        height: calc(100vh - 110px);
        min-height: 520px;
        gap: 18px;
        padding: 18px;
        margin: -18px;
    }
    
    .tickets-list {
        flex: 0 0 340px;
    }
    
    .chat-header {
        padding: 12px 18px;
    }
    
    .title-left h3 {
        font-size: 1.05rem;
        max-width: 300px;
    }
    
    .chat-messages {
        padding: 18px;
        min-height: 380px;
    }
    
    .chat-input {
        padding: 18px;
        min-height: 75px;
    }
    
    .input-wrapper textarea {
        min-height: 46px;
        font-size: 0.92rem;
    }
    
    .btn-send {
        width: 46px;
        height: 46px;
    }
}

/* NEW: 13-inch laptops with lower height (1280px - 1440px, max-height: 800px) */
@media (min-width: 1280px) and (max-width: 1440px) and (max-height: 800px) {
    .tickets-container {
        height: calc(100vh - 90px);
        min-height: 480px;
        gap: 16px;
        padding: 16px;
        margin: -16px;
    }
    
    .tickets-list {
        flex: 0 0 320px;
    }
    
    .chat-header {
        padding: 10px 16px;
    }
    
    .title-left h3 {
        font-size: 1rem;
        max-width: 280px;
    }
    
    .chat-messages {
        padding: 16px;
        min-height: 350px;
    }
    
    .chat-input {
        padding: 16px;
        min-height: 70px;
    }
    
    .input-wrapper textarea {
        min-height: 44px;
        font-size: 0.9rem;
    }
    
    .btn-send {
        width: 44px;
        height: 44px;
    }
}

/* NEW: 13-inch laptops with very low height (1280px - 1440px, max-height: 700px) */
@media (min-width: 1280px) and (max-width: 1440px) and (max-height: 700px) {
    .tickets-container {
        height: calc(100vh - 80px);
        min-height: 450px;
        gap: 14px;
        padding: 14px;
        margin: -14px;
    }
    
    .tickets-list {
        flex: 0 0 300px;
    }
    
    .chat-header {
        padding: 8px 14px;
    }
    
    .title-left h3 {
        font-size: 0.95rem;
        max-width: 260px;
    }
    
    .chat-messages {
        padding: 14px;
        min-height: 320px;
    }
    
    .chat-input {
        padding: 14px;
        min-height: 68px;
    }
    
    .input-wrapper textarea {
        min-height: 42px;
        font-size: 0.88rem;
    }
    
    .btn-send {
        width: 42px;
        height: 42px;
    }
}

/* NEW: 13-inch laptops with ultra-low height (1280px - 1440px, max-height: 600px) */
@media (min-width: 1280px) and (max-width: 1440px) and (max-height: 600px) {
    .tickets-container {
        height: calc(100vh - 70px);
        min-height: 400px;
        gap: 12px;
        padding: 12px;
        margin: -12px;
    }
    
    .tickets-list {
        flex: 0 0 280px;
    }
    
    .chat-header {
        padding: 8px 12px;
    }
    
    .title-left h3 {
        font-size: 0.9rem;
        max-width: 240px;
    }
    
    .chat-messages {
        padding: 12px;
        min-height: 280px;
    }
    
    .chat-input {
        padding: 12px;
        min-height: 65px;
    }
    
    .input-wrapper textarea {
        min-height: 40px;
        font-size: 0.85rem;
    }
    
    .btn-send {
        width: 40px;
        height: 40px;
    }
}

/* NEW: 13-inch laptops with different aspect ratios (1366px - 1440px) */
@media (min-width: 1366px) and (max-width: 1440px) {
    .tickets-container {
        height: calc(100vh - 115px);
        min-height: 530px;
        gap: 19px;
        padding: 19px;
        margin: -19px;
    }
    
    .tickets-list {
        flex: 0 0 345px;
    }
    
    .chat-header {
        padding: 11px 19px;
    }
    
    .title-left h3 {
        font-size: 1.03rem;
        max-width: 290px;
    }
    
    .chat-messages {
        padding: 19px;
        min-height: 370px;
    }
    
    .chat-input {
        padding: 19px;
        min-height: 73px;
    }
    
    .input-wrapper textarea {
        min-height: 45px;
        font-size: 0.91rem;
    }
    
    .btn-send {
        width: 45px;
        height: 45px;
    }
}

/* NEW: 13-inch laptops with 1366x768 resolution */
@media (min-width: 1366px) and (max-width: 1366px) and (max-height: 768px) {
    .tickets-container {
        height: calc(100vh - 85px);
        min-height: 470px;
        gap: 15px;
        padding: 15px;
        margin: -15px;
    }
    
    .tickets-list {
        flex: 0 0 310px;
    }
    
    .chat-header {
        padding: 9px 15px;
    }
    
    .title-left h3 {
        font-size: 0.98rem;
        max-width: 270px;
    }
    
    .chat-messages {
        padding: 15px;
        min-height: 330px;
    }
    
    .chat-input {
        padding: 15px;
        min-height: 69px;
    }
    
    .input-wrapper textarea {
        min-height: 43px;
        font-size: 0.89rem;
    }
    
    .btn-send {
        width: 43px;
        height: 43px;
    }
}


@media (min-width: 1440px) and (max-width: 1440px) and (max-height: 900px) {
    .tickets-container {
        height: calc(100vh - 120px);
        min-height: 550px;
        gap: 20px;
        padding: 20px;
        margin: -20px;
    }
    
    .tickets-list {
        flex: 0 0 360px;
    }
    
    .chat-header {
        padding: 12px 20px;
    }
    
    .title-left h3 {
        font-size: 1.1rem;
        max-width: 320px;
    }
    
    .chat-messages {
        padding: 20px;
        min-height: 400px;
    }
    
    .chat-input {
        padding: 20px;
        min-height: 80px;
    }
    
    .input-wrapper textarea {
        min-height: 48px;
        font-size: 0.95rem;
    }
    
    .btn-send {
        width: 48px;
        height: 48px;
    }
}


@media (min-width: 1366px) and (max-width: 1440px) {
    .tickets-container {
        height: calc(100vh - 110px);
        min-height: 520px;
        gap: 18px;
        padding: 18px;
        margin: -18px;
    }
    
    .tickets-list {
        flex: 0 0 360px;
    }
    
    .chat-header {
        padding: 12px 20px;
    }
    
    .title-left h3 {
        font-size: 1.1rem;
        max-width: 320px;
    }
    
    .chat-messages {
        padding: 20px;
        min-height: 400px;
    }
    
    .chat-input {
        padding: 20px;
        min-height: 80px;
    }
    
    .input-wrapper textarea {
        min-height: 48px;
        font-size: 0.95rem;
    }
    
    .btn-send {
        width: 48px;
        height: 48px;
    }
}


@media (min-width: 1200px) and (max-width: 1365px) {
    .tickets-container {
        height: calc(100vh - 110px);
        min-height: 520px;
        gap: 18px;
        padding: 18px;
        margin: -18px;
    }
    
    .tickets-list {
        flex: 0 0 340px;
    }
    
    .chat-header {
        padding: 10px 18px;
    }
    
    .title-left h3 {
        font-size: 1.05rem;
        max-width: 300px;
    }
    
    .chat-messages {
        padding: 18px;
        min-height: 380px;
    }
    
    .chat-input {
        padding: 18px;
        min-height: 75px;
    }
    
    .input-wrapper textarea {
        min-height: 46px;
        font-size: 0.92rem;
    }
    
    .btn-send {
        width: 46px;
        height: 46px;
    }
}


@media (min-width: 1024px) and (max-width: 1199px) {
    .tickets-container {
        height: calc(100vh - 100px);
        min-height: 500px;
        gap: 16px;
        padding: 16px;
        margin: -16px;
    }
    
    .tickets-list {
        flex: 0 0 320px;
    }
    
    .chat-header {
        padding: 10px 16px;
    }
    
    .title-left h3 {
        font-size: 1rem;
        max-width: 280px;
    }
    
    .chat-messages {
        padding: 16px;
        min-height: 350px;
    }
    
    .chat-input {
        padding: 16px;
        min-height: 70px;
    }
    
    .input-wrapper textarea {
        min-height: 44px;
        font-size: 0.9rem;
    }
    
    .btn-send {
        width: 44px;
        height: 44px;
    }
}


@media (min-width: 900px) and (max-width: 1023px) {
    .tickets-container {
        height: calc(100vh - 90px);
        min-height: 480px;
        gap: 14px;
        padding: 14px;
        margin: -14px;
    }
    
    .tickets-list {
        flex: 0 0 300px;
    }
    
    .list-header {
        padding: 14px;
    }
    
    .header-content h2 {
        font-size: 1.3rem;
    }
    
    .ticket-filters {
        gap: 8px;
    }
    
    .filter-btn {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .chat-header {
        padding: 8px 14px;
    }
    
    .title-left h3 {
        font-size: 0.98rem;
        max-width: 260px;
    }
    
    .btn-sm {
        padding: 5px 10px;
        font-size: 0.75rem;
    }
    
    .action-buttons {
        gap: 5px;
    }
    
    .chat-messages {
        padding: 14px;
        min-height: 320px;
    }
    
    .chat-input {
        padding: 14px;
        min-height: 68px;
    }
    
    .input-wrapper textarea {
        min-height: 42px;
        font-size: 0.88rem;
    }
    
    .btn-send {
        width: 42px;
        height: 42px;
    }
}


@media (min-width: 768px) and (max-width: 899px) {
    .tickets-container {
        height: calc(100vh - 80px);
        min-height: 450px;
        gap: 12px;
        padding: 12px;
        margin: -12px;
    }
    
    .tickets-list {
        flex: 0 0 280px;
    }
    
    .list-header {
        padding: 12px;
    }
    
    .header-content h2 {
        font-size: 1.2rem;
    }
    
    .ticket-filters {
        gap: 6px;
    }
    
    .filter-btn {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    .chat-header {
        padding: 8px 12px;
    }
    
    .title-left h3 {
        font-size: 0.95rem;
        max-width: 240px;
    }
    
    .btn-sm {
        padding: 4px 8px;
        font-size: 0.7rem;
    }
    
    .action-buttons {
        gap: 4px;
    }
    
    .chat-messages {
        padding: 12px;
        min-height: 300px;
    }
    
    .chat-input {
        padding: 12px;
        min-height: 65px;
    }
    
    .input-wrapper textarea {
        min-height: 40px;
        font-size: 0.85rem;
    }
    
    .btn-send {
        width: 40px;
        height: 40px;
    }
}


@media (min-width: 1024px) and (max-height: 700px) {
    .tickets-container {
        height: calc(100vh - 80px);
        min-height: 450px;
    }
    
    .chat-area {
        min-height: 350px;
    }
    
    .chat-messages {
        min-height: 200px;
        max-height: 280px;
    }
    
    .chat-input {
        min-height: 65px;
        padding: 14px;
    }
    
    .input-wrapper textarea {
        min-height: 42px;
    }
    
    .btn-send {
        width: 42px;
        height: 42px;
    }
}

@media (min-width: 1024px) and (max-height: 600px) {
    .tickets-container {
        height: calc(100vh - 60px);
        min-height: 400px;
    }
    
    .chat-area {
        min-height: 300px;
    }
    
    .chat-messages {
        min-height: 150px;
        max-height: 220px;
    }
    
    .chat-input {
        min-height: 60px;
        padding: 12px;
    }
    
    .input-wrapper textarea {
        min-height: 38px;
    }
    
    .btn-send {
        width: 38px;
        height: 38px;
    }
}


@media (min-width: 1800px) {
    .tickets-container {
        max-width: 2000px;
        margin: -30px auto;
    }
    
    .tickets-list {
        flex: 0 0 500px;
    }
    
    .chat-messages {
        padding: 50px;
    }
    
    .chat-input {
        padding: 30px;
        min-height: 100px;
    }
    
    .input-wrapper textarea {
        min-height: 60px;
        font-size: 1rem;
    }
    
    .btn-send {
        width: 60px;
        height: 60px;
    }
}


@media (min-width: 1600px) and (max-width: 1799px) {
    .tickets-container {
        max-width: 1800px;
        margin: -25px auto;
    }
    
    .tickets-list {
        flex: 0 0 450px;
    }
    
    .chat-messages {
        padding: 40px;
    }
    
    .chat-input {
        padding: 25px;
        min-height: 90px;
    }
    
    .input-wrapper textarea {
        min-height: 55px;
        font-size: 0.98rem;
    }
    
    .btn-send {
        width: 55px;
        height: 55px;
    }
}


.main-content {
    margin-left: 250px;
    min-height: 100vh;
    background: #f8f9fa;
}

.content-header {
    background: white;
    padding: 20px 30px;
    border-bottom: 1px solid #e1e8ed;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.content-title {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 24px;
}

.user-info {
    text-align: right;
}

.user-name {
    font-weight: 600;
    color: #2c3e50;
}

.user-role {
    font-size: 14px;
    color: #666;
}

.logout-btn {
    background: #e74c3c;
    color: #fff;
    padding: 10px 28px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(44,62,80,0.04);
    outline: none;
    display: inline-block;
}

.logout-btn:hover {
    background: #c0392b;
    color: #fff;
}

.content-body {
    padding: 30px;
}


@media (max-width: 575px) {
    .tickets-container {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    
    .tickets-list {
        flex: 0 0 auto;
        max-height: 200px;
    }
    
    .chat-area {
        min-height: 400px;
    }
    
    .chat-messages {
        min-height: 200px;
        max-height: 300px;
    }
    
    .chat-input {
        flex-shrink: 0;
        min-height: 80px;
    }
}


@media (max-width: 374px) {
    .tickets-container {
        gap: 8px;
    }
    
    .tickets-list {
        max-height: 150px;
    }
    
    .chat-area {
        min-height: 350px;
    }
    
    .chat-messages {
        min-height: 150px;
        max-height: 250px;
    }
}




.message {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}


@media (max-width: 768px) {
    .login-card {
        padding: 30px 20px;
    }
    
    .dashboard-header {
        padding: 20px;
    }
    
    .dashboard-content {
        padding: 20px;
    }
    
    .nav-bar {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}


.action-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.btn-primary {
    background: #2980b9;
}

.btn-primary:hover {
    background: #2366a8;
}

.users-list {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.list-header {
    background: #f8f9fa;
    padding: 20px;
    border-bottom: 1px solid #e1e8ed;
}

.list-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 18px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 15px;
    color: #ccc;
}

.table-responsive {
    overflow-x: auto;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.users-table th,
.users-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e1e8ed;
}

.users-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

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

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

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #2980b9;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.user-details strong {
    color: #2c3e50;
    font-size: 14px;
}

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

.role-client {
    background: #e8f5e8;
    color: #2d5a2d;
}

.role-administrator {
    background: #fff3cd;
    color: #856404;
}

.action-buttons-small {
    display: flex;
    gap: 8px;
}

.btn-small {
    padding: 6px 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
}

.btn-edit {
    background: #3498db;
    color: white;
}

.btn-edit:hover {
    background: #2980b9;
}

.btn-delete {
    background: #e74c3c;
    color: white;
}

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

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 20px;
    background: #f8f9fa;
    border-top: 1px solid #e1e8ed;
}

.page-link {
    padding: 8px 12px;
    border: 1px solid #e1e8ed;
    border-radius: 6px;
    text-decoration: none;
    color: #2c3e50;
    font-size: 14px;
    transition: all 0.2s;
    background: white;
}

.page-link:hover {
    background: #f8f9fa;
    border-color: #3498db;
}

.page-link.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.form-section {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.form-section h3 {
    margin-bottom: 25px;
    color: #2c3e50;
    font-size: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e1e8ed;
}

.btn-danger {
    background: #e74c3c;
}

.btn-danger:hover {
    background: #c0392b;
}


.modal {
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

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

.modal-header h3 {
    margin: 0;
    color: #2c3e50;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #2c3e50;
}

.modal-body {
    padding: 30px;
}

.modal-body p {
    margin-bottom: 15px;
    color: #2c3e50;
}

.warning {
    color: #e74c3c;
    font-weight: 600;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #e1e8ed;
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}


@media (max-width: 768px) {
    .action-buttons {
        flex-direction: column;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .users-table {
        font-size: 14px;
    }
    
    .users-table th,
    .users-table td {
        padding: 10px 8px;
    }
    
    .user-info-cell {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .action-buttons-small {
        flex-direction: column;
        gap: 4px;
    }
    
    .pagination {
        flex-wrap: wrap;
        gap: 4px;
    }
    
    .page-link {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 15px 20px;
    }
    
    .form-actions {
        flex-direction: column;
    }
}


.user-card-list {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(44,62,80,0.07);
    padding: 0 0 10px 0;
    margin-top: 18px;
    overflow-x: auto;
}
.user-table-header-row, .user-table-row {
    display: grid;
    grid-template-columns: 70px 1.5fr 2fr 1fr 1.5fr 1fr 90px;
    align-items: center;
    min-height: 56px;
    border-bottom: 1px solid #f2f4f8;
}
.user-table-header-row {
    background: #f8f9fa;
    font-weight: 700;
    color: #2c3e50;
    font-size: 16px;
    border-radius: 16px 16px 0 0;
    letter-spacing: 0.02em;
}
.user-table-row {
    font-size: 15px;
    color: #222;
    transition: background 0.18s;
}
.user-table-row:hover {
    background: #f5f7fa;
}
.user-table-cell {
    padding: 10px 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: flex;
    align-items: center;
}
.user-avatar-card {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2980b9 60%, #6dd5fa 100%);
    color: #fff;
    font-weight: 700;
    font-size: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(41,128,185,0.10);
}
.user-table-name {
    font-weight: 500;
    color: #222b45;
}
.ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 180px;
}
.user-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
}
.action-icon {
    background: none;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    font-size: 17px;
    color: #2980b9;
    display: flex;
    align-items: center;
    justify-content: center;
}
.action-icon.edit:hover {
    background: #e3f0fa;
    color: #2366a8;
    box-shadow: 0 2px 8px rgba(41,128,185,0.10);
}
.action-icon.delete {
    color: #e74c3c;
}
.action-icon.delete:hover {
    background: #fae3e3;
    color: #c0392b;
    box-shadow: 0 2px 8px rgba(231,76,60,0.10);
}
@media (max-width: 900px) {
    .user-table-header-row, .user-table-row {
        grid-template-columns: 50px 1.2fr 2fr 1fr 1.2fr 1fr 60px;
        font-size: 13px;
    }
    .ellipsis {
        max-width: 90px;
    }
}


.modern-users-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(44,62,80,0.07);
    margin-top: 18px;
}
.modern-users-table th, .modern-users-table td {
    padding: 18px 16px;
    text-align: left;
    font-size: 16px;
    vertical-align: middle;
}
.modern-users-table th {
    background: #f8f9fa;
    color: #2c3e50;
    font-weight: 700;
    border-bottom: 2px solid #e1e8ed;
    letter-spacing: 0.02em;
}
.modern-users-table tr {
    transition: background 0.18s;
}
.modern-users-table tbody tr:nth-child(even) {
    background: #f5f7fa;
}
.modern-users-table tbody tr:hover {
    background: #eaf3fa;
}
.modern-users-table .ellipsis {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.user-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}
.action-icon {
    background: none;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    font-size: 17px;
    color: #2980b9;
    display: flex;
    align-items: center;
    justify-content: center;
}
.action-icon.edit:hover {
    background: #e3f0fa;
    color: #2366a8;
    box-shadow: 0 2px 8px rgba(41,128,185,0.10);
}
.action-icon.delete {
    color: #e74c3c;
}
.action-icon.delete:hover {
    background: #fae3e3;
    color: #c0392b;
    box-shadow: 0 2px 8px rgba(231,76,60,0.10);
}
@media (max-width: 900px) {
    .modern-users-table th, .modern-users-table td {
        font-size: 13px;
        padding: 10px 6px;
    }
    .modern-users-table .ellipsis {
        max-width: 90px;
    }
}


.card-table-container {
    background: #f8f9fa;
    border-radius: 14px;
    box-shadow: 0 4px 24px rgba(44,62,80,0.07);
    padding: 0 0 24px 0;
    margin-top: 18px;
    overflow: hidden;
}
.card-table-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px 0 32px;
}
.card-table-title {
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
}
.card-table-inner {
    background: #fff;
    border-radius: 12px;
    margin: 24px 24px 0 24px;
    overflow-x: auto;
    box-shadow: 0 2px 8px rgba(44,62,80,0.04);
}
.card-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
}
.card-table th, .card-table td {
    padding: 18px 16px;
    text-align: left;
    font-size: 16px;
    vertical-align: middle;
    border: none;
}
.card-table th {
    background: #f8f9fa;
    color: #2c3e50;
    font-weight: 700;
    border-bottom: 2px solid #e1e8ed;
    letter-spacing: 0.02em;
}
.card-table tr {
    transition: background 0.18s;
}
.card-table tbody tr:nth-child(even) {
    background: #f5f7fa;
}
.card-table tbody tr:hover {
    background: #eaf3fa;
}
.card-table .ellipsis {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.user-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}
.btn-table-action {
    background: #2980b9;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 7px 18px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    box-shadow: 0 2px 8px rgba(41,128,185,0.07);
    outline: none;
    text-decoration: none;
}
.btn-table-action:hover {
    background: #2366a8;
    color: #fff;
}
.btn-table-delete {
    background: #e74c3c;
}
.btn-table-delete:hover {
    background: #c0392b;
}
@media (max-width: 900px) {
    .card-table th, .card-table td {
        font-size: 13px;
        padding: 10px 6px;
    }
    .card-table .ellipsis {
        max-width: 90px;
    }
    .card-table-header-row, .card-table-inner {
        padding-left: 8px;
        padding-right: 8px;
    }
}

/* NEW: 13-inch laptops (1280px - 1440px) - Most common 13" resolution */
@media (min-width: 1280px) and (max-width: 1440px) {
    .tickets-container {
        height: calc(100vh - 110px);
        min-height: 520px;
        gap: 18px;
        padding: 18px;
        margin: -18px;
    }
    
    .tickets-list {
        flex: 0 0 340px;
    }
    
    .chat-header {
        padding: 12px 18px;
    }
    
    .title-left h3 {
        font-size: 1.05rem;
        max-width: 300px;
    }
    
    .chat-messages {
        padding: 18px;
        min-height: 380px;
    }
    
    .chat-input {
        padding: 18px;
        min-height: 75px;
    }
    
    .input-wrapper textarea {
        min-height: 46px;
        font-size: 0.92rem;
    }
    
    .btn-send {
        width: 46px;
        height: 46px;
    }
}

/* NEW: 13-inch laptops with lower height (1280px - 1440px, max-height: 800px) */
@media (min-width: 1280px) and (max-width: 1440px) and (max-height: 800px) {
    .tickets-container {
        height: calc(100vh - 90px);
        min-height: 480px;
        gap: 16px;
        padding: 16px;
        margin: -16px;
    }
    
    .tickets-list {
        flex: 0 0 320px;
    }
    
    .chat-header {
        padding: 10px 16px;
    }
    
    .title-left h3 {
        font-size: 1rem;
        max-width: 280px;
    }
    
    .chat-messages {
        padding: 16px;
        min-height: 350px;
    }
    
    .chat-input {
        padding: 16px;
        min-height: 70px;
    }
    
    .input-wrapper textarea {
        min-height: 44px;
        font-size: 0.9rem;
    }
    
    .btn-send {
        width: 44px;
        height: 44px;
    }
}

/* NEW: 13-inch laptops with very low height (1280px - 1440px, max-height: 700px) */
@media (min-width: 1280px) and (max-width: 1440px) and (max-height: 700px) {
    .tickets-container {
        height: calc(100vh - 80px);
        min-height: 450px;
        gap: 14px;
        padding: 14px;
        margin: -14px;
    }
    
    .tickets-list {
        flex: 0 0 300px;
    }
    
    .chat-header {
        padding: 8px 14px;
    }
    
    .title-left h3 {
        font-size: 0.95rem;
        max-width: 260px;
    }
    
    .chat-messages {
        padding: 14px;
        min-height: 320px;
    }
    
    .chat-input {
        padding: 14px;
        min-height: 68px;
    }
    
    .input-wrapper textarea {
        min-height: 42px;
        font-size: 0.88rem;
    }
    
    .btn-send {
        width: 42px;
        height: 42px;
    }
}

/* NEW: 13-inch laptops with ultra-low height (1280px - 1440px, max-height: 600px) */
@media (min-width: 1280px) and (max-width: 1440px) and (max-height: 600px) {
    .tickets-container {
        height: calc(100vh - 70px);
        min-height: 400px;
        gap: 12px;
        padding: 12px;
        margin: -12px;
    }
    
    .tickets-list {
        flex: 0 0 280px;
    }
    
    .chat-header {
        padding: 8px 12px;
    }
    
    .title-left h3 {
        font-size: 0.9rem;
        max-width: 240px;
    }
    
    .chat-messages {
        padding: 12px;
        min-height: 280px;
    }
    
    .chat-input {
        padding: 12px;
        min-height: 65px;
    }
    
    .input-wrapper textarea {
        min-height: 40px;
        font-size: 0.85rem;
    }
    
    .btn-send {
        width: 40px;
        height: 40px;
    }
}

/* NEW: 13-inch laptops with different aspect ratios (1366px - 1440px) */
@media (min-width: 1366px) and (max-width: 1440px) {
    .tickets-container {
        height: calc(100vh - 115px);
        min-height: 530px;
        gap: 19px;
        padding: 19px;
        margin: -19px;
    }
    
    .tickets-list {
        flex: 0 0 345px;
    }
    
    .chat-header {
        padding: 11px 19px;
    }
    
    .title-left h3 {
        font-size: 1.03rem;
        max-width: 290px;
    }
    
    .chat-messages {
        padding: 19px;
        min-height: 370px;
    }
    
    .chat-input {
        padding: 19px;
        min-height: 73px;
    }
    
    .input-wrapper textarea {
        min-height: 45px;
        font-size: 0.91rem;
    }
    
    .btn-send {
        width: 45px;
        height: 45px;
    }
}

/* NEW: 13-inch laptops with 1366x768 resolution */
@media (min-width: 1366px) and (max-width: 1366px) and (max-height: 768px) {
    .tickets-container {
        height: calc(100vh - 85px);
        min-height: 470px;
        gap: 15px;
        padding: 15px;
        margin: -15px;
    }
    
    .tickets-list {
        flex: 0 0 310px;
    }
    
    .chat-header {
        padding: 9px 15px;
    }
    
    .title-left h3 {
        font-size: 0.98rem;
        max-width: 270px;
    }
    
    .chat-messages {
        padding: 15px;
        min-height: 330px;
    }
    
    .chat-input {
        padding: 15px;
        min-height: 69px;
    }
    
    .input-wrapper textarea {
        min-height: 43px;
        font-size: 0.89rem;
    }
    
    .btn-send {
        width: 43px;
        height: 43px;
    }
}

/* ===== ADVANCED RESPONSIVE DESIGN FOR ALL SCREEN SIZES (4-40 INCH) ===== */

/* Ultra-wide screens (40+ inch displays) */
@media (min-width: 4000px) {
    .tickets-container {
        max-width: 3000px;
        margin: -50px auto;
        gap: 40px;
        padding: 40px;
    }
    
    .tickets-list {
        flex: 0 0 800px;
    }
    
    .chat-messages {
        padding: 80px;
        font-size: 1.2rem;
    }
    
    .chat-input {
        padding: 50px;
        min-height: 120px;
    }
    
    .input-wrapper textarea {
        min-height: 80px;
        font-size: 1.3rem;
    }
    
    .btn-send {
        width: 80px;
        height: 80px;
        font-size: 1.5rem;
    }
}

/* Large 4K displays (30-40 inch) */
@media (min-width: 3000px) and (max-width: 3999px) {
    .tickets-container {
        max-width: 2500px;
        margin: -40px auto;
        gap: 35px;
        padding: 35px;
    }
    
    .tickets-list {
        flex: 0 0 700px;
    }
    
    .chat-messages {
        padding: 60px;
        font-size: 1.1rem;
    }
    
    .chat-input {
        padding: 40px;
        min-height: 100px;
    }
    
    .input-wrapper textarea {
        min-height: 70px;
        font-size: 1.2rem;
    }
    
    .btn-send {
        width: 70px;
        height: 70px;
        font-size: 1.3rem;
    }
}

/* Standard 4K displays (24-30 inch) */
@media (min-width: 2000px) and (max-width: 2999px) {
    .tickets-container {
        max-width: 2000px;
        margin: -35px auto;
        gap: 30px;
        padding: 30px;
    }
    
    .tickets-list {
        flex: 0 0 600px;
    }
    
    .chat-messages {
        padding: 50px;
        font-size: 1.05rem;
    }
    
    .chat-input {
        padding: 35px;
        min-height: 90px;
    }
    
    .input-wrapper textarea {
        min-height: 65px;
        font-size: 1.1rem;
    }
    
    .btn-send {
        width: 65px;
        height: 65px;
        font-size: 1.2rem;
    }
}

/* Large desktop displays (20-24 inch) */
@media (min-width: 1600px) and (max-width: 1999px) {
    .tickets-container {
        max-width: 1800px;
        margin: -30px auto;
        gap: 25px;
        padding: 25px;
    }
    
    .tickets-list {
        flex: 0 0 500px;
    }
    
    .chat-messages {
        padding: 40px;
        font-size: 1rem;
    }
    
    .chat-input {
        padding: 30px;
        min-height: 85px;
    }
    
    .input-wrapper textarea {
        min-height: 60px;
        font-size: 1rem;
    }
    
    .btn-send {
        width: 60px;
        height: 60px;
        font-size: 1.1rem;
    }
}

/* Standard desktop displays (17-20 inch) */
@media (min-width: 1200px) and (max-width: 1599px) {
    .tickets-container {
        height: calc(100vh - 120px);
        min-height: 600px;
        gap: 20px;
        padding: 20px;
        margin: -20px;
    }
    
    .tickets-list {
        flex: 0 0 400px;
    }
    
    .chat-messages {
        padding: 25px;
        min-height: 450px;
    }
    
    .chat-input {
        padding: 25px;
        min-height: 85px;
    }
    
    .input-wrapper textarea {
        min-height: 55px;
        font-size: 0.95rem;
    }
    
    .btn-send {
        width: 55px;
        height: 55px;
        font-size: 1rem;
    }
}

/* Small desktop displays (15-17 inch) */
@media (min-width: 1024px) and (max-width: 1199px) {
    .tickets-container {
        height: calc(100vh - 110px);
        min-height: 550px;
        gap: 18px;
        padding: 18px;
        margin: -18px;
    }
    
    .tickets-list {
        flex: 0 0 350px;
    }
    
    .chat-messages {
        padding: 20px;
        min-height: 400px;
    }
    
    .chat-input {
        padding: 20px;
        min-height: 80px;
    }
    
    .input-wrapper textarea {
        min-height: 50px;
        font-size: 0.9rem;
    }
    
    .btn-send {
        width: 50px;
        height: 50px;
        font-size: 0.95rem;
    }
}

/* Large tablets (12-15 inch) */
@media (min-width: 768px) and (max-width: 1023px) {
    .tickets-container {
        height: calc(100vh - 100px);
        min-height: 500px;
        gap: 15px;
        padding: 15px;
        margin: -15px;
    }
    
    .tickets-list {
        flex: 0 0 300px;
    }
    
    .chat-messages {
        padding: 18px;
        min-height: 350px;
    }
    
    .chat-input {
        padding: 18px;
        min-height: 75px;
    }
    
    .input-wrapper textarea {
        min-height: 45px;
        font-size: 0.85rem;
    }
    
    .btn-send {
        width: 45px;
        height: 45px;
        font-size: 0.9rem;
    }
}

/* Medium tablets (10-12 inch) */
@media (min-width: 600px) and (max-width: 767px) {
    .tickets-container {
        flex-direction: column;
        height: auto;
        gap: 12px;
        padding: 12px;
        margin: -12px;
    }
    
    .tickets-list {
        flex: none;
        max-height: 300px;
        order: 1;
    }
    
    .chat-area {
        min-height: 500px;
        order: 2;
    }
    
    .chat-messages {
        padding: 15px;
        min-height: 350px;
    }
    
    .chat-input {
        padding: 15px;
        min-height: 70px;
    }
    
    .input-wrapper textarea {
        min-height: 42px;
        font-size: 0.85rem;
    }
    
    .btn-send {
        width: 42px;
        height: 42px;
        font-size: 0.85rem;
    }
}

/* Small tablets (8-10 inch) */
@media (min-width: 480px) and (max-width: 599px) {
    .tickets-container {
        flex-direction: column;
        height: auto;
        gap: 10px;
        padding: 10px;
        margin: -10px;
    }
    
    .tickets-list {
        flex: none;
        max-height: 250px;
        order: 1;
    }
    
    .chat-area {
        min-height: 450px;
        order: 2;
    }
    
    .chat-messages {
        padding: 12px;
        min-height: 300px;
    }
    
    .chat-input {
        padding: 12px;
        min-height: 65px;
    }
    
    .input-wrapper textarea {
        min-height: 40px;
        font-size: 0.8rem;
    }
    
    .btn-send {
        width: 40px;
        height: 40px;
        font-size: 0.8rem;
    }
}

/* Large phones (6-8 inch) */
@media (min-width: 400px) and (max-width: 479px) {
    .tickets-container {
        flex-direction: column;
        height: auto;
        gap: 8px;
        padding: 8px;
        margin: -8px;
    }
    
    .tickets-list {
        flex: none;
        max-height: 200px;
        order: 1;
    }
    
    .chat-area {
        min-height: 400px;
        order: 2;
    }
    
    .chat-messages {
        padding: 10px;
        min-height: 250px;
    }
    
    .chat-input {
        padding: 10px;
        min-height: 60px;
    }
    
    .input-wrapper textarea {
        min-height: 38px;
        font-size: 0.75rem;
    }
    
    .btn-send {
        width: 38px;
        height: 38px;
        font-size: 0.75rem;
    }
}

/* Medium phones (5-6 inch) */
@media (min-width: 320px) and (max-width: 399px) {
    .tickets-container {
        flex-direction: column;
        height: auto;
        gap: 6px;
        padding: 6px;
        margin: -6px;
    }
    
    .tickets-list {
        flex: none;
        max-height: 180px;
        order: 1;
    }
    
    .chat-area {
        min-height: 350px;
        order: 2;
    }
    
    .chat-messages {
        padding: 8px;
        min-height: 200px;
    }
    
    .chat-input {
        padding: 8px;
        min-height: 55px;
    }
    
    .input-wrapper textarea {
        min-height: 35px;
        font-size: 0.7rem;
    }
    
    .btn-send {
        width: 35px;
        height: 35px;
        font-size: 0.7rem;
    }
}

/* Small phones (4-5 inch) */
@media (max-width: 319px) {
    .tickets-container {
        flex-direction: column;
        height: auto;
        gap: 4px;
        padding: 4px;
        margin: -4px;
    }
    
    .tickets-list {
        flex: none;
        max-height: 150px;
        order: 1;
    }
    
    .chat-area {
        min-height: 300px;
        order: 2;
    }
    
    .chat-messages {
        padding: 6px;
        min-height: 180px;
    }
    
    .chat-input {
        padding: 6px;
        min-height: 50px;
    }
    
    .input-wrapper textarea {
        min-height: 32px;
        font-size: 0.65rem;
    }
    
    .btn-send {
        width: 32px;
        height: 32px;
        font-size: 0.65rem;
    }
}

/* Height-based responsive adjustments for all screen sizes */
@media (max-height: 600px) {
    .tickets-container {
        height: calc(100vh - 60px);
        min-height: 400px;
    }
    
    .chat-area {
        min-height: 300px;
    }
    
    .chat-messages {
        min-height: 150px;
        max-height: 250px;
    }
    
    .chat-input {
        min-height: 60px;
        padding: 12px;
    }
    
    .input-wrapper textarea {
        min-height: 40px;
    }
    
    .btn-send {
        width: 40px;
        height: 40px;
    }
}

@media (max-height: 500px) {
    .tickets-container {
        height: calc(100vh - 40px);
        min-height: 350px;
    }
    
    .chat-area {
        min-height: 250px;
    }
    
    .chat-messages {
        min-height: 120px;
        max-height: 200px;
    }
    
    .chat-input {
        min-height: 50px;
        padding: 10px;
    }
    
    .input-wrapper textarea {
        min-height: 35px;
        font-size: 0.8rem;
    }
    
    .btn-send {
        width: 35px;
        height: 35px;
    }
}

@media (max-height: 400px) {
    .tickets-container {
        height: calc(100vh - 30px);
        min-height: 300px;
    }
    
    .chat-area {
        min-height: 200px;
    }
    
    .chat-messages {
        min-height: 100px;
        max-height: 150px;
    }
    
    .chat-input {
        min-height: 45px;
        padding: 8px;
    }
    
    .input-wrapper textarea {
        min-height: 30px;
        font-size: 0.75rem;
    }
    
    .btn-send {
        width: 30px;
        height: 30px;
    }
}

/* Landscape orientation adjustments for mobile devices */
@media (max-width: 767px) and (orientation: landscape) {
    .tickets-container {
        flex-direction: row;
        height: calc(100vh - 60px);
        min-height: 350px;
    }
    
    .tickets-list {
        flex: 0 0 250px;
        max-height: none;
        order: 1;
    }
    
    .chat-area {
        min-height: 300px;
        order: 2;
    }
    
    .chat-messages {
        min-height: 200px;
        max-height: 250px;
    }
    
    .chat-input {
        min-height: 50px;
    }
    
    .input-wrapper textarea {
        min-height: 35px;
    }
    
    .btn-send {
        width: 35px;
        height: 35px;
    }
}

/* Portrait orientation adjustments for tablets */
@media (min-width: 768px) and (max-width: 1023px) and (orientation: portrait) {
    .tickets-container {
        flex-direction: column;
        height: auto;
        gap: 15px;
    }
    
    .tickets-list {
        flex: none;
        max-height: 300px;
        order: 1;
    }
    
    .chat-area {
        min-height: 500px;
        order: 2;
    }
    
    .chat-messages {
        min-height: 350px;
    }
    
    .chat-input {
        min-height: 75px;
    }
}

/* High DPI displays (Retina, 4K, etc.) */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .tickets-container {
        border-radius: 8px;
    }
    
    .ticket-item {
        border-radius: 6px;
    }
    
    .btn-send {
        border-radius: 8px;
    }
    
    .chat-messages {
        border-radius: 8px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .tickets-container {
        background: #1a1a1a;
        color: #ffffff;
    }
    
    .tickets-list {
        background: #2d2d2d;
        border-right: 1px solid #404040;
    }
    
    .chat-area {
        background: #2d2d2d;
    }
    
    .chat-messages {
        background: #1a1a1a;
    }
    
    .chat-input {
        background: #2d2d2d;
        border-top: 1px solid #404040;
    }
    
    .input-wrapper textarea {
        background: #1a1a1a;
        color: #ffffff;
        border: 1px solid #404040;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .tickets-container,
    .ticket-item,
    .chat-messages,
    .btn-send {
        transition: none;
    }
}

/* Print styles */
@media print {
    .tickets-container {
        display: block;
        height: auto;
        background: white;
        color: black;
    }
    
    .tickets-list {
        display: none;
    }
    
    .chat-area {
        width: 100%;
        height: auto;
    }
    
    .chat-input {
        display: none;
    }
}