/* =======================================================
   EDIVIC SaaS Premium Global Sticky Top Navbar - Stylesheet
   ======================================================= */

:root {
    --primary-dark: #0f172a;               /* Primary slate dark */
    --secondary-dark: #1e293b;             /* Slate card background */
    --gold: #f59e0b;                       /* Premium focus gold */
    --gold-hover: #d97706;                 /* Gold shade hover */
    --bg-light: #f8fafc;                   /* Light slate gray backdrop */
    --text-primary: #1e293b;               /* Deep slate text */
    --text-muted: #64748b;                 /* Muted slate text */
    --border-light: rgba(241, 245, 249, 0.9);
    --border-dark: rgba(255, 255, 255, 0.08);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 8px 30px rgba(0,0,0,0.05);
    --shadow-lg: 0 15px 40px rgba(0,0,0,0.08);
    --radius-lg: 18px;
    --radius-md: 12px;
}

/* Base Body styles override for Dashboard Platform Pages */
body[data-saas-platform] {
    background: var(--bg-light);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Premium Dark Mode state triggered via body.dark-theme */
body.dark-theme {
    background: #090d16 !important;
    color: #f1f5f9 !important;
    --bg-light: #090d16;
    --text-primary: #f1f5f9;
    --text-muted: #94a3b8;
    --border-light: rgba(255, 255, 255, 0.08);
}

/* Force dark theme coloring for navbar elements specifically */
body.dark-theme .saas-header {
    background: rgba(17, 24, 39, 0.85) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 4px 25px rgba(0,0,0,0.4) !important;
}

body.dark-theme .logo-brand {
    color: #ffffff !important;
}

body.dark-theme .nav-link-item.active {
    background: #ffffff !important;
    color: #0f172a !important;
}

body.dark-theme .nav-search-bar input {
    background: rgba(255, 255, 255, 0.05) !important;
    color: #ffffff !important;
}

body.dark-theme .nav-search-bar input:focus {
    background: #111827 !important;
    border-color: var(--gold) !important;
}

body.dark-theme .nav-action-btn {
    background: rgba(255, 255, 255, 0.05) !important;
    color: #f1f5f9 !important;
}

body.dark-theme .notif-dropdown-quick,
body.dark-theme .profile-dropdown-card {
    background: #111827 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.5) !important;
}

body.dark-theme .profile-dropdown-card h4,
body.dark-theme .profile-dropdown-card span {
    color: #ffffff !important;
}

body.dark-theme .dropdown-divider {
    border-top-color: rgba(255, 255, 255, 0.08) !important;
}

body.dark-theme .dropdown-links a {
    color: #cbd5e1 !important;
}

body.dark-theme .dropdown-links a:hover {
    background: rgba(245, 158, 11, 0.08) !important;
    color: var(--gold) !important;
}

body.dark-theme .saas-nav-menu.mobile-open {
    background: #111827 !important;
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

/* Header Container Layout */
.saas-header {
    position: sticky;
    top: 0;
    z-index: 2000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}

.saas-nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 40px;
    gap: 20px;
}

/* Left Brand Sizing */
.nav-logo-area {
    display: flex;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.logo-img {
    height: 38px;
    width: 38px;
    object-fit: contain;
    border-radius: 8px;
}

.logo-text-group {
    display: flex;
    flex-direction: column;
}

.logo-brand {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary-dark);
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.logo-subtitle {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 1.5px;
}

/* Horizontally Aligned Navigation List */
.saas-nav-menu {
    display: flex;
    align-items: center;
}

.nav-links-list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link-item {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 600;
    padding: 10px 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link-item i {
    font-size: 0.95rem;
}

.nav-link-item:hover {
    color: var(--gold);
    background: rgba(245, 158, 11, 0.06);
}

.nav-link-item.active {
    color: #fff;
    background: var(--primary-dark);
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.15);
}

/* Active option glow underline animations in navbar links */
.nav-link-item.active::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 20%;
    width: 60%;
    height: 3px;
    background: var(--gold);
    border-radius: 4px;
    box-shadow: 0 1px 8px rgba(245, 158, 11, 0.8);
}

/* Right Section Actions controls */
.nav-right-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Modern pill search bar */
.nav-search-bar {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-search-bar input {
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(0,0,0,0);
    padding: 10px 16px 10px 42px;
    border-radius: 50px;
    font-size: 0.85rem;
    outline: none;
    width: 200px;
    color: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-search-bar input:focus {
    width: 250px;
    border-color: var(--gold);
    background: #fff;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.1);
}

.search-icon {
    position: absolute;
    left: 16px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Actions buttons controllers */
.nav-action-btn {
    border: none;
    background: rgba(15, 23, 42, 0.04);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    font-size: 0.95rem;
    transition: all 0.25s ease;
}

.nav-action-btn:hover {
    background: rgba(245, 158, 11, 0.12);
    color: var(--gold);
    transform: translateY(-2px);
}

/* Pulse badge indicators */
.pulse-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 8px;
    height: 8px;
    background: var(--gold);
    border-radius: 50%;
    border: 2px solid #fff;
    animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
    0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
    100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

/* Notification Droplist Component card */
.notification-dropdown-wrapper {
    position: relative;
}

.notif-dropdown-quick {
    position: absolute;
    top: 55px;
    right: 0;
    width: 320px;
    background: #ffffff;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: var(--shadow-lg);
    padding: 15px;
    z-index: 2050;
    animation: slideDownFade 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.notif-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    font-weight: 700;
    font-size: 0.9rem;
}

.notif-dropdown-header a {
    color: var(--gold);
    text-decoration: none;
    font-size: 0.75rem;
}

.notif-dropdown-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notif-item-quick {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.notif-dot {
    width: 8px;
    height: 8px;
    background: var(--gold);
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
}

.notif-text {
    flex-grow: 1;
}

.notif-p {
    font-size: 0.8rem;
    line-height: 1.4;
    color: var(--text-primary);
}

.notif-time {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Connected profile quick controls */
.header-profile-dropdown-container {
    position: relative;
}

.header-profile-trigger {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px;
    border-radius: 50px;
    transition: background 0.2s ease;
}

.header-profile-trigger:hover {
    background: rgba(15, 23, 42, 0.04);
}

.header-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-light);
}

.chevron-icon {
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: transform 0.2s;
}

.header-profile-trigger:focus .chevron-icon {
    transform: rotate(180deg);
}

/* User dropdown contextual cards options */
.profile-dropdown-card {
    position: absolute;
    right: 0;
    top: 55px;
    background: #ffffff;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: var(--shadow-lg);
    width: 230px;
    padding: 15px;
    z-index: 2050;
    display: flex;
    flex-direction: column;
    animation: slideDownFade 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-user-info {
    padding-bottom: 12px;
}

.dropdown-user-info h4 {
    color: var(--text-primary);
    font-size: 0.92rem;
    font-weight: 700;
}

.dropdown-user-info span {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.dropdown-divider {
    border-top: 1px solid rgba(15, 23, 42, 0.06);
    margin: 8px 0;
}

.dropdown-links {
    list-style: none;
}

.dropdown-links a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.82rem;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: all 0.2s;
}

.dropdown-links a:hover {
    background: rgba(245, 158, 11, 0.08);
    color: var(--gold);
    padding-left: 16px;
}

.dropdown-logout-btn {
    border: none;
    background: #fee2e2;
    color: #ef4444;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 11px;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: 0.2s;
}

.dropdown-logout-btn:hover {
    background: #fecaca;
    color: #dc2626;
}

/* Mobile responsive navigation controls */
.mobile-toggle-btn {
    display: none;
    border: none;
    background: none;
    color: var(--text-primary);
    font-size: 1.3rem;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.mobile-toggle-btn:hover {
    color: var(--gold);
}

/* Helpers definition */
.hidden {
    display: none !important;
}

@keyframes slideDownFade {
    0% { transform: translateY(12px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

/* Responsive configurations mapping */
@media (max-width: 768px) {
    .saas-nav-menu {
        display: none; /* Hide top nav list on low screen resolutions */
    }

    .saas-nav-menu.mobile-open {
        display: block;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: #ffffff;
        border-bottom: 1px solid rgba(0,0,0,0.05);
        box-shadow: var(--shadow-lg);
        padding: 20px;
        z-index: 1999;
    }

    .nav-links-list {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .nav-link-item {
        padding: 12px 16px;
    }

    .mobile-toggle-btn {
        display: block;
    }

    .nav-search-bar {
        display: none; /* Hide top-bar direct search form input */
    }
}

@media (max-width: 640px) {
    .saas-nav-container {
        padding: 10px 20px;
    }
}


@media (min-width: 769px) and (max-width: 1280px) {
    .saas-nav-container { padding: 12px 18px; gap: 10px; max-width: 100%; }
    .nav-links-list { gap: 4px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 62vw; }
    .nav-links-list::-webkit-scrollbar { display: none; }
    .nav-link-item { padding: 9px 10px; font-size: 0.8rem; white-space: nowrap; }
    .nav-search-bar { display: none; }
    .logo-subtitle { display: none; }
}


/* EDIVIC final dashboard logo + profile initial fallback */
.dashboard-logo-img, .saas-header .logo-img {
  width: 46px !important;
  height: 46px !important;
  object-fit: contain !important;
  border-radius: 12px !important;
}
.avatar-initial, .header-avatar.avatar-initial {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f172a, #f59e0b);
  color: #fff !important;
  font-weight: 900;
  letter-spacing: .03em;
  box-shadow: 0 10px 24px rgba(15,23,42,.18);
}
.client-profile-box .avatar-initial, .profile-box .avatar-initial {
  width: 64px;
  height: 64px;
  min-width: 64px;
  font-size: 1.35rem;
}
