/*
 * Auto-generated Cacao Component Styles
 * Generated on: 2025-07-17 11:08:53
 * Components with CSS: 31
 *
 * This file contains compiled CSS from all modular components.
 * Include this file in your HTML to apply component-specific styles.
 */


/* Component: avatar (folder-based) */
/* Avatar Component - Cacao UI Framework */

.avatar {
    display: inline-block;
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #f8f9fa;
    border: 1px solid #e8e8e8;
    overflow: hidden;
    vertical-align: middle;
    transition: all 0.3s ease;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.avatar-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 16px;
    color: #8B4513;
    background-color: rgba(139, 69, 19, 0.1);
}

/* Shape Variants */
.avatar.circle {
    border-radius: 50%;
}

.avatar.square {
    border-radius: 4px;
}

/* Size Variants */
.avatar.small {
    width: 24px;
    height: 24px;
}

.avatar.small .avatar-icon {
    font-size: 12px;
}

.avatar.medium {
    width: 32px;
    height: 32px;
}

.avatar.medium .avatar-icon {
    font-size: 16px;
}

.avatar.large {
    width: 48px;
    height: 48px;
}

.avatar.large .avatar-icon {
    font-size: 24px;
}

.avatar.xlarge {
    width: 64px;
    height: 64px;
}

.avatar.xlarge .avatar-icon {
    font-size: 32px;
}

/* Hover Effects */
.avatar:hover {
    border-color: #8B4513;
    transform: scale(1.05);
}

/* Focus States for Accessibility */
.avatar:focus {
    outline: 2px solid #8B4513;
    outline-offset: 2px;
}

/* Avatar Group Support */
.avatar-group {
    display: flex;
    align-items: center;
}

.avatar-group .avatar {
    margin-right: -8px;
    border: 2px solid #fff;
    position: relative;
    z-index: 1;
}

.avatar-group .avatar:hover {
    z-index: 2;
}

.avatar-group .avatar:last-child {
    margin-right: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .avatar.large {
        width: 40px;
        height: 40px;
    }
    
    .avatar.xlarge {
        width: 48px;
        height: 48px;
    }
}

/* Component: badge (folder-based) */
/* Badge Component - Cacao UI Framework */

.badge-wrapper {
    position: relative;
    display: inline-block;
}

.badge {
    position: absolute;
    top: 0;
    right: 0;
    display: inline-block;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    font-size: 12px;
    font-weight: 500;
    line-height: 20px;
    text-align: center;
    white-space: nowrap;
    border-radius: 10px;
    background-color: #ff4d4f;
    color: #fff;
    transform: translate(50%, -50%);
    z-index: 10;
    box-shadow: 0 0 0 1px #fff;
    transition: all 0.3s ease;
}

.badge:empty {
    display: none;
}

/* Dot Badge Style */
.badge.dot {
    width: 8px;
    height: 8px;
    min-width: 8px;
    padding: 0;
    border-radius: 50%;
    background-color: #ff4d4f;
    transform: translate(50%, -50%);
}

/* Badge Colors */
.badge.primary {
    background-color: #8B4513;
}

.badge.success {
    background-color: #52c41a;
}

.badge.warning {
    background-color: #faad14;
}

.badge.error {
    background-color: #ff4d4f;
}

.badge.info {
    background-color: #1890ff;
}

/* Badge Positioning */
.badge-wrapper.top-left .badge {
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
}

.badge-wrapper.top-right .badge {
    top: 0;
    right: 0;
    transform: translate(50%, -50%);
}

.badge-wrapper.bottom-left .badge {
    bottom: 0;
    left: 0;
    transform: translate(-50%, 50%);
}

.badge-wrapper.bottom-right .badge {
    bottom: 0;
    right: 0;
    transform: translate(50%, 50%);
}

/* Badge Sizes */
.badge.small {
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    font-size: 10px;
    line-height: 16px;
    border-radius: 8px;
}

.badge.small.dot {
    width: 6px;
    height: 6px;
    min-width: 6px;
}

.badge.large {
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    font-size: 14px;
    line-height: 24px;
    border-radius: 12px;
}

.badge.large.dot {
    width: 10px;
    height: 10px;
    min-width: 10px;
}

/* Badge Animation */
.badge {
    animation: badgeZoom 0.3s ease;
}

@keyframes badgeZoom {
    0% {
        transform: translate(50%, -50%) scale(0);
    }
    50% {
        transform: translate(50%, -50%) scale(1.1);
    }
    100% {
        transform: translate(50%, -50%) scale(1);
    }
}

/* Badge on different elements */
.badge-wrapper button .badge,
.badge-wrapper .btn .badge {
    top: -2px;
    right: -2px;
}

.badge-wrapper .avatar .badge {
    top: 0;
    right: 0;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .badge {
        border: 1px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .badge {
        animation: none;
        transition: none;
    }
}

/* Component: card (folder-based) */
/* Card Component - Cacao UI Framework */

.card {
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.card.bordered {
    border: 1px solid #e8e8e8;
    box-shadow: none;
}

.card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.card.bordered:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Card Header */
.card-header {
    padding: 16px;
    border-bottom: 1px solid #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #f8f9fa;
    min-height: 48px;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
    flex: 1;
}

.card-extra {
    font-size: 14px;
    color: #666;
    margin-left: 16px;
}

.card-extra button,
.card-extra .btn {
    font-size: 12px;
    padding: 4px 8px;
}

/* Card Content */
.card-content {
    padding: 16px;
    flex: 1;
    color: #333;
    line-height: 1.6;
}

.card-content:empty {
    display: none;
}

/* Card Actions */
.card-actions {
    padding: 12px 16px;
    border-top: 1px solid #e8e8e8;
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    background-color: #f8f9fa;
}

.card-actions.left {
    justify-content: flex-start;
}

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

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

/* Card Cover */
.card-cover {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.card-cover.small {
    height: 120px;
}

.card-cover.large {
    height: 300px;
}

/* Card Meta */
.card-meta {
    padding: 8px 16px;
    font-size: 12px;
    color: #999;
    border-top: 1px solid #e8e8e8;
    background-color: #f8f9fa;
}

.card-meta .card-meta-item {
    display: inline-block;
    margin-right: 16px;
}

.card-meta .card-meta-item:last-child {
    margin-right: 0;
}

/* Card Sizes */
.card.small {
    max-width: 240px;
}

.card.medium {
    max-width: 320px;
}

.card.large {
    max-width: 480px;
}

/* Card Loading State */
.card.loading {
    position: relative;
    overflow: hidden;
}

.card.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: cardLoading 1.5s infinite;
}

@keyframes cardLoading {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Card Grid Layout */
.card-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* Responsive Design */
@media (max-width: 768px) {
    .card-header {
        padding: 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .card-extra {
        margin-left: 0;
    }
    
    .card-content {
        padding: 12px;
    }
    
    .card-actions {
        padding: 8px 12px;
        flex-direction: column;
        gap: 8px;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
}

/* Accessibility */
.card:focus {
    outline: 2px solid #8B4513;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid #000;
    }
    
    .card-header,
    .card-actions,
    .card-meta {
        border-color: #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .card {
        transition: none;
    }
    
    .card:hover {
        transform: none;
    }
    
    .card.loading::before {
        animation: none;
    }
}

/* Component: carousel (folder-based) */
/* Carousel Component - Cacao UI Framework */

.carousel {
    position: relative;
    overflow: hidden;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    width: 100%;
    height: 300px;
    background-color: #fff;
}

.carousel-items {
    display: flex;
    transition: transform 0.3s ease;
    height: 100%;
}

.carousel-item {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f9f9f9;
    border-right: 1px solid #eee;
    position: relative;
}

.carousel-item:last-child {
    border-right: none;
}

.carousel-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

/* Navigation Controls */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 18px;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-nav:hover {
    background-color: rgba(0, 0, 0, 0.7);
    transform: translateY(-50%) scale(1.1);
}

.carousel-nav:focus {
    outline: 2px solid #8B4513;
    outline-offset: 2px;
}

.carousel-prev {
    left: 10px;
}

.carousel-next {
    right: 10px;
}

/* Indicators */
.carousel-indicators {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.carousel-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background-color: #ccc;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-indicator.active,
.carousel-indicator:hover {
    background-color: #8B4513;
    transform: scale(1.2);
}

.carousel-indicator:focus {
    outline: 2px solid #8B4513;
    outline-offset: 2px;
}

/* Carousel Content Styling */
.carousel-content {
    text-align: center;
    padding: 20px;
    color: #333;
}

.carousel-content h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
    color: #8B4513;
}

.carousel-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

/* Carousel Placeholder */
.carousel-placeholder {
    text-align: center;
    color: #666;
    font-size: 14px;
}

.carousel-placeholder-icon {
    font-size: 48px;
    margin-bottom: 10px;
    opacity: 0.5;
}

/* Carousel Sizes */
.carousel.small {
    height: 200px;
}

.carousel.medium {
    height: 300px;
}

.carousel.large {
    height: 400px;
}

/* Autoplay Animation */
.carousel.autoplay .carousel-items {
    animation: carouselAutoplay 12s infinite;
}

@keyframes carouselAutoplay {
    0%, 25% { transform: translateX(0%); }
    33%, 58% { transform: translateX(-100%); }
    66%, 91% { transform: translateX(-200%); }
    100% { transform: translateX(0%); }
}

/* Fade Effect */
.carousel.fade .carousel-items {
    position: relative;
}

.carousel.fade .carousel-item {
    position: absolute;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.carousel.fade .carousel-item.active {
    opacity: 1;
}

/* Touch/Swipe Support */
.carousel.touch {
    touch-action: pan-y;
}

.carousel.touch .carousel-items {
    cursor: grab;
}

.carousel.touch .carousel-items:active {
    cursor: grabbing;
}

/* Loading State */
.carousel.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.carousel.loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid #e8e8e8;
    border-top: 4px solid #8B4513;
    border-radius: 50%;
    animation: carouselSpin 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .carousel-nav {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .carousel-prev {
        left: 5px;
    }
    
    .carousel-next {
        right: 5px;
    }
    
    .carousel-indicators {
        bottom: 5px;
        gap: 6px;
    }
    
    .carousel-indicator {
        width: 8px;
        height: 8px;
    }
    
    .carousel.large {
        height: 250px;
    }
    
    .carousel.medium {
        height: 200px;
    }
}

/* Accessibility */
.carousel:focus {
    outline: 2px solid #8B4513;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .carousel {
        border: 2px solid #000;
    }
    
    .carousel-nav {
        background-color: #000;
        border: 2px solid #fff;
    }
    
    .carousel-indicator {
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .carousel-items {
        transition: none;
    }
    
    .carousel-nav {
        transition: none;
    }
    
    .carousel-indicator {
        transition: none;
    }
    
    .carousel.autoplay .carousel-items {
        animation: none;
    }
    
    .carousel.fade .carousel-item {
        transition: none;
    }
    
    @keyframes carouselAutoplay {
        0%, 100% { transform: translateX(0%); }
    }
}

/* Component: collapse (folder-based) */
/* Collapse Component - Cacao UI Framework */

.collapse {
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    margin-bottom: 8px;
    background-color: #fff;
    overflow: hidden;
    transition: all 0.3s ease;
}

.collapse:hover {
    border-color: #8B4513;
}

.collapse:last-child {
    margin-bottom: 0;
}

/* Collapse Header */
.collapse-header {
    padding: 12px 16px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e8e8e8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
    transition: background-color 0.2s ease;
    position: relative;
}

.collapse-header:hover {
    background-color: #e9ecef;
}

.collapse-header:focus {
    outline: 2px solid #8B4513;
    outline-offset: -2px;
    background-color: #e9ecef;
}

.collapse-header:active {
    background-color: #dee2e6;
}

.collapse-title {
    font-weight: 500;
    font-size: 14px;
    color: #333;
    flex: 1;
    margin-right: 8px;
}

.collapse-indicator {
    font-size: 12px;
    color: #666;
    transition: transform 0.2s ease;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.collapse-indicator::before {
    content: "▼";
}

.collapse[aria-expanded="false"] .collapse-indicator {
    transform: rotate(-90deg);
}

.collapse[aria-expanded="true"] .collapse-indicator {
    transform: rotate(0deg);
}

/* Collapse Content */
.collapse-content {
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    border-top: 1px solid #e8e8e8;
    max-height: 0;
    opacity: 0;
}

.collapse[aria-expanded="true"] .collapse-content {
    opacity: 1;
    border-top: 1px solid #e8e8e8;
}

.collapse[aria-expanded="false"] .collapse-content {
    max-height: 0;
    opacity: 0;
    border-top: none;
}

.collapse-content-wrapper {
    padding: 16px;
    color: #333;
    line-height: 1.6;
}

.collapse-content-wrapper:empty::before {
    content: "Collapse content goes here...";
    color: #666;
    font-style: italic;
}

/* Collapse Variants */
.collapse.borderless {
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.collapse.borderless .collapse-header {
    border-bottom: 1px solid #e8e8e8;
}

.collapse.ghost {
    border: none;
    background-color: transparent;
}

.collapse.ghost .collapse-header {
    background-color: transparent;
    border-bottom: 1px solid #e8e8e8;
}

.collapse.ghost .collapse-header:hover {
    background-color: #f8f9fa;
}

/* Collapse Sizes */
.collapse.small .collapse-header {
    padding: 8px 12px;
}

.collapse.small .collapse-title {
    font-size: 12px;
}

.collapse.small .collapse-content-wrapper {
    padding: 12px;
}

.collapse.large .collapse-header {
    padding: 16px 20px;
}

.collapse.large .collapse-title {
    font-size: 16px;
}

.collapse.large .collapse-content-wrapper {
    padding: 20px;
}

/* Collapse Group */
.collapse-group {
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    overflow: hidden;
}

.collapse-group .collapse {
    border: none;
    border-radius: 0;
    margin-bottom: 0;
}

.collapse-group .collapse:not(:last-child) {
    border-bottom: 1px solid #e8e8e8;
}

.collapse-group .collapse-header {
    border-bottom: none;
}

.collapse-group .collapse[aria-expanded="true"] .collapse-content {
    border-bottom: 1px solid #e8e8e8;
}

.collapse-group .collapse:last-child[aria-expanded="true"] .collapse-content {
    border-bottom: none;
}

/* Accordion Behavior */
.collapse-accordion .collapse {
    border-radius: 0;
}

.collapse-accordion .collapse:first-child {
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}

.collapse-accordion .collapse:last-child {
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
}

/* Disabled State */
.collapse.disabled {
    opacity: 0.6;
    pointer-events: none;
}

.collapse.disabled .collapse-header {
    cursor: not-allowed;
    background-color: #f8f9fa;
}

/* Loading State */
.collapse.loading .collapse-header::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid #e8e8e8;
    border-top: 2px solid #8B4513;
    border-radius: 50%;
    animation: collapseLoading 1s linear infinite;
    margin-left: 8px;
}

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

/* Custom Icons */
.collapse-header.custom-icon .collapse-indicator::before {
    content: none;
}

.collapse-header.plus-icon .collapse-indicator::before {
    content: "+";
    font-size: 16px;
    font-weight: bold;
}

.collapse[aria-expanded="true"] .collapse-header.plus-icon .collapse-indicator::before {
    content: "−";
}

.collapse-header.chevron-icon .collapse-indicator::before {
    content: "›";
    font-size: 16px;
    font-weight: bold;
}

.collapse[aria-expanded="true"] .collapse-header.chevron-icon .collapse-indicator {
    transform: rotate(90deg);
}

.collapse[aria-expanded="false"] .collapse-header.chevron-icon .collapse-indicator {
    transform: rotate(0deg);
}

/* Responsive Design */
@media (max-width: 768px) {
    .collapse-header {
        padding: 10px 12px;
    }
    
    .collapse-title {
        font-size: 13px;
    }
    
    .collapse-content-wrapper {
        padding: 12px;
    }
    
    .collapse.large .collapse-header {
        padding: 12px 16px;
    }
    
    .collapse.large .collapse-content-wrapper {
        padding: 16px;
    }
}

/* Accessibility */
.collapse-header[role="button"] {
    outline: none;
}

.collapse-header[role="button"]:focus {
    outline: 2px solid #8B4513;
    outline-offset: -2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .collapse {
        border: 2px solid #000;
    }
    
    .collapse-header {
        border-bottom: 2px solid #000;
    }
    
    .collapse-content {
        border-top: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .collapse-header {
        transition: none;
    }
    
    .collapse-content {
        transition: none;
    }
    
    .collapse-indicator {
        transition: none;
    }
    
    .collapse.loading .collapse-header::after {
        animation: none;
    }
}

/* Print Styles */
@media print {
    .collapse {
        border: 1px solid #000;
        break-inside: avoid;
    }
    
    .collapse-content {
        max-height: none !important;
        opacity: 1 !important;
        overflow: visible !important;
    }
    
    .collapse-header {
        background-color: #f0f0f0;
    }
}

/* Component: descriptions (folder-based) */
/* Descriptions Component - Cacao UI Framework */

.descriptions {
    width: 100%;
    font-size: 14px;
}

.descriptions.bordered {
    border: 1px solid #e8e8e8;
    border-radius: 4px;
}

.descriptions-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    padding: 16px;
    border-bottom: 1px solid #e8e8e8;
}

.descriptions-items {
    padding: 16px;
    display: grid;
    grid-gap: 16px;
}

.descriptions.columns-2 .descriptions-items {
    grid-template-columns: repeat(2, 1fr);
}

.descriptions-item {
    display: flex;
    flex-direction: column;
}

.descriptions-label {
    color: #666;
    margin-bottom: 4px;
}

.descriptions-content {
    color: #333;
}

.descriptions.bordered .descriptions-items {
    border-radius: 0 0 4px 4px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .descriptions.columns-2 .descriptions-items {
        grid-template-columns: 1fr;
    }
}

/* Component: image (folder-based) */
/* Image Component - Cacao UI Framework */

.image {
    position: relative;
    display: inline-block;
    overflow: hidden;
    border-radius: 4px;
    background-color: #f8f9fa;
    border: 1px solid #e8e8e8;
    transition: all 0.3s ease;
}

.image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.image:hover img {
    transform: scale(1.05);
}

/* Image Placeholder */
.image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    background-color: #f8f9fa;
    color: #666;
    font-size: 14px;
    text-align: center;
    border: 2px dashed #e8e8e8;
}

.image-placeholder-icon {
    font-size: 48px;
    margin-bottom: 8px;
    opacity: 0.5;
}

/* Image Loading State */
.image.loading {
    position: relative;
}

.image.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.image.loading::after {
    content: '';
    width: 32px;
    height: 32px;
    border: 3px solid #e8e8e8;
    border-top: 3px solid #8B4513;
    border-radius: 50%;
    animation: imageSpin 1s linear infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 11;
}

@keyframes imageSpin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Image Error State */
.image.error {
    background-color: #fff2f0;
    border-color: #ffccc7;
}

.image-error {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: #ff4d4f;
    font-size: 14px;
    text-align: center;
    flex-direction: column;
}

.image-error-icon {
    font-size: 48px;
    margin-bottom: 8px;
    opacity: 0.7;
}

/* Image Sizes */
.image.small {
    width: 80px;
    height: 80px;
}

.image.medium {
    width: 120px;
    height: 120px;
}

.image.large {
    width: 200px;
    height: 200px;
}

.image.fullwidth {
    width: 100%;
    height: auto;
}

/* Image Shapes */
.image.circle {
    border-radius: 50%;
}

.image.rounded {
    border-radius: 8px;
}

.image.square {
    border-radius: 0;
}

/* Image Fit Options */
.image.fit-cover img {
    object-fit: cover;
}

.image.fit-contain img {
    object-fit: contain;
}

.image.fit-fill img {
    object-fit: fill;
}

.image.fit-scale-down img {
    object-fit: scale-down;
}

/* Image Preview */
.image.preview {
    cursor: pointer;
    position: relative;
}

.image.preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0);
    transition: background-color 0.3s ease;
    z-index: 1;
}

.image.preview:hover::before {
    background-color: rgba(0, 0, 0, 0.1);
}

.image.preview::after {
    content: '🔍';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    color: #fff;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.image.preview:hover::after {
    opacity: 1;
}

/* Image Caption */
.image-caption {
    padding: 8px 12px;
    background-color: #f8f9fa;
    border-top: 1px solid #e8e8e8;
    font-size: 12px;
    color: #666;
    text-align: center;
    line-height: 1.4;
}

/* Image Gallery */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
    margin: 16px 0;
}

.image-gallery .image {
    width: 100%;
    height: 150px;
}

/* Image Lazy Loading */
.image.lazy {
    background-color: #f8f9fa;
    background-image: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    background-size: 200% 100%;
    animation: imageLazyLoading 1.5s infinite;
}

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

/* Image Zoom */
.image.zoom {
    cursor: zoom-in;
}

.image.zoom:hover {
    transform: scale(1.02);
}

/* Image Overlay */
.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.7));
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 5;
}

