/**
 * Corporate Override Styles
 * Modern, professional styling for SOLIBRA Supplier Portal
 *
 * This file contains Bootstrap overrides and custom styles to create
 * a uniform, corporate look and feel across the entire application.
 *
 * Import this file AFTER all other CSS files to ensure proper cascade.
 */

/* ============================================
   1. GLOBAL BOOTSTRAP OVERRIDES
   ============================================ */

/* Card Enhancements - Override Bootstrap .card */
.card {
    border-radius: 12px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none !important;
    overflow: hidden;
}

.card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12) !important;
}

.card-body {
    padding: 1.75rem 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1.5rem;
}

/* Card Headers */
.card-header {
    background-color: #f8f9fa;
    border-bottom: 2px solid #e8ecef;
    padding: 1.25rem 1.5rem;
    border-radius: 12px 12px 0 0 !important;
}

/* ============================================
   2. BUTTON OVERRIDES
   ============================================ */

.btn {
    border-radius: 8px;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
}

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

.btn-success {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    border: none;
}

.btn-success:hover {
    background: linear-gradient(135deg, #229954 0%, #1e8449 100%);
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    border: none;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
}

.btn-primary {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9 0%, #21618c 100%);
}

.btn-warning {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    border: none;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
}

.btn-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    border: none;
}

.btn-info:hover {
    background: linear-gradient(135deg, #138496 0%, #0f6674 100%);
}

.btn-sm {
    border-radius: 6px;
    padding: 0.375rem 1rem;
}

.btn-lg {
    border-radius: 10px;
    padding: 0.75rem 2rem;
}

/* ============================================
   3. FORM CONTROLS
   ============================================ */

.form-control {
    border-radius: 8px;
    border: 1px solid #ced4da;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.15);
}

.form-select {
    border-radius: 8px;
}

.form-select:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.15);
}

textarea.form-control {
    border-radius: 8px;
}

/* ============================================
   4. TYPOGRAPHY ENHANCEMENTS
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: #2c3e50;
}

.page-title h3 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0;
}

.text-muted {
    color: #6c757d !important;
}

/* ============================================
   5. TIMELINE STYLES (Generic)
   ============================================ */

.bullet-line-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.bullet-line-list li {
    position: relative;
    padding-left: 3.5rem;
    padding-bottom: 2.5rem;
    border-left: 2px solid #e0e6ed;
    margin-left: 1rem;
}

.bullet-line-list li:last-child {
    border-left-color: transparent;
    padding-bottom: 0;
}

.bullet-line-list li:before {
    content: '';
    position: absolute;
    left: -8px;
    top: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #3498db;
    border: 3px solid #fff;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    z-index: 1;
}

