/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border-radius: 0 !important;
}

html, :host {
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Layout Utilities */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }

/* Flexbox */
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-start { justify-content: flex-start; }
.justify-end { justify-content: flex-end; }
.flex-1 { flex: 1 1 0%; }

/* Spacing */
.space-x-2 > * + * { margin-left: 0.5rem; }
.space-x-4 > * + * { margin-left: 1rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }

.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

/* Width */
.w-full { width: 100%; }
.w-auto { width: auto; }
.w-64 { width: 16rem; }
.w-48 { width: 12rem; }
.w-32 { width: 8rem; }
.w-24 { width: 6rem; }
.w-20 { width: 5rem; }
.w-16 { width: 4rem; }
.w-12 { width: 3rem; }
.w-8 { width: 2rem; }
.w-6 { width: 1.5rem; }
.w-4 { width: 1rem; }
.max-w-md { max-width: 28rem; }
.max-w-lg { max-width: 32rem; }
.max-w-xl { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-6xl { max-width: 72rem; }
.max-w-full { max-width: 100%; }

/* Height */
.h-full { height: 100%; }
.h-screen { height: 100vh; }
.min-h-screen { min-height: 100vh; }
.min-h-full { min-height: 100%; }

/* Padding */
.p-0 { padding: 0; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.pt-2 { padding-top: 0.5rem; }
.pt-4 { padding-top: 1rem; }
.pb-2 { padding-bottom: 0.5rem; }
.pb-4 { padding-bottom: 1rem; }
.pl-2 { padding-left: 0.5rem; }
.pr-2 { padding-right: 0.5rem; }

/* Margin */
.m-0 { margin: 0; }
.m-1 { margin: 0.25rem; }
.m-2 { margin: 0.5rem; }
.m-4 { margin: 1rem; }
.m-8 { margin: 2rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mx-2 { margin-left: 0.5rem; margin-right: 0.5rem; }
.mx-4 { margin-left: 1rem; margin-right: 1rem; }
.my-2 { margin-top: 0.5rem; margin-bottom: 0.5rem; }
.my-4 { margin-top: 1rem; margin-bottom: 1rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-10 { margin-top: 2.5rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.ml-2 { margin-left: 0.5rem; }
.mr-2 { margin-right: 0.5rem; }

/* Text */
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }

.font-thin { font-weight: 100; }
.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

.uppercase { text-transform: uppercase; }
.lowercase { text-transform: lowercase; }
.capitalize { text-transform: capitalize; }

.underline { text-decoration: underline; }
.no-underline { text-decoration: none; }

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Colors - Gray Scale */
.text-gray-50 { color: #f9fafb; }
.text-gray-100 { color: #f3f4f6; }
.text-gray-200 { color: #e5e7eb; }
.text-gray-300 { color: #d1d5db; }
.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; }
.text-gray-700 { color: #374151; }
.text-gray-800 { color: #1f2937; }
.text-gray-900 { color: #111827; }

.bg-gray-50 { background-color: #f9fafb; }
.bg-gray-100 { background-color: #f3f4f6; }
.bg-gray-200 { background-color: #e5e7eb; }
.bg-gray-300 { background-color: #d1d5db; }
.bg-gray-400 { background-color: #9ca3af; }
.bg-gray-500 { background-color: #6b7280; }
.bg-gray-600 { background-color: #4b5563; }
.bg-gray-700 { background-color: #374151; }
.bg-gray-800 { background-color: #1f2937; }
.bg-gray-900 { background-color: #111827; }

.border-gray-200 { border-color: #e5e7eb; }
.border-gray-300 { border-color: #d1d5db; }
.border-gray-400 { border-color: #9ca3af; }

/* Colors - Blue */
.text-blue-500 { color: #3b82f6; }
.text-blue-600 { color: #2563eb; }
.bg-blue-500 { background-color: #3b82f6; }
.bg-blue-600 { background-color: #2563eb; }
.border-blue-500 { border-color: #3b82f6; }

/* Colors - Purple */
.text-purple-500 { color: #a855f7; }
.text-purple-600 { color: #9333ea; }
.bg-purple-500 { background-color: #a855f7; }
.bg-purple-600 { background-color: #9333ea; }
.bg-purple-700 { background-color: #7e22ce; }
.border-purple-500 { border-color: #a855f7; }

/* Colors - Green */
.text-green-500 { color: #10b981; }
.text-green-600 { color: #059669; }
.bg-green-500 { background-color: #10b981; }
.bg-green-600 { background-color: #059669; }
.border-green-500 { border-color: #10b981; }

/* Colors - Red */
.text-red-500 { color: #ef4444; }
.text-red-600 { color: #dc2626; }
.bg-red-500 { background-color: #ef4444; }
.bg-red-600 { background-color: #dc2626; }
.border-red-500 { border-color: #ef4444; }

/* Colors - Yellow */
.text-yellow-500 { color: #eab308; }
.text-yellow-600 { color: #ca8a04; }
.bg-yellow-500 { background-color: #eab308; }
.bg-yellow-600 { background-color: #ca8a04; }

/* Colors - White/Black */
.text-white { color: #ffffff; }
.text-black { color: #000000; }
.bg-white { background-color: #ffffff; }
.bg-black { background-color: #000000; }

/* Borders */
.border { border-width: 1px; }
.border-0 { border-width: 0; }
.border-2 { border-width: 2px; }
.border-t { border-top-width: 1px; }
.border-b { border-bottom-width: 1px; }
.border-l { border-left-width: 1px; }
.border-r { border-right-width: 1px; }

.border-solid { border-style: solid; }
.border-dashed { border-style: dashed; }

.rounded { border-radius: 0.25rem; }
.rounded-sm { border-radius: 0.125rem; }
.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }
.rounded-t { border-top-left-radius: 0.25rem; border-top-right-radius: 0.25rem; }
.rounded-b { border-bottom-left-radius: 0.25rem; border-bottom-right-radius: 0.25rem; }

/* Shadows */
.shadow { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }
.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); }
.shadow-xl { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }

/* Overflow */
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.overflow-scroll { overflow: scroll; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }

/* Position */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }

/* Z-index */
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-30 { z-index: 30; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }

/* Cursor */
.cursor-pointer { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }
.cursor-default { cursor: default; }

/* User Select */
.select-none { user-select: none; }
.select-text { user-select: text; }
.select-all { user-select: all; }

/* Opacity */
.opacity-0 { opacity: 0; }
.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }
.opacity-100 { opacity: 1; }

/* Transitions */
.transition { transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-colors { transition-property: color, background-color, border-color, text-decoration-color, fill, stroke; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-all { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }

/* Hover States */
.hover\:bg-gray-50:hover { background-color: #f9fafb; }
.hover\:bg-gray-100:hover { background-color: #f3f4f6; }
.hover\:bg-gray-200:hover { background-color: #e5e7eb; }
.hover\:bg-purple-700:hover { background-color: #7e22ce; }
.hover\:bg-blue-600:hover { background-color: #2563eb; }
.hover\:text-gray-700:hover { color: #374151; }
.hover\:text-blue-500:hover { color: #3b82f6; }
.hover\:text-blue-600:hover { color: #2563eb; }

/* Focus States */
.focus\:outline-none:focus { outline: 2px solid transparent; outline-offset: 2px; }
.focus\:ring:focus { box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5); }
.focus\:ring-2:focus { box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5); }
.focus\:ring-purple-500:focus { box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.5); }
.focus\:ring-blue-500:focus { box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5); }
.focus\:ring-offset-2:focus { box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(59, 130, 246, 0.5); }
.focus\:border-blue-500:focus { border-color: #3b82f6; }

/* Responsive - Mobile First */
@media (min-width: 640px) {
    .sm\:block { display: block; }
    .sm\:hidden { display: none; }
    .sm\:text-sm { font-size: 0.875rem; line-height: 1.25rem; }
}

@media (min-width: 768px) {
    .md\:block { display: block; }
    .md\:hidden { display: none; }
    .md\:flex { display: flex; }
    .md\:p-8 { padding: 2rem; }
    .md\:px-8 { padding-left: 2rem; padding-right: 2rem; }
    .md\:py-4 { padding-top: 1rem; padding-bottom: 1rem; }
}

@media (min-width: 1024px) {
    .lg\:block { display: block; }
    .lg\:hidden { display: none; }
    .lg\:flex { display: flex; }
}

/* Custom Animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.animate-slide-in {
    animation: slideInRight 0.3s ease-out;
}

/* Hide spinner arrows for number inputs */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

th {
    font-weight: 600;
    background-color: #f9fafb;
}

/* Form Styles */
input, textarea, select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 1rem;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

button {
    cursor: pointer;
    font-weight: 500;
    transition: all 0.15s ease-in-out;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Utility Classes */
.container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .container { max-width: 640px; }
}

@media (min-width: 768px) {
    .container { max-width: 768px; }
}

@media (min-width: 1024px) {
    .container { max-width: 1024px; }
}

@media (min-width: 1280px) {
    .container { max-width: 1280px; }
}

/* --- Application Shell --- */
:root {
    color-scheme: light;
    --bg: #f4f6fb;
    --surface: #ffffff;
    --border: #e5e7eb;
    --text: #111827;
    --muted: #6b7280;
    --primary: #2563eb;
    --primary-soft: rgba(37, 99, 235, 0.08);
}

body {
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

.theme-dark {
    --bg: #0f172a;
    --surface: #1e293b;
    --border: #22314b;
    --text: #f8fafc;
    --muted: #94a3b8;
    color-scheme: dark;
}

.app-shell {
    min-height: 100vh;
    display: flex;
}

.sidebar {
    width: 260px;
    background: #111827;
    color: #e5e7eb;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    transition: width 0.3s ease;
    overflow: hidden;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    z-index: 100;
    overflow-y: auto;
}

.sidebar--collapsed {
    width: 72px;
    padding: 1.5rem 0.75rem;
}

.sidebar__brand-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.sidebar__icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.sidebar__label {
    white-space: nowrap;
}

.sidebar--collapsed .sidebar__brand-text,
.sidebar--collapsed .sidebar__subtitle,
.sidebar--collapsed .sidebar__title {
    display: none;
}

.sidebar--collapsed .sidebar__toggle {
    margin-left: 0;
    margin-right: auto;
}

.sidebar--collapsed .sidebar__link {
    justify-content: center;
    padding: 0.5rem;
    width: 100%;
}

.sidebar--collapsed .sidebar__brand {
    justify-content: center;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar--collapsed .sidebar__logo {
    margin: 0 auto;
}

.sidebar--collapsed .sidebar__label {
    display: none;
}

.sidebar__brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar__logo {
    font-size: 1.8rem;
}

.sidebar__title {
    font-weight: 600;
}

.sidebar__subtitle {
    font-size: 0.82rem;
    color: #9ca3af;
}

.sidebar__toggle {
    margin-left: auto;
    border: none;
    background: transparent;
    color: inherit;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: background 0.2s ease;
    min-width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar__toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar__nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sidebar__link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.75rem;
    border-radius: 0.5rem;
    color: inherit;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s ease;
}

.sidebar__link:hover {
    background: rgba(255, 255, 255, 0.08);
}

.sidebar__link--active {
    background: #2563eb;
    color: #fff;
}

.main {
    flex: 1;
    padding: 2rem;
    display: flex;
    overflow-x: hidden;
    flex-direction: column;
    gap: 1.5rem;
    margin-left: 260px;
    transition: margin-left 0.3s ease;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.25rem;
}

.topbar__welcome {
    color: var(--muted);
    font-size: 0.85rem;
}

.topbar__actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dashboard-global-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-right: 0.5rem;
}

.dashboard-global-search-input {
    min-width: 300px;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.65rem;
    background: var(--surface);
    color: inherit;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.dashboard-global-search-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.profile-pill {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg);
    border-radius: 999px;
    padding: 0.25rem 0.75rem;
}

.profile-pill__avatar {
    background: var(--primary);
    color: #fff;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 600;
}

.page-content {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.03);
}

.card--stat {
    text-align: left;
}

.card__label {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 0.25rem;
}

.card__value {
    font-size: 1.6rem;
    font-weight: 700;
}

.card__header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.card__actions {
    display: flex;
    gap: 0.5rem;
}

.table-wrapper {
    overflow-x: auto;
}

.input {
    border: 1px solid var(--border);
    border-radius: 0.65rem;
    padding: 0.55rem 0.85rem;
    background: transparent;
    color: inherit;
}

.input--search {
    min-width: 220px;
}

.btn {
    border: none;
    border-radius: 0.65rem;
    padding: 0.45rem 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn--primary {
    background: var(--primary);
    color: #fff;
}

.btn--success {
    background: #16a34a;
    border: 1px solid #15803d;
    color: #fff;
}

.btn--danger {
    border: 1px solid var(--danger, #ef4444);
    color: #fff;
    background: #dc2626;
}

.btn--ghost {
    background: transparent;
    border: 1px solid var(--border);
    color: inherit;
}

.btn--small {
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
}

.btn--pill {
    border-radius: 999px;
    padding: 0.5rem 1.4rem;
}

.btn--ghost.btn--pill {
    border-color: #c7d2fe;
    color: #1d4ed8;
}

.form-helper {
    font-size: 0.85rem;
    color: var(--muted);
    margin: -0.25rem 0 0.75rem;
}

.text-success {
    color: #059669;
    font-weight: 600;
}

.text-danger {
    color: #b91c1c;
    font-weight: 600;
}

.profile-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.profile-link:hover {
    text-decoration: underline;
}

.profile-modal {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.profile-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.overview-card {
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1rem;
    background: var(--surface);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.overview-card__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.5rem;
}

.overview-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.summary-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.summary-pill {
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    min-width: 150px;
    background: var(--surface);
}

.summary-pill span {
    font-size: 0.8rem;
    color: var(--muted);
}

.summary-pill strong {
    font-size: 1.1rem;
    display: block;
    margin-top: 0.2rem;
}

.agent-details-modal {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.overview-card__grid--two {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.text-strong {
    font-weight: 600;
    color: var(--text);
}

.agent-details__actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.agent-profile-page {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.agent-profile__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.agent-profile__card {
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.25rem;
    background: var(--surface);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.agent-profile__title {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.agent-profile__cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.agent-profile__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.agent-profile__stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.stat-card {
    border-radius: 0.75rem;
    padding: 1rem;
    background: #f5f3ff;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.3rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.pill--permission {
    background: #eef2ff;
    color: #3730a3;
}

.permissions-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* --- Billings --- */
.billings-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.billings-toolbar__chips {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.chip {
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text-strong, #0f172a);
    font-weight: 600;
    padding: 0.45rem 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.chip--early-bird {
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #475569;
    font-weight: 500;
    padding: 0.5rem 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.chip--early-bird .chip-icon {
    font-size: 1rem;
    color: #475569;
    font-weight: 400;
}

.chip--solid {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
    box-shadow: 0 12px 25px rgba(37, 99, 235, 0.25);
}

.chip--ghost {
    border-style: dashed;
    color: #2563eb;
    background: #f8fafc;
}

.billings-toolbar__actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.lookup-field {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.lookup-results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    border: 1px solid var(--border);
    border-radius: 0.9rem;
    background: #fff;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.15);
    max-height: 220px;
    overflow-y: auto;
    display: none;
    z-index: 50;
}

.lookup-results--visible {
    display: block;
}

.lookup-results button {
    width: 100%;
    border: none;
    background: transparent;
    text-align: left;
    padding: 0.55rem 0.85rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.lookup-results button strong {
    font-weight: 600;
    color: #0f172a;
}

.lookup-results button span {
    font-size: 0.85rem;
    color: var(--muted);
}

.lookup-results button:hover {
    background: rgba(37, 99, 235, 0.08);
}

.modal__form--billings input[readonly] {
    background: #f8fafc;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group input {
    padding-right: 3rem;
    width: 100%;
}

.input-icon-btn {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 1rem;
    z-index: 1;
}

.input-icon-btn:hover {
    color: #475569;
}

.input-readonly {
    background: #f8fafc !important;
    cursor: not-allowed;
    color: #64748b;
}

.payment-options {
    margin-bottom: 1.5rem;
}

.payment-options__label {
    display: block;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.payment-options__buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.payment-option-btn {
    padding: 0.6rem 1.25rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: #fff;
    color: #475569;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
    text-align: center;
}

.payment-option-btn:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.payment-option-btn--active {
    border-width: 2px;
    font-weight: 600;
}

.payment-option-btn[data-method="Cash"].payment-option-btn--active {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1e40af;
}

.payment-option-btn[data-method="Online"].payment-option-btn--active {
    background: #d1fae5;
    border-color: #6ee7b7;
    color: #065f46;
}

.payment-option-btn[data-method="Borrow"].payment-option-btn--active {
    background: #fed7aa;
    border-color: #fdba74;
    color: #9a3412;
}

.payment-option-btn[data-method="Agent"].payment-option-btn--active {
    background: #fef3c7;
    border-color: #fde68a;
    color: #78350f;
}

.payment-option-btn--status[data-status="Unpaid"].payment-option-btn--active {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #475569;
}

.payment-option-btn--status[data-status="Pending"].payment-option-btn--active {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #f59e0b;
}

.payment-option-btn--status[data-status="Completed"].payment-option-btn--active {
    background: #d1fae5;
    border-color: #6ee7b7;
    color: #047857;
}

.billings-filters {
    margin-bottom: 1.25rem;
}

.card--billings {
    padding: 0;
    overflow: hidden;
}

.card--billings .table-wrapper {
    border-radius: 1rem;
    overflow-x: auto;
    overflow-y: visible;
    display: block;
    max-width: 100%;
}

.card--customers {
    padding: 0;
    overflow: hidden;
}

.card--customers .table-wrapper {
    border-radius: 1rem;
    overflow-x: auto;
    overflow-y: visible;
    display: block;
    max-width: 100%;
}

/* Customers page - sticky action column on right */
.card .table-wrapper {
    overflow-x: auto;
    overflow-y: visible;
    position: relative;
    -webkit-overflow-scrolling: touch;
}

.table--customers {
    width: 100%;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table--customers th,
.table--customers td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    vertical-align: middle;
    white-space: nowrap;
}

.table--customers th:last-child,
.table--customers td:last-child {
    border-right: none;
}

.table--customers th {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    color: var(--muted);
    background: #f8fafc;
    position: sticky;
    top: 0;
    z-index: 5;
}

.table--customers tbody tr:hover {
    background: #f8fafc;
}

.table--customers tbody tr:last-child td {
    border-bottom: none;
}

/* Phone number column - ensure full visibility */
.table--customers td:nth-child(4),
.table--customers th:nth-child(4) {
    min-width: 140px;
    white-space: nowrap;
}

.table--customers .sticky-column-right {
    position: sticky !important;
    right: 0;
    background: #fff !important;
    z-index: 10;
    box-shadow: -2px 0 4px rgba(0, 0, 0, 0.1);
    min-width: 120px;
    white-space: nowrap;
}

.table--customers thead .sticky-column-right {
    z-index: 20;
    background: #fff !important;
    position: sticky !important;
}

/* Agents table - borders between columns and rows */
.table--agents th,
.table--agents td {
    vertical-align: middle;
    border-bottom: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    padding: 0.75rem 1rem;
}

.table--agents th:last-child,
.table--agents td:last-child {
    border-right: none;
}

.table--agents tbody tr:last-child td {
    border-bottom: none;
}

.table--agents th {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    color: var(--muted);
    background: #f8fafc;
}

.table--agents tbody tr:hover {
    background: #f8fafc;
}

/* Managers Table */
.table--managers {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

.table--managers th,
.table--managers td {
    vertical-align: middle;
    border-bottom: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    padding: 0.75rem 1rem;
    white-space: nowrap;
}

.table--managers th:last-child,
.table--managers td:last-child {
    border-right: none;
}

.table--managers tbody tr:last-child td {
    border-bottom: none;
}

.table--managers th {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    color: var(--muted);
    background: #f8fafc;
    position: sticky;
    top: 0;
    z-index: 5;
}

.table--managers tbody tr:hover {
    background: #f8fafc;
}

.table--managers td:nth-child(7),
.table--managers td:nth-child(8) {
    white-space: normal;
    max-width: 200px;
}

/* Sliding columns mode - sticky first 3 columns */
.table-wrapper--sliding {
    overflow-x: auto;
    overflow-y: visible;
    position: relative;
    -webkit-overflow-scrolling: touch;
}

.table-wrapper--sliding table {
    border-collapse: separate !important;
    border-spacing: 0;
    width: auto;
    min-width: 100%;
    table-layout: fixed;
}

/* Fixed widths for sticky columns */
.table-wrapper--sliding .sticky-column:nth-child(1) {
    width: 100px !important;
    min-width: 100px !important;
    max-width: 100px !important;
}

.table-wrapper--sliding .sticky-column:nth-child(2) {
    width: 140px !important;
    min-width: 140px !important;
    max-width: 140px !important;
}

.table-wrapper--sliding .sticky-column:nth-child(3) {
    width: 220px !important;
    min-width: 220px !important;
    max-width: 220px !important;
}

.table-wrapper--sliding .sticky-column {
    position: sticky !important;
    background: #fff !important;
    z-index: 10;
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
    will-change: transform;
}

.table-wrapper--sliding tbody .sticky-column:nth-child(1) {
    left: 0;
    z-index: 12;
    background: #fff !important;
}

.table-wrapper--sliding tbody .sticky-column:nth-child(2) {
    left: 100px; /* Width of S.NO column */
    z-index: 11;
    background: #fff !important;
}

.table-wrapper--sliding tbody .sticky-column:nth-child(3) {
    left: 240px; /* Width of S.NO + Provider columns (100 + 140) */
    z-index: 10;
    background: #fff !important;
}

.table-wrapper--sliding thead .sticky-column {
    z-index: 20;
    background: #fff !important;
    position: sticky !important;
}

.table-wrapper--sliding thead .sticky-column:nth-child(1) {
    left: 0;
    z-index: 22;
    background: #fff !important;
}

.table-wrapper--sliding thead .sticky-column:nth-child(2) {
    left: 100px;
    z-index: 21;
    background: #fff !important;
}

.table-wrapper--sliding thead .sticky-column:nth-child(3) {
    left: 240px;
    z-index: 20;
    background: #fff !important;
}

.table--billings th,
.table--billings td {
    vertical-align: middle;
    white-space: nowrap;
    border-bottom: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    padding: 0.75rem 1rem;
}

.table--billings th:last-child,
.table--billings td:last-child {
    border-right: none;
}

.table--billings tbody tr:last-child td {
    border-bottom: none;
}

/* Ensure sticky columns don't shrink or grow and stay fixed */
.table-wrapper--sliding th.sticky-column,
.table-wrapper--sliding td.sticky-column {
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0.75rem;
    flex-shrink: 0;
}

/* Prevent any transform or movement on sticky columns */
.table-wrapper--sliding .sticky-column {
    transform: none !important;
    -webkit-transform: none !important;
}

.table--billings th {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    color: var(--muted);
}

.provider-cell {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
}

.provider-avatar {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    color: #fff;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    text-transform: uppercase;
}

.customer-cell {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.customer-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f1f5f9;
    font-size: 0.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    text-transform: uppercase;
    flex-shrink: 0;
    line-height: 1;
}

.provider-image-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0;
}

.provider-image {
    max-width: 40px;
    max-height: 40px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 0.25rem;
}

.provider-image-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
}

.link--customer {
    color: #1d4ed8;
    font-weight: 600;
    text-decoration: none;
}

.link--customer:hover {
    text-decoration: underline;
}

.pill-input {
    display: inline-flex;
    min-width: 72px;
    justify-content: center;
    border-radius: 0.75rem;
    padding: 0.2rem 0.8rem;
    border: 1px solid #cbd5f5;
    background: #f8fbff;
    font-weight: 600;
    color: #1d4ed8;
}

.pill-input--amount {
    border-color: #2563eb;
}

.advance-pill {
    border-radius: 0.6rem;
    padding: 0.2rem 0.75rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.advance-pill--positive {
    background: rgba(16, 185, 129, 0.15);
    color: #047857;
}

.advance-pill--negative {
    background: rgba(248, 113, 113, 0.2);
    color: #b91c1c;
}

.advance-pill--neutral {
    background: rgba(226, 232, 240, 0.7);
    color: #475569;
}

.table-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.table-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.table-input[readonly] {
    background: #f8fafc;
    cursor: default;
}

.table-input--amount {
    color: #1e293b;
}

.table-input--amount::placeholder {
    color: transparent;
    opacity: 0;
    transition: color 0.2s, opacity 0.2s;
}

.table-input--amount:focus::placeholder {
    color: #94a3b8;
    opacity: 0.7;
}

.table-input--advance {
    text-align: center;
    font-weight: 600;
}

.table-input--advance.table-input--positive {
    color: #047857;
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
}

.table-input--advance.table-input--negative {
    color: #b91c1c;
    background: rgba(248, 113, 113, 0.1);
    border-color: rgba(248, 113, 113, 0.3);
}

.table-input--advance.table-input--neutral {
    color: #475569;
    background: rgba(226, 232, 240, 0.3);
}

.date-input-cell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
}

.table-input--date {
    width: 100%;
    cursor: pointer;
}

.date-icon {
    font-size: 1.25rem;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: background-color 0.2s;
}

.date-icon:hover {
    background-color: #f1f5f9;
}

.table-input--date::-webkit-calendar-picker-indicator {
    opacity: 0;
    position: absolute;
    right: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.dropdown-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 0.75rem;
    background: #e0e7ff;
    color: #1e3a8a;
    font-weight: 600;
    padding: 0.2rem 0.9rem;
}

.dropdown-pill::after {
    content: '▾';
    font-size: 0.7rem;
}

.table-select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
    text-overflow: clip;
    overflow: visible;
}

.table-select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.table-select--method {
    font-weight: 600;
    min-width: 130px;
    width: 100%;
    text-overflow: clip;
    overflow: visible;
}

.table-select--method option[value="Select Method"] {
    background: #fff;
    color: #475569;
}

.table-select--method option[value="Cash"] {
    background: #dbeafe;
    color: #1e40af;
}

.table-select--method option[value="Online"] {
    background: #d1fae5;
    color: #065f46;
}

.table-select--method option[value="Borrow"] {
    background: #fed7aa;
    color: #9a3412;
}

.table-select--method option[value="Agent"] {
    background: #fef3c7;
    color: #78350f;
}

.table-select--status {
    font-weight: 600;
    min-width: 130px;
    width: 100%;
    text-overflow: clip;
    overflow: visible;
}

.table-select--status option[value="Unpaid"] {
    background: #f1f5f9;
    color: #475569;
}

.table-select--status option[value="Pending"] {
    background: #f1f5f9;
    color: #f59e0b;
}

.table-select--status option[value="Completed"] {
    background: #d1fae5;
    color: #047857;
}

.payment-pill {
    border-radius: 0.75rem;
    padding: 0.25rem 0.85rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.payment-pill--success {
    background: rgba(16, 185, 129, 0.15);
    color: #047857;
}

.payment-pill--warning {
    background: rgba(251, 191, 36, 0.2);
    color: #92400e;
}

.payment-pill--danger {
    background: rgba(239, 68, 68, 0.15);
    color: #b91c1c;
}

.payment-pill--neutral {
    background: rgba(148, 163, 184, 0.2);
    color: #475569;
}

.table-sn-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.sn-cell {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.sn-column {
    width: auto;
    min-width: 60px;
}

.sn-column--expanded {
    min-width: 180px;
    width: auto;
}

.switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.switch__track {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #e2e8f0;
    border-radius: 12px;
    transition: background-color 0.2s ease;
}

.switch__track::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: #ffffff;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease;
}

.switch input:checked + .switch__track {
    background: #2563eb;
}

.switch input:checked + .switch__track::after {
    transform: translateX(20px);
}

.mac-cell {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.table-header-with-icons {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.table-header-icons {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.icon-btn--header {
    padding: 0.25rem;
    font-size: 0.85rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.icon-btn--header:hover {
    opacity: 1;
}

.copy-icon {
    display: inline-block;
    vertical-align: middle;
    color: currentColor;
}

.undo-icon {
    display: inline-block;
    vertical-align: middle;
    color: currentColor;
}

.mac-dropdown {
    position: relative;
    display: inline-flex;
}

.mac-dropdown__trigger {
    min-width: 7rem;
}

.mac-dropdown__menu {
    position: absolute;
    top: 110%;
    right: 0;
    min-width: 9rem;
    background: #ffffff;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.18);
    padding: 0.5rem 0;
    z-index: 20;
    display: none;
}

.mac-dropdown__menu--open {
    display: block;
}

.mac-dropdown__menu button {
    width: 100%;
    text-align: left;
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    font-size: 0.9rem;
    cursor: pointer;
}

.mac-dropdown__menu button:hover {
    background: #f3f4f6;
}

.mac-modal {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    min-width: 260px;
}

.mac-modal__tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

.mac-tab {
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    background: #ffffff;
    cursor: pointer;
}

.mac-tab--active {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.mac-modal__body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mac-modal__date label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.85rem;
}

.mac-modal__date input[type='date'] {
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid #d1d5db;
    font-size: 0.9rem;
}

.mac-modal__actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mac-modal__copy {
    width: 100%;
}

.icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 0.65rem;
    border: 1px solid var(--border);
    background: #f8fafc;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.icon-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 15px rgba(15, 23, 42, 0.15);
}

.icon-btn--ghost {
    color: #475569;
}

.icon-btn--primary {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.billings-actions {
    display: inline-flex;
    gap: 0.4rem;
}

.toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background: rgba(15, 23, 42, 0.95);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.35s ease, transform 0.35s ease;
    z-index: 9999;
}

.toast--visible {
    opacity: 1;
    transform: translateY(0);
}

.packages-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.packages-toolbar__actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn--filter {
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
}

.table-search {
    margin-bottom: 1rem;
    display: none;
}

.table-search.table-search--visible {
    display: block;
}

.btn--import {
    background: #16a34a;
    color: #fff;
    border: 1px solid #16a34a;
    padding: 0.55rem 1.25rem;
    border-radius: 0.65rem;
    font-weight: 600;
}

.btn--export {
    background: #7c3aed;
    color: #fff;
    border: 1px solid #7c3aed;
    padding: 0.55rem 1.25rem;
    border-radius: 0.65rem;
    font-weight: 600;
}

.packages-filters {
    margin-bottom: 1rem;
}

.complaints-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.btn--filter {
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
}

.table-search {
    margin-bottom: 1rem;
}

.card--complaints {
    padding: 0;
    overflow: hidden;
}

.table--complaints th,
.table--complaints td {
    vertical-align: middle;
    border-bottom: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    padding: 0.75rem 1rem;
}

.table--complaints th:last-child,
.table--complaints td:last-child {
    border-right: none;
}

.table--complaints tbody tr:last-child td {
    border-bottom: none;
}

.priority-pill {
    border-radius: 999px;
    padding: 0.25rem 0.75rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.priority-pill--high {
    background: rgba(248, 113, 113, 0.2);
    color: #b91c1c;
}

.priority-pill--low {
    background: rgba(250, 204, 21, 0.25);
    color: #92400e;
}

.priority-pill--medium {
    background: rgba(59, 130, 246, 0.2);
    color: #1d4ed8;
}

.status-dropdown {
    border-radius: 0.6rem;
    border: 1px solid var(--border);
    padding: 0.35rem 0.6rem;
    background: #fff;
}

.complaint-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.customer-picker .picker-table {
    max-height: 360px;
    overflow-y: auto;
}

.customer-picker table {
    width: 100%;
}

.customer-picker th,
.customer-picker td {
    padding: 0.6rem;
    border-bottom: 1px solid var(--border);
}

.complaint-detail-card {
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    background: var(--surface);
    margin-bottom: 1rem;
}

.complaint-detail-card h3 {
    margin-bottom: 0.75rem;
}

.complaint-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.status-pill {
    display: inline-block;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.2);
    color: #047857;
    padding: 0.2rem 0.8rem;
    font-weight: 600;
}

.profile-page {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.profile-page__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.complaints-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.complaint-item {
    display: flex;
    justify-content: space-between;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    align-items: center;
    gap: 1rem;
}

.manager-profile {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.manager-hero {
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.1);
    background: #fff;
}

.manager-hero__banner {
    height: 140px;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
}

.manager-hero__info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 1rem 2rem;
    text-align: center;
}

.manager-avatar {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    border: 6px solid #fff;
    background: #1e3a8a;
    color: #fff;
    font-size: 1.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -60px;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.2);
}

.manager-subtitle {
    color: var(--muted);
    margin: 0;
}

.manager-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
    color: #0f172a;
    font-weight: 500;
}

.manager-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
}

.manager-card {
    border-radius: 1.25rem;
    background: #fff;
    padding: 1.5rem;
    box-shadow: 0 20px 35px rgba(15, 23, 42, 0.08);
}

.manager-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.manager-form label {
    font-size: 0.9rem;
    color: #0f172a;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.manager-form input {
    border-radius: 999px;
    border: 1px solid var(--border);
    padding: 0.65rem 1rem;
    font-size: 0.95rem;
}

.manager-form__actions {
    display: flex;
    gap: 0.75rem;
}

.card--packages {
    padding: 0;
    overflow: hidden;
}

.table--packages th,
.table--packages td {
    vertical-align: middle;
    border-bottom: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    padding: 0.75rem 1rem;
}

.table--packages th:last-child,
.table--packages td:last-child {
    border-right: none;
}

.table--packages tbody tr:last-child td {
    border-bottom: none;
}

.plan-actions {
    display: inline-flex;
    gap: 0.5rem;
}

.action-btn {
    border-radius: 0.6rem;
    padding: 0.35rem 0.85rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    color: #fff;
}

.action-btn--edit {
    background: #2563eb;
}

.action-btn--delete {
    background: #dc2626;
}

.networks-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.card--networks {
    padding: 1.5rem;
}

.networks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.network-tile {
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1rem;
    background: var(--surface);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.06);
}

.network-tile__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.network-name {
    font-weight: 700;
    font-size: 1.15rem;
}

.network-pill {
    align-self: flex-start;
    border-radius: 999px;
    padding: 0.2rem 0.75rem;
    font-weight: 600;
    background: rgba(59, 130, 246, 0.1);
    color: #1d4ed8;
}

.network-pill--cable {
    background: rgba(251, 191, 36, 0.2);
    color: #a16207;
}

.network-pill--internet {
    background: rgba(59, 130, 246, 0.2);
    color: #1d4ed8;
}

.network-note {
    color: var(--muted);
}

.network-note strong {
    color: var(--text-strong, #111827);
}

.network-edit {
    background: none;
    border: none;
    color: #2563eb;
    font-weight: 600;
    cursor: pointer;
}

.form-label {
    font-weight: 600;
    margin-top: 0.5rem;
}

.service-toggle {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.service-pill {
    border-radius: 0.9rem;
    padding: 0.45rem 1.5rem;
    border: 1px solid var(--border);
    background: #fff;
    font-weight: 600;
    cursor: pointer;
}

.service-pill--active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.25);
}

.date-options {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}

.date-fields > .hidden {
    display: none;
}

.date-fields label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.file-field input[type="file"] {
    border: 1px dashed var(--border);
    padding: 0.4rem;
    border-radius: 0.5rem;
    background: #fff;
}

.permissions-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.permissions-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    min-width: 220px;
    max-width: 360px;
    width: 100%;
}

.permissions-search input {
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
    font-size: 0.95rem;
}

.permissions-search__icon {
    font-size: 0.95rem;
}

.text-muted {
    color: var(--muted, #6b7280);
}

.permissions-page {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.permissions-page__inner {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.permissions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.permissions-card {
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    padding: 1.5rem;
    background: var(--surface);
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.permissions-card__head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.permissions-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.permissions-selected {
    font-weight: 600;
    color: var(--text-strong, #111827);
}

.permissions-search--full {
    max-width: none;
    border-radius: 999px;
}

.permissions-editor {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.permission-group-card {
    border: 1px solid var(--border);
    border-radius: 1rem;
    background: #f8fafc;
    padding: 0.75rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.permission-group-card__header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.permission-group-card__toggle {
    width: 32px;
    height: 32px;
    border-radius: 0.6rem;
    border: 1px solid var(--border);
    background: #fff;
    font-size: 1rem;
    cursor: pointer;
}

.permission-group-card__count {
    margin-left: auto;
    font-weight: 600;
    color: var(--muted);
}

.permission-group-card__body {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.65rem;
}

.permission-checkbox {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 500;
    background: #fff;
    padding: 0.55rem 0.75rem;
    border-radius: 0.75rem;
    border: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.permission-checkbox:hover {
    border-color: var(--primary-light, #c7d2fe);
}

.permission-checkbox input {
    width: auto;
}

.btn--bubble {
    border-radius: 999px;
    padding: 0.85rem 1.75rem;
    border: 1px solid #c7d2fe;
    background: #fff;
    color: #1d4ed8;
    font-weight: 600;
    min-width: 180px;
    text-align: center;
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.1);
}

.btn--bubble-solid {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.25);
}

.modal__form--grid .grid--two {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.grid--two {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.grid--three {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.checkbox-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.checkbox-inline input {
    width: auto;
}

.scroll-x {
    overflow-x: auto;
}

.table--compact th,
.table--compact td {
    white-space: nowrap;
    padding: 0.6rem;
    font-size: 0.9rem;
}

.profile-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.complaints-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.complaint-card {
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--surface);
}

.complaint-card__meta {
    font-size: 0.85rem;
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.profile-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.grid--split {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 768px) {
    .grid--split {
        grid-template-columns: 1fr;
    }
}

.status {
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: capitalize;
}

.status--active {
    background: rgba(16, 185, 129, 0.15);
    color: #047857;
}

.status--inactive,
.status--suspended {
    background: rgba(244, 63, 94, 0.15);
    color: #be123c;
}

.status--overdue,
.status--pending {
    background: rgba(251, 191, 36, 0.2);
    color: #92400e;
}

.status--completed {
    background: rgba(16, 185, 129, 0.2);
    color: #047857;
}

.status--open,
.status--in-progress {
    background: rgba(14, 165, 233, 0.2);
    color: #0369a1;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    color: var(--muted);
    margin-bottom: 0.25rem;
}

.eyebrow--highlight {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
    font-weight: 600;
}

.page-heading {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.permission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.permission-block {
    border: 1px dashed var(--border);
    border-radius: 0.75rem;
    padding: 1rem;
    background: #f8fafc;
}

.card--empty {
    text-align: center;
    padding: 3rem;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

/* --- Welcome / Landing --- */
.welcome-page {
    min-height: 100vh;
    background: var(--bg);
    display: flex;
    flex-direction: column;
}

.welcome-bar {
    max-width: 1080px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.welcome-brand {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.welcome-logo {
    width: 40px;
    height: 40px;
}

.welcome-nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.welcome-nav a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
}

.welcome-hero {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1080px;
    margin: 0 auto;
    width: 100%;
    padding: 2rem 1rem 3rem;
    align-items: center;
}

.welcome-copy h1 {
    font-size: clamp(2rem, 3vw, 3.2rem);
    margin: 0.5rem 0 1rem;
}

.welcome-cta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin: 1.5rem 0;
}

.welcome-checklist {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    color: var(--muted);
}

.welcome-checklist li::before {
    content: '✓';
    color: var(--primary);
    font-weight: 700;
    margin-right: 0.4rem;
}

.welcome-panel {
    background: var(--surface);
    border-radius: 1.25rem;
    border: 1px solid var(--border);
    padding: 1.5rem;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
}

.welcome-footer {
    text-align: center;
    padding: 1.5rem;
    color: var(--muted);
    font-size: 0.95rem;
}

.role-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.role-card {
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1rem;
    background: var(--surface);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.role-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.role-card--hidden {
    display: none;
}

.role-card--hidden.role-card--show {
    display: flex;
}

.role-hint {
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: 0.5rem;
}

/* --- Auth --- */
.auth-page {
    min-height: 100vh;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-card {
    width: min(420px, 100%);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    padding: 2rem;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
}

.auth-card__header h1 {
    font-size: 2rem;
    margin: 0.4rem 0 0.5rem;
}

.auth-card__form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem 0;
}

.auth-card__form label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-weight: 500;
}

.auth-card__footer {
    text-align: center;
    color: var(--muted);
}

.auth-card__footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

/* New Login Page Styles - Two Column Layout */
.login-page {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow: hidden;
}

.login-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Left Section - Blue Gradient with Illustration */
.login-left {
    flex: 0 0 60%;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #60a5fa 100%);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-illustration {
    width: 100%;
    max-width: 600px;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dashboard-illustration {
    width: 100%;
    height: auto;
    opacity: 0.95;
}

.login-pagination {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
}

.pagination-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: transparent;
}

.pagination-dot.active {
    background: #fff;
    border-color: #fff;
}

/* Right Section - Login Form */
.login-right {
    flex: 0 0 40%;
    background: #faf5ff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-form-container {
    width: 100%;
    max-width: 400px;
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.logo-image {
    max-width: 200px;
    width: 100%;
    height: auto;
    margin-bottom: 1rem;
    display: block;
}

.logo-text {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e40af;
    margin: 0;
    letter-spacing: 0.02em;
}

.logo-tagline {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.5rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.login-heading {
    font-size: 2rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 2rem 0;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    position: relative;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: #fff;
    font-size: 1rem;
    color: #1e293b;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.login-form input[type="text"]:focus,
.login-form input[type="password"]:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.login-form input::placeholder {
    color: #94a3b8;
}

.password-group {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9333ea;
}

.password-toggle:hover {
    opacity: 0.7;
}

.btn-login {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
}

.btn-login:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-login:active {
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 968px) {
    .login-container {
        flex-direction: column;
    }
    
    .login-left {
        flex: 0 0 40%;
        min-height: 40vh;
    }
    
    .login-right {
        flex: 1;
    }
}

@media (max-width: 640px) {
    .login-left {
        display: none;
    }
    
    .login-right {
        flex: 1;
    }
    
    .login-form-container {
        max-width: 100%;
    }
}

.table-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.table-toolbar__row {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.toolbar-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn--outline {
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn--ghost {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn--ghost {
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
}

.btn--icon {
    border: 1px solid var(--border);
    background: transparent;
    border-radius: 999px;
    padding: 0.4rem 0.5rem;
    cursor: pointer;
}

.btn--small {
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
}

.table-search {
    margin-bottom: 1rem;
    transition: opacity 0.3s ease, transform 0.3s ease;
    overflow: hidden;
}

.table-actions {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    justify-content: flex-end;
}

.table-actions--center {
    justify-content: center;
}

.table--customers th,
.table--customers td {
    vertical-align: middle;
}

.filters-card {
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.25rem;
    background: var(--surface);
    margin-bottom: 1rem;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
    transition: opacity 0.3s ease, transform 0.3s ease;
    overflow: hidden;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.filters-grid label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-weight: 600;
    color: var(--text);
}

.filters-panel__footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.table-footer {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    background: var(--surface);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}

.table-footer__info {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    font-size: 0.95rem;
}

.table-footer__info label {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    font-weight: 500;
}

.table-footer__pagination {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.page-pill {
    display: inline-flex;
    min-width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    padding: 1rem;
}

.modal {
    background: var(--surface);
    border-radius: 1rem;
    border: 1px solid var(--border);
    padding: 1.5rem;
    width: min(90vw, 800px);
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal--compact {
    width: min(90vw, 420px);
}

.modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal__header h2 {
    margin: 0;
}

.modal__title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.modal__subtitle {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0.25rem 0 0 0;
}

.modal--large {
    max-width: 800px;
    width: 90%;
}

.modal__form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.modal__actions {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    justify-content: flex-end;
    align-items: center;
    margin-top: 0.5rem;
    width: 100%;
}

.modal__actions .btn {
    flex-shrink: 0;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.role-link {
    display: none;
}

.role-link.role-link--show {
    display: inline-flex;
}

