/* Component Styles */

/* Buttons */
.btn {
    border-radius: var(--radius-md) !important;
}

.btn-primary {
    background: var(--royal-gradient);
    border: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-outline-primary {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

/* Forms */
.form-control,
.select2-selection {
    background: var(--bg-input) !important;
    border-radius: var(--radius-md) !important;
    font-size: 14px !important;
    padding: 11px 15px !important;
    border: 1px solid transparent !important;
    color: #fff !important;
}

.form-control:focus {
    background: var(--bg-input) !important;
    border-color: #fff !important;
    color: #fff;
    box-shadow: none;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

label {
    font-size: 13px !important;
    margin-bottom: 0.5rem;
}

/* Select2 Overrides */
.select2-container--bootstrap-5 .select2-selection {
    color: #fff !important;
    height: initial;
}

.select2-selection__rendered {
    color: #fff !important;
}

.select2-dropdown {
    background-color: var(--dark-color);
    border-color: var(--border-light);
}

.select2-results__option {
    color: #fff;
}

.select2-results__option--highlighted {
    background-color: var(--secondary-color) !important;
}

/* Tables */
.table-modern {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.table-modern thead {
    background: #f8fafc;
    background: rgba(255, 255, 255, 0.05);
}

.table-modern th {
    padding: 12px;
    font-size: 13px;
    color: var(--muted-color);
    font-weight: 500;
    text-align: left;
}

.table-modern td {
    padding: 12px;
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
}

.table-dark {
    background: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(10px);
}

.table-dark th {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

.table-dark td {
    border-color: rgba(255, 255, 255, 0.1);
}

.amount {
    text-align: right;
}

/* Tabs */
.nav-tabs {
    border-bottom: 1px solid var(--border-light);
}

.nav-tabs .nav-link {
    border: none !important;
    color: var(--muted-color);
    padding: 10px 18px;
    background: none !important;
}

.nav-tabs .nav-link:hover {
    color: #fff;
}

.nav-tabs .nav-link.active {
    color: var(--secondary-color);
    border-bottom: 2px solid var(--secondary-color) !important;
    font-weight: 500;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 0.5rem;
}

.alert-success {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.alert-danger {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.alert-warning {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.alert-info {
    background: rgba(65, 105, 225, 0.2);
    color: var(--secondary-color);
    border: 1px solid rgba(65, 105, 225, 0.3);
}

/* Badges / Status */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pending {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.status-active,
.status-completed {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.status-cancelled {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

/* Clean Box */
.clean-box {
    padding: 15px 0;
    border-bottom: 1px solid var(--border-light);
}

.clean-box:last-child {
    border-bottom: none;
}

.clean-label {
    font-size: 13px;
    color: var(--muted-color);
    margin-bottom: 4px;
}

.clean-value {
    font-size: 15px;
    line-height: 1.6;
}

/* Stat Block */
.stat-block {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}

.stat-block:last-child {
    border-bottom: none;
}

.stat-label {
    color: var(--muted-color);
    font-size: 13px;
}

.stat-value {
    font-size: 16px;
    font-weight: 500;
    margin-top: 4px;
}

/* Timeline / Updates */
.update-item {
    padding: 15px 0;
    border-bottom: 1px solid var(--border-light);
}

.update-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.update-time {
    font-size: 12px;
    color: var(--muted-color);
    margin-bottom: 8px;
}

.update-text {
    font-size: 14px;
    color: #e5e7eb;
    line-height: 1.6;
}

/* Dropdowns */
.dropdown-menu {
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-light);
}

.dropdown-item {
    color: rgba(255, 255, 255, 0.8);
}

.dropdown-item:hover {
    background: rgba(65, 105, 225, 0.2);
    color: #fff;
}

/* Loaders */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Chips */
.chip {
    padding: 7px 10px;
    border-radius: 8px;
}