/* ========================================
   GCB ENTERPRISE DESIGN SYSTEM
   World-Class Professional UI Components
======================================== */

/* ========================================
   PROFESSIONAL MICRO-INTERACTIONS
======================================== */

/* Enhanced Focus States */
*:focus {
    outline: none;
}

*:focus-visible {
    outline: 3px solid var(--gcb-amber);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Professional Hover Effects */
.enterprise-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.enterprise-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* Ripple Effect */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(253, 184, 19, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple:active::before {
    width: 300px;
    height: 300px;
}

/* ========================================
   ENTERPRISE LOADING STATES
======================================== */

/* Professional Skeleton Screens */
.skeleton-enterprise {
    position: relative;
    overflow: hidden;
    background: linear-gradient(90deg, #f0f0f0 25%, #f8f8f8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading-enterprise 1.5s infinite;
}

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

/* Professional Spinner */
.spinner-enterprise {
    width: 48px;
    height: 48px;
    border: 4px solid var(--gcb-pebble);
    border-top-color: var(--gcb-amber);
    border-radius: 50%;
    animation: spin-enterprise 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

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

/* Progress Bar */
.progress-enterprise {
    height: 4px;
    background: var(--gcb-pebble);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.progress-enterprise-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--gcb-amber), var(--gcb-primary-gold-dark));
    border-radius: 2px;
    transition: width 0.3s ease;
}

.progress-enterprise-indeterminate {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 30%;
    background: var(--gcb-amber);
    animation: progress-indeterminate 1.5s infinite;
}

@keyframes progress-indeterminate {
    0% { left: -30%; }
    100% { left: 100%; }
}

/* ========================================
   ENTERPRISE KPI CARDS
======================================== */

.kpi-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.kpi-label {
    font-size: 0.875rem;
    color: var(--gcb-smoke);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.kpi-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gcb-black);
    line-height: 1;
    margin-bottom: 12px;
}

.kpi-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
}

.kpi-change.positive {
    background: rgba(106, 164, 62, 0.1);
    color: var(--gcb-grass);
}

.kpi-change.negative {
    background: rgba(139, 21, 56, 0.1);
    color: var(--gcb-earth);
}

.kpi-sparkline {
    height: 40px;
    margin-top: 16px;
}

/* ========================================
   ENTERPRISE DATA TABLES
======================================== */

.table-enterprise {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.table-enterprise thead {
    background: linear-gradient(180deg, #fafafa 0%, #f5f5f5 100%);
    border-bottom: 2px solid var(--gcb-pebble);
}

.table-enterprise th {
    font-weight: 600;
    color: var(--gcb-smoke);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 16px;
    position: relative;
    cursor: pointer;
    user-select: none;
}

.table-enterprise th.sortable:hover {
    background: rgba(253, 184, 19, 0.05);
}

.table-enterprise th.sortable::after {
    content: "⇅";
    position: absolute;
    right: 12px;
    opacity: 0.3;
    transition: opacity 0.2s;
}

.table-enterprise th.sorted-asc::after {
    content: "↑";
    opacity: 1;
    color: var(--gcb-amber);
}

.table-enterprise th.sorted-desc::after {
    content: "↓";
    opacity: 1;
    color: var(--gcb-amber);
}

.table-enterprise tbody tr {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.table-enterprise tbody tr:hover {
    background: rgba(253, 184, 19, 0.02);
}

.table-enterprise td {
    padding: 16px;
    color: var(--gcb-black);
    font-size: 0.9375rem;
}

/* ========================================
   PROFESSIONAL EMPTY STATES
======================================== */

.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, rgba(253, 184, 19, 0.1), rgba(253, 184, 19, 0.05));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-state-icon i {
    font-size: 48px;
    color: var(--gcb-amber);
}

.empty-state-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gcb-black);
    margin-bottom: 8px;
}

.empty-state-description {
    color: var(--gcb-smoke);
    max-width: 400px;
    margin: 0 auto 24px;
    line-height: 1.6;
}

