* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Segoe UI", Arial, sans-serif;
}

body {
    background: #f4f6f9;
    color: #333;
}

/* ===== Layout ===== */
.app {
    display: flex;
    height: 100vh;
}
/* ================================
   SIDEBAR – LIGHT THEME
================================ */

.sidebar {
    width: 240px;
    background: #f8fafc; /* Light neutral */
    color: #334155;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e5e7eb;
}

/* Logo */
.sidebar .logo {
    padding: 20px 22px;
    font-size: 19px;
    font-weight: 700;
    color: #1e3a8a; /* Brand blue */
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

/* Menu container */
.sidebar ul {
    list-style: none;
    margin: 0;
    padding: 8px 0;
}

/* Menu item */
.sidebar ul li {
    margin: 0;
}

/* Menu link */
.sidebar ul li a {
    display: flex;
    align-items: center;
    width: 100%;

    padding: 14px 22px;

    font-size: 14px;
    font-weight: 500;
    line-height: 20px;

    color: #334155; /* Slate */
    text-decoration: none;

    transition: background 0.15s ease, color 0.15s ease;
}

/* Hover – FULL WIDTH */
.sidebar ul li a:hover {
    background: #e0e7ff; /* Light blue tint */
    color: #1e3a8a;
}

/* Active menu item */
.sidebar ul li.active a {
    background: #eef2ff;
    color: #1e40af;
    font-weight: 600;
    position: relative;
}

/* Active indicator bar */
.sidebar ul li.active a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: #2563eb;
}

.digilogo {
     width: 150px;
    float: left;
}

/* ===== Main ===== */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
}
/* ================================
   FULL WIDTH FORM FIELD
================================ */

/* This MUST be applied to the grid child */
.form-grid .full-width {
    grid-column: 1 / span 2;
}

/* Better textarea UX */
.form-group textarea {
    width: 100%;
    min-height: 140px;
    resize: vertical;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    font-size: 14px;
}

/* Better textarea UX */
.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

/* ===== Header ===== */
.header {
    height: 99px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.header .title {
    font-size: 16px;
    font-weight: 600;
    color: #1e3a8a;
}

.header .user {
    font-size: 14px;
    color: #475569;
}

/* ===== Content ===== */
.content {
    padding: 20px;
    overflow-y: auto;
}

/* ===== Cards ===== */
.card {
    background: #fff;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
/* ================================
   MODERN LOGIN PAGE
================================ */

.login-wrapper {
    min-height: 100vh;
    background:#053456;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-box {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    padding: 40px 36px;
    border-radius: 12px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 6px;
}

.login-header p {
    font-size: 14px;
    color: #6b7280;
}

.login-form label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    display: block;
    margin-bottom: 6px;
}

.login-form input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 14px;
    margin-bottom: 18px;
}

.login-form input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.2);
}

.login-button {
    width: 100%;
    padding: 12px;
    background: #52B884;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.login-button:hover {
    background: #1d4ed8;
}

.login-error {
    background: #fee2e2;
    color: #991b1b;
    padding: 10px;
    border-radius: 8px;
    font-size: 13px;
    text-align: center;
    margin-bottom: 16px;
}

/* ================================
   TABLE (CRM STANDARD)
================================ */

.table-wrapper {
    background: #ffffff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.table-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.crm-table {
    width: 100%;
    border-collapse: collapse;
}

.crm-table thead {
    background: #f3f4f6;
}

.crm-table th {
    text-align: left;
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
}

.crm-table td {
    padding: 12px 14px;
    font-size: 14px;
    color: #1f2937;
    border-bottom: 1px solid #e5e7eb;
}

.crm-table tbody tr:hover {
    background: #f9fafb;
}

