/* ===============================
   🌐 NurseXplore Admin - Ultimate Global Theme (Final Polished & Responsive)
   =============================== */
   :root {
    --gradient-bg: linear-gradient(180deg, #0b0f2f, #1c1e4a, #3b4070, #6b6fa5);
    --primary-color: #4facfe;
    --secondary-color: #00f2fe;
    --success-color: #28c76f;
    --error-color: #ea5455;
    --warning-color: #ff9f43;
    --info-color: #00cfe8;
    --text-color: #ffffff;
    --card-bg: rgba(255, 255, 255, 0.06);
    --blur: blur(16px);
}

* {
    box-sizing: border-box;
}

/* =============================== */
/* 🚫 Disable Text Selection (Pro UX) */
/* =============================== */

body {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

input, textarea, .nx-input, .nx-textarea {
    user-select: text !important;
}


html,
body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    background: var(--gradient-bg);
    background-size: 400% 400%;
    color: var(--text-color);
    animation: gradientFlow 20s ease infinite;
    scroll-behavior: smooth;
}

@keyframes gradientFlow {
    0%   { background-position: 0% 50%; }
    30%  { background-position: 70% 30%; }
    60%  { background-position: 30% 70%; }
    100% { background-position: 0% 50%; }
}

/* ===============================
   🌌 Global Background & Particles Layer
   =============================== */
/* 🌌 Particle Canvas Layer */
.nx-background-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;  /* Behind everything */
    pointer-events: none;
    filter: blur(1px) brightness(1.2);
}



/* ===============================
   🌟 Typography
   =============================== */
h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0 0 15px 0;
    font-weight: 600;
    color: var(--text-color);
}

p {
    margin: 0 0 10px 0;
    line-height: 1.6;
}

/* ===============================
   🌐 Global Container Utility
   =============================== */
.nx-container {
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.nx-max-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}



/* 🌟 Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gradient-bg);
}

::-webkit-scrollbar-thumb {
    background: #1c1e4a;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* ===============================
   🌟 Premium Card (Fancy, Animated Glass)
   =============================== */
   .nx-card-premium {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    padding: 25px;
    border-radius: 14px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.07);
    transition: transform 0.4s ease, box-shadow 0.4s ease, border 0.4s ease;
    color: #fff;
}

.nx-card-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: -80%;
    width: 50%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255,255,255,0.05), rgba(255,255,255,0.15), rgba(255,255,255,0.05));
    transform: skewX(-20deg);
    transition: all 0.5s ease;
}

.nx-card-premium:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2), 0 0 25px rgba(79, 172, 254, 0.3);
    border: 1px solid rgba(79, 172, 254, 0.2);
}

.nx-card-premium:hover::before {
    left: 130%;
}


/* ===============================
   🎨 Simple Card (Clean & Minimal)
   =============================== */
   .nx-card-simple {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.06);
    color: #fff;
}

/* ===============================
   🌌 Background Card (Ultra Transparent)
   =============================== */
   .nx-card-background {
    background: transparent;  /* Fully transparent */
    backdrop-filter: blur(20px);  /* Subtle blur for readability */
    -webkit-backdrop-filter: blur(20px);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);  /* Soft white border */
    color: #fff;
    box-shadow: none;  /* No shadow for clean look */
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);  /* Improve text readability */
    transition: border 0.3s ease;
}

.nx-card-background:hover {
    border: 1px solid rgba(79, 172, 254, 0.15);  /* Slight highlight on hover */
}

/* ===============================
   🚀 Buttons
   =============================== */
.nx-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 20px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nx-btn:hover {
    opacity: 0.9;
}

.nx-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.nx-btn.full-width {
    width: 100%;
}

.nx-btn-primary {
    background: var(--primary-color);
    color: #fff;
}

.nx-btn-secondary {
    background: #6c757d;
    color: #fff;
}

/* ===============================
   📝 Form Elements
   =============================== */