.image:hover .image-overlay {
    opacity: 1;
}

.image-overlay-content {
    color: #fff;
    padding: 12px;
    text-align: center;
    font-size: 12px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .image.large {
        width: 150px;
        height: 150px;
    }
    
    .image.medium {
        width: 100px;
        height: 100px;
    }
    
    .image-gallery {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 12px;
    }
    
    .image-gallery .image {
        height: 120px;
    }
}

/* Accessibility */
.image:focus {
    outline: 2px solid #8B4513;
    outline-offset: 2px;
}

.image img {
    outline: none;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .image {
        border: 2px solid #000;
    }
    
    .image-placeholder {
        border: 2px solid #000;
    }
    
    .image-caption {
        border-top: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .image {
        transition: none;
    }
    
    .image img {
        transition: none;
    }
    
    .image:hover img {
        transform: none;
    }
    
    .image:hover {
        transform: none;
    }
    
    .image.loading::after {
        animation: none;
    }
    
    .image.lazy {
        animation: none;
    }
    
    .image-overlay {
        transition: none;
    }
}

/* Print Styles */
@media print {
    .image {
        border: 1px solid #000;
        break-inside: avoid;
    }
    
    .image.preview::before,
    .image.preview::after {
        display: none;
    }
    
    .image-overlay {
        opacity: 0;
    }
}

/* Component: list (folder-based) */
/* List Component - Cacao UI Framework */

.list {
    background-color: #fff;
    border-radius: 4px;
    overflow: hidden;
}

.list.bordered {
    border: 1px solid #e8e8e8;
}

.list-item {
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
    position: relative;
}

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

.list-item:hover {
    background-color: #f8f9fa;
}

.list-item:active {
    background-color: #e9ecef;
}

.list-item-title {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
    line-height: 1.4;
}

.list-item-description {
    font-size: 12px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 0;
}

.list-item-description:empty {
    display: none;
}

/* List Sizes */
.list.small .list-item {
    padding: 8px 12px;
}

.list.small .list-item-title {
    font-size: 12px;
}

.list.small .list-item-description {
    font-size: 11px;
}

.list.large .list-item {
    padding: 20px;
}

.list.large .list-item-title {
    font-size: 16px;
    margin-bottom: 6px;
}

.list.large .list-item-description {
    font-size: 14px;
}

/* List Variants */
.list.split .list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.list.split .list-item-content {
    flex: 1;
}

.list.split .list-item-extra {
    margin-left: 16px;
    color: #666;
    font-size: 12px;
}

/* List Item Actions */
.list-item-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.list-item:hover .list-item-actions {
    opacity: 1;
}

.list-item-actions button,
.list-item-actions .btn {
    font-size: 12px;
    padding: 4px 8px;
}

/* List Item Meta */
.list-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 11px;
    color: #999;
}

.list-item-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* List Item Avatar */
.list-item-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
}

.list-item.with-avatar {
    display: flex;
    align-items: flex-start;
}

.list-item.with-avatar .list-item-content {
    flex: 1;
}

/* List Item Status */
.list-item.active {
    background-color: rgba(139, 69, 19, 0.1);
    border-left: 3px solid #8B4513;
}

.list-item.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.list-item.selected {
    background-color: #e6f7ff;
    border-left: 3px solid #1890ff;
}

/* List Item Icon */
.list-item-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    color: #8B4513;
    flex-shrink: 0;
}

.list-item.with-icon {
    display: flex;
    align-items: flex-start;
}

.list-item.with-icon .list-item-content {
    flex: 1;
}

/* List Header */
.list-header {
    padding: 12px 16px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e8e8e8;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.list.bordered .list-header {
    border-bottom: 1px solid #e8e8e8;
}

/* List Footer */
.list-footer {
    padding: 12px 16px;
    background-color: #f8f9fa;
    border-top: 1px solid #e8e8e8;
    font-size: 12px;
    color: #666;
    text-align: center;
}

/* List Empty State */
.list-empty {
    padding: 40px 16px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

.list-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* List Loading State */
.list.loading {
    position: relative;
    min-height: 200px;
}

.list.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.list.loading::after {
    content: '';
    width: 32px;
    height: 32px;
    border: 3px solid #e8e8e8;
    border-top: 3px solid #8B4513;
    border-radius: 50%;
    animation: listSpin 1s linear infinite;
}

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

/* List Virtual Scrolling */
.list.virtual {
    height: 400px;
    overflow-y: auto;
}

.list.virtual .list-item {
    border-bottom: 1px solid #f0f0f0;
}

/* List Drag and Drop */
.list.sortable .list-item {
    cursor: move;
}

.list.sortable .list-item:hover {
    background-color: #f8f9fa;
}

.list.sortable .list-item.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}

.list.sortable .list-item.drag-over {
    border-top: 2px solid #8B4513;
}

/* List Checkbox */
.list-item-checkbox {
    margin-right: 12px;
    flex-shrink: 0;
}

.list-item.with-checkbox {
    display: flex;
    align-items: flex-start;
}

.list-item.with-checkbox .list-item-content {
    flex: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .list-item {
        padding: 12px;
    }
    
    .list.small .list-item {
        padding: 8px;
    }
    
    .list.large .list-item {
        padding: 16px;
    }
    
    .list.split .list-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .list.split .list-item-extra {
        margin-left: 0;
        margin-top: 8px;
    }
    
    .list-item-actions {
        flex-wrap: wrap;
        gap: 4px;
    }
}

/* Accessibility */
.list-item:focus {
    outline: 2px solid #8B4513;
    outline-offset: -2px;
}

.list-item[role="button"] {
    cursor: pointer;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .list.bordered {
        border: 2px solid #000;
    }
    
    .list-item {
        border-bottom: 1px solid #000;
    }
    
    .list-header,
    .list-footer {
        border-color: #000;
    }
    
    .list-item.active {
        border-left: 3px solid #000;
    }
    
    .list-item.selected {
        border-left: 3px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .list-item {
        transition: none;
    }
    
    .list-item-actions {
        transition: none;
        opacity: 1;
    }
    
    .list.loading::after {
        animation: none;
    }
    
    .list.sortable .list-item.dragging {
        transform: none;
    }
}

/* Print Styles */
@media print {
    .list {
        border: 1px solid #000;
        break-inside: avoid;
    }
    
    .list-item {
        break-inside: avoid;
        border-bottom: 1px solid #000;
    }
    
    .list-item-actions {
        display: none;
    }
    
    .list-item:hover {
        background-color: transparent;
    }
}

/* Component: plot (folder-based) */
/* Plot Component - Cacao UI Framework */

.plot {
    position: relative;
    background-color: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    padding: 16px;
    margin: 16px 0;
    overflow: hidden;
}

.plot-container {
    position: relative;
    width: 100%;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.plot-canvas {
    width: 100%;
    height: 100%;
    border-radius: 4px;
}

/* Plot Title */
.plot-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
    text-align: center;
}

/* Plot Legend */
.plot-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e8e8e8;
}

.plot-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #666;
}

.plot-legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    flex-shrink: 0;
}

/* Plot Axes */
.plot-axis {
    color: #666;
    font-size: 11px;
}

.plot-axis-title {
    font-weight: 500;
    color: #333;
}

/* Plot Placeholder */
.plot-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 400px;
    color: #666;
    font-size: 14px;
    text-align: center;
}

.plot-placeholder-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Plot Loading State */
.plot.loading {
    position: relative;
}

.plot.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.plot.loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid #e8e8e8;
    border-top: 4px solid #8B4513;
    border-radius: 50%;
    animation: plotSpin 1s linear infinite;
}

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

/* Plot Error State */
.plot.error {
    border-color: #ffccc7;
    background-color: #fff2f0;
}

.plot-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 400px;
    color: #ff4d4f;
    font-size: 14px;
    text-align: center;
}

.plot-error-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.7;
}

/* Plot Toolbar */
.plot-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e8e8e8;
}

.plot-toolbar-button {
    padding: 4px 8px;
    font-size: 12px;
    background-color: #f8f9fa;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.plot-toolbar-button:hover {
    background-color: #e9ecef;
    border-color: #8B4513;
}

.plot-toolbar-button.active {
    background-color: #8B4513;
    color: #fff;
    border-color: #8B4513;
}

