/* ============================================
   OES CUSTOM STYLES WITH BOOTSTRAP 5
   ============================================ */

/* General Styles */
.oes-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.oes-page-header {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 15px;
    padding: 2.5rem 2rem;
    margin-bottom: 2rem;
    color: white;
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
    position: relative;
    overflow: hidden;
}

.oes-page-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(100px, -100px);
}

.oes-page-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    transform: translate(-50px, 50px);
}

.oes-page-header h1 {
    font-weight: 800;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
    font-size: 2.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.oes-page-header .lead {
    opacity: 0.9;
    margin-bottom: 0;
    font-size: 1.1rem;
    position: relative;
    z-index: 1;
}

/* Card Enhancements */
.oes-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    background: white;
}

.oes-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.oes-card-header {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e2e8f0;
    padding: 1.5rem 2rem;
    border-radius: 15px 15px 0 0 !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.oes-card-header h5 {
    margin: 0;
    font-weight: 700;
    color: #1e293b;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.oes-card-body {
    padding: 2rem;
}

.oes-card-footer {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    padding: 1.5rem 2rem;
    border-radius: 0 0 15px 15px;
}

/* Form Enhancements */
.oes-form-label {
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

.oes-form-control, .oes-form-select {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: white;
}

.oes-form-control:focus, .oes-form-select:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
    background: white;
}

.oes-form-textarea {
    min-height: 120px;
    resize: vertical;
}

/* Button Enhancements */
.oes-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.oes-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.oes-btn:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(40, 40);
        opacity: 0;
    }
}

.oes-btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border: none;
}

.oes-btn-primary:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

.oes-btn-secondary {
    background: #64748b;
    color: white;
}

.oes-btn-secondary:hover {
    background: #475569;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(100, 116, 139, 0.3);
}

.oes-btn-success {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    color: white;
    border: none;
}

.oes-btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.oes-btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    color: #1f2937;
    border: none;
}

.oes-btn-warning:hover {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.3);
}

.oes-btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
    color: white;
    border: none;
}

.oes-btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3);
}

.oes-btn-info {
    background: linear-gradient(135deg, #06b6d4 0%, #22d3ee 100%);
    color: white;
    border: none;
}

.oes-btn-info:hover {
    background: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(6, 182, 212, 0.3);
}

.oes-btn-light {
    background: #f8fafc;
    color: #475569;
    border: 2px solid #e2e8f0;
}

.oes-btn-light:hover {
    background: #f1f5f9;
    color: #334155;
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

.oes-btn-outline-primary {
    border: 2px solid #6366f1;
    color: #6366f1;
    background: transparent;
}

.oes-btn-outline-primary:hover {
    background: #6366f1;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.2);
}

.oes-btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: 8px;
}

.oes-btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 12px;
}

/* Badge Styles */
.oes-badge {
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
}

.badge-draft { 
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border: 1px solid #fbbf24;
}

.badge-pending { 
    background: linear-gradient(135deg, #dbeafe 0%, #93c5fd 100%);
    color: #1e40af;
    border: 1px solid #60a5fa;
}

.badge-approved { 
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border: 1px solid #34d399;
}

.badge-published { 
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    color: #3730a3;
    border: 1px solid #818cf8;
}

.badge-archived { 
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    color: #374151;
    border: 1px solid #d1d5db;
}

/* Table Styles */
.oes-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.oes-table thead th {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 2px solid #e2e8f0;
    padding: 1.25rem 1.5rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    position: sticky;
    top: 0;
    z-index: 10;
}

.oes-table tbody td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    color: #475569;
    transition: background 0.2s ease;
}

.oes-table tbody tr:last-child td {
    border-bottom: none;
}

.oes-table tbody tr:hover td {
    background: #f8fafc;
}

.oes-table tbody tr:nth-child(even) td {
    background: #fafbfc;
}

.oes-table tbody tr:hover:nth-child(even) td {
    background: #f1f5f9;
}

/* Alert Styles */
.oes-alert {
    border-radius: 12px;
    border: none;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.oes-alert::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 5px;
}