/* ========================================
   ENTERPRISE TOOLTIPS
======================================== */

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

.tooltip-enterprise::before,
.tooltip-enterprise::after {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.tooltip-enterprise::before {
    content: attr(data-tooltip);
    background: var(--gcb-black);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.875rem;
    white-space: nowrap;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
}

.tooltip-enterprise::after {
    content: "";
    border: 4px solid transparent;
    border-top-color: var(--gcb-black);
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
}

.tooltip-enterprise:hover::before,
.tooltip-enterprise:hover::after {
    opacity: 1;
}

/* ========================================
   PROFESSIONAL NOTIFICATIONS
======================================== */

.notification-enterprise {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-left: 4px solid var(--gcb-amber);
    animation: slide-in-right 0.3s ease;
    margin-bottom: 12px;
}

@keyframes slide-in-right {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification-enterprise-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(253, 184, 19, 0.1);
}

.notification-enterprise-content {
    flex: 1;
}

.notification-enterprise-title {
    font-weight: 600;
    color: var(--gcb-black);
    margin-bottom: 4px;
}

.notification-enterprise-message {
    color: var(--gcb-smoke);
    font-size: 0.875rem;
    line-height: 1.5;
}

.notification-enterprise-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--gcb-smoke);
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
}

.notification-enterprise-close:hover {
    color: var(--gcb-black);
}

/* ========================================
   ADVANCED FORM PATTERNS
======================================== */

.form-group-enterprise {
    position: relative;
    margin-bottom: 24px;
}

.form-label-enterprise {
    position: absolute;
    left: 12px;
    top: 12px;
    color: var(--gcb-smoke);
    font-size: 0.9375rem;
    pointer-events: none;
    transition: all 0.2s ease;
    background: white;
    padding: 0 4px;
}

.form-input-enterprise {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--gcb-pebble);
    border-radius: 8px;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    background: white;
}

.form-input-enterprise:focus {
    border-color: var(--gcb-amber);
    box-shadow: 0 0 0 3px rgba(253, 184, 19, 0.1);
}

.form-input-enterprise:focus + .form-label-enterprise,
.form-input-enterprise:not(:placeholder-shown) + .form-label-enterprise {
    top: -10px;
    left: 8px;
    font-size: 0.875rem;
    color: var(--gcb-amber);
}

.form-helper-text {
    margin-top: 4px;
    font-size: 0.875rem;
    color: var(--gcb-smoke);
}

.form-error-text {
    margin-top: 4px;
    font-size: 0.875rem;
    color: var(--gcb-earth);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ========================================
   PROFESSIONAL BADGES
======================================== */

.badge-enterprise {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-enterprise.success {
    background: rgba(106, 164, 62, 0.1);
    color: var(--gcb-grass);
    border: 1px solid rgba(106, 164, 62, 0.2);
}

.badge-enterprise.warning {
    background: rgba(253, 184, 19, 0.1);
    color: var(--gcb-amber);
    border: 1px solid rgba(253, 184, 19, 0.2);
}

.badge-enterprise.danger {
    background: rgba(139, 21, 56, 0.1);
    color: var(--gcb-earth);
    border: 1px solid rgba(139, 21, 56, 0.2);
}

.badge-enterprise.info {
    background: rgba(0, 171, 192, 0.1);
    color: var(--gcb-aqua);
    border: 1px solid rgba(0, 171, 192, 0.2);
}

/* ========================================
   ENTERPRISE NAVIGATION
======================================== */

.nav-enterprise {
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-enterprise-item {
    position: relative;
    padding: 16px 20px;
    color: var(--gcb-black);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
}

.nav-enterprise-item:hover {
    background: rgba(253, 184, 19, 0.05);
    color: var(--gcb-amber);
}

.nav-enterprise-item.active {
    border-bottom-color: var(--gcb-amber);
    color: var(--gcb-amber);
}

/* ========================================
   PROFESSIONAL MODALS
======================================== */

.modal-enterprise {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fade-in 0.2s ease;
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-enterprise-content {
    background: white;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: scale-up 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes scale-up {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-enterprise-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid var(--gcb-pebble);
}

.modal-enterprise-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gcb-black);
}

.modal-enterprise-body {
    padding: 24px;
}

.modal-enterprise-footer {
    padding: 16px 24px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ========================================
   ENTERPRISE CHARTS CONTAINER
======================================== */

.chart-container-enterprise {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

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

.chart-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gcb-black);
}

.chart-legend {
    display: flex;
    gap: 16px;
}

.chart-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    color: var(--gcb-smoke);
}

.chart-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

/* ========================================
   PROFESSIONAL SEARCH
======================================== */

.search-enterprise {
    position: relative;
    max-width: 400px;
}

.search-enterprise-input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 2px solid var(--gcb-pebble);
    border-radius: 24px;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
}

.search-enterprise-input:focus {
    border-color: var(--gcb-amber);
    box-shadow: 0 0 0 3px rgba(253, 184, 19, 0.1);
}

.search-enterprise-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gcb-smoke);
}

