/* Profluo Premium Light Mode Dashboard Stylesheet */

:root {
    /* Color Palette */
    --bg-primary: #f8fafc;
    --bg-secondary: #f1f5f9;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;
    
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    
    --success: #10b981;
    --success-light: #ecfdf5;
    
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    
    --danger: #f43f5e;
    --danger-light: #fff1f2;
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    /* Layout Configurations */
    --sidebar-width: 260px;
    --topbar-height: 70px;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;
    
    /* Shadows */
    --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 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Global Reset & Base Setup */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

/* Scrollbars styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--border-hover);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Global Layout Shell */
.app-container {
    display: flex;
    min-height: 100vh;
}

.hidden {
    display: none !important;
}

/* Fullscreen Global App Loader */
.app-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Sidebar Navigation */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-card);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header {
    padding: 24px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header .logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-header .logo img {
    height: 36px;
    width: auto;
}

.logo-text {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

/* Business Switcher */
.business-switcher-container {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.field-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.custom-select-wrapper {
    position: relative;
}

.business-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background-color: var(--bg-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s, background-color 0.2s;
    appearance: none;
}

.business-select:hover {
    border-color: var(--border-hover);
    background-color: var(--bg-card);
}

.business-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.custom-select-wrapper::after {
    content: "▼";
    font-size: 9px;
    color: var(--text-secondary);
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

/* Sidebar Links */
.sidebar-nav {
    flex: 1;
    padding: 20px 12px;
    overflow-y: auto;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 550;
    border-radius: var(--border-radius-sm);
    transition: all 0.2s;
}

.nav-link i {
    width: 18px;
    height: 18px;
    stroke-width: 2px;
}

.nav-link:hover {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.nav-link.active {
    background-color: var(--primary-light);
    color: var(--primary);
}

/* Sidebar Footer & User Profile */
.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-widget {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    flex: 1;
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.user-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.user-name-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.user-role-text {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: capitalize;
}

.btn-logout {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.btn-logout i {
    width: 18px;
    height: 18px;
}

/* Main Workspace */
.main-workspace {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100vh;
    overflow: hidden;
}

/* Top bar (Glassmorphism Light Header) */
.top-bar {
    height: var(--topbar-height);
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 90;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--text-primary);
}

.view-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.topbar-btn:hover {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.topbar-btn i {
    width: 20px;
    height: 20px;
}

.badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background-color: var(--danger);
    color: white;
    font-size: 9px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--bg-card);
}

.topbar-profile img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: transform 0.2s;
}

.topbar-profile img:hover {
    transform: scale(1.05);
}

/* Notifications dropdown panel */
.notification-trigger-container {
    position: relative;
}

.notifications-panel {
    position: absolute;
    right: 0;
    top: 45px;
    width: 320px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    z-index: 150;
    overflow: hidden;
    animation: scaleIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95) translateY(-10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.panel-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.panel-header h3 {
    font-size: 14px;
    font-weight: 700;
}

.btn-text {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

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

.panel-body {
    max-height: 280px;
    overflow-y: auto;
}

.notification-item {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background-color 0.2s;
}

.notification-item:hover {
    background-color: var(--bg-primary);
}

.notification-item.unread {
    background-color: var(--primary-light);
}

.notification-item h4 {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 2px;
}

.notification-item p {
    font-size: 12px;
    color: var(--text-secondary);
}

.notification-item .time {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 4px;
    display: block;
}

.empty-state {
    padding: 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

/* Main App View render area */
.app-view {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
}

/* Container spacing for Views */
.view-container {
    max-width: 1200px;
    margin: 0 auto;
    animation: fadeInSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInSlideUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Header summary layouts inside views */
.view-header-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    gap: 16px;
}

.view-header-title h2 {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.view-header-title p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* UI General Components: Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.btn i {
    width: 16px;
    height: 16px;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

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

.btn-secondary {
    background-color: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background-color: var(--bg-secondary);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

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

.btn-danger:hover {
    background-color: #e11d48;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

/* UI Components: Cards Grid and Cards */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.card-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title i {
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
}

.card-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.card-subtext {
    font-size: 12px;
    color: var(--text-secondary);
}

.card-subtext.positive {
    color: var(--success);
    font-weight: 600;
}

.card-subtext.negative {
    color: var(--danger);
    font-weight: 600;
}

/* Two column dashboards layout */
.dashboard-grid-columns {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

.section-panel {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.section-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-panel-header h3 {
    font-size: 16px;
    font-weight: 700;
}

/* UI Table Components */
.table-wrapper {
    overflow-x: auto;
    margin-top: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 14px;
}

.data-table th {
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    font-weight: 600;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    vertical-align: middle;
}

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

.data-table tbody tr:hover {
    background-color: var(--primary-light);
    cursor: pointer;
}

/* Status Badges */
.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: capitalize;
}

.status-pill.active, .status-pill.paid, .status-pill.completed, .status-pill.verified {
    background-color: var(--success-light);
    color: var(--success);
}

.status-pill.pending, .status-pill.sent, .status-pill.draft {
    background-color: var(--warning-light);
    color: var(--warning);
}

.status-pill.overdue, .status-pill.suspended, .status-pill.cancelled {
    background-color: var(--danger-light);
    color: var(--danger);
}

/* Auth / Login Signup Page Layouts */
.auth-page-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-secondary);
    padding: 20px;
    background-image: radial-gradient(var(--border-color) 1px, transparent 1px);
    background-size: 20px 20px;
}

.auth-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 440px;
    padding: 40px;
    animation: scaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header img {
    height: 48px;
    margin-bottom: 16px;
}

.auth-header h2 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 4px;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background-color: var(--bg-card);
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.auth-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--primary);
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Global Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-container {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 580px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 700;
}

.modal-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close-btn:hover {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.modal-content-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

/* Toast Alerts Notification System */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background-color: var(--bg-card);
    border-left: 4px solid var(--primary);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-lg);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    font-weight: 550;
    animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    min-width: 280px;
    max-width: 400px;
}

@keyframes toastIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.toast.success { border-left-color: var(--success); }
.toast.warning { border-left-color: var(--warning); }
.toast.danger { border-left-color: var(--danger); }

/* Quick Lists */
.list-group {
    list-style: none;
}

.list-group-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.list-group-item:last-child {
    border-bottom: none;
}

/* Skeletons Loaders Styling */
.skeleton {
    background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--border-color) 50%, var(--bg-secondary) 75%);
    background-size: 200% 100%;
    animation: loadingSkeleton 1.5s infinite;
    border-radius: var(--border-radius-sm);
}

.skeleton-text {
    height: 14px;
    margin-bottom: 8px;
}

.skeleton-title {
    height: 24px;
    width: 60%;
    margin-bottom: 16px;
}

@keyframes loadingSkeleton {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Messaging Split Box Layout */
.messaging-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    height: calc(100vh - var(--topbar-height) - 64px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: var(--bg-card);
    overflow: hidden;
}

.message-sidebar {
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.message-sidebar-search {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.message-list {
    flex: 1;
    overflow-y: auto;
}

.message-preview-item {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background-color 0.2s;
}

.message-preview-item:hover {
    background-color: var(--bg-primary);
}

.message-preview-item.active {
    background-color: var(--primary-light);
}

.message-preview-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.message-sender {
    font-size: 13px;
    font-weight: 700;
}

.message-time {
    font-size: 11px;
    color: var(--text-muted);
}

.message-preview-subject {
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    margin-bottom: 2px;
}

.message-preview-body {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.message-content-area {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.message-content-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.message-subject-title {
    font-size: 15px;
    font-weight: 700;
}

.message-thread-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    background-color: var(--bg-primary);
}

.message-bubble-wrapper {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.message-bubble-wrapper.received {
    align-items: flex-start;
}

.message-bubble-wrapper.sent {
    align-items: flex-end;
}

.message-bubble-info {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.message-bubble {
    padding: 12px 16px;
    border-radius: 16px;
    max-width: 70%;
    font-size: 13.5px;
    box-shadow: var(--shadow-sm);
}

.received .message-bubble {
    background-color: var(--bg-card);
    border-bottom-left-radius: 2px;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.sent .message-bubble {
    background-color: var(--primary);
    border-bottom-right-radius: 2px;
    color: white;
}

.message-reply-composer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-card);
}

/* Multi-step/item Invoices */
.invoice-items-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}

.invoice-items-table th, .invoice-items-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
}

/* Search bar filter panels */
.filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-input-wrapper {
    flex: 1;
    position: relative;
    min-width: 240px;
}

.search-input-wrapper i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

.search-input-wrapper input {
    padding-left: 36px;
}

/* Responsive Breakpoints Rules */
@media (max-width: 992px) {
    .dashboard-grid-columns {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        transform: translateX(-100%);
        box-shadow: var(--shadow-xl);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .sidebar-toggle {
        display: block;
    }
    
    .messaging-layout {
        grid-template-columns: 1fr;
    }
    
    .message-sidebar {
        display: block;
    }
    
    .message-content-area {
        display: none;
    }
    
    .message-content-area.active {
        display: flex;
        position: fixed;
        top: var(--topbar-height);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--topbar-height));
        background: var(--bg-card);
        z-index: 200;
}

/* Neighborhood Perks Styling Extensions */
.perks-tab-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.perks-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: var(--border-radius-sm);
    background: transparent;
    color: var(--text-secondary);
    font-size: 13.5px;
    font-weight: 550;
    cursor: pointer;
    transition: all 0.2s ease;
}

.perks-tab-btn i {
    width: 16px;
    height: 16px;
}

.perks-tab-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.perks-tab-btn.active {
    background: var(--primary-light);
    color: var(--primary);
    border-color: transparent;
}

.perks-tab-content.hidden {
    display: none !important;
}

.perks-ledger-header-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
    margin-bottom: 24px;
}

@media (max-width: 992px) {
    .perks-ledger-header-grid {
        grid-template-columns: 1fr;
    }
}

.perks-wallet-card {
    position: relative;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #6d28d9 100%);
    color: #ffffff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 140px;
    border: none !important;
    z-index: 1;
}

.wallet-card-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.15), transparent 60%);
    z-index: -1;
}

.wallet-card-content .card-label {
    font-size: 11px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 6px;
}

.wallet-card-content .card-value {
    font-size: 32px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.wallet-card-content .card-subtext {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.4;
}

.perks-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

@media (max-width: 576px) {
    .perks-stats-grid {
        grid-template-columns: 1fr;
    }
}

.stat-mini-card {
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.stat-mini-card.stat-earned {
    background-color: #f0fdf4;
    border-color: #bbf7d0;
}

.stat-mini-card.stat-paid {
    background-color: #fef2f2;
    border-color: #fecaca;
}

.stat-mini-card.stat-fees {
    background-color: #fffbeb;
    border-color: #fef3c7;
}

.stat-mini-card .stat-label {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-mini-card .stat-sub {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

.perks-partnerships-layout {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 24px;
    align-items: start;
}

@media (max-width: 992px) {
    .perks-partnerships-layout {
        grid-template-columns: 1fr;
    }
}

/* Custom Checkbox/Toggle Surfaces styling */
.toggle-surface input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 32px;
    height: 18px;
    border-radius: 9px;
    background-color: var(--border-hover);
    position: relative;
    outline: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
    vertical-align: middle;
}

.toggle-surface input[type="checkbox"]:checked {
    background-color: var(--success);
}

.toggle-surface input[type="checkbox"]::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: #ffffff;
    top: 2px;
    left: 2px;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.toggle-surface input[type="checkbox"]:checked::after {
    transform: translateX(14px);
}