/* Plot Tooltip */
.plot-tooltip {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.plot-tooltip.visible {
    opacity: 1;
}

.plot-tooltip::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.8);
}

/* Plot Sizes */
.plot.small {
    padding: 12px;
}

.plot.small .plot-container {
    height: 250px;
}

.plot.small .plot-title {
    font-size: 14px;
    margin-bottom: 12px;
}

.plot.large {
    padding: 24px;
}

.plot.large .plot-container {
    height: 500px;
}

.plot.large .plot-title {
    font-size: 18px;
    margin-bottom: 24px;
}

/* Plot Responsive */
.plot.responsive {
    width: 100%;
    height: auto;
}

.plot.responsive .plot-container {
    aspect-ratio: 16/9;
    height: auto;
}

/* Plot Fullscreen */
.plot.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    border: none;
    border-radius: 0;
    margin: 0;
    padding: 24px;
    background-color: #fff;
}

.plot.fullscreen .plot-container {
    height: calc(100vh - 48px);
}

/* Plot Types */
.plot.line-chart {
    border-left: 3px solid #1890ff;
}

.plot.bar-chart {
    border-left: 3px solid #52c41a;
}

.plot.pie-chart {
    border-left: 3px solid #faad14;
}

.plot.scatter-chart {
    border-left: 3px solid #722ed1;
}

.plot.area-chart {
    border-left: 3px solid #f759ab;
}

/* Plot Data Labels */
.plot-data-label {
    font-size: 10px;
    fill: #666;
    text-anchor: middle;
}

/* Plot Grid */
.plot-grid {
    stroke: #e8e8e8;
    stroke-width: 1;
    stroke-dasharray: 2,2;
}

.plot-grid-major {
    stroke: #d9d9d9;
    stroke-width: 1;
}

/* Plot Zoom */
.plot.zoomable {
    cursor: crosshair;
}

.plot.zoomable.zooming {
    cursor: move;
}

.plot-zoom-overlay {
    position: absolute;
    background-color: rgba(139, 69, 19, 0.2);
    border: 1px solid #8B4513;
    border-radius: 2px;
    pointer-events: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .plot {
        padding: 12px;
        margin: 12px 0;
    }
    
    .plot-container {
        height: 300px;
    }
    
    .plot-title {
        font-size: 14px;
        margin-bottom: 12px;
    }
    
    .plot-legend {
        gap: 8px;
        margin-top: 12px;
        padding-top: 12px;
    }
    
    .plot-legend-item {
        font-size: 11px;
    }
    
    .plot-toolbar {
        flex-wrap: wrap;
        gap: 4px;
    }
    
    .plot.large .plot-container {
        height: 350px;
    }
    
    .plot.small .plot-container {
        height: 200px;
    }
}

/* Accessibility */
.plot:focus {
    outline: 2px solid #8B4513;
    outline-offset: 2px;
}

.plot-toolbar-button:focus {
    outline: 2px solid #8B4513;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .plot {
        border: 2px solid #000;
    }
    
    .plot-toolbar-button {
        border: 2px solid #000;
    }
    
    .plot-legend {
        border-top: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .plot.loading::after {
        animation: none;
    }
    
    .plot-tooltip {
        transition: none;
    }
    
    .plot-toolbar-button {
        transition: none;
    }
}

/* Print Styles */
@media print {
    .plot {
        break-inside: avoid;
        border: 1px solid #000;
    }
    
    .plot-toolbar {
        display: none;
    }
    
    .plot.fullscreen {
        position: static;
        padding: 16px;
        background-color: #fff;
    }
}

/* Component: popover (folder-based) */
/* Popover Component - Cacao UI Framework */

.popover-wrapper {
    position: relative;
    display: inline-block;
}

.popover {
    position: absolute;
    background-color: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 12px;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.95);
    transition: all 0.2s ease;
    pointer-events: none;
    min-width: 200px;
    max-width: 300px;
    word-wrap: break-word;
}

.popover.visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    pointer-events: auto;
}

/* Popover Arrow */
.popover::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border: 6px solid transparent;
}

.popover::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border: 5px solid transparent;
}

/* Popover Positions */
.popover.top {
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) scale(0.95);
    margin-bottom: 8px;
}

.popover.top.visible {
    transform: translateX(-50%) scale(1);
}

.popover.top::before {
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-top-color: #e8e8e8;
}

.popover.top::after {
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-top-color: #fff;
    margin-top: -1px;
}

.popover.bottom {
    top: 100%;
    left: 50%;
    transform: translateX(-50%) scale(0.95);
    margin-top: 8px;
}

.popover.bottom.visible {
    transform: translateX(-50%) scale(1);
}

.popover.bottom::before {
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-bottom-color: #e8e8e8;
}

.popover.bottom::after {
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-bottom-color: #fff;
    margin-bottom: -1px;
}

.popover.left {
    right: 100%;
    top: 50%;
    transform: translateY(-50%) scale(0.95);
    margin-right: 8px;
}

.popover.left.visible {
    transform: translateY(-50%) scale(1);
}

.popover.left::before {
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border-left-color: #e8e8e8;
}

.popover.left::after {
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border-left-color: #fff;
    margin-left: -1px;
}

.popover.right {
    left: 100%;
    top: 50%;
    transform: translateY(-50%) scale(0.95);
    margin-left: 8px;
}

.popover.right.visible {
    transform: translateY(-50%) scale(1);
}

.popover.right::before {
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    border-right-color: #e8e8e8;
}

.popover.right::after {
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    border-right-color: #fff;
    margin-right: -1px;
}

/* Popover Header */
.popover-header {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e8e8e8;
}

.popover-header:empty {
    display: none;
}

/* Popover Content */
.popover-content {
    font-size: 13px;
    line-height: 1.6;
    color: #666;
}

.popover-content:empty {
    display: none;
}

/* Popover Footer */
.popover-footer {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e8e8e8;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.popover-footer:empty {
    display: none;
}

.popover-footer button,
.popover-footer .btn {
    font-size: 12px;
    padding: 4px 8px;
}

/* Popover Variants */
.popover.primary {
    background-color: #8B4513;
    color: #fff;
    border-color: #8B4513;
}

.popover.primary .popover-header {
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.popover.primary .popover-content {
    color: rgba(255, 255, 255, 0.9);
}

.popover.primary .popover-footer {
    border-top-color: rgba(255, 255, 255, 0.2);
}

.popover.primary.top::after {
    border-top-color: #8B4513;
}

.popover.primary.bottom::after {
    border-bottom-color: #8B4513;
}

.popover.primary.left::after {
    border-left-color: #8B4513;
}

.popover.primary.right::after {
    border-right-color: #8B4513;
}

.popover.success {
    background-color: #52c41a;
    color: #fff;
    border-color: #52c41a;
}

.popover.success .popover-header {
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.popover.success .popover-content {
    color: rgba(255, 255, 255, 0.9);
}

.popover.success .popover-footer {
    border-top-color: rgba(255, 255, 255, 0.2);
}

.popover.success.top::after {
    border-top-color: #52c41a;
}

.popover.success.bottom::after {
    border-bottom-color: #52c41a;
}

.popover.success.left::after {
    border-left-color: #52c41a;
}

.popover.success.right::after {
    border-right-color: #52c41a;
}

.popover.warning {
    background-color: #faad14;
    color: #fff;
    border-color: #faad14;
}

.popover.warning .popover-header {
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.popover.warning .popover-content {
    color: rgba(255, 255, 255, 0.9);
}

.popover.warning .popover-footer {
    border-top-color: rgba(255, 255, 255, 0.2);
}

.popover.warning.top::after {
    border-top-color: #faad14;
}

.popover.warning.bottom::after {
    border-bottom-color: #faad14;
}

.popover.warning.left::after {
    border-left-color: #faad14;
}

.popover.warning.right::after {
    border-right-color: #faad14;
}

.popover.error {
    background-color: #ff4d4f;
    color: #fff;
    border-color: #ff4d4f;
}

.popover.error .popover-header {
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.popover.error .popover-content {
    color: rgba(255, 255, 255, 0.9);
}

.popover.error .popover-footer {
    border-top-color: rgba(255, 255, 255, 0.2);
}

.popover.error.top::after {
    border-top-color: #ff4d4f;
}

.popover.error.bottom::after {
    border-bottom-color: #ff4d4f;
}

.popover.error.left::after {
    border-left-color: #ff4d4f;
}

.popover.error.right::after {
    border-right-color: #ff4d4f;
}

/* Popover Sizes */
.popover.small {
    padding: 8px;
    font-size: 12px;
    min-width: 150px;
    max-width: 250px;
}

.popover.small .popover-header {
    font-size: 12px;
    margin-bottom: 6px;
    padding-bottom: 6px;
}

.popover.small .popover-content {
    font-size: 11px;
}

.popover.large {
    padding: 16px;
    font-size: 16px;
    min-width: 250px;
    max-width: 400px;
}

.popover.large .popover-header {
    font-size: 16px;
    margin-bottom: 12px;
    padding-bottom: 12px;
}

.popover.large .popover-content {
    font-size: 14px;
}

/* Popover Trigger States */
.popover-trigger {
    cursor: pointer;
}

.popover-trigger:hover {
    color: #8B4513;
}

.popover-trigger.active {
    color: #8B4513;
}

/* Popover Animation */
.popover-fade-enter {
    opacity: 0;
    transform: scale(0.95);
}

.popover-fade-enter-active {
    opacity: 1;
    transform: scale(1);
    transition: all 0.2s ease;
}

.popover-fade-exit {
    opacity: 1;
    transform: scale(1);
}

.popover-fade-exit-active {
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.2s ease;
}

/* Popover Backdrop */
.popover-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    background-color: transparent;
}

/* Responsive Design */
@media (max-width: 768px) {
    .popover {
        min-width: 180px;
        max-width: 280px;
        font-size: 13px;
    }
    
    .popover.small {
        min-width: 140px;
        max-width: 220px;
    }
    
    .popover.large {
        min-width: 200px;
        max-width: 320px;
    }
    
    .popover-footer {
        flex-direction: column;
        gap: 4px;
    }
}

/* Accessibility */
.popover-trigger:focus {
    outline: 2px solid #8B4513;
    outline-offset: 2px;
}

.popover[role="tooltip"] {
    pointer-events: none;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .popover {
        border: 2px solid #000;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    }
    
    .popover-header {
        border-bottom: 2px solid #000;
    }
    
    .popover-footer {
        border-top: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .popover {
        transition: none;
    }
    
    .popover-fade-enter-active,
    .popover-fade-exit-active {
        transition: none;
    }
}

/* Print Styles */
@media print {
    .popover {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: 1px solid #000;
        margin: 8px 0;
    }
    
    .popover::before,
    .popover::after {
        display: none;
    }
    
    .popover-backdrop {
        display: none;
    }
}

/* Component: table (folder-based) */
/* Enhanced Table */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.table th.sortable {
  cursor: pointer;
}

.table th.sortable:hover {
  background: #f5f5f5;
}

.table-pagination {
  display: flex;
  justify-content: flex-end;
  padding: 16px;
  border-top: 1px solid #eee;
}

/* Component: tag (folder-based) */
/* Tag Component - Cacao UI Framework */

.tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    border-radius: 4px;
    background-color: #f8f9fa;
    color: #333;
    border: 1px solid #e8e8e8;
    transition: all 0.2s ease;
    max-width: 100%;
    box-sizing: border-box;
}

.tag:hover {
    background-color: #e9ecef;
    border-color: #8B4513;
}

/* Tag Text */
.tag-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

/* Tag Close Button */
.tag-close {
    margin-left: 4px;
    cursor: pointer;
    font-size: 10px;
    color: #999;
    transition: color 0.2s ease;
    padding: 2px;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
}

.tag-close:hover {
    color: #ff4d4f;
    background-color: rgba(255, 77, 79, 0.1);
}

.tag-close::before {
    content: "×";
    font-size: 12px;
    line-height: 1;
}

/* Tag Icon */
.tag-icon {
    margin-right: 4px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Tag Colors */
.tag.primary {
    background-color: #8B4513;
    color: #fff;
    border-color: #8B4513;
}

.tag.primary:hover {
    background-color: #6b3410;
    border-color: #6b3410;
}

.tag.primary .tag-close {
    color: rgba(255, 255, 255, 0.7);
}

.tag.primary .tag-close:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.2);
}

.tag.success {
    background-color: #52c41a;
    color: #fff;
    border-color: #52c41a;
}

.tag.success:hover {
    background-color: #389e0d;
    border-color: #389e0d;
}

.tag.success .tag-close {
    color: rgba(255, 255, 255, 0.7);
}

.tag.success .tag-close:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.2);
}

.tag.warning {
    background-color: #faad14;
    color: #fff;
    border-color: #faad14;
}

.tag.warning:hover {
    background-color: #d48806;
    border-color: #d48806;
}

.tag.warning .tag-close {
    color: rgba(255, 255, 255, 0.7);
}

.tag.warning .tag-close:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.2);
}

.tag.error {
    background-color: #ff4d4f;
    color: #fff;
    border-color: #ff4d4f;
}

.tag.error:hover {
    background-color: #f5222d;
    border-color: #f5222d;
}

.tag.error .tag-close {
    color: rgba(255, 255, 255, 0.7);
}

.tag.error .tag-close:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.2);
}

.tag.info {
    background-color: #1890ff;
    color: #fff;
    border-color: #1890ff;
}

.tag.info:hover {
    background-color: #096dd9;
    border-color: #096dd9;
}

.tag.info .tag-close {
    color: rgba(255, 255, 255, 0.7);
}

.tag.info .tag-close:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.2);
}

/* Tag Sizes */
.tag.small {
    padding: 2px 6px;
    font-size: 11px;
}

.tag.small .tag-close {
    width: 12px;
    height: 12px;
    margin-left: 2px;
}

.tag.small .tag-close::before {
    font-size: 10px;
}

.tag.small .tag-icon {
    font-size: 8px;
    margin-right: 2px;
}

.tag.large {
    padding: 6px 12px;
    font-size: 14px;
}

.tag.large .tag-close {
    width: 20px;
    height: 20px;
    margin-left: 6px;
}

.tag.large .tag-close::before {
    font-size: 14px;
}

.tag.large .tag-icon {
    font-size: 12px;
    margin-right: 6px;
}

/* Tag Variants */
.tag.outlined {
    background-color: transparent;
    border-width: 1px;
}

.tag.outlined.primary {
    color: #8B4513;
    border-color: #8B4513;
}

.tag.outlined.primary:hover {
    background-color: rgba(139, 69, 19, 0.1);
}

