/**
 * Portal CSS Styles
 * Customer Portal Styling
 */

/* Portal Container */
.portal-container {
    min-height: calc(100vh - 120px);
}

/* Portal Menu */
.portal-menu {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid rgba(255, 140, 0, 0.2);
}

.portal-menu .nav-link.portal-nav-item {
    color: #e0e0e0;
    padding: 12px 15px;
    margin: 5px 0;
    border-radius: 8px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.portal-menu .nav-link.portal-nav-item:hover {
    background: rgba(255, 140, 0, 0.1);
    color: #ff8c00;
    border-left-color: #ff8c00;
}

.portal-menu .nav-link.portal-nav-item.active {
    background: rgba(255, 140, 0, 0.2);
    color: #ff8c00;
    border-left-color: #ff8c00;
    font-weight: 600;
}

/* Portal Content */
.portal-content {
    padding: 20px;
}

/* Cards in Portal */
.portal-content .card {
    border-radius: 12px;
    overflow: hidden;
}

.portal-content .card-header {
    background: rgba(255, 140, 0, 0.1) !important;
    color: #ff8c00;
    font-weight: 600;
}

/* Buttons */
.btn-orange {
    background: linear-gradient(135deg, #ff8c00 0%, #ff6b00 100%);
    border: none;
    color: white;
    transition: all 0.3s ease;
}

.btn-orange:hover {
    background: linear-gradient(135deg, #ff6b00 0%, #ff4500 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.4);
}

.btn-outline-light {
    border-color: #ff8c00;
    color: #ff8c00;
}

.btn-outline-light:hover {
    background: #ff8c00;
    color: white;
}

/* Badges */
.badge.bg-orange {
    background: #ff8c00 !important;
}

.badge.bg-primary {
    background: #0d6efd !important;
}

/* Progress Bars */
.progress-bar.bg-orange {
    background: #ff8c00 !important;
}

/* Table Styles */
.table-dark {
    --bs-table-bg: #1a1a2e;
    --bs-table-striped-bg: #16213e;
    --bs-table-striped-color: #fff;
    --bs-table-hover-bg: #2a2a3e;
    --bs-table-hover-color: #fff;
    color: #e0e0e0;
    border-color: #333;
}

.table-dark thead th {
    background: #0f0f1e;
    color: #ff8c00;
    border-color: #333;
}

.table-dark tbody tr {
    border-color: #333;
}

.table-dark tbody tr:hover {
    background: rgba(255, 140, 0, 0.1);
}

/* Form Controls in Portal */
.portal-content .form-control,
.portal-content .form-select {
    background: #1a1a2e;
    border: 1px solid #333;
    color: #e0e0e0;
}

.portal-content .form-control:focus,
.portal-content .form-select:focus {
    background: #1a1a2e;
    border-color: #ff8c00;
    color: #e0e0e0;
    box-shadow: 0 0 0 0.2rem rgba(255, 140, 0, 0.25);
}

.portal-content .form-control:disabled,
.portal-content .form-control[readonly] {
    background: #16213e;
    color: #999;
}

/* Modal Styles */
.modal-content {
    background: #1a1a2e;
    border: 1px solid #ff8c00;
}

.modal-header {
    border-bottom: 1px solid #333;
}

.modal-footer {
    border-top: 1px solid #333;
}

/* Alert Styles */
.alert-info {
    background: rgba(13, 110, 253, 0.1);
    border-color: #0d6efd;
    color: #6ea8fe;
}

.alert-danger {
    background: rgba(220, 53, 69, 0.1);
    border-color: #dc3545;
    color: #ea868f;
}

/* List Group */
.list-group-item {
    background: #1a1a2e;
    border-color: #333;
    color: #e0e0e0;
}

.list-group-item:hover {
    background: #2a2a3e;
}

/* Sticky Top for Menu */
.sticky-top {
    position: sticky;
    top: 20px;
    z-index: 1020;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .portal-menu {
        margin-bottom: 20px;
    }
    
    .sticky-top {
        position: static;
    }
    
    .portal-content {
        padding: 10px;
    }
}

/* Text Colors */
.text-orange {
    color: #ff8c00 !important;
}

.text-blue {
    color: #0d6efd !important;
}

/* Custom Scrollbar for Portal */
.portal-content::-webkit-scrollbar,
.portal-menu::-webkit-scrollbar {
    width: 8px;
}

.portal-content::-webkit-scrollbar-track,
.portal-menu::-webkit-scrollbar-track {
    background: #1a1a2e;
}

.portal-content::-webkit-scrollbar-thumb,
.portal-menu::-webkit-scrollbar-thumb {
    background: #ff8c00;
    border-radius: 4px;
}

.portal-content::-webkit-scrollbar-thumb:hover,
.portal-menu::-webkit-scrollbar-thumb:hover {
    background: #ff6b00;
}

/* Loading States */
.loading-spinner {
    color: #ff8c00;
}

/* Dashboard Stats Cards */
.stat-card {
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

/* Portal Navigation Breadcrumb */
.portal-breadcrumb {
    background: rgba(255, 140, 0, 0.05);
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 3px solid #ff8c00;
}

.portal-breadcrumb a {
    color: #ff8c00;
    text-decoration: none;
}

.portal-breadcrumb a:hover {
    text-decoration: underline;
}

/* Activity Timeline */
.timeline-item {
    position: relative;
    padding-left: 30px;
    border-left: 2px solid #333;
    margin-bottom: 20px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ff8c00;
}

/* Stats Progress */
.stat-progress {
    background: #16213e;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.stat-progress h6 {
    margin: 0 0 10px 0;
    color: #e0e0e0;
}

.stat-progress .progress {
    height: 8px;
    background: #0f0f1e;
}

/* User Info Card */
.user-info-card {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid rgba(255, 140, 0, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.user-info-card .user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff8c00, #ff6b00);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    color: white;
    margin: 0 auto 15px;
}

/* Quick Actions Grid */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.quick-action-btn {
    background: #1a1a2e;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    color: #e0e0e0;
    transition: all 0.3s ease;
    cursor: pointer;
}

.quick-action-btn:hover {
    background: #2a2a3e;
    border-color: #ff8c00;
    transform: translateY(-2px);
}

.quick-action-btn i {
    font-size: 24px;
    color: #ff8c00;
    margin-bottom: 8px;
    display: block;
}

/* Admin Section Styles */
.admin-section {
    background: rgba(255, 140, 0, 0.05);
    border-left: 3px solid #ff8c00;
    padding: 15px;
    margin: 15px 0;
    border-radius: 8px;
}

.admin-section h6 {
    color: #ff8c00;
    font-weight: 600;
    margin-bottom: 10px;
}

/* Service Card Enhancements */
.service-card {
    transition: all 0.3s ease;
    border: 1px solid #333;
}

.service-card:hover {
    border-color: #ff8c00;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 140, 0, 0.2);
}

/* Status Badges */
.badge.bg-orange {
    background: #ff8c00 !important;
}

.badge.bg-success {
    background: #28a745 !important;
}

.badge.bg-warning {
    background: #ffc107 !important;
    color: #000 !important;
}

.badge.bg-info {
    background: #17a2b8 !important;
}

.badge.bg-secondary {
    background: #6c757d !important;
}

.badge.bg-danger {
    background: #dc3545 !important;
}

/* Modal Dark Theme Enhancement */
.modal-content.bg-dark-card {
    background: #1a1a2e;
    border: 1px solid #ff8c00;
}

.modal-content.bg-dark-card .form-control {
    background: #16213e;
    border-color: #333;
    color: #e0e0e0;
}

.modal-content.bg-dark-card .form-control:focus {
    background: #16213e;
    border-color: #ff8c00;
    color: #e0e0e0;
    box-shadow: 0 0 0 0.2rem rgba(255, 140, 0, 0.25);
}

/* Table Enhancements for Admin */
.table-dark.table-hover tbody tr:hover {
    background: rgba(255, 140, 0, 0.15);
}

.table-dark .badge {
    font-size: 0.75em;
}

/* Timeline Enhancements */
.timeline-item {
    padding-left: 30px;
    border-left: 2px solid #333;
    margin-bottom: 20px;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ff8c00;
}

.timeline-item small {
    color: #999;
}

.timeline-item p {
    margin: 5px 0;
    color: #e0e0e0;
}

/* Quick Stats Cards */
.stat-card {
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: scale(1.05);
}

.stat-card h3 {
    font-size: 2rem;
    font-weight: 700;
}

/* Button Enhancements */
.btn-orange {
    font-weight: 500;
}

.btn-orange:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.4);
}

.btn-outline-light:hover {
    background: #ff8c00;
    border-color: #ff8c00;
    transform: translateY(-2px);
}

.btn-outline-danger:hover {
    background: #dc3545;
    border-color: #dc3545;
    transform: translateY(-2px);
}

/* Form Validation Styles */
.form-control.is-invalid {
    border-color: #dc3545;
    background-image: none;
}

.form-control.is-valid {
    border-color: #28a745;
    background-image: none;
}

/* Alert Enhancements */
.alert-info {
    background: rgba(23, 162, 184, 0.15);
    border-color: #17a2b8;
    color: #7fc8d8;
}

.alert-danger {
    background: rgba(220, 53, 69, 0.15);
    border-color: #dc3545;
    color: #ea868f;
}

.alert-success {
    background: rgba(40, 167, 69, 0.15);
    border-color: #28a745;
    color: #8dd99b;
}

/* Loading States */
.loading-spinner {
    color: #ff8c00;
    font-size: 2rem;
}

/* Responsive Table */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.85rem;
    }
    
    .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* Custom Scrollbar for Admin Sections */
.admin-scroll::-webkit-scrollbar {
    width: 10px;
}

.admin-scroll::-webkit-scrollbar-track {
    background: #1a1a2e;
}

.admin-scroll::-webkit-scrollbar-thumb {
    background: #ff8c00;
    border-radius: 5px;
}

.admin-scroll::-webkit-scrollbar-thumb:hover {
    background: #ff6b00;
}

/* User Role Badge */
.badge-role {
    background: linear-gradient(135deg, #ff8c00, #ff6b00);
    color: white;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    text-transform: uppercase;
}

/* Service Status Indicator */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.status-indicator.active {
    background: #28a745;
    box-shadow: 0 0 8px #28a745;
}

.status-indicator.pending {
    background: #ffc107;
    box-shadow: 0 0 8px #ffc107;
}

.status-indicator.inactive {
    background: #dc3545;
    box-shadow: 0 0 8px #dc3545;
}