:root {
    --background: #faf9f5;
    --foreground: #3d3929;
    --card: #faf9f5;
    --card-foreground: #141413;
    --popover: #ffffff;
    --popover-foreground: #28261b;
    --primary: #c96442;
    --primary-foreground: #ffffff;
    --secondary: #e9e6dc;
    --secondary-foreground: #535146;
    --muted: #ede9de;
    --muted-foreground: #83827d;
    --accent: #e9e6dc;
    --accent-foreground: #28261b;
    --destructive: #141413;
    --destructive-foreground: #ffffff;
    --border: #dad9d4;
    --input: #b4b2a7;
    --ring: #c96442;
    --chart-1: #b05730;
    --chart-2: #9c87f5;
    --chart-3: #ded8c4;
    --chart-4: #dbd3f0;
    --chart-5: #b4552d;
    --sidebar: #f5f4ee;
    --sidebar-foreground: #3d3d3a;
    --sidebar-primary: #c96442;
    --sidebar-primary-foreground: #fbfbfb;
    --sidebar-accent: #e9e6dc;
    --sidebar-accent-foreground: #343434;
    --sidebar-border: #ebebeb;
    --sidebar-ring: #b5b5b5;
    --font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
    --font-serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    --radius: 0.5rem;
    --shadow-x: 0;
    --shadow-y: 1px;
    --shadow-blur: 3px;
    --shadow-spread: 0px;
    --shadow-opacity: 0.1;
    --shadow-color: oklch(0 0 0);
    --shadow-2xs: 0 1px 3px 0px hsl(0 0% 0% / 0.05);
    --shadow-xs: 0 1px 3px 0px hsl(0 0% 0% / 0.05);
    --shadow-sm: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 1px 2px -1px hsl(0 0% 0% / 0.10);
    --shadow: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 1px 2px -1px hsl(0 0% 0% / 0.10);
    --shadow-md: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 2px 4px -1px hsl(0 0% 0% / 0.10);
    --shadow-lg: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 4px 6px -1px hsl(0 0% 0% / 0.10);
    --shadow-xl: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 8px 10px -1px hsl(0 0% 0% / 0.10);
    --shadow-2xl: 0 1px 3px 0px hsl(0 0% 0% / 0.25);
    --tracking-normal: 0em;
    --spacing: 0.25rem;
    /* Light Mode Colors */
    --color-background: #faf9f5;
    --color-foreground: #3d3929;
    --color-card: #faf9f5;
    --color-card-foreground: #141413;
    --color-popover: #ffffff;
    --color-popover-foreground: #28261b;
    --color-primary: #c96442;
    --color-primary-foreground: #ffffff;
    --color-secondary: #e9e6dc;
    --color-secondary-foreground: #535146;
    --color-muted: #ede9de;
    --color-muted-readonly: #e1ddd2;
    --color-muted-foreground: #83827d;
    --color-accent: #e9e6dc;
    --color-accent-foreground: #28261b;
    --color-border: #dad9d4;
    --color-input: #b4b2a7;
    --color-ring: #c96442;
    --color-destructive: #141413;
    --color-destructive-foreground: #ffffff;


    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 0.75rem;
    --spacing-lg: 1rem;
    --spacing-xl: 1.25rem;
    --spacing-2xl: 1.5rem;
    --spacing-3xl: 1.75rem;
    --spacing-4xl: 2rem;

    /* Border Radius */
    --radius-sm: 0.125rem;
    --radius-md: 0.25rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.875rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-xs: 0 1px 3px 0px hsl(0 0% 0% / 0.05);
    --shadow-sm: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 1px 2px -1px hsl(0 0% 0% / 0.10);
    --shadow-md: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 2px 4px -1px hsl(0 0% 0% / 0.10);
    --shadow-lg: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 4px 6px -1px hsl(0 0% 0% / 0.10);
}