.tag.outlined.success {
    color: #52c41a;
    border-color: #52c41a;
}

.tag.outlined.success:hover {
    background-color: rgba(82, 196, 26, 0.1);
}

.tag.outlined.warning {
    color: #faad14;
    border-color: #faad14;
}

.tag.outlined.warning:hover {
    background-color: rgba(250, 173, 20, 0.1);
}

.tag.outlined.error {
    color: #ff4d4f;
    border-color: #ff4d4f;
}

.tag.outlined.error:hover {
    background-color: rgba(255, 77, 79, 0.1);
}

.tag.outlined.info {
    color: #1890ff;
    border-color: #1890ff;
}

.tag.outlined.info:hover {
    background-color: rgba(24, 144, 255, 0.1);
}

/* Tag Rounded */
.tag.rounded {
    border-radius: 12px;
}

/* Tag Borderless */
.tag.borderless {
    border: none;
}

/* Tag Clickable */
.tag.clickable {
    cursor: pointer;
}

.tag.clickable:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tag.clickable:active {
    transform: translateY(0);
    box-shadow: none;
}

/* Tag Disabled */
.tag.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Tag Group */
.tag-group {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.tag-group .tag {
    margin: 0;
}

/* Tag Input */
.tag-input {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    font-size: 12px;
    background-color: transparent;
    border: 1px dashed #8B4513;
    border-radius: 4px;
    color: #8B4513;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tag-input:hover {
    background-color: rgba(139, 69, 19, 0.1);
    border-style: solid;
}

.tag-input-icon {
    margin-right: 4px;
    font-size: 10px;
}

.tag-input-icon::before {
    content: "+";
}

/* Tag Animation */
.tag-enter {
    opacity: 0;
    transform: scale(0.8);
}

.tag-enter-active {
    opacity: 1;
    transform: scale(1);
    transition: all 0.2s ease;
}

.tag-exit {
    opacity: 1;
    transform: scale(1);
}

.tag-exit-active {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.2s ease;
}

/* Tag Status */
.tag.new {
    position: relative;
}

.tag.new::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 6px;
    height: 6px;
    background-color: #ff4d4f;
    border-radius: 50%;
    animation: tagPulse 2s infinite;
}

@keyframes tagPulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .tag {
        font-size: 11px;
        padding: 3px 6px;
    }
    
    .tag.large {
        font-size: 12px;
        padding: 4px 8px;
    }
    
    .tag-group {
        gap: 2px;
    }
}

/* Accessibility */
.tag:focus {
    outline: 2px solid #8B4513;
    outline-offset: 2px;
}

.tag-close:focus {
    outline: 2px solid #8B4513;
    outline-offset: 1px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .tag {
        border: 2px solid #000;
    }
    
    .tag.primary,
    .tag.success,
    .tag.warning,
    .tag.error,
    .tag.info {
        border-color: #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .tag {
        transition: none;
    }
    
    .tag.clickable:hover {
        transform: none;
    }
    
    .tag.clickable:active {
        transform: none;
    }
    
    .tag-enter-active,
    .tag-exit-active {
        transition: none;
    }
    
    .tag.new::after {
        animation: none;
    }
}

/* Print Styles */
@media print {
    .tag {
        border: 1px solid #000;
        break-inside: avoid;
    }
    
    .tag-close {
        display: none;
    }
    
    .tag.clickable:hover {
        transform: none;
        box-shadow: none;
    }
}

/* Component: timeline (folder-based) */
/* Timeline Component - Cacao UI Framework */

.timeline {
    position: relative;
    padding: 16px 0;
}

.timeline-item {
    position: relative;
    padding-left: 32px;
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

/* Timeline Line */
.timeline-item::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 20px;
    bottom: -24px;
    width: 2px;
    background-color: #e8e8e8;
}

.timeline-item:last-child::before {
    display: none;
}

/* Timeline Dot */
.timeline-item::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 4px;
    width: 10px;
    height: 10px;
    background-color: #8B4513;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 2px #e8e8e8;
    z-index: 1;
}

/* Timeline Content */
.timeline-content {
    flex: 1;
    margin-left: 16px;
}

.timeline-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    line-height: 1.4;
}

.timeline-description {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 8px;
}

.timeline-time {
    font-size: 12px;
    color: #999;
    margin-bottom: 0;
}

/* Timeline Item States */
.timeline-item.pending::after {
    background-color: #d9d9d9;
}

.timeline-item.processing::after {
    background-color: #1890ff;
    animation: timelinePulse 2s infinite;
}

.timeline-item.success::after {
    background-color: #52c41a;
}

.timeline-item.error::after {
    background-color: #ff4d4f;
}

.timeline-item.warning::after {
    background-color: #faad14;
}

@keyframes timelinePulse {
    0% {
        box-shadow: 0 0 0 2px #e8e8e8, 0 0 0 2px #1890ff;
    }
    50% {
        box-shadow: 0 0 0 2px #e8e8e8, 0 0 0 6px rgba(24, 144, 255, 0.3);
    }
    100% {
        box-shadow: 0 0 0 2px #e8e8e8, 0 0 0 2px #1890ff;
    }
}

/* Timeline Variants */
.timeline.alternate {
    text-align: left;
}

.timeline.alternate .timeline-item {
    width: 50%;
    padding-left: 0;
    padding-right: 32px;
}

.timeline.alternate .timeline-item:nth-child(even) {
    margin-left: 50%;
    padding-left: 32px;
    padding-right: 0;
}

.timeline.alternate .timeline-item::before {
    left: auto;
    right: 8px;
}

.timeline.alternate .timeline-item:nth-child(even)::before {
    left: 8px;
    right: auto;
}

.timeline.alternate .timeline-item::after {
    left: auto;
    right: 4px;
}

.timeline.alternate .timeline-item:nth-child(even)::after {
    left: 4px;
    right: auto;
}

.timeline.alternate .timeline-content {
    margin-left: 0;
    margin-right: 16px;
}

.timeline.alternate .timeline-item:nth-child(even) .timeline-content {
    margin-left: 16px;
    margin-right: 0;
}

/* Timeline Right Align */
.timeline.right {
    text-align: right;
}

.timeline.right .timeline-item {
    padding-left: 0;
    padding-right: 32px;
}

.timeline.right .timeline-item::before {
    left: auto;
    right: 8px;
}

.timeline.right .timeline-item::after {
    left: auto;
    right: 4px;
}

.timeline.right .timeline-content {
    margin-left: 0;
    margin-right: 16px;
}

/* Timeline Horizontal */
.timeline.horizontal {
    display: flex;
    align-items: flex-start;
    padding: 0;
    overflow-x: auto;
}

.timeline.horizontal .timeline-item {
    flex: 0 0 auto;
    padding-left: 0;
    padding-top: 32px;
    margin-bottom: 0;
    margin-right: 40px;
    min-width: 120px;
}

.timeline.horizontal .timeline-item:last-child {
    margin-right: 0;
}

.timeline.horizontal .timeline-item::before {
    left: 50%;
    top: 8px;
    bottom: auto;
    width: 40px;
    height: 2px;
    transform: translateX(-50%);
}

.timeline.horizontal .timeline-item:last-child::before {
    display: none;
}

.timeline.horizontal .timeline-item::after {
    left: 50%;
    top: 4px;
    transform: translateX(-50%);
}

.timeline.horizontal .timeline-content {
    margin-left: 0;
    margin-top: 16px;
    text-align: center;
}

/* Timeline Sizes */
.timeline.small .timeline-item {
    padding-left: 24px;
    margin-bottom: 16px;
}

.timeline.small .timeline-item::before {
    left: 6px;
    bottom: -16px;
    width: 1px;
}

.timeline.small .timeline-item::after {
    left: 3px;
    width: 6px;
    height: 6px;
}

.timeline.small .timeline-content {
    margin-left: 12px;
}

.timeline.small .timeline-title {
    font-size: 12px;
}

.timeline.small .timeline-description {
    font-size: 11px;
}

.timeline.small .timeline-time {
    font-size: 10px;
}

.timeline.large .timeline-item {
    padding-left: 48px;
    margin-bottom: 32px;
}

.timeline.large .timeline-item::before {
    left: 12px;
    bottom: -32px;
    width: 3px;
}

.timeline.large .timeline-item::after {
    left: 6px;
    width: 14px;
    height: 14px;
}

.timeline.large .timeline-content {
    margin-left: 24px;
}

.timeline.large .timeline-title {
    font-size: 16px;
    margin-bottom: 8px;
}

.timeline.large .timeline-description {
    font-size: 14px;
    margin-bottom: 12px;
}

.timeline.large .timeline-time {
    font-size: 13px;
}

/* Timeline Custom Icons */
.timeline-item.custom-icon::after {
    content: none;
    background-color: transparent;
    border: none;
    box-shadow: none;
}

.timeline-icon {
    position: absolute;
    left: 0;
    top: 0;
    width: 18px;
    height: 18px;
    background-color: #8B4513;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    z-index: 1;
}

/* Timeline Actions */
.timeline-actions {
    margin-top: 8px;
    display: flex;
    gap: 8px;
}

.timeline-actions button,
.timeline-actions .btn {
    font-size: 12px;
    padding: 4px 8px;
}

/* Timeline Labels */
.timeline-label {
    position: absolute;
    left: -100px;
    top: 0;
    width: 80px;
    text-align: right;
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.timeline.with-labels .timeline-item {
    padding-left: 48px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .timeline.alternate .timeline-item {
        width: 100%;
        padding-left: 32px;
        padding-right: 0;
    }
    
    .timeline.alternate .timeline-item:nth-child(even) {
        margin-left: 0;
        padding-left: 32px;
        padding-right: 0;
    }
    
    .timeline.alternate .timeline-item::before {
        left: 8px;
        right: auto;
    }
    
    .timeline.alternate .timeline-item:nth-child(even)::before {
        left: 8px;
        right: auto;
    }
    
    .timeline.alternate .timeline-item::after {
        left: 4px;
        right: auto;
    }
    
    .timeline.alternate .timeline-item:nth-child(even)::after {
        left: 4px;
        right: auto;
    }
    
    .timeline.alternate .timeline-content {
        margin-left: 16px;
        margin-right: 0;
    }
    
    .timeline.alternate .timeline-item:nth-child(even) .timeline-content {
        margin-left: 16px;
        margin-right: 0;
    }
    
    .timeline.horizontal {
        flex-direction: column;
    }
    
    .timeline.horizontal .timeline-item {
        padding-left: 32px;
        padding-top: 0;
        margin-right: 0;
        margin-bottom: 24px;
        width: 100%;
    }
    
    .timeline.horizontal .timeline-item::before {
        left: 8px;
        top: 20px;
        bottom: -24px;
        width: 2px;
        height: auto;
        transform: none;
    }
    
    .timeline.horizontal .timeline-item::after {
        left: 4px;
        top: 4px;
        transform: none;
    }
    
    .timeline.horizontal .timeline-content {
        margin-left: 16px;
        margin-top: 0;
        text-align: left;
    }
    
    .timeline-label {
        position: static;
        width: auto;
        text-align: left;
        margin-bottom: 4px;
    }
    
    .timeline.with-labels .timeline-item {
        padding-left: 32px;
    }
}

/* Accessibility */
.timeline-item:focus {
    outline: 2px solid #8B4513;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .timeline-item::before {
        background-color: #000;
    }
    
    .timeline-item::after {
        border-color: #000;
        box-shadow: 0 0 0 2px #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .timeline-item.processing::after {
        animation: none;
    }
    
    @keyframes timelinePulse {
        0%, 100% {
            box-shadow: 0 0 0 2px #e8e8e8, 0 0 0 2px #1890ff;
        }
    }
}

/* Print Styles */
@media print {
    .timeline {
        break-inside: avoid;
    }
    
    .timeline-item {
        break-inside: avoid;
        margin-bottom: 16px;
    }
    
    .timeline-item::before {
        background-color: #000;
    }
    
    .timeline-item::after {
        border-color: #000;
        box-shadow: 0 0 0 1px #000;
    }
    
    .timeline-actions {
        display: none;
    }
}

/* Component: tooltip (folder-based) */
/* Tooltip Component - Cacao UI Framework */

.tooltip-wrapper {
    position: relative;
    display: inline-block;
}

.tooltip {
    position: absolute;
    background-color: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    pointer-events: none;
    max-width: 200px;
    word-wrap: break-word;
    line-height: 1.4;
}

.tooltip.visible {
    opacity: 1;
    visibility: visible;
}

/* Tooltip Arrow */
.tooltip::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border: 5px solid transparent;
}

/* Tooltip Positions */
.tooltip.top {
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
}

.tooltip.top::before {
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-top-color: #333;
}

.tooltip.bottom {
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 8px;
}

.tooltip.bottom::before {
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-bottom-color: #333;
}

.tooltip.left {
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-right: 8px;
}

.tooltip.left::before {
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border-left-color: #333;
}

.tooltip.right {
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 8px;
}

.tooltip.right::before {
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    border-right-color: #333;
}

/* Tooltip Variants */
.tooltip.light {
    background-color: #fff;
    color: #333;
    border: 1px solid #e8e8e8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tooltip.light.top::before {
    border-top-color: #e8e8e8;
    border-top-width: 6px;
}

.tooltip.light.top::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border: 5px solid transparent;
    border-top-color: #fff;
    margin-top: -1px;
}

.tooltip.light.bottom::before {
    border-bottom-color: #e8e8e8;
    border-bottom-width: 6px;
}

.tooltip.light.bottom::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border: 5px solid transparent;
    border-bottom-color: #fff;
    margin-bottom: -1px;
}

.tooltip.light.left::before {
    border-left-color: #e8e8e8;
    border-left-width: 6px;
}

.tooltip.light.left::after {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border: 5px solid transparent;
    border-left-color: #fff;
    margin-left: -1px;
}

.tooltip.light.right::before {
    border-right-color: #e8e8e8;
    border-right-width: 6px;
}

.tooltip.light.right::after {
    content: '';
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border: 5px solid transparent;
    border-right-color: #fff;
    margin-right: -1px;
}

.tooltip.primary {
    background-color: #8B4513;
}

.tooltip.primary.top::before {
    border-top-color: #8B4513;
}

.tooltip.primary.bottom::before {
    border-bottom-color: #8B4513;
}

.tooltip.primary.left::before {
    border-left-color: #8B4513;
}

.tooltip.primary.right::before {
    border-right-color: #8B4513;
}

.tooltip.success {
    background-color: #52c41a;
}

.tooltip.success.top::before {
    border-top-color: #52c41a;
}

