:root {
    --bg-primary: #f4f6f9;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    
    --color-accent: #0284c7; /* Sky Blue */
    --color-accent-hover: #0369a1;
    --color-success: #10b981; /* Emerald */
    --color-warning: #f59e0b; /* Amber */
    --color-danger: #ef4444;  /* Rose */
    --color-info: #0ea5e9;    /* Sky */
    
    --font-sans: "Segoe UI Variable", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.05), 0 4px 15px -2px rgba(0, 0, 0, 0.02);
    --transition: color .16s ease, background-color .16s ease, border-color .16s ease, box-shadow .18s ease, transform .18s ease, opacity .16s ease;
    --theme-button-text: #ffffff;
    --theme-sidebar-text: #475569;
    --theme-sidebar-active-text: #ffffff;
    --theme-header-text: #1e293b;
    --theme-angle: 135deg;
    --sidebar-gradient: linear-gradient(var(--theme-angle), #ffffff, #ffffff);
    --header-gradient: linear-gradient(var(--theme-angle), #ffffff, #ffffff);
    --card-gradient: linear-gradient(var(--theme-angle), #ffffff, #ffffff);
    --table-header-gradient: linear-gradient(var(--theme-angle), #f8fafc, #eef2ff);
    --table-row-bg: #ffffff;
    --theme-card-radius: 12px;
    --theme-shadow: var(--shadow-sm);
}

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

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-sans);
    min-height: 100vh;
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* Panel Containers */
.glass-panel {
    background: var(--card-gradient);
    border: 1px solid var(--border-color);
    border-radius: var(--theme-card-radius);
    box-shadow: var(--theme-shadow);
    transition: var(--transition);
}

.glass-panel:hover {
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.06);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: var(--transition);
}
a:hover {
    color: var(--color-accent-hover);
}

/* Form Inputs */
input, select, textarea {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    padding: 12px 16px;
    font-size: 0.95rem;
    width: 100%;
    outline: none;
    transition: var(--transition);
}

input:focus, select:focus, textarea:focus {
    border-color: var(--color-accent);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.1);
}

label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-family: var(--font-sans);
    transition: var(--transition);
    gap: 6px;
}

.btn-primary {
    background: linear-gradient(var(--theme-angle), var(--color-accent), var(--color-info));
    color: var(--theme-button-text);
}
.btn-primary:hover {
    background: var(--color-accent-hover);
}

.btn-secondary {
    background: #f1f5f9;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover {
    background: #e2e8f0;
}

.btn-danger {
    background: var(--color-danger);
    color: white;
}
.btn-danger:hover {
    background: #dc2626;
}

.btn-success {
    background: var(--color-success);
    color: white;
}
.btn-success:hover {
    background: #059669;
}

/* Table Action Buttons & Icon Utilities */
.icon-svg {
    width: 16px;
    height: 16px;
    stroke-width: 2;
    stroke: currentColor;
    fill: none;
    vertical-align: middle;
}
.icon-svg-large {
    width: 20px;
    height: 20px;
    stroke-width: 2;
    stroke: currentColor;
    fill: none;
    vertical-align: middle;
}

.action-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    text-decoration: none;
    user-select: none;
}

/* Icon-only button */
.btn-action-icon {
    width: 32px;
    padding: 0;
}

/* Button with text */
.btn-action-text {
    padding: 0 12px;
    gap: 6px;
}

/* Success / Complete */
.btn-action-success {
    background-color: #dcfce7;
    color: #15803d;
    border-color: #bbf7d0;
}
.btn-action-success:hover {
    background-color: #bbf7d0;
    color: #166534;
}

/* Alert / Warning */
.btn-action-warning {
    background-color: #fef3c7;
    color: #b45309;
    border-color: #fde68a;
}
.btn-action-warning:hover {
    background-color: #fde68a;
    color: #92400e;
}

/* Edit / Secondary */
.btn-action-secondary {
    background-color: #f1f5f9;
    color: #475569;
    border-color: #e2e8f0;
}
.btn-action-secondary:hover {
    background-color: #e2e8f0;
    color: #334155;
}

/* Danger / Delete */
.btn-action-danger {
    background-color: #fee2e2;
    color: #b91c1c;
    border-color: #fecaca;
}
.btn-action-danger:hover {
    background-color: #fecaca;
    color: #991b1b;
}

