/* ===================================
   Vendor Bid Submission Portal
   Professional Clean Theme with Red Accent
   =================================== */



:root {
    --primary-red: #95052a;
    --primary-red-dark: #77021e;
    --primary-red-light: #D71920;
    --background-white: #FFFFFF;
    --absa-orange: #FF780F;
    --text-dark: #333333;
    --text-light: #666666;
    --border-light: #E5E5E5;

    --success-green: #2E7D32;
    --warning-amber: #F9A825;
    --error-red: #C62828;
    --disabled-gray: #BDBDBD;
    --sidebar-width: 260px;
}

html {
    zoom: 80%;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Source Sans 3', 'Source Sans Pro', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #F8F9FA;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
}

h2 {
    color: var(--primary-red);
}

/* ===================================
   Layout Structure
   =================================== */

.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background-color: var(--background-white);
    border-right: 1px solid var(--border-light);
    position: fixed;
    height: 100%;
    overflow-y: auto;
    z-index: 1000;
}

.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 0;
}

/* ===================================
   Sidebar Navigation
   =================================== */

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border-light);
}

.sidebar-logo {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    text-decoration: none;
    display: block;
}

.sidebar-logo span {
    color: var(--primary-red);
}

.sidebar-nav {
    padding: 16px 0;
}

.nav-section {
    margin-bottom: 24px;
}

.nav-section-title {
    padding: 8px 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-light);
    letter-spacing: 0.5px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.nav-link:hover {
    background-color: #F8F9FA;
    color: var(--primary-red);
}

.nav-link.active {
    background-color: #FFF5F5;
    color: var(--primary-red);
    border-left-color: var(--primary-red);
    font-weight: 500;
}

.nav-icon {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.nav-link svg.nav-icon {
    color: var(--text-dark);
    transition: color 0.2s ease;
}

.nav-link:hover svg.nav-icon,
.nav-link.active svg.nav-icon {
    color: var(--primary-red);
}

/* ===================================
   Top Bar
   =================================== */

.top-bar {
    background-color: var(--background-white);
    border-bottom: 1px solid var(--border-light);
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-dark);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-info {
    text-align: right;
}

.user-name {
    font-weight: 500;
    color: var(--text-dark);
    font-size: 14px;
}

.user-role {
    font-size: 12px;
    color: var(--text-light);
}

/* ===================================
   Content Area
   =================================== */

.content-wrapper {
    padding: 32px;
}

.card {
    background-color: var(--background-white);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    padding: 24px;
    margin-bottom: 24px;
}

.card-header {
    background-color: rgba(253, 132, 135, 0.1) !important;
    border-bottom: none !important;
    margin: -24px -24px 20px -24px;
    padding: 16px 24px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: #333333 !important;
}

/* ===================================
   Buttons
   =================================== */

.btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--primary-red);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-red-dark);
}

.btn-secondary {
    background-color: var(--background-white);
    color: var(--text-dark);
    border: 1px solid var(--border-light);
}

.btn-secondary:hover {
    background-color: #F8F9FA;
}

.btn-success {
    background-color: var(--success-green);
    color: white;
}

.btn-success:hover {
    background-color: #1B5E20;
}

.btn-danger {
    background-color: var(--error-red);
    color: white;
}

.btn-danger:hover {
    background-color: #B71C1C;
}

.btn:disabled {
    background-color: var(--disabled-gray);
    cursor: not-allowed;
    opacity: 0.6;
}
.btn-outline-primary {
    color: var(--primary-red-dark);
    border-color: var(--primary-red-dark);
    border-color: var(--primary-red-dark);

    /*background-color: var(--primary-red-dark);*/
  
}
    .btn-outline-primary:hover {
        background-color: var(--primary-red-dark);
        color: var(--background-white);
        color: #000;
    }
.btn-outline-warning {
    color: var(--absa-orange);
    border-color: var(--absa-orange);
    border-color: var(--absa-orange);
    /*background-color: var(--absa-orange);*/
}
.btn-outline-primary:warning {
/*    background-color: var(--primary-red-dark);*/
    color: #000;
}

.bg-info {
    background-color: var( --primary-red-dark);
}

/* ===================================
   Forms
   =================================== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text-dark);
    font-size: 14px;
}

.form-label.required::after {
    content: " *";
    color: var(--primary-red);
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    transition: border-color 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(176, 20, 25, 0.1);
}

.form-control:disabled {
    background-color: #F8F9FA;
    cursor: not-allowed;
}

.form-text {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-light);
}

.form-error {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--error-red);
}

/* ===================================
   Tables
   =================================== */

.table-container {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--background-white);
}

.table thead {
    background-color: #F8F9FA;
}

.table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-dark);
    border-bottom: 2px solid var(--border-light);
    font-size: 13px;
}

