/* ===== RESET ===== */
body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background: #f4f6fb;
}

/* ===== LAYOUT ===== */
.crm-layout {
    display: flex;
}

/* SIDEBAR FIXED */
.crm-sidebar {
    width: 12%;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(180deg, #1e2a78, #6a1b9a);
    color: white;
    display: flex;
    flex-direction: column;
     padding: 6px 8px;
    box-sizing: border-box;
}

/* PROFILE */
.profile {
    text-align: center;
    margin-bottom: 6px; 
}
.profile img {
    width: 48px;          /* balanced size */
    border-radius: 50%;
    margin-bottom: 4px;
}
.profile h4 {
    margin: 2px 0;
    font-size: 12px;      /* readable + compact */
    line-height: 1.2;
}

/* MENU */
.menu {
    list-style: none;
    padding: 0;
    margin-top: 10px;
}
.menu li {
    padding: 0;
    margin: 2px 0;
    cursor: pointer;
}
.menu li.active {
    background: rgba(255,255,255,0.2);
    border-radius: 6px;
}

/* SETTINGS */
.settings {
    margin-top: auto;
}

/* RIGHT CONTENT */
.crm-content {
    margin-left: 12%;
    width: 88%;

    display: flex;
    flex-direction: column;

    height: 100vh;
    min-height: 100vh;

    overflow: hidden;

    position: relative;
}

/* TOP BAR */
.top-row {
    background: white;
    padding: 10px 20px;
    border-bottom: 1px solid #ddd;
}

/* SCROLL AREA */
.page-body {
    flex: 1;

    overflow-y: auto;
    overflow-x: hidden;

    height: 100%;

    padding: 2px;
}

/* ===== DASHBOARD ===== */

/* TOPBAR */
.topbar {
    position: sticky;
    top: 0;

    z-index: 99999;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 10px 20px;

    background: #22297a;

    border-bottom: 1px solid #eee;
}

.support-text {
    font-size: 16px;
    color: #ffffff;
}

.actions {
    display: flex;
    align-items: center;
    gap: 14px;
}


/* Buttons */
.btn {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 14px;
    border: none;
    cursor: pointer;
}

.btn.primary {
    background: #4f46e5;
    color: white;
    padding: 6px 14px;
    border-radius: 6px;
    border: none;
}

.btn.primary:hover {
    background: #4338ca;
}

.btn.ghost {
    background: transparent;
    border: 1px solid #ddd;
    padding: 6px 12px;
    border-radius: 6px;
}

/* Icons */
.icon {
    font-size: 18px;
    cursor: pointer;
}

.icon:hover {
    transform: scale(1.1);
}

.topbar input {
    padding: 10px;
    width: 260px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

/* BUTTON */
.btn-primary {
    background: #3f51b5;
    color: white;
    border: none;
    padding: 10px 14px;
    border-radius: 6px;
}

/* CARDS */
.cards-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    transition: .3s;
}
.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

/* DONUT */
.donut {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: conic-gradient(
        #00c853 0% 40%,
        #ff9800 40% 70%,
        #2196f3 70% 85%,
        #f44336 85% 100%
    );
    position: relative;
}
.inner {
    position: absolute;
    top: 25px;
    left: 25px;
    width: 70px;
    height: 70px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* METRICS */
.metrics-header {
    display: flex;
    justify-content: space-between;
    background: #5c6bc0;
    color: white;
    padding: 10px;
    margin-top: 20px;
}

/* CIRCLE */
.circle-row {
    display: flex;
    gap: 20px;
    margin: 20px 0;
}

.circle {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
}

.green { background: #4caf50; }
.orange { background: #ff7f32; }

/* ROW */
.row {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.half {
    flex: 1;
}

/* TITLE BAR */
.title {
    padding: 10px;
    color: white;
}

.blue { background: #3f51b5; }
.purple { background: #8e24aa; }
.orange { background: #ff7f32; }
.green { background: #2e7d32; }

/* GRID */
.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}
.grid div {
    background: white;
    padding: 15px;
    margin: 5px;
    text-align: center;
    border-radius: 6px;
}

/* COLORED */
.purple div { background: #5e35b1; color: white; }
.bluebox div { background: #3f51b5; color: white; }
.greenbox div { background: #8bc34a; color: white; }

.bordered div {
    border: 2px solid #4caf50;
}

/* BUTTON ROW */
.btn-row {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.b1 { background: #3f51b5; color: white; }
.b2 { background: #5c6bc0; color: white; }
.b3 { background: #e53935; color: white; }
.b4 { background: #d32f2f; color: white; }

button {
    padding: 10px;
    border: none;
    border-radius: 6px;
}

.settings-btn {
    margin-top: auto;
    background: transparent;
    border: none;
    color: white;
    font-size: 16px;
    text-align: left;
    padding: 10px;
    width: 100%;
    cursor: pointer;
}

.menu-link {
    color: white;
    text-decoration: none;
    display: block;          /* IMPORTANT */
    padding: 6px 10px;       /* थोड़ा balanced spacing */
    font-size: 13px;
    white-space: nowrap;
}

.menu-link.active {
    background: rgba(255,255,255,0.2);
    border-radius: 5px;
}

.form-group {
    margin-bottom: 14px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 5px;
    display: block;
    color: #333;
}
.btn-success {
    width: 60% !important;
    display: block !important;
    margin: 15px auto 0 auto !important;
}

.form-control {
    width: 60%;
    padding: 9px 10px;
    border-radius: 6px;
    border: 1px solid #dcdcdc;
    font-size: 14px;
    display: block;
    margin: 0 auto;   /* 🔥 यही fix है */
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.custom-table thead {
    background: #2f6fda;
    color: white;
}

.custom-table th {
    background: #2f6fda;
    color: white;
    padding: 4px;
    border: 1px solid #ddd;

    font-size: 12px;      /* 👈 add this */
    white-space: nowrap;  /* 👈 add this */
}

.custom-table td {
    padding: 6px;
    border: 1px solid #e5e5e5;

    font-size: 12px;   /* 👈 add this */
}
.custom-table tbody tr:hover {
    background: #f9fbff;
}
.sub-text {
    font-size: 12px;
    color: gray;
}

.company-name {
    font-weight: 600;
}

.company-sub {
    font-size: 12px;
    color: #666;
}

.btn-edit {
    background: green;
    color: white;
    border: none;
    padding: 5px 10px;
    margin-right: 5px;
}

.btn-delete {
    background: red;
    color: white;
    border: none;
    padding: 5px 10px;
}

.close-btn {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 20px;
    cursor: pointer;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 9999;

    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-box {
    background: white;
    padding: 20px;
    width: 600px;
    border-radius: 10px;
}


.checkbox-row {
    margin-top: 10px;
    display: flex;
    gap: 20px;
}

.btn-add { background: green; color:white; padding:8px; }
.btn-edit { background:#3498db; color:white; }
.btn-delete { background:red; color:white; }
.btn-save { background:green; color:white; }
.btn-cancel { background:gray; color:white; }

.user-table {
    width: 100%;
    border-collapse: collapse;
}

.user-table th, .user-table td {
    padding: 10px;
    border: 1px solid #ddd;
    font-size: 13px;
}

.modal {
    background: #fff;
    width: 600px;
    padding: 20px;
    border-radius: 10px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.modal-actions {
    margin-top: 15px;
    text-align: right;
}

.btn-add { background: green; color: white; }
.btn-edit { background: blue; color: white; }
.btn-delete { background: red; color: white; }