html.dark {
    --background: #262624;
    --foreground: #c3c0b6;
    --card: #262624;
    --card-foreground: #faf9f5;
    --popover: #30302e;
    --popover-foreground: #e5e5e2;
    --primary: #d97757;
    --primary-foreground: #ffffff;
    --secondary: #faf9f5;
    --secondary-foreground: #30302e;
    --muted: #1b1b19;
    --muted-foreground: #b7b5a9;
    --accent: #1a1915;
    --accent-foreground: #f5f4ee;
    --destructive: #ef4444;
    --destructive-foreground: #ffffff;
    --border: #3e3e38;
    --input: #52514a;
    --ring: #d97757;
    --chart-1: #b05730;
    --chart-2: #9c87f5;
    --chart-3: #1a1915;
    --chart-4: #2f2b48;
    --chart-5: #b4552d;
    --sidebar: #1f1e1d;
    --sidebar-foreground: #c3c0b6;
    --sidebar-primary: #343434;
    --sidebar-primary-foreground: #fbfbfb;
    --sidebar-accent: #0f0f0e;
    --sidebar-accent-foreground: #c3c0b6;
    --sidebar-border: #ebebeb;
    --sidebar-ring: #b5b5b5;
    --font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
    --font-serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    --radius: 0.5rem;
    --shadow-x: 0;
    --shadow-y: 1px;
    --shadow-blur: 3px;
    --shadow-spread: 0px;
    --shadow-opacity: 0.1;
    --shadow-color: oklch(0 0 0);
    --shadow-2xs: 0 1px 3px 0px hsl(0 0% 0% / 0.05);
    --shadow-xs: 0 1px 3px 0px hsl(0 0% 0% / 0.05);
    --shadow-sm: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 1px 2px -1px hsl(0 0% 0% / 0.10);
    --shadow: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 1px 2px -1px hsl(0 0% 0% / 0.10);
    --shadow-md: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 2px 4px -1px hsl(0 0% 0% / 0.10);
    --shadow-lg: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 4px 6px -1px hsl(0 0% 0% / 0.10);
    --shadow-xl: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 8px 10px -1px hsl(0 0% 0% / 0.10);
    --shadow-2xl: 0 1px 3px 0px hsl(0 0% 0% / 0.25);
    --color-background: #262624;
    --color-foreground: #c3c0b6;
    --color-card: #262624;
    --color-card-foreground: #faf9f5;
    --color-popover: #30302e;
    --color-popover-foreground: #e5e5e2;
    --color-primary: #d97757;
    --color-primary-foreground: #ffffff;
    --color-secondary: #30302e;
    --color-secondary-foreground: #faf9f5;
    --color-muted: #1b1b19;
    --color-muted-foreground: #b7b5a9;
    --color-accent: #1a1915;
    --color-accent-foreground: #f5f4ee;
    --color-border: #3e3e38;
    --color-input: #52514a;
    --color-ring: #d97757;
    --color-destructive: #ef4444;
    --color-destructive-foreground: #ffffff;
}

@theme inline {
    --color-background: var(--background);
    --color-foreground: var(--foreground);
    --color-card: var(--card);
    --color-card-foreground: var(--card-foreground);
    --color-popover: var(--popover);
    --color-popover-foreground: var(--popover-foreground);
    --color-primary: var(--primary);
    --color-primary-foreground: var(--primary-foreground);
    --color-secondary: var(--secondary);
    --color-secondary-foreground: var(--secondary-foreground);
    --color-muted: var(--muted);
    --color-muted-foreground: var(--muted-foreground);
    --color-accent: var(--accent);
    --color-accent-foreground: var(--accent-foreground);
    --color-destructive: var(--destructive);
    --color-destructive-foreground: var(--destructive-foreground);
    --color-border: var(--border);
    --color-input: var(--input);
    --color-ring: var(--ring);
    --color-chart-1: var(--chart-1);
    --color-chart-2: var(--chart-2);
    --color-chart-3: var(--chart-3);
    --color-chart-4: var(--chart-4);
    --color-chart-5: var(--chart-5);
    --color-sidebar: var(--sidebar);
    --color-sidebar-foreground: var(--sidebar-foreground);
    --color-sidebar-primary: var(--sidebar-primary);
    --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
    --color-sidebar-accent: var(--sidebar-accent);
    --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
    --color-sidebar-border: var(--sidebar-border);
    --color-sidebar-ring: var(--sidebar-ring);

    --font-sans: var(--font-sans);
    --font-mono: var(--font-mono);
    --font-serif: var(--font-serif);

    --radius-sm: calc(var(--radius) - 4px);
    --radius-md: calc(var(--radius) - 2px);
    --radius-lg: var(--radius);
    --radius-xl: calc(var(--radius) + 4px);

    --shadow-2xs: var(--shadow-2xs);
    --shadow-xs: var(--shadow-xs);
    --shadow-sm: var(--shadow-sm);
    --shadow: var(--shadow);
    --shadow-md: var(--shadow-md);
    --shadow-lg: var(--shadow-lg);
    --shadow-xl: var(--shadow-xl);
    --shadow-2xl: var(--shadow-2xl);
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.5;
    min-height: 100vh;
}

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Typography */
h1 {
    font-size: 3rem;
    line-height: 1;
    font-weight: 700;
    color: var(--foreground);
}

