/* ShifaGo - Patient Dashboard Core Stylesheet */

:root {
    /* Light Mode Variables (Default) */
    --primary: #4338f2;
    --primary-hover: #2f24d4;
    --bg: #eef4fb;
    --border: #e3e7ef;
    --card-bg: #ffffff;
    --text-color: #1c1d2d;
    --text-muted: #f8fafc;
    --sidebar-bg: #ffffff;
    --navbar-bg: #f8f5fb;
    --purple-soft: #f4f1ff;
    --cyan-soft: #dff7f8;
    --logout-bg: #d91b1b;
    --logout-hover: #b51212;
    --notification-dot-bg: #dc3545;
}

[data-theme="dark"] {
    /* Dark Mode Variables Override */
    --primary: #5c54f5;
    --primary-hover: #4338f2;
    --bg: #0f172a; /* Slate 900 */
    --border: #1e293b; /* Slate 800 */
    --card-bg: #1e293b; /* Slate 800 */
    --text-color: #f8fafc; /* Slate 50 */
    --text-muted: #f8fafc; /* Slate 400 */
    --sidebar-bg: #0f172a; /* Slate 900 */
    --navbar-bg: #1e293b; /* Slate 800 */
    --purple-soft: #2e2667;
    --cyan-soft: #12363b;
    --logout-bg: #ef4444;
    --logout-hover: #dc2626;
    --notification-dot-bg: #ef4444;
}

/* Global Adjustments */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    text-decoration: none;
}

.dashboard-layout {
    
    min-height: 100vh;
}

/* ==========================================================
   SIDEBAR COMPONENT
   ========================================================== */
.sidebar {
    width: 280px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 28px 22px;
    position: fixed;
    top: 0;
    bottom: 0;
    z-index: 1000;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

html[dir="rtl"] .sidebar {
    border-right: none;
    border-left: 1px solid var(--border);
    right: 0;
    left: auto;
}

.profile-box {
    display: flex;
    align-items: center;
    gap: 14px;
    background-color: var(--purple-soft);
    padding: 14px;
    border-radius: 18px;
    margin-bottom: 26px;
    transition: background-color 0.3s ease;
}

.profile-box img {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-label {
    font-size: 12px;
    color: var(--text-muted);
}

.profile-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-color);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav-item-custom {
    height: 58px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 18px;
    color: var(--text-muted);
    transition: all 0.3s ease;
    font-weight: 500;
    background-color: transparent;
}

.nav-item-custom:hover {
    background-color: var(--purple-soft);
    color: var(--primary);
}

.nav-item-custom.active {
    background-color: var(--primary);
    color: #ffffff !important;
}

.logout-btn {
    width: 100%;
    height: 58px;
    border: none;
    border-radius: 16px;
    background-color: var(--logout-bg);
    color: #ffffff;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.logout-btn:hover {
    background-color: var(--logout-hover);
}

/* ==========================================================
   MAIN CONTENT & NAVBAR
   ========================================================== */
.main-content {
    flex: 1;
    margin-left: 280px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin 0.3s ease;
}

html[dir="rtl"] .main-content {
    margin-left: 0;
    margin-right: 280px;
}

.topbar {
    height: 82px;
    background-color: var(--navbar-bg);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.logo {
    font-size: 40px;
    font-weight: 800;
    color: var(--primary);
}

.top-links {
    display: flex;
    gap: 35px;
}

.top-links a {
    font-weight: 500;
    transition: color 0.2s ease;
}

.top-links a:hover {
    color: var(--primary);
}

.top-links a.active {
    color: var(--primary);
    font-weight: 700;
    text-decoration: underline;
}

.top-icon {
    font-size: 22px;
    color: var(--text-color);
    cursor: pointer;
}

.page-content {
    flex: 1;
    padding: 35px;
}

/* Real-time Indicators (اللمبة الحمرا) */
.notification-dot {
    width: 10px;
    height: 10px;
    background-color: var(--notification-dot-bg);
    border-radius: 50%;
    display: inline-block;
    margin-inline-start: auto;
    box-shadow: 0 0 8px var(--notification-dot-bg);
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .sidebar {
        width: 70px;
        padding: 20px 10px;
    }
    .sidebar .profile-name, .sidebar .profile-label, .sidebar span, .sidebar .logout-btn span {
        display: none;
    }
    .main-content {
        margin-left: 70px;
    }
    html[dir="rtl"] .main-content {
        margin-right: 70px;
        margin-left: 0;
    }
}