.table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
}

.table tbody tr:hover {
    background-color: #F8F9FA;
}

.table td:first-child {
    color: var(--primary-red);
    font-weight: 500;
}

/* ===================================
   Badges & Status
   =================================== */

.progress-bar {
    background-color: var(--success-green);
}

.text-warning {
    color: var(--absa-orange);
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-draft {
    background-color: #FFF3E0;
    color: #E65100;
}

.badge-submitted {
    background-color: #FFF5F5;
    color: #B01419;
}

.badge-approved {
    background-color: #E8F5E9;
    color: var(--success-green);
}

.badge-rejected {
    background-color: #FFEBEE;
    color: var(--error-red);
}

.badge-pending {
    background-color: #FFF5F5;
    color: #B01419;
}

.badge-late {
    background-color: #FFEBEE;
    color: var(--error-red);
    font-weight: 600;
}

/* ===================================
   Alerts
   =================================== */

.alert {
    padding: 16px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.alert-success {
    background-color: #E8F5E9;
    border-color: var(--success-green);
    color: var(--success-green);
}

.alert-error {
    background-color: #FFEBEE;
    border-color: var(--error-red);
    color: var(--error-red);
}

.alert-warning {
    background-color: #FFF9C4;
    border-color: var(--warning-amber);
    color: #F57F17;
}

.alert-info {
    background-color: #FFF5F5;
    border-color: #B01419;
    color: #B01419;
}

/* ===================================
   Authentication Pages
   =================================== */

.auth-container {
    min-height: 130vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-image: url('../images/hero-4.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 20px;
    position: relative;
}

.auth-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(139, 0, 0, 0.4);
    z-index: 1;
}

.auth-page-logo {
    margin-bottom: 32px;
    text-align: center;
    position: relative;
    z-index: 2;
}

.auth-page-logo img {
    max-width: 150px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.auth-card {
    background-color: var(--background-white);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 48px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 2;
}

.auth-card-logo {
    text-align: center;
    margin-bottom: 24px;
}

.auth-card-logo img {
    max-width: 120px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.auth-logo {
    text-align: center;
    margin-bottom: 8px;
}

.auth-logo h1 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-dark);
}

.auth-logo span {
    color: var(--primary-red);
}

.auth-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
    text-align: center;
}

.auth-subtitle {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 32px;
    text-align: center;
}

/* ===================================
   Typography Overrides
   =================================== */

/* Override Bootstrap default font weights - max weight is 600 */
strong, b {
    font-weight: 600 !important;
}

dt {
    font-weight: 600 !important;
}

/* Bootstrap utility classes override */
.fw-bold,
.font-weight-bold {
    font-weight: 600 !important;
}

/* Override any potential font-weight: 700 or higher */
.fw-bolder {
    font-weight: 600 !important;
}

/* ===================================
   Bootstrap Overrides for Maroon Theme
   =================================== */

/* Override Bootstrap primary color for branding contexts */
.bg-primary {
    background-color: var(--primary-red) !important;
    color: white !important;
}

.bg-primary .text-white {
    color: white !important;
}

/* Profile and information page specific headers */
.profile-header,
.info-header,
.vendor-header {
    background-color: var(--primary-red) !important;
    color: white !important;
}

/* Dashboard metrics styling */
.dashboard-metric,
.metric-card {
    background-color: var(--primary-red) !important;
    color: white !important;
}

.dashboard-metric h3,
.metric-card h3 {
    color: white !important;
}

/* Keep semantic colors for status indicators */
.bg-success {
    background-color: var(--success-green) !important;
}

.bg-danger {
    background-color: var(--error-red) !important;
}

.bg-warning {
    background-color: var(--warning-amber) !important;
}

/* Secondary stays grey for neutral actions */
.bg-secondary {
    background-color: #6c757d !important;
}

/* Info class - use light red for branding contexts, keep blue for informational */
.bg-info.branding {
    background-color: #FFF5F5 !important;
    color: var(--primary-red) !important;
}

/* Light backgrounds stay neutral */
.bg-light {
    background-color: #f8f9fa !important;
}

/* ===================================
   Utility Classes
   =================================== */

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.d-flex {
    display: flex;
}

.justify-between {
    justify-content: space-between;
}

.align-center {
    align-items: center;
}

.gap-2 {
    gap: 16px;
}

/* ===================================
   Responsive Design
   =================================== */

/* ===================================
   Landing Page Styles
   =================================== */

.hero-banner {
    position: relative;
    width: 100%;
    height: 280px;
    background-image: url('../images/hero-1.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(139, 0, 0, 0.5);
}

.hero-logo {
    position: absolute;
    top: 40px;
    right: 60px;
    z-index: 2;
}

.hero-logo img {
    max-width: 100px;
    height: auto;
    display: block;
}

.hero-content {
    position: absolute;
    bottom: 40px;
    left: 60px;
    color: white;
    z-index: 2;
}

.hero-title {
    font-size: 42px;
    font-weight: 600;
    margin-bottom: 8px;
    color: white;
}

.hero-subtitle {
    font-size: 18px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.95);
}

.landing-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

.landing-content {
    padding: 60px 40px;
}

.welcome-section {
    text-align: center;
    margin-bottom: 60px;
}

.welcome-section h2 {
    font-size: 32px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.lead-text {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-light);
    max-width: 900px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.feature-card {
    background: white;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.feature-card p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
}

.cta-section {
    margin-bottom: 60px;
}

.cta-card {
    background: linear-gradient(135deg, #FFF5F5 0%, #FFFFFF 100%);
    border: 2px solid var(--primary-red);
    border-radius: 12px;
    padding: 50px;
    text-align: center;
}

.cta-card h2 {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.cta-card p {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 24px;
}

.btn-large {
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
}

.cta-subtext {
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-light);
}

.text-link {
    color: var(--primary-red);
    text-decoration: none;
    font-weight: 500;
}

.text-link:hover {
    text-decoration: underline;
}

.info-section {
    margin-bottom: 60px;
}

.info-section h2 {
    font-size: 32px;
    font-weight: 600;
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 40px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 30px;
}

.info-item {
    text-align: center;
}

.info-number {
    width: 60px;
    height: 60px;
    background: var(--primary-red);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 600;
    margin: 0 auto 20px;
}

.info-item h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.info-item p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
}

.landing-footer {
    text-align: center;
    padding: 40px 0;
    border-top: 1px solid var(--border-light);
    margin-top: 60px;
}

.landing-footer p {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 8px;
}

.footer-links {
    margin-top: 12px;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    margin: 0 12px;
}

.footer-links a:hover {
    color: var(--primary-red);
}

/* ===================================
   Document Cards
   =================================== */

.document-card {
    transition: all 0.2s ease;
    border: 1px solid #dee2e6 !important;
    min-height: 100px;
}

.document-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-color: #B01419 !important;
}

.document-card .d-flex {
    min-height: 76px; /* Ensures consistent height regardless of content */
}

.document-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    flex-shrink: 0; /* Prevents icon from shrinking */
}