h5 {
    font-size: 1.125rem;
    line-height: 1.75rem;
    font-weight: 600;
}

.text-muted {
    color: var(--muted-foreground);
}

.text-secondary {
    color: var(--muted-foreground);
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 1000;
    cursor: pointer;
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0.75rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.theme-toggle .material-icons-outlined {
    display: block;
    font-size: 1.25rem;
    color: var(--foreground);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    border-radius: var(--radius-lg);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

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

.btn-primary:hover {
    opacity: 0.9;
}

.btn-outline-primary {
    background-color: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

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

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.125rem;
}

/* Cards */
.card {
    background-color: var(--card);
    color: var(--card-foreground);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-header {
    background-color: var(--muted);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    background-color: var(--muted);
    border-top: 1px solid var(--border);
    padding: 1rem 1.5rem;
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
    position: relative;
}

.alert-success {
    background-color: var(--accent);
    color: var(--accent-foreground);
    border-color: var(--primary);
}

.alert-danger {
    background-color: var(--muted);
    color: var(--destructive);
    border-color: var(--destructive);
}

.alert ul {
    margin-top: 0.5rem;
    margin-bottom: 0;
    padding-left: 1.5rem;
}

.btn-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    opacity: 0.5;
}

.btn-close:hover {
    opacity: 1;
}

/* Forms */
.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--foreground);
}

.input-group {
    display: flex;
    align-items: stretch;
    width: 100%;
}

.input-group-text {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background-color: var(--muted);
    border: 1px solid var(--input);
    border-right: none;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    color: var(--muted-foreground);
}

.form-control {
    flex: 1;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    background-color: var(--background);
    color: var(--foreground);
    border: 1px solid var(--input);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.input-group .form-control {
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.form-control:focus {
    outline: none;
    border-color: var(--ring);
    box-shadow: 0 0 0 2px var(--ring);
}

.form-control::placeholder {
    color: var(--muted-foreground);
}

.form-control-lg {
    padding: 0.75rem 1rem;
    font-size: 1.125rem;
}

.is-invalid {
    border-color: var(--destructive);
}

.invalid-feedback {
    display: block;
    margin-top: 0.25rem;
    color: var(--destructive);
    font-size: 0.875rem;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    border-radius: var(--radius-lg);
}

.table,
.custom-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--card);
    color: var(--card-foreground);
}

.table thead,
.custom-table thead {
    background-color: var(--muted);
}

.table th,
.custom-table th {
    padding: 0.75rem 1rem;
    font-weight: 600;
    text-align: left;
    color: var(--muted-foreground);
    border-bottom: 1px solid var(--border);
}

.table td,
.custom-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    overflow: hidden;
}

.table tbody tr:hover,
.custom-table tbody tr:hover {
    background-color: var(--muted);
}

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

/* Select2 Custom Styling */
.select2-container--default .select2-selection--single {
    background-color: transparent;
    border: none;
    border-radius: var(--radius-md);
    height: auto;
    padding: 0;
    min-height: 30px;
    display: flex;
    align-items: center;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--foreground);
    padding: 0.25rem;
    line-height: 1.5;
    padding-left: 0;
    padding-right: 30px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    font-size: 0.8125rem;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: var(--muted-foreground);
    font-size: 0.8125rem;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100%;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: var(--muted-foreground) transparent transparent transparent;
    border-width: 5px 4px 0 4px;
    margin-left: -4px;
    margin-top: -2px;
}

