body {
    margin: 0;
    padding: 0;
    background: #f4f6f9;
    font-family: Arial, sans-serif;
}

.container {
    width: 98%;
    margin: 15px auto;
}

header {
    background: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

h1 {
    margin: 0;
    color: #1f2937;
}

.menu {
    margin-top: 15px;
}

.menu button {
    background: #2563eb;
    color: white;
    border: none;
    padding: 10px 15px;
    margin-right: 5px;
    border-radius: 6px;
    cursor: pointer;
}

.menu button:hover {
    background: #1d4ed8;
}

.search-bar {
    margin-bottom: 15px;
}

.search-bar input {
    width: 400px;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
}

.filters {
    margin-bottom: 15px;
}

.filters button {
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    background: white;
    margin-right: 5px;
    cursor: pointer;
}

.crm-layout {
    display: flex;
    gap: 15px;
}

.lead-panel {
    width: 45%;
    background: white;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow-y: auto;
    max-height: 80vh;
}

.detail-panel {
    width: 55%;
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow-y: auto;
    max-height: 80vh;
}

#recordCount {
    margin-top: 0;
    color: #374151;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: #2563eb;
    color: white;
    padding: 10px;
    text-align: left;
}

td {
    padding: 10px;
    border-bottom: 1px solid #e5e7eb;
}

tr:hover {
    background: #f9fafb;
}

a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

a:hover {
    text-decoration: underline;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 20px;
}

.detail-grid div {
    background: #f9fafb;
    padding: 10px;
    border-radius: 6px;
}

.detail-grid label {
    display: block;
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 5px;
}

.action-buttons {
    margin-top: 20px;
}

.action-buttons button {
    padding: 10px 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    margin-right: 8px;
    background: #2563eb;
    color: white;
}

.notes-box,
.interaction-box {
    margin-top: 20px;
    background: #f9fafb;
    padding: 15px;
    border-radius: 8px;
}

.notes-box {

    max-height: 220px;

    overflow-y: auto;

}

.interaction-box {

    max-height: 300px;

    overflow-y: auto;

}

#backBtn {
    background: #2563eb;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    cursor: pointer;
}

@media screen and (max-width: 900px) {

    .crm-layout {
        display: block;
    }

    .lead-panel {
        width: 100%;
        max-height: none;
        margin-bottom: 15px;
    }

    .detail-panel {
        width: 100%;
        max-height: none;
    }

.detail-grid input {
    width: 100%;
    padding: 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    box-sizing: border-box;
}

.interaction-box select,
.interaction-box input,
.interaction-box textarea {

    width: 100%;
    padding: 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    box-sizing: border-box;

}

.interaction-box textarea {
    width: 100%;
    min-height: 140px;
    resize: vertical;
}

.followup-row {

    display: flex;
    gap: 15px;

}

.followup-row div {

    flex: 1;

}

.followup-row {
    display:flex;
    gap:15px;
}

.attempted-grid {

    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 10px;

    margin-top: 10px;

    margin-bottom: 15px;

}

.attempted-grid label {

    display: flex;

    align-items: center;

    gap: 6px;

}

.invalid-btn {

    background: #dc3545;

    color: white;

    border: none;

    padding: 6px 12px;

    border-radius: 4px;

    cursor: pointer;

}

.restore-btn {

    background: #28a745;

    color: white;

    border: none;

    padding: 6px 12px;

    border-radius: 4px;

    cursor: pointer;

}

.invalid-number {

    color: red;

    font-weight: bold;

}

#interactionHistory {

    max-height: 250px;

    overflow-y: auto;

    padding-right: 10px;

}

.contact-grid {

    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 12px;

    margin-top: 10px;

    margin-bottom: 15px;

}


.tab-btn {

    padding: 10px 20px;

    border: 1px solid #d1d5db;

    background: white;

    cursor: pointer;

    border-radius: 6px;

}

.active-tab {

    background: #2563eb;

    color: white;

    border-color: #2563eb;

}

.active-tab {

    background: #2563eb !important;

    color: white !important;

    border: 1px solid #2563eb !important;

}

#leadTabBtn {

    background: #2563eb !important;

    color: white !important;

}

}