.oes-alert-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
}

.oes-alert-success::before {
    background: #10b981;
}

.oes-alert-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
}

.oes-alert-danger::before {
    background: #ef4444;
}

.oes-alert-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
}

.oes-alert-warning::before {
    background: #f59e0b;
}

.oes-alert-info {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    color: #0369a1;
}

.oes-alert-info::before {
    background: #0ea5e9;
}

/* Modal Enhancements */
.oes-modal .modal-content {
    border-radius: 20px;
    border: none;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.oes-modal .modal-header {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e2e8f0;
    padding: 1.5rem 2rem;
    border-radius: 20px 20px 0 0;
}

.oes-modal .modal-title {
    font-weight: 700;
    color: #1e293b;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.oes-modal .modal-body {
    padding: 2rem;
}

.oes-modal .modal-footer {
    border-top: 1px solid #e2e8f0;
    padding: 1.5rem 2rem;
    background: #f8fafc;
    border-radius: 0 0 20px 20px;
}

/* Progress Bar */
.oes-progress {
    height: 10px;
    border-radius: 5px;
    background: #e2e8f0;
    overflow: hidden;
}

.oes-progress-bar {
    border-radius: 5px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    transition: width 1s ease-in-out;
}

/* Loading Spinner */
.oes-spinner {
    width: 3rem;
    height: 3rem;
    border-width: 4px;
    border-top-color: #6366f1;
    animation: spinner-rotate 1s linear infinite;
}

@keyframes spinner-rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Empty State */
.oes-empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.oes-empty-state-icon {
    font-size: 4rem;
    color: #cbd5e0;
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.oes-empty-state-title {
    color: #64748b;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.oes-empty-state-text {
    color: #94a3b8;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

/* Status Indicators */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.status-indicator::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-active::before { background: #10b981; }
.status-draft::before { background: #f59e0b; }
.status-pending::before { background: #6366f1; }
.status-approved::before { background: #3b82f6; }
.status-published::before { background: #8b5cf6; }
.status-archived::before { background: #9ca3af; }

/* Custom Tabs */
.oes-tabs {
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 2rem;
}

.oes-tabs .nav-link {
    border: none;
    color: #64748b;
    font-weight: 600;
    padding: 1rem 1.5rem;
    border-radius: 10px 10px 0 0;
    margin-right: 5px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
}

.oes-tabs .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: #6366f1;
    transform: translateY(3px);
    transition: transform 0.3s ease;
}

.oes-tabs .nav-link:hover {
    color: #4f46e5;
    background: #f8fafc;
}

.oes-tabs .nav-link:hover::after {
    transform: translateY(0);
}

.oes-tabs .nav-link.active {
    color: #4f46e5;
    background: white;
}

.oes-tabs .nav-link.active::after {
    transform: translateY(0);
}

/* Toast Container */
#oes-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .oes-container {
        padding: 1rem;
    }
    
    .oes-page-header {
        padding: 1.5rem;
        text-align: center;
    }
    
    .oes-page-header h1 {
        font-size: 1.75rem;
    }
    
    .oes-card-body {
        padding: 1.5rem;
    }
    
    .oes-table {
        font-size: 0.875rem;
    }
    
    .oes-table thead {
        display: none;
    }
    
    .oes-table tbody tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        padding: 1rem;
    }
    
    .oes-table tbody td {
        display: block;
        text-align: right;
        border-bottom: 1px solid #e2e8f0;
        padding: 0.75rem 0.5rem;
    }
    
    .oes-table tbody td:last-child {
        border-bottom: none;
    }
    
    .oes-table tbody td::before {
        content: attr(data-label);
        float: left;
        font-weight: 700;
        color: #4a5568;
        text-transform: uppercase;
        font-size: 0.75rem;
    }
    
    .oes-tabs .nav-link {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

.slide-in {
    animation: slideIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Print Styles */
@media print {
    .oes-page-header {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
    }
    
    .oes-btn {
        display: none !important;
    }
    
    .oes-card {
        box-shadow: none !important;
        border: 1px solid #dee2e6 !important;
    }
}