.search-enterprise-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gcb-smoke);
    cursor: pointer;
    padding: 4px;
    opacity: 0;
    transition: opacity 0.2s;
}

.search-enterprise-input:not(:placeholder-shown) ~ .search-enterprise-clear {
    opacity: 1;
}

/* ========================================
   ENTERPRISE FILTERS
======================================== */

.filter-enterprise {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 8px;
    flex-wrap: wrap;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: white;
    border: 1px solid var(--gcb-pebble);
    border-radius: 20px;
    font-size: 0.875rem;
    color: var(--gcb-smoke);
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-chip:hover {
    border-color: var(--gcb-amber);
    color: var(--gcb-amber);
}

.filter-chip.active {
    background: var(--gcb-amber);
    border-color: var(--gcb-amber);
    color: var(--gcb-black);
}

.filter-chip-remove {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

/* ========================================
   PROFESSIONAL STEP INDICATORS
======================================== */

.steps-enterprise {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 40px;
}

.steps-enterprise::before {
    content: "";
    position: absolute;
    top: 24px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gcb-pebble);
    z-index: -1;
}

.step-item {
    text-align: center;
    flex: 1;
    position: relative;
}

.step-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--gcb-pebble);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    font-weight: 600;
    color: var(--gcb-smoke);
    transition: all 0.3s ease;
}

.step-item.active .step-circle {
    background: var(--gcb-amber);
    border-color: var(--gcb-amber);
    color: var(--gcb-black);
    transform: scale(1.1);
}

.step-item.completed .step-circle {
    background: var(--gcb-grass);
    border-color: var(--gcb-grass);
    color: white;
}

.step-label {
    font-size: 0.875rem;
    color: var(--gcb-smoke);
}

.step-item.active .step-label {
    color: var(--gcb-black);
    font-weight: 600;
}

/* ========================================
   PROFESSIONAL TOGGLES
======================================== */

.toggle-enterprise {
    position: relative;
    width: 56px;
    height: 28px;
}

.toggle-enterprise-input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-enterprise-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gcb-pebble);
    transition: 0.3s;
    border-radius: 28px;
}

.toggle-enterprise-slider::before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-enterprise-input:checked + .toggle-enterprise-slider {
    background: var(--gcb-amber);
}

.toggle-enterprise-input:checked + .toggle-enterprise-slider::before {
    transform: translateX(28px);
}

/* ========================================
   ACCESSIBILITY ENHANCEMENTS
======================================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Skip to content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--gcb-amber);
    color: var(--gcb-black);
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 0 0 8px 0;
    z-index: 3000;
    font-weight: 600;
}

.skip-link:focus {
    top: 0;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn-gcb-gold,
    .btn-gcb-amber {
        border: 2px solid var(--gcb-black);
    }
    
    .form-input-enterprise {
        border-width: 3px;
    }
}

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

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .dark-mode-auto {
        background: var(--gcb-black);
        color: white;
    }
}