.tooltip.success.bottom::before {
    border-bottom-color: #52c41a;
}

.tooltip.success.left::before {
    border-left-color: #52c41a;
}

.tooltip.success.right::before {
    border-right-color: #52c41a;
}

.tooltip.warning {
    background-color: #faad14;
}

.tooltip.warning.top::before {
    border-top-color: #faad14;
}

.tooltip.warning.bottom::before {
    border-bottom-color: #faad14;
}

.tooltip.warning.left::before {
    border-left-color: #faad14;
}

.tooltip.warning.right::before {
    border-right-color: #faad14;
}

.tooltip.error {
    background-color: #ff4d4f;
}

.tooltip.error.top::before {
    border-top-color: #ff4d4f;
}

.tooltip.error.bottom::before {
    border-bottom-color: #ff4d4f;
}

.tooltip.error.left::before {
    border-left-color: #ff4d4f;
}

.tooltip.error.right::before {
    border-right-color: #ff4d4f;
}

/* Tooltip Sizes */
.tooltip.small {
    padding: 4px 8px;
    font-size: 10px;
}

.tooltip.small::before {
    border-width: 4px;
}

.tooltip.large {
    padding: 12px 16px;
    font-size: 14px;
    max-width: 300px;
}

.tooltip.large::before {
    border-width: 6px;
}

/* Tooltip Multiline */
.tooltip.multiline {
    white-space: normal;
    max-width: 200px;
    text-align: left;
}

.tooltip.multiline.small {
    max-width: 150px;
}

.tooltip.multiline.large {
    max-width: 300px;
}

/* Tooltip Animation */
.tooltip-fade-enter {
    opacity: 0;
    transform: scale(0.8);
}

.tooltip-fade-enter-active {
    opacity: 1;
    transform: scale(1);
    transition: all 0.2s ease;
}

.tooltip-fade-exit {
    opacity: 1;
    transform: scale(1);
}

.tooltip-fade-exit-active {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.2s ease;
}

/* Tooltip Trigger States */
.tooltip-trigger {
    cursor: help;
}

.tooltip-trigger:hover {
    text-decoration: underline;
    text-decoration-style: dotted;
}

.tooltip-trigger.disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

/* Tooltip Content */
.tooltip-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.tooltip-description {
    font-weight: normal;
    opacity: 0.9;
}

/* Tooltip Icon */
.tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-right: 4px;
    font-size: 12px;
}

/* Tooltip Delay */
.tooltip.delay-short {
    transition-delay: 0.1s;
}

.tooltip.delay-medium {
    transition-delay: 0.5s;
}

.tooltip.delay-long {
    transition-delay: 1s;
}

/* Tooltip Auto-adjust */
.tooltip.auto-adjust {
    max-width: none;
    width: auto;
    min-width: 50px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tooltip {
        font-size: 11px;
        padding: 6px 10px;
        max-width: 180px;
    }
    
    .tooltip.small {
        font-size: 9px;
        padding: 3px 6px;
    }
    
    .tooltip.large {
        font-size: 12px;
        padding: 8px 12px;
        max-width: 250px;
    }
    
    .tooltip.multiline {
        max-width: 180px;
    }
    
    .tooltip.multiline.small {
        max-width: 130px;
    }
    
    .tooltip.multiline.large {
        max-width: 250px;
    }
}

/* Accessibility */
.tooltip[role="tooltip"] {
    pointer-events: none;
}

.tooltip-wrapper:focus .tooltip {
    opacity: 1;
    visibility: visible;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .tooltip {
        background-color: #000;
        color: #fff;
        border: 2px solid #fff;
    }
    
    .tooltip.light {
        background-color: #fff;
        color: #000;
        border: 2px solid #000;
    }
    
    .tooltip::before {
        border-color: transparent;
    }
    
    .tooltip.top::before {
        border-top-color: #000;
    }
    
    .tooltip.bottom::before {
        border-bottom-color: #000;
    }
    
    .tooltip.left::before {
        border-left-color: #000;
    }
    
    .tooltip.right::before {
        border-right-color: #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .tooltip {
        transition: none;
    }
    
    .tooltip-fade-enter-active,
    .tooltip-fade-exit-active {
        transition: none;
    }
}

/* Print Styles */
@media print {
    .tooltip {
        position: static;
        opacity: 1;
        visibility: visible;
        background-color: transparent;
        color: #000;
        border: 1px solid #000;
        padding: 4px;
        margin: 2px 0;
        font-size: 10px;
    }
    
    .tooltip::before {
        display: none;
    }
    
    .tooltip-wrapper::after {
        content: " [" attr(title) "]";
        font-size: 10px;
        color: #666;
    }
}

/* Component: tree_viewer (folder-based) */
/* tree_viewer.css */
.tree_viewer {
  font-family: monospace;
  font-size: 14px;
  line-height: 1.4;
  user-select: none;
  padding: 8px;
}
.tree_viewer.light {
  background: #fff;
  color: #333;
}
.tree_viewer.dark {
  background: #1e1e1e;
  color: #ccc;
}

.tree-node {
  margin-left: 16px;
  position: relative;
}
.tree-expand-toggle {
  display: inline-block;
  width: 12px;
  cursor: pointer;
  user-select: none;
}
.tree-key {
  font-weight: bold;
  margin-left: 4px;
}
.tree-value {
  margin-left: 4px;
  color: #007acc;
}

.tree-node.collapsed > .tree-children {
  display: none;
}
.tree-children {
  margin-left: 16px;
  border-left: 1px dashed #ccc;
  padding-left: 8px;
}

/* Component: checkbox (folder-based) */
/* Checkbox */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 1rem;
    cursor: pointer;
    padding: 8px 0 8px 4px;
    border-radius: 4px;
    transition: background 0.2s;
}
.checkbox-wrapper:hover {
    background: #f5f5f5;
}
.checkbox-wrapper input[type="checkbox"] {
    accent-color: var(--checkbox-accent);
    width: 18px;
    height: 18px;
    margin: 0 6px 0 0;
}
select option {
    padding: 8px 12px;
}

/* Component: input (folder-based) */
input[type="text"],
input[type="password"],
input[type="search"],
input[type="date"],
input[type="time"] {
    width: 100%;
    padding: var(--input-padding);
    border: 1px solid var(--input-border);
    border-radius: var(--input-radius);
    background: var(--input-bg);
    color: var(--font-color);
    font-family: var(--font-family);
    margin-bottom: 10px;
    box-sizing: border-box;
    transition: border 0.2s, box-shadow 0.2s;
}
input[type="text"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="date"]:focus,
input[type="time"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--input-focus);
}
input[disabled] {
    background: var(--input-disabled);
    color: #aaa;
    cursor: not-allowed;
}

/* Component: radio (folder-based) */
/* Radio */
.radio-group {
    display: flex;
    gap: 20px;
    margin-bottom: 14px;
    padding: 4px 0 4px 2px;
}
.radio-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    cursor: pointer;
    padding: 6px 0 6px 2px;
    border-radius: 4px;
    transition: background 0.2s;
}
.radio-wrapper:hover {
    background: #f5f5f5;
}
.radio-wrapper input[type="radio"] {
    accent-color: var(--primary-color);
    width: 18px;
    height: 18px;
    margin: 0 6px 0 0;
}

/* Component: range-sliders (folder-based) */
/**
 * Range Sliders Component Styles
 * Styling for the dual-slider range component
 */

.range-sliders-container {
    width: 100%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sliders-wrapper {
    width: 100%;
    position: relative;
    padding: 10px 0;
}

.range-slider {
    width: 100%;
    margin: 10px 0;
    -webkit-appearance: none;
    background: transparent;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 24px;
    width: 24px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    margin-top: -10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    border: 2px solid #D2691E;
    transition: all 0.2s ease;
}

.range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.range-slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
}

.range-display {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    font-size: 20px;
    color: #ffffff;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}

.range-value {
    min-width: 60px;
    text-align: center;
    padding: 5px 10px;
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
    margin: 0 10px;
}

/* Firefox support */
.range-slider::-moz-range-thumb {
    height: 24px;
    width: 24px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    border: 2px solid #D2691E;
    transition: all 0.2s ease;
}

.range-slider::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.range-slider::-moz-range-track {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
}

/* Edge/IE support */
.range-slider::-ms-thumb {
    height: 24px;
    width: 24px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    border: 2px solid #D2691E;
    transition: all 0.2s ease;
}

.range-slider::-ms-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.range-slider::-ms-track {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    border-color: transparent;
    color: transparent;
}

.range-slider::-ms-fill-lower {
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
}

.range-slider::-ms-fill-upper {
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
}

/* Component: rate (folder-based) */
/* Rate (stars) */
.rate-wrapper {
    display: flex;
    gap: 4px;
    font-size: 1.5rem;
    margin-bottom: 10px;
}
.rate-star {
    color: var(--rate-star-empty);
    cursor: pointer !important;
    transition: color 0.2s;
    user-select: none;
    position: relative;
    font-size: 2em;
}
.rate-star:hover {
    transform: scale(1.1);
}
.rate-star.filled {
    color: var(--rate-star);
}
.rate-star.half {
    color: var(--rate-star);
}
.rate-star.half:after {
    content: "★";
    color: var(--rate-star-empty);
    position: absolute;
    left: 50%;
    top: 0;
    width: 50%;
    overflow: hidden;
    z-index: 1;
}

/* Component: select (folder-based) */
select {
    width: 100%;
    padding: var(--input-padding);
    border: 1px solid var(--input-border);
    border-radius: var(--input-radius);
    background: var(--input-bg);
    color: var(--font-color);
    font-family: var(--font-family);
    margin-bottom: 10px;
    box-sizing: border-box;
    transition: border 0.2s, box-shadow 0.2s;
}
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--input-focus);
}
select[disabled] {
    background: var(--input-disabled);
    color: #aaa;
    cursor: not-allowed;
}

/* Component: slider (folder-based) */
.range-slider {
    width: 100%;
    margin: 10px 0;
    -webkit-appearance: none;
    background: transparent;
    height: 2px;
}
.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    border: 2px solid #fff;
    transition: all 0.2s;
}
.range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.range-slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    background: #eee;
    border-radius: 2px;
}

/* Component: switch (folder-based) */
/* Switch */
.switch-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 44px;
    height: 24px;
    margin-right: 8px;
    margin-bottom: 0;
}
.switch-wrapper input[type="checkbox"] {
    opacity: 0;
    width: 0;
    height: 0;
}
.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--switch-bg);
    border-radius: 24px;
    transition: background 0.2s;
}
.switch-wrapper input[type="checkbox"]:checked + .switch-slider {
    background: var(--switch-checked-bg);
}
.switch-slider:before {
    content: "";
    position: absolute;
    left: 4px;
    top: 4px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
}
.switch-wrapper input[type="checkbox"]:checked + .switch-slider:before {
    transform: translateX(20px);
}

/* Component: textarea (folder-based) */
textarea {
    width: 100%;
    padding: var(--input-padding);
    border: 1px solid var(--input-border);
    border-radius: var(--input-radius);
    background: var(--input-bg);
    color: var(--font-color);
    font-family: var(--font-family);
    margin-bottom: 10px;
    box-sizing: border-box;
    transition: border 0.2s, box-shadow 0.2s;
}
textarea:focus{
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--input-focus);
}
textarea[disabled] {
    background: var(--input-disabled);
    color: #aaa;
    cursor: not-allowed;
}

/* Component: upload (folder-based) */
/* Upload */
    .upload-wrapper {
        display: flex;
        align-items: center;
        justify-content: center;
        border: 2px dashed var(--upload-border);
        border-radius: var(--input-radius);
        padding: 20px;
        background: #fafafa;
        color: var(--font-color);
        margin-bottom: 10px;
        min-height: 60px;
    }
    .upload-wrapper input[type="file"] {
        width: auto;
        margin: 0;
        border: none;
        background: transparent;
        box-shadow: none;
        padding: 0;
    }
    /* Search input wrapper */
    .search-input-wrapper {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 10px;
    }

/* Component: breadcrumb (folder-based) */
/**
 * Breadcrumb Component Styles
 * Provides styling for breadcrumb navigation
 */

.breadcrumb-container {
    display: flex;
    align-items: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #666;
    overflow: hidden;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
    flex-wrap: nowrap;
    overflow: hidden;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    white-space: nowrap;
    max-width: 200px;
    overflow: hidden;
}

.breadcrumb-item:last-child {
    max-width: none;
}

.breadcrumb-link {
    display: flex;
    align-items: center;
    color: #666;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.breadcrumb-link:hover {
    color: #1890ff;
    background-color: #f0f8ff;
}

.breadcrumb-link:focus {
    outline: 2px solid #1890ff;
    outline-offset: 2px;
}