.material-row .select2-container {
    width: 100% !important;
    display: block;
}

.material-row td .select2-container {
    display: block;
}

.select2-dropdown {
    background-color: var(--popover);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 9999;
}

.select2-results__option {
    padding: 0.5rem 0.75rem;
    color: var(--popover-foreground);
    font-size: 0.8125rem;
}

.select2-results__option--highlighted {
    background-color: var(--accent);
    color: var(--accent-foreground);
}

.select2-search--dropdown .select2-search__field {
    background-color: var(--background);
    color: var(--foreground);
    border: 1px solid var(--input);
    border-radius: var(--radius-md);
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
}

.select2-search--dropdown .select2-search__field:focus {
    outline: none;
    border-color: var(--ring);
    box-shadow: 0 0 0 2px var(--ring);
}

/* Fix Select2 overflow and text wrapping */
.select2-container .select2-selection--single .select2-selection__rendered {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    font-size: 0.8125rem;
}


/* Utility Classes */
.text-center {
    text-align: center;
}

.text-end {
    text-align: right;
}

.fw-bold {
    font-weight: 700;
}

.fw-semibold {
    font-weight: 600;
}

.w-100 {
    width: 100%;
}

.d-flex {
    display: flex;
}

.d-none {
    display: none;
}

.d-block {
    display: block;
}

.align-items-center {
    align-items: center;
}

.justify-content-between {
    justify-content: space-between;
}

.justify-content-center {
    justify-content: center;
}

