/* ===== RESET ===== */
/* ============================= */
/* GLOBAL FIXED APP */
/* ============================= */

html,
body {

    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family:
        'Segoe UI',
        sans-serif;
    background: #f4f7fb;
}


/* ===== LAYOUT ===== */
.crm-layout {

    display: flex;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: #f4f7fb;
}

/* SIDEBAR FIXED */
.crm-sidebar {

    width: 138px;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
   overflow: hidden;
    background:
        linear-gradient(
            180deg,
            #0f172a 0%,
            #1e1b4b 45%,
            #581c87 100%
        );

    color: white;

    display: flex;
    flex-direction: column;

    padding: 14px 10px;
    border-right:
        1px solid rgba(255,255,255,.06);

    box-shadow:
        0 0 35px rgba(0,0,0,.25);

    z-index: 1000;
}

/* PROFILE AREA */

.profile {

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: flex-start;

    padding: 12px 6px;
    
    margin-bottom: 4px;
     margin-top: 4px;

    border-bottom:
        1px solid rgba(255,255,255,.08);
}

.sidebar-top {

    padding-bottom: 4px;

    margin-bottom: 4px;
}

/* COMPANY LOGO */

.company-logo {

    width: 46px !important;

    height: 46px !important;

    object-fit: contain !important;

    border-radius: 12px !important;

    margin-bottom: 2px !important;

    box-shadow:
        0 4px 12px rgba(0,0,0,.22);
}


/* USER IMAGE */

.profile img {

    width: 40px;

    height: 40px;

    object-fit: cover;

    border-radius: 50%;

    border:
        2px solid rgba(255,255,255,.12);

    margin-bottom: 2px;
}



.profile h4 {

    margin: 0;

    font-size: 10px;

    font-weight: 600;

    color: #fff;

    line-height: 1.2;
}

.menu {

    list-style: none;

    padding: 0;

    margin-top: 8px;

    display: flex;

    flex-direction: column;

    gap: 2px;
}

.menu li {

    margin: 0;
    padding: 0;
}

/* MENU LINKS */

.menu-link {

    display: flex;

    align-items: center;

    gap: 10px;

    padding: 8px 12px;

    border-radius: 10px;

    font-size: 14px;

    font-weight: 500;

    color: rgba(255,255,255,.92);

    text-decoration: none;

    transition: .2s ease;
}

.menu-icon {

    min-width: 16px;

    font-size: 14px;

    display: flex;

    align-items: center;

    justify-content: center;
}

/* HOVER */

.menu-link:hover {

    background:
        rgba(255,255,255,.08);

    color: white;

    transform:
        translateX(2px);
}


/* SETTINGS */
.settings {
    margin-top: auto;
    padding-top: 16px;
    border-top:
        1px solid rgba(255,255,255,.08);
}

/* RIGHT CONTENT */
.crm-content {

    margin-left: 138px;

    width: calc(100% - 138px);

    height: 100vh;

    display: flex;

    flex-direction: column;

    overflow: hidden;

    position: relative;

    background: #f4f7fb;
}

/* TOP BAR */
.top-row {
    background: white;
    padding: 6px 10px;
    border-bottom: 1px solid #ddd;
}

/* SCROLL AREA */
.page-body {

    flex: 1;

    overflow-y: auto;

    overflow-x: auto;

    min-height: 0;

    padding: 10px;
}

/* ===== DASHBOARD ===== */

/* TOPBAR */
.topbar {

    position: sticky;

    top: 0;

    z-index: 999;

    flex-shrink: 0;

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 4px 20px;

   background:
    linear-gradient(
        90deg,
        #111827 0%,
        #1f2937 45%,
        #3b0764 100%
    );

    border-bottom: 1px solid rgba(255,255,255,.08);
}

.support-text {
    font-size: 10px;
    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: 4px 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;
}


.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; }