input,
select,
textarea {
    font-family: 'Poppins', sans-serif;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 15px;
    font-size: 14px;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* ===============================
   ✨ Toast Notifications
   =============================== */
.toast-container {
    position: fixed;
    z-index: 1055;
    padding: 10px;
}

.toast-container.bottom-right {
    bottom: 20px;
    right: 20px;
}

.toast-container.top-right {
    top: 20px;
    right: 20px;
}

.toast-message {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
    margin-bottom: 15px;
    padding: 16px 20px;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    font-size: 15px;
    min-width: 250px;
    max-width: 320px;
    border-left: 6px solid;
    background: #fff;
    animation: slideFadeIn 0.5s ease forwards;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.toast-message.success {
    border-color: var(--success-color);
    background: #e6f4ea;
    color: #1e4620;
}

.toast-message.error {
    border-color: var(--error-color);
    background: #fdecea;
    color: #611a1a;
}

.toast-message.info {
    border-color: var(--info-color);
    background: #e7f3f9;
    color: #0c5460;
}

.toast-message.warning {
    border-color: var(--warning-color);
    background: #fff8e1;
    color: #8a6d1d;
}

.toast-close {
    font-size: 18px;
    color: #999;
    cursor: pointer;
}

.toast-close:hover {
    color: #000;
}

.toast-message.fade-out {
    opacity: 0;
    transform: translateX(50px);
}

@keyframes slideFadeIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===============================
   🌐 Global Loader
   =============================== */
#global-loader {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

#global-loader.active {
    display: flex;
}

.loader-dots {
    display: flex;
    gap: 12px;
}

.loader-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    animation: pulse 1s infinite ease-in-out;
}

.loader-dot:nth-child(1) {
    background: #007bff;
}

.loader-dot:nth-child(2) {
    background: #28a745;
    animation-delay: 0.2s;
}

.loader-dot:nth-child(3) {
    background: #dc3545;
    animation-delay: 0.4s;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.6;
    }

    50% {
        transform: scale(1.5);
        opacity: 1;
    }
}

/* ===============================
   🔽 Inline Row Loader (Table)
   =============================== */
.inline-loader {
  background-color: rgba(255, 255, 255, 0.05);
}

.inline-loader-cell {
  text-align: center;
  padding: 16px;
}

.inline-loader .loader-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.inline-loader .loader-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  animation: pulse 1s infinite ease-in-out;
}

.inline-loader .loader-dot:nth-child(1) {
  background: #007bff;
}

.inline-loader .loader-dot:nth-child(2) {
  background: #28a745;
  animation-delay: 0.2s;
}

.inline-loader .loader-dot:nth-child(3) {
  background: #dc3545;
  animation-delay: 0.4s;
}

/* ===============================
   🎨 Animated Modal
   =============================== */
.nx-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 10px;
}

.nx-modal {
    background: #fff;
    width: 100%;
    max-width: 380px;
    border-radius: 15px;
    overflow: hidden;
    text-align: center;
    transform: scale(0.8);
    opacity: 0;
    animation: modalPop 0.3s forwards;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    position: relative;
}

.nx-modal-top {
    padding: 25px 20px 10px;
    font-size: 20px;
    font-weight: bold;
    color: #fff;
}

.nx-modal-icon {
    font-size: 40px;
    margin-bottom: 8px;
    animation: iconPop 0.4s ease;
}

.nx-modal-body {
    background: #fff;
    color: #444;
    font-size: 15px;
    padding: 18px;
}

.nx-modal-footer {
    background: #f1f1f1;
    padding: 15px;
    display: flex;
    justify-content: center;
    gap: 12px;
}

.nx-modal-close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 20px;
    color: #fff;
    cursor: pointer;
}

.nx-modal-success {
    background: var(--success-color);
}

.nx-modal-error {
    background: var(--error-color);
}

.nx-modal-warning {
    background: var(--warning-color);
    color: #333;
}

.nx-modal-info {
    background: var(--info-color);
}