.justify-content-end {
    justify-content: flex-end;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 0.75rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-5 {
    margin-bottom: 1.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 0.75rem;
}

.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.py-5 {
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
}

.p-2 {
    padding: 0.5rem;
}

.p-4 {
    padding: 1rem;
}

.px-1 {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
}

.px-2 {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.my-3 {
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
}

.rounded {
    border-radius: var(--radius-md);
}

.bg-body-secondary {
    background-color: var(--muted);
}

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

/* Row Layouts */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.75rem;
}

/* Grid gap utilities */
.g-0>* {
    padding: 0;
}

.g-1>* {
    padding: 0 0.25rem;
    margin-bottom: 0.5rem;
}

.g-2>* {
    padding: 0 0.5rem;
    margin-bottom: 1rem;
}

.g-3>* {
    padding: 0 0.75rem;
    margin-bottom: 1.5rem;
}

.g-4>* {
    padding: 0 1rem;
    margin-bottom: 2rem;
}

.g-5>* {
    padding: 0 1.25rem;
    margin-bottom: 2.5rem;
}

/* Row with gutters */
.row.g-0 {
    margin: 0;
}

.row.g-1 {
    margin: 0 -0.25rem;
}

.row.g-2 {
    margin: 0 -0.5rem;
}

.row.g-3 {
    margin: 0 -0.75rem;
}

.row.g-4 {
    margin: 0 -1rem;
}

.row.g-5 {
    margin: 0 -1.25rem;
}

/* Column utilities */
.col-1 {
    flex: 0 0 auto;
    width: 8.333333%;
    padding: 0 0.75rem;
}

.col-2 {
    flex: 0 0 auto;
    width: 16.666667%;
    padding: 0 0.75rem;
}

.col-3 {
    flex: 0 0 auto;
    width: 25%;
    padding: 0 0.75rem;
}

.col-4 {
    flex: 0 0 auto;
    width: 33.333333%;
    padding: 0 0.75rem;
}

.col-5 {
    flex: 0 0 auto;
    width: 41.666667%;
    padding: 0 0.75rem;
}

.col-6 {
    flex: 0 0 auto;
    width: 50%;
    padding: 0 0.75rem;
}

.col-7 {
    flex: 0 0 auto;
    width: 58.333333%;
    padding: 0 0.75rem;
}

.col-8 {
    flex: 0 0 auto;
    width: 66.666667%;
    padding: 0 0.75rem;
}

.col-9 {
    flex: 0 0 auto;
    width: 75%;
    padding: 0 0.75rem;
}

.col-10 {
    flex: 0 0 auto;
    width: 83.333333%;
    padding: 0 0.75rem;
}

.col-11 {
    flex: 0 0 auto;
    width: 91.666667%;
    padding: 0 0.75rem;
}

.col-12 {
    flex: 0 0 auto;
    width: 100%;
    padding: 0 0.75rem;
}

/* Medium columns */
@media (min-width: 768px) {
    .col-md-1 {
        flex: 0 0 auto;
        width: 8.333333%;
    }

    .col-md-2 {
        flex: 0 0 auto;
        width: 16.666667%;
    }

    .col-md-3 {
        flex: 0 0 auto;
        width: 25%;
    }

    .col-md-4 {
        flex: 0 0 auto;
        width: 33.333333%;
    }

    .col-md-5 {
        flex: 0 0 auto;
        width: 41.666667%;
    }

    .col-md-6 {
        flex: 0 0 auto;
        width: 50%;
    }

    .col-md-7 {
        flex: 0 0 auto;
        width: 58.333333%;
    }

    .col-md-8 {
        flex: 0 0 auto;
        width: 66.666667%;
    }

    .col-md-9 {
        flex: 0 0 auto;
        width: 75%;
    }

    .col-md-10 {
        flex: 0 0 auto;
        width: 83.333333%;
    }

    .col-md-11 {
        flex: 0 0 auto;
        width: 91.666667%;
    }

    .col-md-12 {
        flex: 0 0 auto;
        width: 100%;
    }
}

/* Large columns */
@media (min-width: 992px) {
    .col-lg-1 {
        flex: 0 0 auto;
        width: 8.333333%;
    }

    .col-lg-2 {
        flex: 0 0 auto;
        width: 16.666667%;
    }

    .col-lg-3 {
        flex: 0 0 auto;
        width: 25%;
    }

    .col-lg-4 {
        flex: 0 0 auto;
        width: 33.333333%;
    }

    .col-lg-5 {
        flex: 0 0 auto;
        width: 41.666667%;
    }

    .col-lg-6 {
        flex: 0 0 auto;
        width: 50%;
    }

    .col-lg-7 {
        flex: 0 0 auto;
        width: 58.333333%;
    }

    .col-lg-8 {
        flex: 0 0 auto;
        width: 66.666667%;
    }

    .col-lg-9 {
        flex: 0 0 auto;
        width: 75%;
    }

    .col-lg-10 {
        flex: 0 0 auto;
        width: 83.333333%;
    }

    .col-lg-11 {
        flex: 0 0 auto;
        width: 91.666667%;
    }

    .col-lg-12 {
        flex: 0 0 auto;
        width: 100%;
    }
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 768px) {

    .col-md-8,
    .col-lg-5 {
        width: 100%;
    }

    h1 {
        font-size: 2.25rem;
    }
}

/* Custom Display Values */
.display-value {
    padding: 0.5rem;
    font-size: 1rem;
    background-color: transparent;
    border: none;
    color: var(--foreground);
}

.display-value-lg {
    padding: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
}

/* Specific Table Styling */
.material-row .form-control,
.material-row .form-control-plaintext,
.material-row .form-select {
    background-color: transparent;
    border: none;
    box-shadow: none;
    padding: 0.25rem;
}

.material-row td {
    white-space: nowrap;
    overflow: hidden;
}

.material-row td>select,
.material-row td>.select2-container {
    max-width: 100%;
}

.material-row .form-control:focus,
.material-row .form-select:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--ring);
    border: 1px solid var(--ring);
    border-radius: var(--radius-md);
    background-color: var(--background);
}

.material-row .percentage:focus {
    box-shadow: 0 0 0 2px var(--primary);
    border-color: var(--primary);
}

hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1rem 0;
}

/* Tooltip Styles */
.info-tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: help;
    margin-left: 0.25rem;
}

.info-tooltip .material-icons-outlined {
    font-size: 1rem;
    color: var(--muted-foreground);
    transition: color 0.2s ease;
}

.info-tooltip:hover .material-icons-outlined {
    color: var(--primary);
}

