/* =======================
   GLOBAL
======================= */

body {
    background: #f4f6f9;
    font-family: 'Inter', sans-serif;
}


/* =======================
   BANNER
======================= */

.dashboard-banner {
    border-radius: 16px;
}


/* =======================
   KPI BOX
======================= */

.kpi-box {
    position: relative;
    padding: 18px 8px;
    border-radius: 14px;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
}

.kpi-box span {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ffffff;
    color: #000;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 50px;
}


/* =======================
   ACTION CARDS
======================= */

.action-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 22px 14px;
    text-align: center;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
    transition: all 0.25s ease;
    display: block;
    height: 100%;
    text-decoration: none;
}

.action-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.15);
}


/* ICON */

.action-card img {
    width: 100px;
    margin-bottom: 10px;
    transition: transform 0.25s ease;
}

.action-card:hover img {
    transform: scale(1.15);
}


/* TEXT */

.action-card span {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #333;
}


/* =======================
   QUOTATION CARD
======================= */

.quote-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
}

.quote-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quote-header h6 {
    font-weight: 700;
    margin-bottom: 4px;
}

.quote-amount {
    font-weight: 700;
    color: #198754;
}

.quote-card small {
    color: #666;
}

.quote-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}


/* =======================
   COLOR HELPERS
======================= */

.bg-primary {
    background: #0d6efd;
}

.bg-warning {
    background: #ffc107;
    color: #000;
}

.bg-success {
    background: #198754;
}


/* =======================
   MOBILE OPTIMIZATION
======================= */

@media (max-width: 576px) {
    .action-card img {
        width: 76px;
    }
    .kpi-box {
        font-size: 13px;
    }
}

.lead-card {
    border-radius: 14px;
}

.lead-card h6 {
    font-size: 15px;
}

.lead-meta {
    font-size: 13px;
    color: #6c757d;
}

.status-badge {
    font-size: 11px;
    padding: 5px 10px;
    border-radius: 20px;
}

.card-quote {
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-quote:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.card-title {
    font-weight: 600;
    font-size: 1.25rem;
}

.service-row {
    margin-bottom: 5px;
}

.badge-service {
    background-color: #0d6efd;
    color: white;
    margin-right: 5px;
}

.badge-product {
    background-color: #198754;
    color: white;
    margin-right: 5px;
}

.badge-item {
    background-color: #fd7e14;
    color: white;
    margin-right: 5px;
    margin-bottom: 3px;
    display: inline-block;
}

.view-btn {
    margin-top: auto;
}

.card-quote {
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    padding: 20px;
}

.card-title {
    font-weight: 600;
    font-size: 1.5rem;
}

.badge-service {
    background-color: #0d6efd;
    color: white;
    margin-right: 5px;
}

.badge-product {
    background-color: #198754;
    color: white;
    margin-right: 5px;
}

.badge-item {
    background-color: #fd7e14;
    color: white;
    margin-right: 5px;
    margin-bottom: 3px;
    display: inline-block;
}

table th,
table td {
    vertical-align: middle !important;
}

.table thead {
    background-color: #e9ecef;
}

.chat-container-custom {
    display: flex;
    flex-direction: column;
    height: 100vh;
    /* Full viewport height */
    max-width: 800px;
    margin: 0 auto;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}


/* Chat Header */

.chat-header {
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
    background: #f5f6f7;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h5 {
    margin: 0;
    font-weight: 500;
}

.chat-header small {
    color: #555;
}


/* Chat messages */

.chat-messages {
    flex: 1;
    padding: 15px 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f0f2f5;
}


/* Chat bubbles */

.message {
    display: flex;
}

.message.customer {
    justify-content: flex-start;
}

.message.tech {
    justify-content: flex-end;
}

.bubble {
    max-width: 70%;
    padding: 10px 15px;
    border-radius: 18px;
    word-wrap: break-word;
    position: relative;
}

.message.customer .bubble {
    background: #fff;
    border-top-left-radius: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.message.tech .bubble {
    background: #0084ff;
    color: #fff;
    border-top-right-radius: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.bubble small {
    display: block;
    font-size: 11px;
    margin-top: 5px;
    color: #555;
}

.message.tech .bubble small {
    color: #e0e0e0;
}


/* Images inside chat */

.bubble img {
    display: block;
    max-width: 100%;
    border-radius: 8px;
    margin-top: 5px;
}


/* Scrollbar customization */

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}


/* Chat input at bottom */

.chat-input {
    display: flex;
    gap: 10px;
    padding: 10px 15px;
    border-top: 1px solid #ddd;
    background: #f5f6f7;
}

.chat-input input[type="text"] {
    flex: 1;
    padding: 10px 15px;
    border-radius: 25px;
    border: 1px solid #ccc;
    outline: none;
}

.chat-input button {
    padding: 10px 15px;
    border: none;
    border-radius: 25px;
    background: #0084ff;
    color: #fff;
    cursor: pointer;
}

.chat-input .file-upload {
    position: relative;
    cursor: pointer;
    padding: 10px 15px;
    border-radius: 50%;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-input .file-upload input[type="file"] {
    display: none;
}


/* Responsive */

@media (max-width: 768px) {
    .chat-container {
        max-width: 100%;
        border-radius: 0;
    }
}