.bullet-line-list li h6 {
    font-size: 1.05rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.bullet-line-list li p {
    font-size: 0.875rem;
    line-height: 1.7;
    margin-bottom: 0.5rem;
}

.bullet-line-list li p.text-muted {
    color: #6c757d !important;
}

.bullet-line-list li p.text-muted i {
    margin-right: 0.5rem;
    color: #95a5a6;
    font-size: 0.95rem;
}

.bullet-line-list li p.text-muted span {
    display: inline-flex;
    align-items: center;
}

/* Alternative vertical line timeline */
.bullet-line-list:after {
    content: none;
}

/* ============================================
   6. STATISTICS CARDS
   ============================================ */

.stats-card .card {
    text-align: center;
}

.stats-card .card-body {
    padding: 1.75rem 1.5rem;
}

.stats-card h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.stats-card h4 {
    font-size: 0.875rem;
    font-weight: 500;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0;
}

.stats-card .icon-lg {
    font-size: 2.5rem;
    opacity: 0.9;
}

/* ============================================
   7. STATUS COLORS
   ============================================ */

.text-info-blue-sabc {
    color: #3498db !important;
}

.text-info-green-sabc {
    color: #27ae60 !important;
}

.text-info-orange-sabc {
    color: #f39c12 !important;
}

.text-info-red-sabc {
    color: #e74c3c !important;
}

.text-info-sabc {
    color: #3498db !important;
}

.text-info-black-sabc {
    color: #2c3e50 !important;
}

/* ============================================
   8. BADGES & LABELS
   ============================================ */

.badge {
    border-radius: 6px;
    padding: 0.375em 0.75em;
    font-weight: 500;
}

.badge-primary {
    background-color: #3498db;
}

.badge-success {
    background-color: #27ae60;
}

.badge-danger {
    background-color: #e74c3c;
}

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

.badge-info {
    background-color: #17a2b8;
}

/* ============================================
   9. TABLES
   ============================================ */

.table {
    border-radius: 8px;
    overflow: hidden;
}

.table thead th {
    background-color: #f8f9fa;
    color: #2c3e50;
    font-weight: 600;
    border-bottom: 2px solid #e8ecef;
    padding: 1rem;
}

.table tbody tr {
    transition: background-color 0.2s ease;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

.table td {
    padding: 0.875rem 1rem;
    vertical-align: middle;
}

/* ============================================
   10. MODALS
   ============================================ */

.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.modal-header {
    background-color: #f8f9fa;
    border-bottom: 2px solid #e8ecef;
    padding: 1.25rem 1.5rem;
    border-radius: 12px 12px 0 0;
}

.modal-title {
    font-weight: 600;
    color: #2c3e50;
}

.modal-footer {
    border-top: 1px solid #e8ecef;
    padding: 1rem 1.5rem;
}

/* ============================================
   11. ALERTS
   ============================================ */

.alert {
    border-radius: 8px;
    border: none;
    padding: 1rem 1.25rem;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* ============================================
   12. NAVIGATION & BREADCRUMBS
   ============================================ */

.breadcrumb {
    background-color: transparent;
    padding: 0.75rem 0;
}

.breadcrumb-item {
    font-size: 0.875rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: #6c757d;
}

.breadcrumb-item.active {
    color: #6c757d;
}

/* ============================================
   13. PAGINATION
   ============================================ */

.pagination {
    margin-bottom: 0;
}

.page-link {
    border-radius: 6px;
    margin: 0 2px;
    border: 1px solid #dee2e6;
    color: #3498db;
}

.page-link:hover {
    background-color: #e9ecef;
    border-color: #dee2e6;
    color: #2980b9;
}

.page-item.active .page-link {
    background-color: #3498db;
    border-color: #3498db;
}

/* ============================================
   14. CONTENT WRAPPER
   ============================================ */

.content-wrapper {
    background-color: #f8f9fa;
    padding: 2rem 1.5rem;
}

/* ============================================
   15. GRID & SPACING
   ============================================ */

.grid-margin {
    margin-bottom: 1.5rem;
}

.stretch-card {
    display: flex;
    align-items: stretch;
    justify-content: stretch;
}

.stretch-card > .card {
    width: 100%;
}

/* ============================================
   16. RESPONSIVE UTILITIES
   ============================================ */

@media (max-width: 768px) {
    .card-body {
        padding: 1.25rem 1rem;
    }

    .stats-card h3 {
        font-size: 1.5rem;
    }

    .page-title h3 {
        font-size: 1.5rem;
    }

    .btn {
        padding: 0.5rem 1rem;
    }
}

@media (max-width: 576px) {
    .card {
        border-radius: 8px !important;
    }

    .modal-content {
        border-radius: 8px;
    }
}

/* ============================================
   17. LISTS & LIST GROUPS
   ============================================ */

.list-group-item {
    border: 1px solid #e8ecef;
    padding: 1rem 1.25rem;
}

.list-group-item:first-child {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.list-group-item:last-child {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

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

/* ============================================
   18. DROPDOWNS
   ============================================ */

.dropdown-menu {
    border-radius: 8px;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 0.5rem 0;
}

.dropdown-item {
    padding: 0.5rem 1.25rem;
    transition: background-color 0.15s ease;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: #2c3e50;
}

.dropdown-divider {
    border-top: 1px solid #e8ecef;
}

/* ============================================
   19. PROGRESS BARS
   ============================================ */

.progress {
    border-radius: 8px;
    height: 1.25rem;
    background-color: #e9ecef;
}

.progress-bar {
    background-color: #3498db;
}

/* ============================================
   20. TOOLTIPS & POPOVERS
   ============================================ */

.tooltip-inner {
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
}

.popover {
    border-radius: 8px;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.popover-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e8ecef;
    border-radius: 8px 8px 0 0;
}

/* ============================================
   21. ICONS
   ============================================ */

.icon-lg {
    font-size: 2.5rem;
}

.icon-md {
    font-size: 1.5rem;
}

.icon-sm {
    font-size: 1rem;
}

/* ============================================
   22. UTILITY CLASSES
   ============================================ */

.shadow-sm {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
}

.shadow {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

.shadow-lg {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12) !important;
}

.rounded {
    border-radius: 8px !important;
}

.rounded-lg {
    border-radius: 12px !important;
}

/* ============================================
   23. TABS
   ============================================ */

.nav-tabs {
    border-bottom: 2px solid #e8ecef;
}

.nav-tabs .nav-link {
    border: none;
    border-bottom: 2px solid transparent;
    color: #6c757d;
    padding: 0.75rem 1.5rem;
    transition: all 0.2s ease;
}

.nav-tabs .nav-link:hover {
    border-color: transparent;
    color: #3498db;
}

.nav-tabs .nav-link.active {
    border-color: transparent transparent #3498db;
    color: #3498db;
    font-weight: 600;
}

.tab-content {
    padding: 1.5rem 0;
}

/* ============================================
   24. ACCORDION
   ============================================ */

.accordion-button {
    background-color: #f8f9fa;
    color: #2c3e50;
    font-weight: 600;
    border-radius: 8px;
}

.accordion-button:not(.collapsed) {
    background-color: #e9ecef;
    color: #3498db;
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.15);
}

/* ============================================
   25. CUSTOM UTILITIES
   ============================================ */

.bg-light-blue {
    background-color: #e3f2fd !important;
}

.bg-light-green {
    background-color: #e8f5e9 !important;
}

.bg-light-red {
    background-color: #ffebee !important;
}

.bg-light-orange {
    background-color: #fff3e0 !important;
}

/* ============================================
   26. WIZARD STYLES (for multi-step forms)
   ============================================ */

.wizard > .steps .done a {
    background: #27ae60 !important;
}

.wizard > .steps .current a {
    background: #3498db !important;
}

/* ============================================
   END OF CORPORATE OVERRIDE STYLES
   ============================================ */