.tooltip-content {
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--popover);
    color: var(--popover-foreground);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    white-space: nowrap;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 1000;
    pointer-events: none;
}

.tooltip-content::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--border);
}

.info-tooltip:hover .tooltip-content {
    opacity: 1;
    visibility: visible;
}

/* Percentage Total Indicator */
.percentage-total {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.percentage-total.total-perfect {
    background-color: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.percentage-total.total-close {
    background-color: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.percentage-total.total-incomplete {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Percentage Input Enhancement */
.percentage-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.percentage-wrapper input {
    padding-right: 1.5rem;
}

.percentage-suffix {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted-foreground);
    pointer-events: none;
    font-size: 0.875rem;
}

/* Cost Update Animation */
@keyframes highlightUpdate {
    0% {
        background-color: rgba(34, 197, 94, 0.2);
    }

    100% {
        background-color: transparent;
    }
}

.cost-updated {
    animation: highlightUpdate 0.6s ease;
}

/* Invalid Input Animation */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

.input-error {
    animation: shake 0.3s ease;
    border-color: var(--destructive) !important;
}

/* Add Row Button Enhancement */
@keyframes subtlePulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.add-row-btn {
    min-height: 44px;
    min-width: 44px;
}

.add-row-btn.pulse-hint {
    animation: subtlePulse 2s ease-in-out 3;
}

/* Loading State */
.select2-container--default .select2-results__option--loading {
    padding: 0.5rem 0.75rem;
}

.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid var(--muted);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Sticky Alert */
.alert-sticky {
    position: sticky;
    top: 1rem;
    z-index: 100;
    margin-bottom: 1.5rem;
}

/* Inline Error Message */
.inline-error {
    display: none;
    color: var(--destructive);
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.inline-error.show {
    display: block;
}

/* Focus visible for accessibility */
*:focus-visible {
    outline: 2px solid var(--ring);
    outline-offset: 2px;
}

/* Exchange Rate Cards */
.exchange-rate-card {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem;
    text-align: center;
    transition: all 0.2s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.exchange-rate-card:hover {
    background-color: var(--muted);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.exchange-rate-currency {
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.exchange-rate-value {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    line-height: 1.4;
}

.exchange-rate-value .fw-semibold {
    color: var(--foreground);
    font-weight: 600;
}

/* Exchange rate section styling */
.exchange-rates-section .card {
    margin-bottom: var(--spacing-2xl);
}

.exchange-rates-section .card-header {
    background-color: var(--muted);
    border-bottom: 1px solid var(--border);
    padding: var(--spacing-lg) var(--spacing-2xl);
}

.exchange-rates-section .card-body {
    padding: var(--spacing-lg) var(--spacing-2xl);
}

/* Mobile Table Enhancement */
@media (max-width: 768px) {
    .table-responsive {
        border: none;
    }

    .material-row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding: 1rem;
        border: 1px solid var(--border);
        border-radius: var(--radius-lg);
        margin-bottom: 1rem;
    }

    .material-row td {
        display: grid;
        grid-template-columns: 120px 1fr;
        align-items: center;
        border: none;
        padding: 0.5rem 0;
    }

    .material-row td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--muted-foreground);
    }

    .material-row .row-number {
        position: absolute;
        top: 0.5rem;
        right: 0.5rem;
    }

    .add-row-btn {
        width: 100%;
        margin-top: 0.5rem;
    }

    .exchange-rate-card {
        margin-bottom: var(--spacing-md);
    }
}

.price-dashboard .card {
    background-color: var(--color-card);
    color: var(--color-card-foreground);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    transition: transform 200ms ease-out, box-shadow 200ms ease-out;
}

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

.price-dashboard .card .material-icons-outlined {
    color: var(--color-primary);
}

/* Card styling */
.card {
    background-color: var(--color-card);
    color: var(--color-card-foreground);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
}

.card-title {
    color: var(--color-card-foreground);
    font-weight: 600;
}

.card-subtitle {
    color: var(--color-muted-foreground);
}

.card-body {
    padding: var(--spacing-2xl);
}

.card-footer {
    background-color: var(--color-muted);
    border-top: 1px solid var(--color-border);
}

/* Styling for original vs today's costs distinction */
.cost-section {
    position: relative;
}

.cost-section-original {
    background-color: var(--color-muted);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    border: 1px solid var(--color-border);
}

.cost-section-original h6 {
    color: var(--color-muted-foreground);
    font-weight: 600;
}

.cost-section-today {
    background-color: rgba(201, 100, 66, 0.1);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    border: 1px solid var(--color-primary);
}

.cost-section-today h6 {
    color: var(--color-primary);
    font-weight: 600;
}

/* Text utilities */
.text-primary {
    color: var(--color-primary) !important;
}

.text-secondary {
    color: var(--color-secondary-foreground) !important;
}

.text-muted {
    color: var(--color-muted-foreground) !important;
}

.text-accent {
    color: var(--color-accent-foreground) !important;
}

/* Button styling */
.btn-primary {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-primary-foreground);
    border-radius: var(--radius-lg);
    font-weight: 500;
    transition: all 200ms ease-out;
}

.btn-primary:hover {
    background-color: rgba(201, 100, 66, 0.9);
    border-color: rgba(201, 100, 66, 0.9);
}

.btn-primary:focus:active {
    background-color: var(--color-primary);
    color: var(--color-primary-foreground);
}

.btn-outline-primary {
    color: var(--color-primary);
    border-color: var(--color-primary);
    border-radius: var(--radius-lg);
}

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

.btn-outline-primary:focus:active {
    background-color: var(--color-primary);
    color: var(--color-primary-foreground);
}

.btn-outline-secondary {
    color: var(--color-secondary-foreground);
    border-color: var(--color-border);
    border-radius: var(--radius-lg);
}

.btn-outline-secondary:hover {
    background-color: var(--color-secondary);
    color: var(--color-secondary-foreground);
}

.btn-outline-danger {
    color: var(--color-destructive);
    border-color: var(--color-border);
    border-radius: var(--radius-lg);
}

.btn-outline-danger:hover {
    background-color: var(--color-destructive);
    color: var(--color-destructive-foreground);
}

/* Animation for price updates */
@keyframes priceUpdate {
    0% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 1;
    }
}

.real-time-price {
    animation: priceUpdate 1s ease-in-out;
    color: var(--color-primary);
    font-weight: 600;
}

/* Header styling */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--color-card-foreground);
}

