/* =========================================
   Sippin Gadjets CRM
   Apple Premium UI — Final Refined Version
========================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
    background: linear-gradient(135deg, #eef2f7, #dbe4f3);
    color: #1d1d1f;
    min-height: 100vh;
    overflow-x: hidden;
}

/* =========================================
   SIDEBAR
========================================= */

.sidebar {
    position: fixed;
    width: 220px;
    top: 0;
    left: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    color: white;
    padding-top: 20px;
    box-shadow: 8px 0 30px rgba(0,0,0,0.08);
    z-index: 1000;
}

.sidebar-brand {
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 25px;
    letter-spacing: .3px;
}

.sidebar ul {
    list-style: none;
}

.sidebar ul li {
    margin: 5px 10px;
}

.sidebar ul li a {
    display: block;
    padding: 12px 14px;
    border-radius: 12px;
    text-decoration: none;
    color: #dbeafe;
    font-size: 15px;
    font-weight: 500;
    transition: all .25s ease;
}

.sidebar ul li a:hover {
    background: rgba(255,255,255,0.08);
    transform: translateX(4px);
}

/* =========================================
   NAVBAR
========================================= */

.navbar {
    position: fixed;
    top: 0;
    left: 220px;
    right: 0;
    height: 68px;
    background: rgba(255,255,255,0.72);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(255,255,255,0.4);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 999;
}

.navbar h2 {
    font-size: 20px;
    font-weight: 700;
}

/* Right side moved inward */
.navbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-right: 250px;
}

.navbar-right span {
    font-weight: 500;
    color: #1f2937;
}

.navbar a {
    text-decoration: none;
    color: #2563eb;
    font-weight: 600;
}

/* =========================================
   MAIN CONTENT
========================================= */

.main-content {
    margin-left: 220px;
    margin-top: 78px;
    padding: 24px;
    max-width: 1400px;
}

/* =========================================
   HEADINGS
========================================= */

h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
}

h2 {
    font-size: 24px;
    margin-bottom: 18px;
}

h3 {
    font-size: 20px;
    margin-bottom: 16px;
}

/* =========================================
   DASHBOARD CARDS
========================================= */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(240px,1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.card {
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(14px);
    border-radius: 18px;
    padding: 20px;
    min-height: 110px;
    box-shadow: 0 8px 24px rgba(31,38,135,0.06);
    border: 1px solid rgba(255,255,255,0.35);
    transition: transform .2s ease;
    font-size: 16px;
}

.card:hover {
    transform: translateY(-3px);
}

/* =========================================
   TABLES
========================================= */

table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 18px;
    overflow: hidden;
    background: rgba(255,255,255,0.80);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.04);
}

table th {
    text-align: left;
    padding: 14px;
    background: rgba(255,255,255,0.55);
    font-weight: 700;
    font-size: 14px;
}

table td {
    padding: 14px;
    border-top: 1px solid rgba(0,0,0,0.04);
    font-size: 14px;
}

/* =========================================
   BUTTONS
========================================= */

.btn,
button {
    border: none;
    border-radius: 12px;
    padding: 10px 16px;
    cursor: pointer;
    background: linear-gradient(135deg,#2563eb,#3b82f6);
    color: white;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 6px 20px rgba(37,99,235,0.18);
    transition: .2s ease;
}

.btn:hover,
button:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

/* =========================================
   FORMS
========================================= */

input,
textarea,
select {
    width: 100%;
    padding: 13px 14px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.08);
    background: rgba(255,255,255,0.9);
    margin-bottom: 16px;
    font-size: 14px;
    outline: none;
}

input:focus,
textarea:focus,
select:focus {
    border-color: #3b82f6;
}

/* =========================================
   LOGIN BOX
========================================= */

.login-box {
    width: 400px;
    margin: 100px auto;
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(18px);
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 18px 50px rgba(0,0,0,0.08);
}

.login-box h2 {
    text-align: center;
    margin-bottom: 24px;
}

/* =========================================
   NOTIFICATION BELL
========================================= */

.notification-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.notification-bell {
    position: relative;
    cursor: pointer;
    font-size: 20px;
    margin-right: 8px;
    color: #111827;
    transition: 0.2s ease;
}

.notification-bell:hover {
    transform: scale(1.05);
}

.notification-bell span {
    position: absolute;
    top: -6px;
    right: -8px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    border-radius: 50%;
    padding: 3px 6px;
    font-weight: bold;
}

/* Notification Dropdown */
.notification-dropdown {
    position: absolute;
    right: 0;
    top: 42px;
    width: 320px;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(20px);
    border-radius: 18px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
    display: none;
    overflow: hidden;
    z-index: 9999;
}

.show-dropdown {
    display: block;
}

.notif-header {
    padding: 16px;
    font-weight: bold;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.notif-item {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(0,0,0,0.04);
    font-size: 14px;
}

.notif-item:hover {
    background: rgba(0,0,0,0.03);
}

.notif-footer {
    padding: 12px;
    text-align: center;
}

.notif-empty {
    padding: 20px;
    text-align: center;
    color: gray;
}

/* =========================================
   MODALS
========================================= */

.glass-modal {
    background: rgba(255,255,255,0.78);
    backdrop-filter: blur(20px);
    border-radius: 22px;
    border: none;
}

/* =========================================
   DARK MODE
========================================= */

body.dark-mode {
    background: linear-gradient(135deg,#0f172a,#1e293b);
    color: #f8fafc;
}

body.dark-mode .navbar,
body.dark-mode .card,
body.dark-mode table,
body.dark-mode .login-box,
body.dark-mode .notification-dropdown {
    background: rgba(30,41,59,0.65);
    color: white;
}

body.dark-mode .navbar-right span,
body.dark-mode .notification-bell {
    color: #f8fafc;
}

body.dark-mode input,
body.dark-mode textarea,
body.dark-mode select {
    background: rgba(51,65,85,0.85);
    color: white;
    border-color: rgba(255,255,255,0.08);
}
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.full-width {
    grid-column: span 2;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #374151;
}

textarea {
    resize: vertical;
    min-height: 80px;
}

body.dark-mode label {
    color: #f8fafc;
}
/* =========================================
   RESPONSIVE
========================================= */

@media(max-width:768px) {

    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }

    .navbar {
        left: 0;
    }

    .main-content {
        margin-left: 0;
        padding: 18px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .login-box {
        width: 90%;
    }

    .navbar-right {
        margin-right: 10px;
        gap: 10px;
    }
}