.document-info {
    min-width: 0; /* Allows flex item to shrink below content size */
    overflow: hidden; /* Prevents content from overflowing */
}

.document-name {
    font-weight: 600;
    color: #495057;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.25rem !important;
    cursor: help; /* Shows that there's a tooltip */
}

.document-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    line-height: 1.4;
}

.document-actions {
    flex-shrink: 0; /* Prevents actions from shrinking */
    align-self: flex-center; /* Aligns to top */
}

.document-actions .btn-group .btn {
    border-radius: 0.375rem;
}

.document-actions .btn-group .btn:not(:last-child) {
    margin-right: 0.25rem;
}

.document-placeholder {
    min-height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* ===================================
   Text Truncation Utilities
   =================================== */

.text-truncate-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.title-truncate {
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===================================
   Card Enhancements
   =================================== */

.card-equal-height {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card-equal-height .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-equal-height .card-footer {
    margin-top: auto;
}

/* Dashboard metrics styling - specific to metric cards only */
.dashboard-metric h2,
.metric-card h2 {
    color: white !important;
}

/* ===================================
   Accordion Styling
   =================================== */

/* Accordion button styling - expanded state gets pink background */
.accordion-button:not(.collapsed) {
    background-color: rgba(253, 132, 135, 0.1) !important;
    color: #333333 !important;
    box-shadow: none;
    border-bottom: none !important;
}

/* Keep collapsed accordion buttons as light gray */
.accordion-button.collapsed {
    background-color: #f8f9fa;
    color: #333333;
}

/* Ensure accordion button focus states work properly */
.accordion-button:focus {
    box-shadow: none;
    border-color: rgba(253, 132, 135, 0.3);
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .content-wrapper {
        padding: 16px;
    }

    .auth-card {
        padding: 32px 24px;
        margin: 16px;
    }

    .hero-banner {
        height: 200px;
    }

    .hero-logo {
        right: 30px;
        top: 30px;
    }

    .hero-logo img {
        max-width: 80px;
    }

    .hero-content {
        left: 30px;
        bottom: 30px;
    }

    .hero-title {
        font-size: 28px;
    }

    .hero-subtitle {
        font-size: 14px;
    }

    .landing-content {
        padding: 40px 20px;
    }

    .features-grid,
    .info-grid {
        grid-template-columns: 1fr;
    }

    .cta-card {
        padding: 30px 20px;
    }

    .auth-page-logo img {
        max-width: 120px;
    }
}