.crm-table .status {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.status-active {
    background: #dcfce7;
    color: #166534;
}

.status-onhold {
    background: #fef3c7;
    color: #92400e;
}

.status-closed {
    background: #fee2e2;
    color: #991b1b;
}

.no-records {
    text-align: center;
    padding: 30px;
    font-size: 14px;
    color: #6b7280;
}
/* ===== Primary Button ===== */
.btn {
    display: inline-block;
    background: #52B884;
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    background: #1d4ed8;
    box-shadow: 0 4px 10px rgba(37,99,235,0.25);
}

/* Optional: Secondary button */
.btn-secondary {
    background: #6b7280;
}

.btn-secondary:hover {
    background: #4b5563;
}
/* ================================
   FORM LAYOUT (CRM GRADE)
================================ */

.form-wrapper {
    background: #ffffff;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    max-width: 900px;
}

.form-section {
    margin-bottom: 28px;
}

.form-section h4 {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 6px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37,99,235,0.15);
}

.form-actions {
    margin-top: 24px;
    text-align: right;
}

/* ================================
   ADDRESS BLOCK
================================ */

.address-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px 20px;
}

@media (max-width: 900px) {
    .address-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .address-grid {
        grid-template-columns: 1fr;
    }
}
/* ================================
   CRM VIEW PAGE (BLOCK LAYOUT)
================================ */

.view-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.view-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 18px 20px;
}

.view-card h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 14px;
    color: #1e3a8a;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 6px;
}

.view-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 14px;
}

.view-row label {
    color: #64748b;
    font-weight: 500;
}

.view-row span {
    color: #111827;
}

.view-card.full {
    grid-column: 1 / -1;
}

@media (max-width: 900px) {
    .view-grid {
        grid-template-columns: 1fr;
    }
}
/* ================================
   CONTACT + FOLLOWUPS (VIEW PAGE)
================================ */

.contact-card {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 12px;
}

.contact-card strong {
    font-size: 14px;
    color: #1e3a8a;
}

.followup-item {
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
}

.followup-item:last-child {
    border-bottom: none;
}

.followup-meta {
    font-size: 13px;
    color: #475569;
    margin-bottom: 4px;
}

.followup-notes {
    font-size: 14px;
    color: #111827;
}
/* ================================
   TABLE ACTION BUTTON FIX
================================ */

.action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;          /* Allows clean wrap on small screens */
    align-items: center;
}

.action-buttons .btn {
    padding: 6px 12px;
    font-size: 13px;
    line-height: 18px;
    white-space: nowrap;      /* Prevent text breaking */
}

/* Secondary button style consistency */
.btn.btn-secondary {
    background: #e5e7eb;
    color: #111827;
}
.btn-followup {
    background: #2563eb;
    color: #ffffff;
}
/* ================================
   LEADS FILTER BAR
================================ */

.filter-bar {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    background: #f8fafc;
    padding: 14px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    border: 1px solid #e5e7eb;
}

.filter-group {
    display: flex;
    flex-direction: column;
    min-width: 160px;
}

.filter-group label {
    font-size: 12px;
    color: #475569;
    margin-bottom: 4px;
}

.filter-actions {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}
/* ================================
   PAGINATION
================================ */

.pagination {
    display: flex;
    gap: 6px;
    margin-top: 18px;
    justify-content: center;
}

.pagination a {
    padding: 6px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
    color: #1e3a8a;
}

.pagination a.active {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

.pagination a:hover {
    background: #f1f5f9;
}
/* ================================
   COLLAPSIBLE FILTER BLOCK
================================ */

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.filter-header h4 {
    margin: 0;
}

.filter-header span {
    font-size: 16px;
    color: #1e3a8a;
}

.filter-body {
    display: none;
    margin-top: 12px;
}

.filter-body.open {
    display: block;
}
/* ================================
   FULL-WIDTH SEARCH / FILTER PANEL
================================ */

.filter-panel {
    width: 100%;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px 18px;
    margin-bottom: 18px;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    margin-bottom: 12px;
}

.filter-header h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #1e3a8a;
}

.filter-header span {
    font-size: 16px;
    color: #1e3a8a;
}

.filter-body {
    display: none;
}

.filter-body.open {
    display: block;
}

/* Grid for filters (NOT form-grid) */
.filter-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
}

/* Search should span full width */
.filter-grid .full-width {
    grid-column: 1 / -1;
}

/* Responsive */
@media (max-width: 1200px) {
    .filter-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .filter-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Butt*