header {
    margin-bottom: var(--spacing-4xl);
}

header h1 {
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: var(--spacing-lg);
}

header p {
    color: var(--color-muted-foreground);
}

/* Alert styling */
.alert {
    background-color: var(--color-card);
    border-color: var(--color-border);
    color: var(--color-card-foreground);
    border-radius: var(--radius-lg);
}

.alert-success {
    background-color: rgba(201, 100, 66, 0.1);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.alert-danger {
    background-color: rgba(239, 68, 68, 0.1);
    border-color: var(--color-destructive);
    color: var(--color-destructive);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .price-dashboard .card h4 {
        font-size: 1.2rem;
    }

    .cost-section h6 {
        font-size: 0.85rem;
    }

    header {
        margin-bottom: var(--spacing-3xl);
    }

    .container {
        padding-left: var(--spacing-lg);
        padding-right: var(--spacing-lg);
    }
}

/* Utility classes */
.bg-transparent {
    background-color: transparent !important;
}

hr {
    border-color: var(--color-border);
    opacity: 1;
}

.input-readonly {
    background-color: var(--color-muted-readonly) !important;
    color: var(--color-muted-foreground);
}

/* Custom Tooltip for Currency Conversion */
#custom-tooltip {
    position: absolute;
    z-index: 10000;
    background-color: #2d2d2d;
    color: #ffffff;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    font-size: 0.75rem;
    line-height: 1.5;
    max-width: 280px;
    pointer-events: none;
    animation: tooltipFadeIn 0.2s ease-in-out;
}

html.dark #custom-tooltip {
    background-color: #1a1a1a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

#custom-tooltip::before {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #2d2d2d;
}

html.dark #custom-tooltip::before {
    border-top-color: #1a1a1a;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gap-1 {
    gap: 0.25rem;
}

.position-relative {
    position: relative;
}