/* Clean SVG Icon Inside Action Button */
.btn-action svg, .menu-link svg, .app-header svg, .service-card svg {
    flex-shrink: 0;
}

.auth-wrapper {
    display: flex;
    min-height: 100vh;
    background: #ffffff;
}

.auth-split-left {
    flex: 1;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px;
    color: white;
    position: relative;
    overflow: hidden;
}

.auth-split-left::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.15) 0%, transparent 70%);
    top: -100px;
    left: -100px;
    border-radius: 50%;
}

.auth-split-left h1 {
    font-size: 3.5rem;
    color: white;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.auth-split-left p {
    font-size: 1.2rem;
    color: #cbd5e1;
    max-width: 400px;
    line-height: 1.6;
}

.auth-split-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    padding: 40px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    padding: 40px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}

.auth-header {
    text-align: left;
    margin-bottom: 30px;
}
.auth-header h2 {
    font-size: 2rem;
    margin-top: 10px;
}
.auth-header p {
    color: var(--text-muted);
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: rgba(2, 132, 199, 0.1);
    border: 1px solid rgba(2, 132, 199, 0.2);
    color: var(--color-accent);
    font-size: 1.3rem;
    font-weight: bold;
}

.form-group {
    margin-bottom: 16px;
}

.error-text {
    color: var(--color-danger);
    font-size: 0.75rem;
    margin-top: 4px;
    display: block;
}

/* App Grid Layout */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: var(--sidebar-gradient);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-right: 1px solid var(--border-color);
}

.sidebar-logo {
    font-size: 1.3rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 30px;
    color: var(--text-primary);
    padding-left: 8px;
}

.sidebar-logo span {
    color: var(--color-accent); /* sky-400 */
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.menu-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    color: var(--theme-sidebar-text);
    font-size: 0.95rem;
    font-weight: 600;
    transition: var(--transition);
}

.menu-link:hover {
    background: #f8fafc;
    color: var(--color-accent);
}

.menu-link.active {
    background: linear-gradient(var(--theme-angle), var(--color-accent), var(--color-info));
    color: var(--theme-sidebar-active-text);
    font-weight: 700;
    position: relative;
}

.menu-link.active::before {
    content: '';
    position: absolute;
    left: -16px;
    top: 50%;
    transform: translateY(-50%);
    height: 60%;
    width: 4px;
    background: var(--color-accent);
    border-radius: 0 4px 4px 0;
}

.sidebar-profile {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.profile-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.95rem;
}

.profile-info {
    flex-grow: 1;
    overflow: hidden;
}

.profile-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-role {
    font-size: 0.7rem;
    color: #64748b;
    text-transform: uppercase;
}

.logout-btn {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
}

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

/* Content Area */
.content-panel {
    margin-left: 250px;
    width: calc(100% - 250px);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sidebar Collapsed State */
.sidebar-collapsed .sidebar {
    transform: translateX(-250px);
}
.sidebar-collapsed .content-panel {
    margin-left: 0;
    width: 100%;
}

.app-header {
    background: var(--header-gradient);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 90;
}

.app-header, .app-header button, .app-header span { color: var(--theme-header-text); }

.header-title h1 {
    font-size: 1.3rem;
}

.header-title p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.app-body {
    padding: 30px;
    flex-grow: 1;
}

/* Dashboard Cards & Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 30px;
}

@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* Premium Card Design */
.premium-card {
    background: var(--card-gradient);
    border: 1px solid var(--border-color);
    border-radius: var(--theme-card-radius);
    padding: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -1px rgba(0, 0, 0, 0.01);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 140px;
}

.premium-card:hover {
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.07);
}

