/*
====================================================
FILE : /assets/css/main.css
PURPOSE: Single source polished UI CSS for Advanced CRM
====================================================
*/

/* ===================== RESET ===================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    background: #f4f6f9;
    color: #222;
}

/* ===================== HEADER ===================== */
.top-header {
    height: 56px;
    background: #0f172a;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: fixed;
    top: 0;           /* Fixed: gap khatam karne ke liye */
    left: 0;
    right: 0;
    z-index: 1000;
}

/* ===================== APP WRAPPER ===================== */
.app-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
    padding-top: 56px; /* Yeh content ko header ke niche dhakelta hai */
}

/* ===================== SIDEBAR ===================== */
.sidebar {
    width: 240px;
    background: linear-gradient(180deg, #0b132b, #050a1a);
    color: #ffffff;
    flex-shrink: 0;
    position: fixed;
    top: 56px;        /* Header ke theek niche se shuru */
    left: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 999;
}

/* Sidebar Header */
.sidebar-header {
    padding: 22px 20px;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    color: #ffffff;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

/* Sidebar menu */
.sidebar ul {
    list-style: none;
    padding: 12px 0;
}

.sidebar ul li {
    width: 100%;
}

.sidebar ul li a {
    display: flex;
    align-items: center;
    padding: 12px 22px;
    color: #dbe4ff;
    text-decoration: none;
    font-size: 14.5px;
    transition: all 0.2s ease;
}

.sidebar ul li a:hover {
    background: rgba(255,255,255,0.08);
    color: #ffffff;
}

.sidebar ul li a.active {
    background: rgba(255,255,255,0.15);
    color: #ffffff;
    font-weight: 600;
}

/* ===================== MAIN CONTENT ===================== */
.main-content {
    margin-left: 240px;      /* Sidebar ki space chhodne ke liye */
margin-top: 56px;      /* Ise 0 rakhein taaki double gap na aaye */
    flex: 1;
    padding: 30px 35px;
    background: #f4f6f9;
    min-height: calc(100vh - 56px); 
    box-sizing: border-box;
    /* margin-top yahan se hata diya gaya hai kyunki app-wrapper mein padding hai */
}

/* ===================== HEADINGS ===================== */
h1, h2, h3, h4 {
    margin-bottom: 18px;
    color: #111;
    font-weight: 600;
}

/* ===================== CARDS ===================== */
.card {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
    margin-bottom: 25px;
}

.card-body {
    padding: 22px 26px;
}

/* ===================== TABLES ===================== */
table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

table thead {
    background: #eef2f7;
}

table th,
table td {
    padding: 13px 14px;
    border: 1px solid #e5e7eb;
    font-size: 14px;
}

table th {
    text-align: left;
    font-weight: 600;
}

/* ===================== BUTTONS ===================== */
button,
.btn {
    display: inline-block;
    padding: 9px 16px;
    border: none;
    border-radius: 6px;
    background: #2563eb;
    color: #ffffff;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    transition: background 0.2s ease;
}

button:hover,
.btn:hover {
    background: #1d4ed8;
}

/* ===================== FORMS ===================== */
input[type="text"],
input[type="email"],
input[type="password"],
select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    margin-bottom: 12px;
    font-size: 14px;
}

/* ===================== STATUS COLORS ===================== */
.text-success { color: #16a34a; }
.text-danger  { color: #dc2626; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {
    .sidebar {
        width: 70px; /* Mobile par sidebar chota karein ya hide karein */
    }
    .main-content {
        margin-left: 70px;
        padding: 20px;
    }
}

/* ===================== MODULE SPECIFIC ===================== */
.progress-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.progress-status.good { background: #dcfce7; color: #166534; }
.progress-status.average { background: #fef9c3; color: #854d0e; }
.progress-status.poor { background: #fee2e2; color: #991b1b; }