@keyframes modalPop {
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes iconPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ===============================
   🌟 Utility Classes
   =============================== */
.text-muted {
    font-size: 14px;
    opacity: 0.75;
}

.mt-3 {
    margin-top: 1rem;
}

.center-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* ===============================
   📱 Responsive Tweaks
   =============================== */
@media (max-width: 600px) {
    .nx-card {
        padding: 20px;
    }

    .nx-modal {
        max-width: 90%;
    }

    .toast-container.bottom-right,
    .toast-container.top-right {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        bottom: 20px;
    }

    .toast-message {
        font-size: 14px;
    }
}

/* =============================== 
   🌐 Layout Adjustments 
   =============================== */

   .nx-layout {
    display: flex;
    z-index: 1;
    flex-direction: column;
    min-height: 100vh;
}

.nx-main-wrapper {
    margin-left: 220px;
    padding-top: 60px;   /* For topbar */
    transition: margin-left 0.3s ease;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* 🌟 Collapse Behavior - Desktop Only */
.nx-main-wrapper.collapsed {
    margin-left: 60px;
}

/* Main Content Area */
.nx-main-content {
    flex: 1;
    padding: 20px;
}

/* 🌐 Responsive - Mobile View */
@media (max-width: 768px) {
    .nx-main-wrapper {
        margin-left: 0 !important;   /* Force full width on mobile */
    }
}

/* ===============================
   📊 NXAdmin - Dynamic Table Styling
   =============================== */

/* 🌐 Table Wrapper */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    margin-bottom: 20px;
}

/* 📋 Table Base */
.dynamic-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    overflow: hidden;
    color: #fff;
    box-shadow: 0 6px 18px rgba(0,0,0,0.1);
}

/* 📝 Table Headers */
.dynamic-table th {
    background: rgba(255, 255, 255, 0.05);
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    user-select: none;
    position: relative;
}

/* 🔽 Sort Indicator */
.dynamic-table th.sortable::after {
    content: '⇅';
    position: absolute;
    right: 10px;
    font-size: 12px;
    opacity: 0.5;
}

.dynamic-table th.sortable.active-asc::after {
    content: '▲';
    opacity: 0.8;
}

.dynamic-table th.sortable.active-desc::after {
    content: '▼';
    opacity: 0.8;
}

/* 📄 Table Cells */
.dynamic-table td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
}

/* 🚨 Hover Effect */
.dynamic-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* Last Row */
.dynamic-table tbody tr:last-child td {
    border-bottom: none;
}

/* 🎨 Action Buttons */
.action-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--primary-color);
    font-size: 20px;
    margin-right: 6px;
    transition: color 0.3s ease;
}

.action-btn:hover {
    color: var(--secondary-color);
}

/* ===============================
   📄 Pagination Controls
   =============================== */
#paginationControls {
    text-align: center;
    margin-top: 15px;
}

#paginationControls .page-btn {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: #fff;
    margin: 0 4px;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
    font-size: 0.9rem;
}

#paginationControls .page-btn:hover {
    background: var(--primary-color);
}

#paginationControls .page-btn.active {
    background: var(--secondary-color);
    font-weight: bold;
}

/* ===============================
   🔎 Search Box (Optional)
   =============================== */
.dynamic-search-box {
    text-align: right;
    margin-bottom: 10px;
}

.dynamic-search-box input {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #ccc;
    width: 250px;
    max-width: 100%;
    font-size: 0.9rem;
}

/* ===============================
   📱 Responsive Tweaks
   =============================== */
@media (max-width: 600px) {
    .dynamic-table {
        min-width: unset;
        font-size: 13px;
    }

    .dynamic-search-box input {
        width: 100%;
        margin-bottom: 10px;
    }
}



/* =============================== */
/* ✏️ nxAdmin.css Globle Button Elements Styling        */
/* =============================== */

/* Button with Icon Styling */
.nx-btn-icon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    font-size: 14px;
    transition: background 0.3s, box-shadow 0.3s;
}

.nx-btn-icon .material-icons-outlined {
    font-size: 18px;
}

/* Example for Primary Button */
.nx-btn-primary {
    background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 25px;
    cursor: pointer;
}

.nx-btn-primary:hover {
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.4);
}


/* =============================== 
   🎯 GridList Actions (Consistent Top Right Button)
   =============================== */
   .gridlist-actions {
    margin-bottom: 15px;
    text-align: right;
}


/* =============================== 
   🎯 Global Tooltip (Minimal + Premium)
   =============================== */
#nxGlobalTooltip {
  position: fixed;
  pointer-events: none;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  background: rgba(0, 242, 254, 0.08);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  border-radius: 10px;
  white-space: nowrap;
  z-index: 99999;

  /* Soft shadow without glow */
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);

  /* Initial hidden state */
  opacity: 0;
  transform: translate(-50%, 0) scale(0.95);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

#nxGlobalTooltip.show {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}