.premium-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.premium-card-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.premium-icon-wrapper {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.premium-card-value {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.premium-card-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 8px;
    font-weight: 500;
}

/* Color Variants for Icons */
.icon-blue { background: rgba(14, 165, 233, 0.1); color: #0ea5e9; }
.icon-indigo { background: rgba(99, 102, 241, 0.1); color: #6366f1; }
.icon-emerald { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.icon-rose { background: rgba(244, 63, 94, 0.1); color: #f43f5e; }
.icon-amber { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.icon-slate { background: rgba(100, 116, 139, 0.1); color: #64748b; }

/* Segmented Controls (Modern Tabs) */
.segmented-control {
    display: inline-flex;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 10px;
    gap: 4px;
}

.segment-btn {
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.segment-btn:hover {
    color: var(--text-primary);
}

.segment-btn.active {
    background: #ffffff;
    color: var(--color-accent);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Key Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}

.service-card {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: rgba(2, 132, 199, 0.25);
}

.service-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.service-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.new-badge {
    background: var(--color-danger);
    color: white;
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 700;
}

/* Tables (Premium) */
.custom-table-wrapper {
    overflow-x: auto;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    background: var(--table-row-bg);
    border-radius: var(--theme-card-radius);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
    background: var(--table-row-bg);
}

.custom-table th {
    background: var(--table-header-gradient);
    padding: 16px 20px;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.custom-table td {
    background: var(--table-row-bg);
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    font-weight: 500;
}

.custom-table tr:last-child td {
    border-bottom: none;
}

.custom-table tr:hover td {
    background: color-mix(in srgb, var(--color-accent) 8%, var(--table-row-bg));
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

.badge-danger { background: rgba(239, 68, 68, 0.1); color: var(--color-danger); }
.badge-warning { background: rgba(245, 158, 11, 0.1); color: var(--color-warning); }
.badge-success { background: rgba(16, 185, 129, 0.1); color: var(--color-success); }
.badge-info { background: rgba(14, 165, 233, 0.1); color: var(--color-info); }
.badge-secondary { background: rgba(100, 116, 139, 0.1); color: var(--text-secondary); }

/* Layout Split */
.layout-split {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    align-items: start;
}

@media (max-width: 1200px) {
    .layout-split {
        grid-template-columns: 1fr;
    }
}

.right-section {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Sticky Yellow Note */
.sticky-note {
    background: #fef08a; /* Soft Yellow */
    border: 1px solid #fde047;
    color: #713f12;
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.sticky-note h4 {
    color: #713f12;
    margin-bottom: 8px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Latest Updates Feed */
.updates-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.update-item {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.update-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.update-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
}
.update-title:hover {
    color: var(--color-accent);
}

.update-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Floating Call buttons matching ComplyRelax */
.floating-call {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 50px;
    height: 50px;
    background: #0ea5e9;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.4);
    cursor: pointer;
    transition: var(--transition);
    z-index: 999;
}
.floating-call:hover {
    transform: scale(1.1);
}

.chat-bubble-mascot {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    background: #f1f5f9;
    border-radius: 8px;
    padding: 10px;
    border: 1px solid var(--border-color);
}
.chat-mascot-img {
    width: 32px;
    height: 32px;
}
.chat-mascot-txt {
    font-size: 0.75rem;
    font-weight: 600;
}
.chat-mascot-sub {
    font-size: 0.65rem;
    color: var(--text-secondary);
}

/* Drag and Drop Handle Styling */
.drag-handle {
    display: inline-flex;
    align-items: center;
    color: var(--text-muted);
    opacity: 0.5;
    transition: var(--transition);
    cursor: grab;
}
tr:hover .drag-handle {
    opacity: 1;
    color: var(--text-secondary);
}

.header-shortcut-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: var(--transition);
}

.header-shortcut-btn:hover {
    color: var(--text-primary);
    background-color: #f1f5f9;
}

/* Premium Segmented Tab Selector */
.tabs-buttons {
    display: inline-flex;
    gap: 6px;
    background: #f8fafc;
    padding: 6px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: #f1f5f9;
}

.tab-btn.active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--color-accent), var(--color-info));
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
    transform: translateY(-1px);
}

/* Premium Pagination Styling (Ultra-Modern SaaS Design) */
nav[role="navigation"] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 0;
    margin-top: 2rem;
    border-top: 1px solid var(--border-color, #e2e8f0);
}

/* Hide mobile simple view on desktop */
nav[role="navigation"] > div:first-child {
    display: none;
}

nav[role="navigation"] > div:last-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

nav[role="navigation"] p {
    margin: 0;
    color: var(--text-secondary, #64748b);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Main Wrapper */
nav[role="navigation"] span.relative.z-0.inline-flex {
    display: inline-flex;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border-color, #e2e8f0);
    overflow: hidden;
    padding: 4px;
    gap: 4px;
}

/* All Buttons (Links and Spans) */
nav[role="navigation"] span.relative.z-0.inline-flex a,
nav[role="navigation"] span.relative.z-0.inline-flex > span {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary, #475569);
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    background: transparent;
    cursor: pointer;
}

/* Remove weird inner borders from default Laravel html */
nav[role="navigation"] span.relative.z-0.inline-flex * {
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
}

/* Inner elements for nested spans */
nav[role="navigation"] span.relative.z-0.inline-flex > span > span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Hover State for Links */
nav[role="navigation"] span.relative.z-0.inline-flex a:hover {
    background-color: #f1f5f9;
    color: var(--color-primary, #0f172a);
}

/* Active Page Style */
nav[role="navigation"] span[aria-current="page"] {
    background: linear-gradient(135deg, var(--color-accent, #3b82f6), var(--color-info, #0ea5e9)) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3) !important;
}

nav[role="navigation"] span[aria-current="page"] * {
    color: #ffffff !important;
}

/* Disabled Arrows Style */
nav[role="navigation"] span[aria-disabled="true"] {
    color: #cbd5e1 !important;
    background-color: transparent !important;
    cursor: not-allowed !important;
    opacity: 0.5;
}

/* Constraint on Icons */
nav[role="navigation"] svg {
    width: 18px !important;
    height: 18px !important;
}

/* Tenant Theme Studio: global surfaces and tables */
.content-panel {
    background: var(--bg-primary);
}

.content-panel > div[style*="background: #ffffff"],
.content-panel > div > div[style*="background: #ffffff"] {
    background: var(--card-gradient) !important;
}

.content-panel table:not(.custom-table) {
    background: var(--table-row-bg);
    border-color: var(--border-color);
    border-radius: var(--theme-card-radius);
    overflow: hidden;
}

.content-panel table:not(.custom-table) thead,
.content-panel table:not(.custom-table) thead tr,
.content-panel table:not(.custom-table) thead th {
    background: var(--table-header-gradient) !important;
    color: var(--text-primary);
}

.content-panel table:not(.custom-table) tbody td {
    background: var(--table-row-bg);
    border-color: var(--border-color);
}

.content-panel table:not(.custom-table) tbody tr:hover td {
    background: color-mix(in srgb, var(--color-accent) 8%, var(--table-row-bg));
}

.content-panel .glass-panel,
.content-panel .premium-card,
.content-panel .service-card,
.content-panel .custom-table-wrapper {
    border-radius: var(--theme-card-radius);
    box-shadow: var(--theme-shadow);
}

/* Override legacy inline surfaces so every existing module participates in theming. */
.tenant-themed .content-panel [style*="background: #ffffff"],
.tenant-themed .content-panel [style*="background:#ffffff"],
.tenant-themed .content-panel [style*="background: white"],
.tenant-themed .content-panel [style*="background:white"] {
    background: var(--card-gradient) !important;
}

.tenant-themed .content-panel [style*="background: #f8fafc"],
.tenant-themed .content-panel [style*="background:#f8fafc"],
.tenant-themed .content-panel [style*="background: #f1f5f9"],
.tenant-themed .content-panel [style*="background:#f1f5f9"] {
    background: color-mix(in srgb, var(--color-accent) 6%, var(--table-row-bg)) !important;
}

.tenant-themed .btn-primary,
.tenant-themed .tab-btn.active {
    background: linear-gradient(var(--theme-angle), var(--color-accent), var(--color-info)) !important;
    color: var(--theme-button-text) !important;
}

.tenant-themed input:not([type="color"]):not([type="range"]),
.tenant-themed select,
.tenant-themed textarea,
.tenant-themed .segmented-control,
.tenant-themed .tabs-buttons {
    background: color-mix(in srgb, var(--color-accent) 4%, var(--table-row-bg));
    color: var(--text-primary);
    border-color: var(--border-color);
}

.tenant-themed .sidebar-logo,
.tenant-themed .sidebar-profile,
.tenant-themed .profile-name,
.tenant-themed .profile-role,
.tenant-themed .logout-btn { color: var(--theme-sidebar-text); }

/* Smooth rendering profile: keep interaction feedback without repainting the page. */
button, a, input, select, textarea,
.btn, .menu-link, .segment-btn, .premium-card, .glass-panel {
    transition-property: color, background-color, border-color, box-shadow, opacity, transform;
    transition-duration: .16s;
    transition-timing-function: ease-out;
}

.sidebar,
.top-header,
.drawer-container,
.global-popup-dialog {
    backface-visibility: hidden;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