.breadcrumb-link-focused {
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.breadcrumb-text {
    display: flex;
    align-items: center;
    color: #333;
    font-weight: 500;
    padding: 4px 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.breadcrumb-icon {
    margin-right: 4px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.breadcrumb-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.breadcrumb-separator {
    display: flex;
    align-items: center;
    margin: 0 8px;
    color: #ccc;
    font-size: 12px;
    flex-shrink: 0;
}

.breadcrumb-ellipsis {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    color: #999;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: bold;
    user-select: none;
}

.breadcrumb-ellipsis:hover {
    color: #1890ff;
    background-color: #f0f8ff;
}

.breadcrumb-ellipsis:focus {
    outline: 2px solid #1890ff;
    outline-offset: 2px;
}

/* Home item styling */
.breadcrumb-home {
    flex-shrink: 0;
}

.breadcrumb-home-link {
    padding: 4px 6px;
    min-width: 32px;
    justify-content: center;
}

.breadcrumb-home-link .breadcrumb-icon {
    margin-right: 0;
    font-size: 16px;
}

/* Active item styling */
.breadcrumb-item-active .breadcrumb-text,
.breadcrumb-item-active .breadcrumb-link {
    color: #1890ff;
    font-weight: 600;
}

/* Disabled item styling */
.breadcrumb-item-disabled .breadcrumb-text,
.breadcrumb-item-disabled .breadcrumb-link {
    color: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.breadcrumb-item-disabled .breadcrumb-link:hover {
    color: #ccc;
    background-color: transparent;
}

/* Size variations */
.breadcrumb-small {
    font-size: 12px;
}

.breadcrumb-small .breadcrumb-link,
.breadcrumb-small .breadcrumb-text {
    padding: 2px 6px;
}

.breadcrumb-small .breadcrumb-icon {
    font-size: 12px;
}

.breadcrumb-small .breadcrumb-separator {
    margin: 0 6px;
    font-size: 10px;
}

.breadcrumb-large {
    font-size: 16px;
}

.breadcrumb-large .breadcrumb-link,
.breadcrumb-large .breadcrumb-text {
    padding: 6px 12px;
}

.breadcrumb-large .breadcrumb-icon {
    font-size: 18px;
}

.breadcrumb-large .breadcrumb-separator {
    margin: 0 12px;
    font-size: 14px;
}

/* Variant styles */

/* Outlined variant */
.breadcrumb-outlined .breadcrumb-link {
    border: 1px solid #d9d9d9;
    background-color: #fff;
}

.breadcrumb-outlined .breadcrumb-link:hover {
    border-color: #1890ff;
    background-color: #f0f8ff;
}

.breadcrumb-outlined .breadcrumb-item-active .breadcrumb-text,
.breadcrumb-outlined .breadcrumb-item-active .breadcrumb-link {
    border-color: #1890ff;
    background-color: #e6f7ff;
}

/* Ghost variant */
.breadcrumb-ghost .breadcrumb-link {
    background-color: transparent;
    border: 1px solid transparent;
}

.breadcrumb-ghost .breadcrumb-link:hover {
    background-color: rgba(24, 144, 255, 0.1);
    border-color: rgba(24, 144, 255, 0.3);
}

.breadcrumb-ghost .breadcrumb-item-active .breadcrumb-text,
.breadcrumb-ghost .breadcrumb-item-active .breadcrumb-link {
    background-color: rgba(24, 144, 255, 0.1);
}

/* Separator styles */
.breadcrumb-separator-arrow .breadcrumb-separator {
    font-size: 14px;
    color: #999;
}

.breadcrumb-separator-slash .breadcrumb-separator {
    font-size: 16px;
    color: #ccc;
    font-weight: 300;
}

.breadcrumb-separator-dot .breadcrumb-separator {
    font-size: 18px;
    color: #ddd;
    font-weight: bold;
}

.breadcrumb-separator-custom .breadcrumb-separator {
    color: #999;
}

/* Responsive design */
.breadcrumb-responsive {
    min-width: 0;
    flex: 1;
}

.breadcrumb-responsive .breadcrumb-list {
    min-width: 0;
}

.breadcrumb-responsive .breadcrumb-item {
    min-width: 0;
    flex-shrink: 1;
}

.breadcrumb-responsive .breadcrumb-item:last-child {
    flex-shrink: 0;
}

.breadcrumb-truncated .breadcrumb-item:not(:first-child):not(:last-child):not(.breadcrumb-item-ellipsis) {
    display: none;
}

@media (max-width: 768px) {
    .breadcrumb-container {
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .breadcrumb-container::-webkit-scrollbar {
        display: none;
    }
    
    .breadcrumb-list {
        flex-wrap: nowrap;
        min-width: max-content;
    }
    
    .breadcrumb-item {
        max-width: 150px;
    }
    
    .breadcrumb-separator {
        margin: 0 4px;
    }
    
    .breadcrumb-link,
    .breadcrumb-text {
        padding: 4px 6px;
    }
}

@media (max-width: 480px) {
    .breadcrumb-item {
        max-width: 100px;
    }
    
    .breadcrumb-separator {
        margin: 0 2px;
    }
    
    .breadcrumb-link,
    .breadcrumb-text {
        padding: 2px 4px;
        font-size: 12px;
    }
    
    .breadcrumb-icon {
        font-size: 12px;
    }
    
    /* Auto-truncate on very small screens */
    .breadcrumb-item:not(:first-child):not(:last-child) {
        display: none;
    }
    
    .breadcrumb-item:nth-last-child(2) {
        display: flex;
    }
    
    .breadcrumb-item:nth-last-child(2)::before {
        content: '...';
        color: #999;
        margin-right: 4px;
    }
}

/* Dark theme */
.breadcrumb-dark {
    color: rgba(255, 255, 255, 0.65);
}

.breadcrumb-dark .breadcrumb-link {
    color: rgba(255, 255, 255, 0.65);
}

.breadcrumb-dark .breadcrumb-link:hover {
    color: #1890ff;
    background-color: rgba(255, 255, 255, 0.1);
}

.breadcrumb-dark .breadcrumb-text {
    color: rgba(255, 255, 255, 0.85);
}

.breadcrumb-dark .breadcrumb-separator {
    color: rgba(255, 255, 255, 0.3);
}

.breadcrumb-dark .breadcrumb-ellipsis {
    color: rgba(255, 255, 255, 0.45);
}

.breadcrumb-dark .breadcrumb-ellipsis:hover {
    color: #1890ff;
    background-color: rgba(255, 255, 255, 0.1);
}

.breadcrumb-dark .breadcrumb-item-active .breadcrumb-text,
.breadcrumb-dark .breadcrumb-item-active .breadcrumb-link {
    color: #1890ff;
}

/* Loading state */
.breadcrumb-loading {
    opacity: 0.6;
    pointer-events: none;
}

.breadcrumb-loading .breadcrumb-item::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 4px;
    width: 10px;
    height: 10px;
    margin-top: -5px;
    border: 1px solid #1890ff;
    border-top: 1px solid transparent;
    border-radius: 50%;
    animation: breadcrumb-spin 1s linear infinite;
}

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

/* Accessibility improvements */
.breadcrumb-link:focus-visible {
    outline: 2px solid #1890ff;
    outline-offset: 2px;
}

.breadcrumb-ellipsis:focus-visible {
    outline: 2px solid #1890ff;
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .breadcrumb-link {
        border: 1px solid;
    }
    
    .breadcrumb-separator {
        border: 1px solid;
        padding: 2px 4px;
    }
    
    .breadcrumb-item-active .breadcrumb-text,
    .breadcrumb-item-active .breadcrumb-link {
        background-color: ButtonFace;
        border-color: ButtonText;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .breadcrumb-link,
    .breadcrumb-ellipsis {
        transition: none;
    }
    
    .breadcrumb-loading .breadcrumb-item::after {
        animation: none;
    }
}

/* Print styles */
@media print {
    .breadcrumb-container {
        display: none;
    }
}

/* RTL support */
.breadcrumb-container[dir="rtl"] .breadcrumb-icon {
    margin-right: 0;
    margin-left: 4px;
}

.breadcrumb-container[dir="rtl"] .breadcrumb-separator {
    transform: scaleX(-1);
}

.breadcrumb-container[dir="rtl"] .breadcrumb-home-link .breadcrumb-icon {
    margin-left: 0;
}

/* Hover effects for better UX */
.breadcrumb-item:hover .breadcrumb-separator {
    color: #999;
}

.breadcrumb-item:hover + .breadcrumb-item .breadcrumb-separator {
    color: #999;
}

/* Focus management */
.breadcrumb-container:focus-within .breadcrumb-separator {
    color: #1890ff;
}

/* Smooth scrolling for responsive */
.breadcrumb-responsive {
    scroll-behavior: smooth;
}

/* Custom scrollbar for webkit browsers */
.breadcrumb-container::-webkit-scrollbar {
    height: 4px;
}

.breadcrumb-container::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.breadcrumb-container::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

.breadcrumb-container::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Component: menu (folder-based) */
/**
 * Menu Component Styles
 * Provides styling for menu navigation with submenus and various themes
 */

.menu {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    list-style: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    background-color: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.menu-horizontal {
    flex-direction: row;
    align-items: center;
}

.menu-item {
    position: relative;
    display: flex;
    flex-direction: column;
}

.menu-horizontal .menu-item {
    flex-direction: row;
}

.menu-link,
.menu-submenu-toggle {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    background: none;
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 400;
    position: relative;
    outline: none;
}
.menu-item__button,
.menu-item__link {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 18px;
    color: #222;
    background: #f8fafc;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    font-size: 15px;
    font-weight: 500;
    position: relative;
    outline: none;
    gap: 10px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
    margin-bottom: 6px;
}

.menu-item__button:hover,
.menu-item__link:hover,
.menu-item__button:focus,
.menu-item__link:focus {
    color: #1890ff;
    background: #e6f7ff;
    outline: 2px solid #1890ff;
    outline-offset: -2px;
    box-shadow: 0 2px 8px rgba(24,144,255,0.08);
}

.menu-item.is-selected > .menu-item__button,
.menu-item.is-selected > .menu-item__link {
    color: #fff;
    background: linear-gradient(90deg, #1890ff 80%, #40a9ff 100%);
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(24,144,255,0.12);
}

.menu-item.is-disabled > .menu-item__button,
.menu-item.is-disabled > .menu-item__link {
    color: #aaa;
    cursor: not-allowed;
    background: #f5f5f5;
    pointer-events: none;
    box-shadow: none;
}

.menu-link:hover,
.menu-submenu-toggle:hover {
    color: #1890ff;
    background-color: #f0f8ff;
}

.menu-link:focus,
.menu-submenu-toggle:focus {
    background-color: #f0f8ff;
    box-shadow: inset 0 0 0 2px #1890ff;
}

.menu-link:focus-visible,
.menu-submenu-toggle:focus-visible {
    outline: 2px solid #1890ff;
    outline-offset: -2px;
}

.menu-link-content,
.menu-submenu-toggle-content {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 8px;
}

.menu-icon {
    font-size: 16px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.menu-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.menu-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    background-color: #ff4d4f;
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    border-radius: 9px;
    line-height: 1;
    flex-shrink: 0;
}

.menu-arrow {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
    margin-left: auto;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.menu-horizontal .menu-arrow {
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 4px solid currentColor;
    border-right: none;
}

/* Active state */
.menu-item-active > .menu-link,
.menu-item-active > .menu-submenu-toggle {
    color: #1890ff;
    background-color: #e6f7ff;
    font-weight: 500;
}

.menu-item-active > .menu-link::after,
.menu-item-active > .menu-submenu-toggle::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: #1890ff;
}

.menu-horizontal .menu-item-active > .menu-link::after,
.menu-horizontal .menu-item-active > .menu-submenu-toggle::after {
    right: auto;
    left: 0;
    top: auto;
    bottom: 0;
    width: 100%;
    height: 3px;
}

/* Disabled state */
.menu-item-disabled > .menu-link,
.menu-item-disabled > .menu-submenu-toggle {
    color: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.menu-item-disabled > .menu-link:hover,
.menu-item-disabled > .menu-submenu-toggle:hover {
    color: #ccc;
    background-color: transparent;
}

/* Submenu */
.menu-submenu {
    display: none;
    flex-direction: column;
    margin: 0;
    padding: 0;
    list-style: none;
    background-color: #fafafa;
    border-left: 3px solid #e6f7ff;
    margin-left: 16px;
    border-radius: 0 4px 4px 0;
    overflow: hidden;
}

.menu-horizontal .menu-submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    margin-left: 0;
    border-left: none;
}

.menu-item-submenu-open > .menu-submenu {
    display: flex;
}

.menu-item-submenu-open > .menu-submenu-toggle .menu-arrow {
    transform: rotate(180deg);
}

.menu-horizontal .menu-item-submenu-open > .menu-submenu-toggle .menu-arrow {
    transform: rotate(90deg);
}

.menu-submenu .menu-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.menu-submenu .menu-item:last-child {
    border-bottom: none;
}

.menu-submenu .menu-link {
    padding: 10px 16px;
    font-size: 13px;
    padding-left: 40px;
}

.menu-horizontal .menu-submenu .menu-link {
    padding: 10px 16px;
    padding-left: 16px;
}

/* Size variations */
.menu-small {
    font-size: 12px;
}

.menu-small .menu-link,
.menu-small .menu-submenu-toggle {
    padding: 8px 12px;
    font-size: 12px;
}

.menu-small .menu-icon {
    font-size: 14px;
    width: 16px;
    height: 16px;
}

.menu-small .menu-submenu .menu-link {
    padding: 6px 12px;
    padding-left: 28px;
}

.menu-large {
    font-size: 16px;
}

.menu-large .menu-link,
.menu-large .menu-submenu-toggle {
    padding: 16px 20px;
    font-size: 16px;
}

.menu-large .menu-icon {
    font-size: 20px;
    width: 24px;
    height: 24px;
}

.menu-large .menu-submenu .menu-link {
    padding: 12px 20px;
    padding-left: 44px;
}

/* Variant styles */

/* Inline variant */
.menu-inline {
    box-shadow: none;
    background-color: transparent;
    border-radius: 0;
}

.menu-inline .menu-item {
    border-bottom: 1px solid #f0f0f0;
}

.menu-inline .menu-item:last-child {
    border-bottom: none;
}

/* Vertical variant */
.menu-vertical {
    border-right: 1px solid #f0f0f0;
}

/* Theme variations */

/* Dark theme */
.menu-dark {
    background-color: #001529;
    color: rgba(255, 255, 255, 0.65);
}

.menu-dark .menu-link,
.menu-dark .menu-submenu-toggle {
    color: rgba(255, 255, 255, 0.65);
}

.menu-dark .menu-link:hover,
.menu-dark .menu-submenu-toggle:hover {
    color: rgba(255, 255, 255, 0.85);
    background-color: rgba(255, 255, 255, 0.1);
}

.menu-dark .menu-item-active > .menu-link,
.menu-dark .menu-item-active > .menu-submenu-toggle {
    color: #1890ff;
    background-color: rgba(24, 144, 255, 0.1);
}

.menu-dark .menu-submenu {
    background-color: rgba(255, 255, 255, 0.05);
    border-left-color: rgba(24, 144, 255, 0.3);
}

.menu-dark .menu-submenu .menu-item {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

/* Light theme */
.menu-light {
    background-color: #fafafa;
    border: 1px solid #f0f0f0;
}

.menu-light .menu-link:hover,
.menu-light .menu-submenu-toggle:hover {
    background-color: #fff;
}

.menu-light .menu-item-active > .menu-link,
.menu-light .menu-item-active > .menu-submenu-toggle {
    background-color: #fff;
    border-color: #1890ff;
}

/* Collapsed state */
.menu-collapsed {
    width: 64px;
    overflow: hidden;
}

.menu-collapsed .menu-label {
    display: none;
}

.menu-collapsed .menu-badge {
    display: none;
}

.menu-collapsed .menu-arrow {
    display: none;
}

.menu-collapsed .menu-link,
.menu-collapsed .menu-submenu-toggle {
    justify-content: center;
    padding: 12px;
}

.menu-collapsed .menu-submenu {
    display: none !important;
}

.menu-collapsed .menu-icon {
    margin: 0;
}

/* Responsive design */
@media (max-width: 768px) {
    .menu-horizontal {
        flex-direction: column;
    }
    
    .menu-horizontal .menu-item {
        flex-direction: column;
    }
    
    .menu-horizontal .menu-submenu {
        position: static;
        box-shadow: none;
        border: none;
        border-left: 3px solid #e6f7ff;
        margin-left: 16px;
        border-radius: 0 4px 4px 0;
    }
    
    .menu-horizontal .menu-arrow {
        border-left: 4px solid transparent;
        border-right: 4px solid transparent;
        border-top: 4px solid currentColor;
        border-bottom: none;
    }
    
    .menu-horizontal .menu-item-submenu-open > .menu-submenu-toggle .menu-arrow {
        transform: rotate(180deg);
    }
    
    .menu-horizontal .menu-item-active > .menu-link::after,
    .menu-horizontal .menu-item-active > .menu-submenu-toggle::after {
        right: 0;
        left: auto;
        top: 0;
        bottom: 0;
        width: 3px;
        height: 100%;
    }
}

/* Accessibility improvements */
.menu-link:focus-visible,
.menu-submenu-toggle:focus-visible {
    outline: 2px solid #1890ff;
    outline-offset: -2px;
}

/* Animation for submenu */
.menu-submenu {
    transition: all 0.3s ease;
    max-height: 0;
    overflow: hidden;
}

.menu-item-submenu-open > .menu-submenu {
    max-height: 1000px;
}

.menu-horizontal .menu-submenu {
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    max-height: none;
}

.menu-horizontal .menu-item-submenu-open > .menu-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .menu {
        border: 2px solid;
    }
    
    .menu-link,
    .menu-submenu-toggle {
        border: 1px solid;
    }
    
    .menu-item-active > .menu-link,
    .menu-item-active > .menu-submenu-toggle {
        background-color: ButtonFace;
        border-color: ButtonText;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .menu-link,
    .menu-submenu-toggle,
    .menu-arrow,
    .menu-submenu {
        transition: none;
    }
}

/* Print styles */
@media print {
    .menu {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .menu-submenu {
        display: flex !important;
    }
}

/* Loading state */
.menu-loading {
    opacity: 0.6;
    pointer-events: none;
}

.menu-loading .menu-item::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 8px;
    width: 12px;
    height: 12px;
    margin-top: -6px;
    border: 2px solid #1890ff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: menu-spin 1s linear infinite;
}

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

/* Scroll indicators for long menus */
.menu-scrollable {
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #ccc #f1f1f1;
}

.menu-scrollable::-webkit-scrollbar {
    width: 6px;
}

.menu-scrollable::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.menu-scrollable::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.menu-scrollable::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Tooltip for collapsed menu items */
.menu-collapsed .menu-item {
    position: relative;
}

.menu-collapsed .menu-item:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    background-color: #333;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1001;
    margin-left: 8px;
}

.menu-collapsed .menu-item:hover::before {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-right: 4px solid #333;
    z-index: 1001;
    margin-left: 4px;
}

/* RTL support */
.menu[dir="rtl"] .menu-item-active > .menu-link::after,
.menu[dir="rtl"] .menu-item-active > .menu-submenu-toggle::after {
    right: auto;
    left: 0;
}

.menu[dir="rtl"] .menu-submenu {
    border-left: none;
    border-right: 3px solid #e6f7ff;
    margin-left: 0;
    margin-right: 16px;
    border-radius: 4px 0 0 4px;
}

.menu[dir="rtl"] .menu-arrow {
    margin-left: 0;
    margin-right: auto;
}

/* Component: navbar (folder-based) */
/**
 * Navbar Component Styles
 * Provides styling for navigation bars with responsive design
 */

.navbar {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    background-color: #fff;
    border-bottom: 1px solid #e9ecef;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Brand section */
.navbar-brand {
    display: flex;
    align-items: center;
    margin-right: auto;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1890ff;
    text-decoration: none;
}

.navbar-brand-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.navbar-brand-link:hover {
    color: #40a9ff;
}

.navbar-logo {
    height: 32px;
    width: auto;
    margin-right: 0.5rem;
}

.navbar-brand-text {
    color: inherit;
}

/* Toggle button for mobile */
.navbar-toggle {
    display: none;
    background: none;
    border: none;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.navbar-toggle:hover {
    background-color: #f8f9fa;
}

.navbar-toggle:focus {
    outline: 2px solid #1890ff;
    outline-offset: 2px;
}

.navbar-toggle-icon {
    display: flex;
    flex-direction: column;
    width: 24px;
    height: 18px;
    justify-content: space-between;
}

.navbar-toggle-icon span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: #333;
    border-radius: 1px;
    transition: all 0.3s ease;
}

.navbar-collapsed .navbar-toggle-icon span:first-child {
    transform: rotate(45deg) translate(6px, 6px);
}

.navbar-collapsed .navbar-toggle-icon span:nth-child(2) {
    opacity: 0;
}

.navbar-collapsed .navbar-toggle-icon span:last-child {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Navigation collapse */
.navbar-collapse {
    display: flex;
    align-items: center;
    flex-grow: 1;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.navbar-nav {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.navbar-nav-item {
    position: relative;
    margin: 0 0.5rem;
}

.navbar-nav-link {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.navbar-nav-link:hover {
    color: #1890ff;
    background-color: #f0f8ff;
}

.navbar-nav-link:focus {
    outline: 2px solid #1890ff;
    outline-offset: 2px;
}

.navbar-nav-active {
    color: #1890ff !important;
    background-color: #e6f7ff !important;
    font-weight: 500;
}

.navbar-nav-disabled {
    color: #ccc !important;
    cursor: not-allowed;
    opacity: 0.6;
}

.navbar-nav-disabled:hover {
    background-color: transparent !important;
}

.navbar-nav-icon {
    margin-right: 0.5rem;
    font-size: 16px;
}

/* Dropdown functionality */
.navbar-dropdown {
    position: relative;
}

.navbar-dropdown-toggle {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    color: #333;
    background: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.navbar-dropdown-toggle:hover {
    color: #1890ff;
    background-color: #f0f8ff;
}

.navbar-dropdown-toggle:focus {
    outline: 2px solid #1890ff;
    outline-offset: 2px;
}

.navbar-dropdown-caret {
    margin-left: 0.5rem;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
    transition: transform 0.3s ease;
}

.navbar-dropdown-open .navbar-dropdown-caret {
    transform: rotate(180deg);
}

.navbar-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 0;
    padding: 0.5rem 0;
    list-style: none;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.navbar-dropdown-open .navbar-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.navbar-dropdown-item {
    margin: 0;
}

.navbar-dropdown-link {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}

.navbar-dropdown-link:hover {
    color: #1890ff;
    background-color: #f0f8ff;
}

.navbar-dropdown-icon {
    margin-right: 0.5rem;
    font-size: 14px;
}

.navbar-dropdown-divider {
    height: 1px;
    background-color: #e9ecef;
    margin: 0.5rem 0;
}

/* Actions section */
.navbar-actions {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.navbar-action {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    margin-left: 0.5rem;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.navbar-action-icon {
    margin-right: 0.5rem;
    font-size: 16px;
}

.navbar-action.default {
    color: #333;
    background-color: transparent;
    border-color: #d9d9d9;
}

.navbar-action.default:hover {
    color: #1890ff;
    border-color: #1890ff;
}

.navbar-action.primary {
    color: #fff;
    background-color: #1890ff;
    border-color: #1890ff;
}

.navbar-action.primary:hover {
    background-color: #40a9ff;
    border-color: #40a9ff;
}

.navbar-action.secondary {
    color: #333;
    background-color: #f5f5f5;
    border-color: #d9d9d9;
}

.navbar-action.secondary:hover {
    background-color: #e6e6e6;
    border-color: #bfbfbf;
}

/* Variants */
.navbar-light {
    background-color: #fff;
    border-color: #e9ecef;
}

.navbar-dark {
    background-color: #343a40;
    border-color: #495057;
    color: rgba(255, 255, 255, 0.85);
}

.navbar-dark .navbar-brand,
.navbar-dark .navbar-nav-link,
.navbar-dark .navbar-dropdown-toggle {
    color: rgba(255, 255, 255, 0.85);
}

.navbar-dark .navbar-nav-link:hover,
.navbar-dark .navbar-dropdown-toggle:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

.navbar-dark .navbar-nav-active {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.2) !important;
}

.navbar-dark .navbar-toggle-icon span {
    background-color: rgba(255, 255, 255, 0.85);
}

.navbar-primary {
    background-color: #1890ff;
    border-color: #1890ff;
    color: #fff;
}

.navbar-primary .navbar-brand,
.navbar-primary .navbar-nav-link,
.navbar-primary .navbar-dropdown-toggle {
    color: #fff;
}

.navbar-primary .navbar-nav-link:hover,
.navbar-primary .navbar-dropdown-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.navbar-primary .navbar-nav-active {
    background-color: rgba(255, 255, 255, 0.2) !important;
}

.navbar-primary .navbar-toggle-icon span {
    background-color: #fff;
}

/* Positioning */
.navbar-fixed-top {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1030;
}

.navbar-fixed-bottom {
    position: fixed;
    bottom: 0;
    right: 0;
    left: 0;
    z-index: 1030;
}

.navbar-sticky-top {
    position: sticky;
    top: 0;
    z-index: 1020;
}

/* Transparent navbar */
.navbar-transparent {
    background-color: transparent;
    border-color: transparent;
}

.navbar-transparent.navbar-scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    border-color: rgba(233, 236, 239, 0.5);
    backdrop-filter: blur(10px);
}

/* Shadow */
.navbar-shadow {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-scrolled {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Responsive design */
@media (max-width: 767px) {
    .navbar-toggle {
        display: block;
    }

    .navbar-collapse {
        flex-basis: 100%;
        flex-grow: 1;
        align-items: flex-start;
        max-height: 0;
        overflow: hidden;
    }

    .navbar-collapsed .navbar-collapse {
        max-height: 100vh;
    }

    .navbar-nav {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        padding: 1rem 0;
    }

    .navbar-nav-item {
        margin: 0;
        width: 100%;
    }

    .navbar-nav-link {
        padding: 0.75rem 1rem;
        width: 100%;
        justify-content: flex-start;
    }

    .navbar-dropdown-menu {
        position: static;
        width: 100%;
        box-shadow: none;
        border: none;
        border-top: 1px solid #e9ecef;
        border-radius: 0;
        margin: 0;
        padding: 0;
        background-color: #f8f9fa;
    }

    .navbar-dropdown-open .navbar-dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .navbar-dropdown-link {
        padding: 0.75rem 2rem;
    }

    .navbar-actions {
        margin-left: 0;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid #e9ecef;
        width: 100%;
        justify-content: center;
    }

    .navbar-action {
        margin: 0 0.25rem;
    }
}

/* Accessibility improvements */
.navbar-nav-link:focus-visible,
.navbar-dropdown-toggle:focus-visible,
.navbar-action:focus-visible {
    outline: 2px solid #1890ff;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .navbar {
        border-bottom: 2px solid;
    }
    
    .navbar-nav-link,
    .navbar-dropdown-toggle,
    .navbar-action {
        border: 1px solid;
    }
    
    .navbar-dropdown-menu {
        border: 2px solid;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .navbar,
    .navbar-nav-link,
    .navbar-dropdown-toggle,
    .navbar-action,
    .navbar-dropdown-menu,
    .navbar-toggle-icon span,
    .navbar-dropdown-caret {
        transition: none;
    }
}

/* Print styles */
@media print {
    .navbar {
        display: none;
    }
}

/* Component: nav_item (folder-based) */
/**
 * Nav Item Component Styles
 * Provides styling for individual navigation items
 */

.nav-item-container {
    position: relative;
    display: inline-block;
}

.nav-item {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    color: #333;
    text-decoration: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    border-radius: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid transparent;
    background-color: transparent;
    white-space: nowrap;
}

.nav-item:hover {
    color: #1890ff;
    background-color: #f0f0f0;
}

.nav-item:focus {
    outline: 2px solid #1890ff;
    outline-offset: 2px;
}

.nav-item-icon {
    margin-right: 8px;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Active state */
.nav-item-active .nav-item {
    color: #1890ff;
    background-color: #e6f7ff;
    font-weight: 500;
    border-color: #1890ff;
}

.nav-item-active .nav-item:hover {
    color: #40a9ff;
    background-color: #bae7ff;
}

/* Disabled state */
.nav-item-disabled .nav-item {
    color: #ccc;
    cursor: not-allowed;
    opacity: 0.5;
}

.nav-item-disabled .nav-item:hover {
    color: #ccc;
    background-color: transparent;
}

/* Hover state */
.nav-item-hover .nav-item {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Focus state */
.nav-item-focus .nav-item {
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

/* Size variations */
.nav-item-small .nav-item {
    padding: 4px 8px;
    font-size: 12px;
}

.nav-item-large .nav-item {
    padding: 12px 24px;
    font-size: 16px;
}

/* Theme variations */
.nav-item-primary .nav-item {
    background-color: #1890ff;
    color: white;
    border-color: #1890ff;
}

.nav-item-primary .nav-item:hover {
    background-color: #40a9ff;
    border-color: #40a9ff;
}

.nav-item-secondary .nav-item {
    background-color: #f5f5f5;
    color: #333;
    border-color: #d9d9d9;
}

.nav-item-secondary .nav-item:hover {
    background-color: #e6e6e6;
    border-color: #bfbfbf;
}

.nav-item-ghost .nav-item {
    background-color: transparent;
    border-color: #1890ff;
    color: #1890ff;
}

.nav-item-ghost .nav-item:hover {
    background-color: rgba(24, 144, 255, 0.1);
}

.nav-item-danger .nav-item {
    background-color: #ff4d4f;
    color: white;
    border-color: #ff4d4f;
}

.nav-item-danger .nav-item:hover {
    background-color: #ff7875;
    border-color: #ff7875;
}

/* Dark theme */
.nav-item-dark .nav-item {
    color: rgba(255, 255, 255, 0.85);
    background-color: transparent;
}

.nav-item-dark .nav-item:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-item-dark.nav-item-active .nav-item {
    color: #1890ff;
    background-color: rgba(24, 144, 255, 0.1);
}

/* Vertical alignment in navigation contexts */
.nav-item-vertical {
    display: block;
    width: 100%;
}

.nav-item-vertical .nav-item {
    width: 100%;
    justify-content: flex-start;
    text-align: left;
}

/* Loading state */
.nav-item-loading .nav-item {
    cursor: wait;
    opacity: 0.6;
}

.nav-item-loading .nav-item::after {
    content: '';
    width: 12px;
    height: 12px;
    margin-left: 8px;
    border: 2px solid #1890ff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: nav-item-spin 1s linear infinite;
}

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

/* Responsive design */
@media (max-width: 768px) {
    .nav-item {
        padding: 12px 16px;
        font-size: 16px;
    }
    
    .nav-item-small .nav-item {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .nav-item-large .nav-item {
        padding: 16px 24px;
        font-size: 18px;
    }
}

/* Accessibility improvements */
.nav-item:focus-visible {
    outline: 2px solid #1890ff;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .nav-item {
        border: 2px solid;
    }
    
    .nav-item-disabled .nav-item {
        border-style: dashed;
    }
}

/* Component: tabs (folder-based) */
/**
 * Tabs Component Styles
 * Provides styling for tab navigation and content panels
 */

.tabs-container {
    position: relative;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

.tabs-vertical {
    flex-direction: row;
}

.tabs-nav {
    position: relative;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #e9ecef;
    background-color: #fff;
}

.tabs-vertical .tabs-nav {
    flex-direction: column;
    align-items: stretch;
    border-bottom: none;
    border-right: 1px solid #e9ecef;
    min-width: 200px;
}

.tabs-list {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tabs-list::-webkit-scrollbar {
    display: none;
}

.tabs-vertical .tabs-list {
    flex-direction: column;
    align-items: stretch;
    overflow-x: visible;
    overflow-y: auto;
}

.tabs-centered .tabs-list {
    justify-content: center;
}

/* Tab Items */
.tab-item {
    position: relative;
    display: flex;
    align-items: center;
    padding: 12px 16px;
    margin: 0;
    background: none;
    border: none;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-decoration: none;
    min-height: 44px;
    border-radius: 0;
}

.tab-item:hover {
    color: #1890ff;
    background-color: #f0f8ff;
}

.tab-item:focus {
    outline: 2px solid #1890ff;
    outline-offset: -2px;
}

.tab-item:focus-visible {
    outline: 2px solid #1890ff;
    outline-offset: -2px;
}

.tab-active {
    color: #1890ff !important;
    background-color: transparent;
}

.tab-disabled {
    color: #ccc !important;
    cursor: not-allowed;
    opacity: 0.6;
}

.tab-disabled:hover {
    color: #ccc !important;
    background-color: transparent !important;
}

.tab-content {
    display: flex;
    align-items: center;
    gap: 6px;
}

.tab-icon {
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tab-label {
    display: flex;
    align-items: center;
}

.tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    background-color: #ff4d4f;
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    border-radius: 9px;
    line-height: 1;
}

.tab-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-left: 6px;
    background: none;
    border: none;
    color: #999;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
    opacity: 0;
    transform: scale(0.8);
}

.tab-item:hover .tab-close,
.tab-active .tab-close {
    opacity: 1;
    transform: scale(1);
}

.tab-close:hover {
    color: #ff4d4f;
    background-color: #fff2f0;
}

.tab-close:focus {
    outline: 1px solid #1890ff;
    outline-offset: 1px;
}

/* Add Button */
.tabs-add-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-left: 8px;
    background: none;
    border: 1px dashed #d9d9d9;
    color: #666;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.tabs-add-button:hover {
    color: #1890ff;
    border-color: #1890ff;
    background-color: #f0f8ff;
}

.tabs-add-button:focus {
    outline: 2px solid #1890ff;
    outline-offset: 2px;
}

.tabs-add-icon {
    font-size: 14px;
    font-weight: bold;
}

.tabs-vertical .tabs-add-button {
    margin-left: 0;
    margin-top: 8px;
    width: calc(100% - 16px);
    margin-left: 8px;
    margin-right: 8px;
}

/* Active Indicator */
.tabs-indicator {
    position: absolute;
    background-color: #1890ff;
    transition: all 0.3s ease;
    z-index: 1;
}

.tabs-horizontal .tabs-indicator {
    bottom: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
}

.tabs-vertical .tabs-indicator {
    right: 0;
    width: 3px;
    border-radius: 0 3px 3px 0;
}

/* Tab Content */
.tabs-content {
    position: relative;
    flex: 1;
    padding: 16px;
    background-color: #fff;
}

.tabs-vertical .tabs-content {
    border-left: 1px solid #e9ecef;
}

.tab-panel {
    display: block;
    outline: none;
}

.tab-panel[hidden] {
    display: none;
}

/* Animations */
.tabs-animated .tab-panel {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.tabs-animated .tab-panel:not(.tab-panel-active) {
    opacity: 0;
    transform: translateX(10px);
}

.tabs-animated .tab-panel-active {
    opacity: 1;
    transform: translateX(0);
}

/* Size Variations */
.tabs-small .tab-item {
    padding: 8px 12px;
    font-size: 12px;
    min-height: 36px;
}

.tabs-small .tabs-content {
    padding: 12px;
}

.tabs-small .tab-badge {
    min-width: 16px;
    height: 16px;
    font-size: 10px;
}

.tabs-large .tab-item {
    padding: 16px 24px;
    font-size: 16px;
    min-height: 52px;
}

.tabs-large .tabs-content {
    padding: 24px;
}

.tabs-large .tab-badge {
    min-width: 20px;
    height: 20px;
    font-size: 12px;
}

/* Variant Styles */

/* Card Variant */
.tabs-card .tabs-nav {
    border-bottom: none;
    background-color: #f5f5f5;
    padding: 4px;
    border-radius: 6px;
}

.tabs-card .tab-item {
    border-radius: 4px;
    margin: 0 2px;
    background-color: transparent;
}

.tabs-card .tab-active {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tabs-card .tabs-indicator {
    display: none;
}

.tabs-card .tabs-content {
    border: 1px solid #e9ecef;
    border-top: none;
    border-radius: 0 0 6px 6px;
}

.tabs-card.tabs-vertical .tabs-content {
    border-top: 1px solid #e9ecef;
    border-left: none;
    border-radius: 0 6px 6px 0;
}

/* Pill Variant */
.tabs-pill .tab-item {
    border-radius: 20px;
    margin: 0 4px;
    background-color: transparent;
}

.tabs-pill .tab-active {
    background-color: #1890ff;
    color: #fff !important;
}

.tabs-pill .tab-active:hover {
    background-color: #40a9ff;
    color: #fff !important;
}

.tabs-pill .tabs-indicator {
    display: none;
}

.tabs-pill .tabs-nav {
    border-bottom: 1px solid #e9ecef;
    padding: 4px 0;
}

/* Underline Variant (Default) */
.tabs-underline .tab-item {
    border-bottom: 2px solid transparent;
}

.tabs-underline .tab-active {
    border-bottom-color: #1890ff;
}

.tabs-underline .tabs-indicator {
    display: none;
}

/* Dark Theme */
.tabs-dark {
    background-color: #001529;
    color: rgba(255, 255, 255, 0.85);
}

.tabs-dark .tabs-nav {
    border-color: #303030;
    background-color: #001529;
}

.tabs-dark .tab-item {
    color: rgba(255, 255, 255, 0.65);
}

.tabs-dark .tab-item:hover {
    color: rgba(255, 255, 255, 0.85);
    background-color: rgba(255, 255, 255, 0.1);
}

.tabs-dark .tab-active {
    color: #1890ff !important;
}

.tabs-dark .tabs-content {
    background-color: #001529;
    border-color: #303030;
}

.tabs-dark .tabs-add-button {
    border-color: #303030;
    color: rgba(255, 255, 255, 0.65);
}

.tabs-dark .tabs-add-button:hover {
    color: #1890ff;
    border-color: #1890ff;
    background-color: rgba(24, 144, 255, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .tabs-container {
        overflow-x: auto;
    }
    
    .tabs-list {
        overflow-x: auto;
        scrollbar-width: thin;
        -ms-overflow-style: auto;
    }
    
    .tabs-list::-webkit-scrollbar {
        display: block;
        height: 4px;
    }
    
    .tabs-list::-webkit-scrollbar-track {
        background: #f1f1f1;
    }
    
    .tabs-list::-webkit-scrollbar-thumb {
        background: #ccc;
        border-radius: 2px;
    }
    
    .tabs-list::-webkit-scrollbar-thumb:hover {
        background: #999;
    }
    
    .tab-item {
        padding: 12px 16px;
        min-width: 80px;
    }
    
    .tabs-content {
        padding: 12px;
    }
    
    .tabs-vertical {
        flex-direction: column;
    }
    
    .tabs-vertical .tabs-nav {
        flex-direction: row;
        border-right: none;
        border-bottom: 1px solid #e9ecef;
        min-width: auto;
    }
    
    .tabs-vertical .tabs-list {
        flex-direction: row;
        overflow-x: auto;
        overflow-y: visible;
    }
    
    .tabs-vertical .tabs-content {
        border-left: none;
        border-top: 1px solid #e9ecef;
    }
}

@media (max-width: 480px) {
    .tab-item {
        padding: 8px 12px;
        font-size: 12px;
        min-width: 60px;
    }
    
    .tabs-content {
        padding: 8px;
    }
    
    .tab-badge {
        min-width: 16px;
        height: 16px;
        font-size: 10px;
    }
}

/* Accessibility Improvements */
.tab-item:focus-visible {
    outline: 2px solid #1890ff;
    outline-offset: -2px;
}

.tab-panel:focus {
    outline: 2px solid #1890ff;
    outline-offset: -2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .tabs-nav {
        border-bottom: 2px solid;
    }
    
    .tab-item {
        border: 1px solid;
    }
    
    .tab-active {
        border-color: currentColor;
        background-color: ButtonFace;
    }
    
    .tabs-indicator {
        background-color: currentColor;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .tab-item,
    .tabs-indicator,
    .tab-panel,
    .tab-close,
    .tabs-add-button {
        transition: none;
    }
    
    .tabs-animated .tab-panel {
        transition: none;
    }
}

/* Print Styles */
@media print {
    .tabs-nav {
        display: none;
    }
    
    .tab-panel {
        display: block !important;
        opacity: 1 !important;
        transform: none !important;
    }
    
    .tab-panel:not(.tab-panel-active) {
        page-break-before: always;
    }
}

/* Loading State */
.tabs-loading {
    opacity: 0.6;
    pointer-events: none;
}

.tabs-loading .tab-item::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 8px;
    width: 12px;
    height: 12px;
    margin-top: -6px;
    border: 2px solid #1890ff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: tabs-spin 1s linear infinite;
}

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

/* Scrollable tabs indicator */
.tabs-list-scrollable {
    position: relative;
}

.tabs-list-scrollable::before,
.tabs-list-scrollable::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 20px;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.8), transparent);
    pointer-events: none;
    z-index: 2;
}

.tabs-list-scrollable::before {
    left: 0;
}

.tabs-list-scrollable::after {
    right: 0;
    background: linear-gradient(to left, rgba(255, 255, 255, 0.8), transparent);
}

/* Component: sidebar (folder-based) */
/* UI Sidebar Component Styles */
.ui-sidebar {
    position: relative;
    display: flex;
    flex-direction: column;
    background-color: var(--sidebar-bg, #2d3748);
    color: var(--sidebar-text, #e2e8f0);
    border-right: 1px solid var(--sidebar-border, #4a5568);
    transition: width 0.3s ease;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

/* Light theme */
.ui-sidebar.light {
    background-color: var(--sidebar-bg-light, #ffffff);
    color: var(--sidebar-text-light, #2d3748);
    border-right-color: var(--sidebar-border-light, #e2e8f0);
}

/* Dark theme */
.ui-sidebar.dark {
    background-color: var(--sidebar-bg-dark, #1a202c);
    color: var(--sidebar-text-dark, #e2e8f0);
    border-right-color: var(--sidebar-border-dark, #2d3748);
}

/* Position variants */
.ui-sidebar.position-left {
    border-right: 1px solid var(--sidebar-border, #4a5568);
    border-left: none;
}

.ui-sidebar.position-right {
    border-left: 1px solid var(--sidebar-border, #4a5568);
    border-right: none;
}

/* Collapsed state */
.ui-sidebar.collapsed {
    width: 60px !important;
    min-width: 60px;
}

.ui-sidebar.collapsed .sidebar-content {
    padding: 8px 4px;
}

.ui-sidebar.collapsed .sidebar-item-text {
    display: none;
}

.ui-sidebar.collapsed .sidebar-item {
    justify-content: center;
    padding: 8px;
}

/* Toggle button */
.sidebar-toggle {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--sidebar-toggle-bg, #4a5568);
    color: var(--sidebar-toggle-text, #e2e8f0);
    border: none;
    border-radius: 4px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
    z-index: 101;
}

.sidebar-toggle:hover {
    background: var(--sidebar-toggle-hover-bg, #718096);
    transform: scale(1.1);
}

.sidebar-toggle:active {
    transform: scale(0.95);
}

/* Sidebar content */
.sidebar-content {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--sidebar-scrollbar, #4a5568) transparent;
}

.sidebar-content::-webkit-scrollbar {
    width: 6px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: var(--sidebar-scrollbar, #4a5568);
    border-radius: 3px;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
    background: var(--sidebar-scrollbar-hover, #718096);
}

/* Sidebar items */
.sidebar-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 4px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.sidebar-item:hover {
    background-color: var(--sidebar-item-hover, rgba(255, 255, 255, 0.1));
}

.sidebar-item.active {
    background-color: var(--sidebar-item-active, #4299e1);
    color: var(--sidebar-item-active-text, #ffffff);
}

.sidebar-item-icon {
    margin-right: 12px;
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.sidebar-item-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Responsive design */
@media (max-width: 768px) {
    .ui-sidebar {
        width: 100% !important;
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid var(--sidebar-border, #4a5568);
    }
    
    .ui-sidebar.collapsed {
        width: 100% !important;
        height: 60px;
    }
    
    .sidebar-toggle {
        position: static;
        margin: 8px;
    }
}

/* Animation for smooth transitions */
@keyframes slideIn {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

.ui-sidebar.animate-in {
    animation: slideIn 0.3s ease-out;
}

.ui-sidebar.animate-out {
    animation: slideOut 0.3s ease-in;
}

/* Focus and accessibility */
.sidebar-toggle:focus,
.sidebar-item:focus {
    outline: 2px solid var(--focus-color, #4299e1);
    outline-offset: 2px;
}

.sidebar-item:focus-visible {
    outline: 2px solid var(--focus-color, #4299e1);
    outline-offset: -2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .ui-sidebar {
        border-width: 2px;
    }
    
    .sidebar-item {
        border: 1px solid transparent;
    }
    
    .sidebar-item:hover {
        border-color: currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .ui-sidebar,
    .sidebar-toggle,
    .sidebar-item {
        transition: none;
    }
    
    .ui-sidebar.animate-in,
    .ui-sidebar.animate-out {
        animation: none;
    }
}
