/**
 * DrillerDB Supplier Portal - Industrial Precision Design System
 * A distinctive, production-grade B2B interface for water well tooling suppliers
 * Design Theme: Industrial Precision with Hexagonal Geometry
 */

/* Import distinctive, technical fonts */
@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;500;600;700&family=IBM+Plex+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&family=Saira+Condensed:wght@400;500;600;700;800&display=swap');

/* ============================================
   DESIGN SYSTEM - CSS VARIABLES
   ============================================ */
:root {
    /* DrillerDB Orange - Strategic Accent */
    --drillerdb-orange: #FF7A00;
    --drillerdb-orange-dark: #E66A00;
    --drillerdb-orange-light: #FF9433;
    --drillerdb-orange-glow: rgba(255, 122, 0, 0.15);
    --drillerdb-orange-intense: rgba(255, 122, 0, 0.35);

    /* Industrial Steel Palette - Primary */
    --steel-dark: #1A252F;
    --steel-medium: #2C3E50;
    --steel-base: #34495E;
    --steel-light: #546E7A;
    --steel-lighter: #7B8D99;

    /* Concrete Neutrals */
    --concrete-dark: #95A5A6;
    --concrete-medium: #BDC3C7;
    --concrete-light: #E8EDEF;
    --concrete-lighter: #F4F6F7;
    --concrete-paper: #F8F9FA;

    /* Technical Accents */
    --precision-blue: #2E86C1;
    --precision-blue-light: #5DADE2;
    --safety-yellow: #F39C12;
    --caution-red: #E74C3C;
    --success-green: #27AE60;

    /* Semantic Colors */
    --primary: var(--drillerdb-orange);
    --secondary: var(--steel-medium);
    --success: var(--success-green);
    --info: var(--precision-blue);
    --warning: var(--safety-yellow);
    --danger: var(--caution-red);
    --light: var(--concrete-paper);
    --dark: var(--steel-dark);

    /* Surface Colors */
    --surface-base: #FFFFFF;
    --surface-elevated: #FFFFFF;
    --surface-overlay: rgba(26, 37, 47, 0.95);
    --surface-frosted: rgba(255, 255, 255, 0.85);

    /* Typography Scale */
    --font-display: 'Rajdhani', 'Saira Condensed', system-ui, sans-serif;
    --font-body: 'IBM Plex Sans', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;
    --font-numbers: 'Rajdhani', sans-serif;

    /* Font Sizes (Modular Scale 1.25) */
    --text-xs: 0.75rem;     /* 12px */
    --text-sm: 0.875rem;    /* 14px */
    --text-base: 1rem;      /* 16px */
    --text-lg: 1.125rem;    /* 18px */
    --text-xl: 1.25rem;     /* 20px */
    --text-2xl: 1.563rem;   /* 25px */
    --text-3xl: 1.953rem;   /* 31px */
    --text-4xl: 2.441rem;   /* 39px */
    --text-5xl: 3.052rem;   /* 49px */

    /* Spacing System (8px base) */
    --space-1: 0.25rem;   /* 4px */
    --space-2: 0.5rem;    /* 8px */
    --space-3: 0.75rem;   /* 12px */
    --space-4: 1rem;      /* 16px */
    --space-5: 1.25rem;   /* 20px */
    --space-6: 1.5rem;    /* 24px */
    --space-8: 2rem;      /* 32px */
    --space-10: 2.5rem;   /* 40px */
    --space-12: 3rem;     /* 48px */
    --space-16: 4rem;     /* 64px */
    --space-20: 5rem;     /* 80px */

    /* Shadows - Depth System */
    --shadow-xs: 0 1px 2px rgba(26, 37, 47, 0.06);
    --shadow-sm: 0 2px 4px rgba(26, 37, 47, 0.08);
    --shadow-md: 0 4px 8px rgba(26, 37, 47, 0.12);
    --shadow-lg: 0 8px 16px rgba(26, 37, 47, 0.15);
    --shadow-xl: 0 12px 24px rgba(26, 37, 47, 0.18);
    --shadow-2xl: 0 20px 40px rgba(26, 37, 47, 0.22);
    --shadow-inner: inset 0 2px 4px rgba(26, 37, 47, 0.08);
    --shadow-orange: 0 4px 20px var(--drillerdb-orange-glow);
    --shadow-orange-intense: 0 8px 32px var(--drillerdb-orange-intense);

    /* Border Radius - Hexagonal Theme */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;
    --radius-2xl: 16px;
    --radius-hex: 8px; /* Simulates hexagonal appearance */
    --radius-full: 9999px;

    /* Transitions */
    --transition-quick: 0.1s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);

    /* Z-Index Scale */
    --z-base: 1;
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;

    /* Grid Pattern */
    --grid-size: 24px;
    --grid-color: rgba(46, 134, 193, 0.04);
}

/* Dark Mode Variables */
@media (prefers-color-scheme: dark) {
    :root {
        --surface-base: #1A252F;
        --surface-elevated: #2C3E50;
        --concrete-paper: #34495E;
        --steel-dark: #F8F9FA;
        --grid-color: rgba(93, 173, 226, 0.06);
    }
}

/* ============================================
   BASE STYLES
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--steel-dark);
    background: var(--concrete-paper);
    position: relative;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Technical Grid Background Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(var(--grid-color) 1.5px, transparent 1.5px),
        linear-gradient(90deg, var(--grid-color) 1.5px, transparent 1.5px);
    background-size: var(--grid-size) var(--grid-size);
    pointer-events: none;
    z-index: 0;
    opacity: 1;
    animation: gridFadeIn 0.8s ease-out;
}

/* Hexagonal accent pattern (drill bit inspired) */
body::after {
    content: '';
    position: fixed;
    top: -10%;
    right: -5%;
    width: 40%;
    height: 120%;
    background: radial-gradient(
        ellipse at center,
        var(--drillerdb-orange-glow) 0%,
        transparent 70%
    );
    clip-path: polygon(
        50% 0%,
        90% 25%,
        90% 75%,
        50% 100%,
        10% 75%,
        10% 25%
    );
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
    animation: hexagonPulse 8s ease-in-out infinite;
}

@keyframes gridFadeIn {
    from {
        opacity: 0;
        transform: scale(0.98);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes hexagonPulse {
    0%, 100% {
        opacity: 0.2;
        transform: scale(1);
    }
    50% {
        opacity: 0.35;
        transform: scale(1.05);
    }
}

/* Main container positioning */
main.container-fluid,
.container-fluid,
.container {
    position: relative;
    z-index: var(--z-base);
}

main.container-fluid,
main.main-content {
    padding: var(--space-8) var(--space-6);
    min-height: calc(100vh - 160px);
    animation: contentSlideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   BREADCRUMBS & PAGE LAYOUT
   ============================================ */

/* Breadcrumb Navigation - Dark text on light background */
.breadcrumb-container {
    background: var(--concrete-paper);
    padding: var(--space-4) var(--space-6);
    border-bottom: 1px solid var(--concrete-light);
    margin-bottom: var(--space-6);
}

.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
}

.breadcrumb-item {
    color: var(--steel-light);
    font-size: var(--text-sm);
    font-weight: 500;
}

.breadcrumb-item a {
    color: var(--steel-medium);
    text-decoration: none;
    transition: var(--transition-base);
}

.breadcrumb-item a:hover {
    color: var(--drillerdb-orange);
}

.breadcrumb-item.active {
    color: var(--steel-dark);
    font-weight: 600;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--concrete-dark);
}

.breadcrumb-item i {
    color: var(--steel-light);
    margin-right: var(--space-2);
}

/* Page Title Section - Dark text on light background */
.page-title-section {
    background: var(--surface-base);
    padding: var(--space-6) 0;
    margin-bottom: var(--space-6);
    border-bottom: 2px solid var(--concrete-light);
}

.page-title {
    color: var(--steel-dark);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--text-3xl);
    margin-bottom: var(--space-2);
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.page-title i {
    color: var(--drillerdb-orange);
    font-size: var(--text-2xl);
}

.page-subtitle {
    color: var(--steel-lighter);
    font-size: var(--text-base);
    margin: 0;
}

.page-actions {
    display: flex;
    gap: var(--space-3);
    align-items: center;
}

/* Content Container */
.content-container {
    background: transparent;
    padding: 0;
}

@keyframes contentSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    color: var(--steel-dark);
    margin-bottom: var(--space-4);
    letter-spacing: -0.02em;
}

h1, .h1 { font-size: var(--text-4xl); }
h2, .h2 { font-size: var(--text-3xl); }
h3, .h3 { font-size: var(--text-2xl); }
h4, .h4 { font-size: var(--text-xl); }
h5, .h5 { font-size: var(--text-lg); }
h6, .h6 { font-size: var(--text-base); }

.display-1 { font-size: var(--text-5xl); font-weight: 800; }
.display-2 { font-size: var(--text-4xl); font-weight: 700; }
.display-3 { font-size: var(--text-3xl); font-weight: 700; }

.text-mono { font-family: var(--font-mono); }
.text-numbers { font-family: var(--font-numbers); font-weight: 600; }

.text-muted {
    color: var(--steel-lighter) !important;
}

/* ============================================
   NAVIGATION
   ============================================ */

.navbar {
    background: linear-gradient(
        135deg,
        var(--steel-dark) 0%,
        var(--steel-medium) 100%
    ) !important;
    box-shadow: var(--shadow-lg);
    padding: var(--space-4) var(--space-6);
    border-bottom: 2px solid var(--drillerdb-orange);
    position: relative;
    overflow: visible;
}

/* ============================================
   HEADER COMPONENTS - Text Readability
   ============================================ */

/* Industrial Header */
.industrial-header {
    background: linear-gradient(
        135deg,
        var(--steel-dark) 0%,
        var(--steel-medium) 100%
    );
    box-shadow: var(--shadow-lg);
    border-bottom: 2px solid var(--drillerdb-orange);
    position: relative;
    overflow: visible;
}

.industrial-header .hex-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.1;
    pointer-events: none;
}

.industrial-header .header-accent-border {
    height: 2px;
    background: var(--drillerdb-orange);
}

/* Logo and Brand - White text on dark gradient */
.industrial-header .logo-text {
    color: white;
    font-family: var(--font-display);
    font-weight: 700;
}

/* Navigation links - White text on dark gradient */
.industrial-header .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: var(--space-2) var(--space-4) !important;
    border-radius: var(--radius-md);
    transition: var(--transition-base);
    position: relative;
}

.industrial-header .nav-link:hover {
    color: white !important;
    background: rgba(255, 255, 255, 0.1);
}

.industrial-header .nav-link.active {
    color: var(--drillerdb-orange) !important;
    background: rgba(255, 122, 0, 0.1);
}

/* User avatar - White text on dark gradient */
.industrial-header .user-name {
    color: white;
}

.industrial-header .avatar-circle {
    background: var(--drillerdb-orange);
    color: white;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
}

/* Notification bell - White icon on dark gradient */
.industrial-header .notification-bell {
    color: white !important;
}

.industrial-header .notification-badge {
    background: var(--caution-red);
    color: white;
    font-weight: 700;
}

/* DROPDOWN MENUS - Dark text on white background */
.industrial-header .dropdown-menu {
    background: white;
    border: 1px solid var(--concrete-medium);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: var(--z-dropdown);
    position: absolute;
}

/* Notification Dropdown - Dark text on white */
.industrial-header .notification-dropdown {
    min-width: 360px;
}

.industrial-header .notification-header {
    padding: var(--space-4);
    border-bottom: 1px solid var(--concrete-light);
}

.industrial-header .notification-header h6 {
    color: var(--steel-dark);
    font-weight: 700;
    margin: 0;
}

.industrial-header .notification-header .mark-all-read {
    color: var(--precision-blue);
    font-size: var(--text-sm);
    font-weight: 500;
}

.industrial-header .notification-header .mark-all-read:hover {
    color: var(--precision-blue-light);
}

.industrial-header .notification-item {
    padding: var(--space-4);
    border-bottom: 1px solid var(--concrete-light);
}

.industrial-header .notification-item h6 {
    color: var(--steel-dark);
    font-weight: 600;
    font-size: var(--text-sm);
    margin-bottom: var(--space-1);
}

.industrial-header .notification-item p {
    color: var(--steel-light);
    font-size: var(--text-sm);
    margin-bottom: var(--space-1);
}

.industrial-header .notification-item small {
    color: var(--steel-lighter);
    font-size: var(--text-xs);
}

.industrial-header .notification-empty {
    padding: var(--space-8);
    text-align: center;
}

.industrial-header .notification-empty i {
    color: var(--concrete-dark);
    font-size: var(--text-3xl);
    margin-bottom: var(--space-3);
}

.industrial-header .notification-empty p {
    color: var(--steel-lighter);
    font-size: var(--text-sm);
}

.industrial-header .notification-footer {
    padding: var(--space-3);
    text-align: center;
    border-top: 1px solid var(--concrete-light);
}

.industrial-header .notification-footer a {
    color: var(--precision-blue);
    font-size: var(--text-sm);
    font-weight: 600;
}

.industrial-header .notification-footer a:hover {
    color: var(--precision-blue-light);
}

/* User Dropdown Menu - Dark text on white */
.industrial-header .user-dropdown-menu {
    min-width: 260px;
}

.industrial-header .user-dropdown-menu .dropdown-header {
    padding: var(--space-4);
    background: var(--concrete-paper);
    border-bottom: 1px solid var(--concrete-light);
}

.industrial-header .user-dropdown-menu .avatar-circle-large {
    width: 48px;
    height: 48px;
    background: var(--drillerdb-orange);
    color: white;
    font-weight: 700;
    font-size: var(--text-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    margin-bottom: var(--space-2);
}

.industrial-header .user-dropdown-menu .user-details strong {
    color: var(--steel-dark);
    font-weight: 700;
    display: block;
    font-size: var(--text-base);
}

.industrial-header .user-dropdown-menu .user-details small {
    color: var(--steel-lighter);
    font-size: var(--text-sm);
}

.industrial-header .user-dropdown-menu .dropdown-item {
    color: var(--steel-dark);
    padding: var(--space-3) var(--space-4);
    font-weight: 500;
    transition: var(--transition-base);
}

.industrial-header .user-dropdown-menu .dropdown-item:hover {
    background: var(--concrete-paper);
    color: var(--drillerdb-orange);
}

.industrial-header .user-dropdown-menu .dropdown-item i {
    color: var(--steel-light);
    margin-right: var(--space-3);
    width: 18px;
    text-align: center;
}

.industrial-header .user-dropdown-menu .dropdown-item:hover i {
    color: var(--drillerdb-orange);
}

.industrial-header .user-dropdown-menu .logout-item {
    color: var(--caution-red);
}

.industrial-header .user-dropdown-menu .logout-item:hover {
    background: rgba(231, 76, 60, 0.1);
    color: var(--caution-red);
}

/* Mobile Navigation */
.industrial-header .mobile-nav-toggle {
    background: transparent;
    border: none;
    color: white;
    font-size: var(--text-xl);
    padding: var(--space-2);
}

.industrial-header .mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 37, 47, 0.95);
    z-index: var(--z-modal);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
}

.industrial-header .mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

.industrial-header .mobile-nav-content {
    background: white;
    width: 85%;
    max-width: 320px;
    height: 100%;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: var(--transition-smooth);
}

.industrial-header .mobile-nav-overlay.active .mobile-nav-content {
    transform: translateX(0);
}

.industrial-header .mobile-nav-header {
    padding: var(--space-5);
    background: linear-gradient(
        135deg,
        var(--steel-dark) 0%,
        var(--steel-medium) 100%
    );
    border-bottom: 2px solid var(--drillerdb-orange);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.industrial-header .mobile-nav-header .logo-text {
    color: white;
}

.industrial-header .mobile-nav-close {
    background: transparent;
    border: none;
    color: white;
    font-size: var(--text-xl);
    padding: var(--space-2);
}

.industrial-header .mobile-nav-body {
    padding: var(--space-4) 0;
}

.industrial-header .mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.industrial-header .mobile-nav-list li {
    border-bottom: 1px solid var(--concrete-light);
}

.industrial-header .mobile-nav-list a {
    display: flex;
    align-items: center;
    padding: var(--space-4) var(--space-5);
    color: var(--steel-dark);
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition-base);
}

.industrial-header .mobile-nav-list a:hover,
.industrial-header .mobile-nav-list a.active {
    background: var(--concrete-paper);
    color: var(--drillerdb-orange);
}

.industrial-header .mobile-nav-list a i {
    color: var(--steel-light);
    margin-right: var(--space-4);
    width: 20px;
    text-align: center;
}

.industrial-header .mobile-nav-list a:hover i,
.industrial-header .mobile-nav-list a.active i {
    color: var(--drillerdb-orange);
}

.industrial-header .mobile-nav-divider {
    height: 1px;
    background: var(--concrete-medium);
    margin: var(--space-4) 0;
}

.industrial-header .mobile-nav-list .logout-link {
    color: var(--caution-red);
}

.industrial-header .mobile-nav-list .logout-link:hover {
    background: rgba(231, 76, 60, 0.1);
}

/* Hexagonal accent on navbar */
.navbar::before {
    content: '';
    position: absolute;
    top: -50%;
    right: 10%;
    width: 200px;
    height: 200px;
    background: var(--drillerdb-orange-glow);
    clip-path: polygon(
        50% 0%,
        100% 25%,
        100% 75%,
        50% 100%,
        0% 75%,
        0% 25%
    );
    opacity: 0.4;
}

.navbar-brand {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 800;
    color: white !important;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    transition: var(--transition-base);
}

.navbar-brand:hover {
    color: var(--drillerdb-orange) !important;
    transform: translateX(4px);
}

.navbar-brand img {
    height: 32px;
    filter: brightness(1.1);
    transition: var(--transition-base);
}

.navbar-brand:hover img {
    filter: brightness(1.3);
    transform: rotate(-5deg);
}

/* Nav tabs styling - dark text on light background */
.nav-tabs .nav-link {
    color: var(--steel-medium);
    font-weight: 500;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-md);
    transition: var(--transition-base);
    position: relative;
}

.nav-tabs .nav-link:hover {
    color: var(--steel-dark);
}

.nav-tabs .nav-link.active {
    color: var(--drillerdb-orange);
    border-color: var(--concrete-light) var(--concrete-light) var(--surface-base);
}

/* Orange underline animation for header nav-links only */
.industrial-header .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--drillerdb-orange);
    transition: var(--transition-smooth);
}

.industrial-header .nav-link:hover::after {
    width: 80%;
}

.industrial-header .nav-link.active::after {
    width: 80%;
}

/* ============================================
   CARDS - Hexagonal Design System
   ============================================ */

.card {
    background: var(--surface-base);
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-6);
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

/* Hexagonal accent on card top-right */
.card::before {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 80px;
    height: 80px;
    background: var(--drillerdb-orange-glow);
    clip-path: polygon(
        50% 0%,
        100% 25%,
        100% 75%,
        50% 100%,
        0% 75%,
        0% 25%
    );
    opacity: 0;
    transition: var(--transition-smooth);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.card:hover::before {
    opacity: 0.6;
}

.card-header {
    background: linear-gradient(
        135deg,
        var(--concrete-lighter) 0%,
        var(--concrete-light) 100%
    );
    border-bottom: 2px solid var(--concrete-medium);
    padding: var(--space-5) var(--space-6);
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--steel-dark);
    letter-spacing: -0.01em;
    position: relative;
}

.card-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--drillerdb-orange);
    opacity: 0;
    transition: var(--transition-base);
}

.card:hover .card-header::before {
    opacity: 1;
}

.card-body {
    padding: var(--space-6);
}

.card-footer {
    background: var(--concrete-paper);
    border-top: 1px solid var(--concrete-light);
    padding: var(--space-4) var(--space-6);
}

/* Card footers should inherit background on colored cards */
.card.bg-primary .card-footer,
.card.bg-secondary .card-footer,
.card.bg-success .card-footer,
.card.bg-danger .card-footer,
.card.bg-warning .card-footer,
.card.bg-info .card-footer,
.card.bg-light .card-footer,
.card.bg-dark .card-footer {
    background: transparent;
    border-top-color: rgba(255, 255, 255, 0.2);
}

/* Dashboard Metric Cards */
.card.border-primary,
.card.border-success,
.card.border-warning,
.card.border-info,
.card.border-danger {
    border-left: 4px solid !important;
    border-top: none;
    border-right: none;
    border-bottom: none;
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

.card.border-primary {
    border-left-color: var(--drillerdb-orange) !important;
}
.card.border-primary::before {
    background: var(--drillerdb-orange-glow);
    opacity: 0.8;
}

.card.border-success {
    border-left-color: var(--success-green) !important;
}

.card.border-warning {
    border-left-color: var(--safety-yellow) !important;
}

.card.border-info {
    border-left-color: var(--precision-blue) !important;
}

/* Metric Card Styling */
.card .display-4 {
    font-family: var(--font-numbers);
    font-size: var(--text-4xl);
    font-weight: 700;
    color: var(--steel-dark);
    margin-bottom: 0;
}

.card .text-muted {
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* ============================================
   BUTTONS - Industrial Design
   ============================================ */

.btn {
    font-family: var(--font-body);
    font-weight: 600;
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-5);
    border: none;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    font-size: var(--text-sm);
}

/* Button shine effect */
.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: var(--transition-smooth);
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn:active {
    transform: translateY(0);
}

/* Primary Button - Orange */
.btn-primary {
    background: linear-gradient(
        135deg,
        var(--drillerdb-orange) 0%,
        var(--drillerdb-orange-dark) 100%
    );
    color: white;
    box-shadow: var(--shadow-orange);
}

.btn-primary:hover {
    background: linear-gradient(
        135deg,
        var(--drillerdb-orange-dark) 0%,
        var(--drillerdb-orange) 100%
    );
    box-shadow: var(--shadow-orange-intense);
}

/* Secondary Button - Steel */
.btn-secondary {
    background: linear-gradient(
        135deg,
        var(--steel-medium) 0%,
        var(--steel-base) 100%
    );
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(
        135deg,
        var(--steel-dark) 0%,
        var(--steel-medium) 100%
    );
}

/* Outline Buttons */
.btn-outline-primary {
    border: 2px solid var(--drillerdb-orange);
    color: var(--drillerdb-orange);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--drillerdb-orange);
    color: white;
    border-color: var(--drillerdb-orange);
}

.btn-outline-secondary {
    border: 2px solid var(--steel-medium);
    color: var(--steel-medium);
    background: transparent;
}

.btn-outline-secondary:hover {
    background: var(--steel-medium);
    color: white;
    border-color: var(--steel-medium);
}

/* Button Sizes */
.btn-sm {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-xs);
}

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-base);
}

/* Icon Buttons */
.btn i {
    margin-right: var(--space-2);
    transition: var(--transition-base);
}

.btn:hover i {
    transform: scale(1.1);
}

/* ============================================
   FORMS - Technical Precision
   ============================================ */

.form-label {
    font-weight: 600;
    color: var(--steel-medium);
    margin-bottom: var(--space-2);
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-control,
.form-select {
    border: 2px solid var(--concrete-medium);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-base);
    transition: all var(--transition-base);
    background: var(--surface-base);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--drillerdb-orange);
    box-shadow: 0 0 0 3px var(--drillerdb-orange-glow);
    outline: none;
}

.form-control::placeholder {
    color: var(--concrete-dark);
    opacity: 0.7;
}

.form-check-input {
    width: 20px;
    height: 20px;
    border: 2px solid var(--concrete-medium);
    border-radius: var(--radius-sm);
}

.form-check-input:checked {
    background-color: var(--drillerdb-orange);
    border-color: var(--drillerdb-orange);
}

.form-check-label {
    margin-left: var(--space-2);
    font-weight: 500;
}

/* Input Groups */
.input-group-text {
    background: var(--concrete-light);
    border: 2px solid var(--concrete-medium);
    color: var(--steel-medium);
    font-weight: 600;
}

/* ============================================
   TABLES - Data-Centric Design
   ============================================ */

.table {
    background: var(--surface-base);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table thead th {
    background: linear-gradient(
        135deg,
        var(--steel-dark) 0%,
        var(--steel-medium) 100%
    );
    color: white;
    font-family: var(--font-display);
    font-weight: 700;
    text-transform: uppercase;
    font-size: var(--text-xs);
    letter-spacing: 0.1em;
    padding: var(--space-4) var(--space-5);
    border: none;
    position: relative;
}

.table thead th::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--drillerdb-orange);
}

.table tbody td {
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--concrete-light);
    color: var(--steel-dark);
    font-size: var(--text-sm);
    vertical-align: middle;
}

.table-hover tbody tr {
    transition: var(--transition-fast);
    cursor: pointer;
}

.table-hover tbody tr:hover {
    background: linear-gradient(
        90deg,
        var(--drillerdb-orange-glow) 0%,
        transparent 100%
    );
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}

/* Striped Tables */
.table-striped tbody tr:nth-of-type(odd) {
    background: var(--concrete-paper);
}

/* DataTables Customization */
.dataTables_wrapper {
    padding: var(--space-6);
}

.dataTables_filter input {
    border: 2px solid var(--concrete-medium);
    border-radius: var(--radius-md);
    padding: var(--space-2) var(--space-4);
    margin-left: var(--space-2);
}

.dataTables_length select {
    border: 2px solid var(--concrete-medium);
    border-radius: var(--radius-md);
    padding: var(--space-2) var(--space-3);
    margin: 0 var(--space-2);
}

.dataTables_info {
    color: var(--steel-lighter);
    font-size: var(--text-sm);
    padding-top: var(--space-4);
}

.dataTables_paginate {
    padding-top: var(--space-4);
}

.dataTables_paginate .paginate_button {
    padding: var(--space-2) var(--space-4);
    margin: 0 var(--space-1);
    border-radius: var(--radius-sm);
    border: 1px solid var(--concrete-medium);
    background: white;
    color: var(--steel-dark) !important;
    transition: var(--transition-base);
}

.dataTables_paginate .paginate_button:hover {
    background: var(--drillerdb-orange) !important;
    border-color: var(--drillerdb-orange) !important;
    color: white !important;
}

.dataTables_paginate .paginate_button.current {
    background: var(--drillerdb-orange) !important;
    border-color: var(--drillerdb-orange) !important;
    color: white !important;
    box-shadow: var(--shadow-orange);
}

/* ============================================
   BADGES & STATUS INDICATORS
   ============================================ */

.badge {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: 600;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

.badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: var(--radius-full);
    background: currentColor;
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.badge.bg-primary {
    background: var(--drillerdb-orange) !important;
    color: white;
}

.badge.bg-success {
    background: var(--success-green) !important;
    color: white;
}

.badge.bg-warning {
    background: var(--safety-yellow) !important;
    color: var(--steel-dark);
}

.badge.bg-danger {
    background: var(--caution-red) !important;
    color: white;
}

.badge.bg-info {
    background: var(--precision-blue) !important;
    color: white;
}

.badge.bg-secondary {
    background: var(--steel-medium) !important;
    color: white;
}

/* ============================================
   ALERTS
   ============================================ */

.alert {
    border: none;
    border-left: 4px solid;
    border-radius: var(--radius-md);
    padding: var(--space-4) var(--space-5);
    margin-bottom: var(--space-4);
    box-shadow: var(--shadow-sm);
    animation: alertSlideIn 0.3s ease-out;
}

@keyframes alertSlideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.alert-primary {
    background: rgba(255, 122, 0, 0.1);
    border-left-color: var(--drillerdb-orange);
    color: var(--drillerdb-orange-dark);
}

.alert-success {
    background: rgba(39, 174, 96, 0.1);
    border-left-color: var(--success-green);
    color: #186A3B;
}

.alert-warning {
    background: rgba(243, 156, 18, 0.1);
    border-left-color: var(--safety-yellow);
    color: #9A7D0A;
}

.alert-danger {
    background: rgba(231, 76, 60, 0.1);
    border-left-color: var(--caution-red);
    color: #922B21;
}

.alert-info {
    background: rgba(46, 134, 193, 0.1);
    border-left-color: var(--precision-blue);
    color: #1B4F72;
}

/* ============================================
   MODALS - Text Readability
   ============================================ */

.modal-content,
.industrial-modal {
    border: none;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-2xl);
    overflow: hidden;
    background: white;
}

/* Modal Header - White text on dark gradient */
.modal-header {
    background: linear-gradient(
        135deg,
        var(--steel-dark) 0%,
        var(--steel-medium) 100%
    );
    color: white;
    border-bottom: 2px solid var(--drillerdb-orange);
    padding: var(--space-5) var(--space-6);
}

.modal-header.modal-warning {
    background: linear-gradient(
        135deg,
        var(--safety-yellow) 0%,
        var(--drillerdb-orange) 100%
    );
    color: var(--steel-dark);
}

.modal-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--text-xl);
    color: white;
}

.modal-header.modal-warning .modal-title {
    color: var(--steel-dark);
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

.modal-header.modal-warning .btn-close {
    filter: none;
    opacity: 0.8;
}

.modal-header .btn-close:hover {
    opacity: 1;
}

/* Modal Body - Dark text on white background */
.modal-body {
    padding: var(--space-6);
    background: white;
    color: var(--steel-dark);
}

.modal-body p {
    color: var(--steel-dark);
    margin-bottom: var(--space-3);
}

.modal-body strong {
    color: var(--steel-dark);
    font-weight: 700;
}

.modal-body .loading-text {
    color: var(--steel-medium);
    font-weight: 500;
}

/* Modal Footer - Dark text on light background */
.modal-footer {
    background: var(--concrete-paper);
    border-top: 1px solid var(--concrete-light);
    padding: var(--space-4) var(--space-6);
}

/* Industrial Modal specific styles */
.industrial-modal .modal-header {
    background: linear-gradient(
        135deg,
        var(--steel-dark) 0%,
        var(--steel-medium) 100%
    );
    color: white;
}

.industrial-modal .modal-body {
    background: white;
    color: var(--steel-dark);
}

/* Modal Animation */
.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    transform: scale(0.9) translateY(-50px);
}

.modal.show .modal-dialog {
    transform: scale(1) translateY(0);
}

/* ============================================
   CHARTS - Technical Data Visualization
   ============================================ */

canvas {
    border-radius: var(--radius-lg);
    background: var(--surface-base);
    padding: var(--space-4);
}

.chart-container {
    position: relative;
    background: var(--surface-base);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-6);
}

/* ============================================
   LOADING STATES
   ============================================ */

.spinner-border {
    width: 2.5rem;
    height: 2.5rem;
    border-width: 3px;
    border-color: var(--drillerdb-orange);
    border-right-color: transparent;
}

/* Hexagonal Loader */
.hex-loader {
    width: 60px;
    height: 60px;
    clip-path: polygon(
        50% 0%,
        100% 25%,
        100% 75%,
        50% 100%,
        0% 75%,
        0% 25%
    );
    background: var(--drillerdb-orange);
    animation: hexRotate 1.5s ease-in-out infinite;
    position: relative;
}

.hex-loader::after {
    content: '';
    position: absolute;
    inset: 6px;
    clip-path: polygon(
        50% 0%,
        100% 25%,
        100% 75%,
        50% 100%,
        0% 75%,
        0% 25%
    );
    background: var(--surface-base);
}

@keyframes hexRotate {
    0%, 100% {
        transform: rotate(0deg) scale(1);
    }
    50% {
        transform: rotate(180deg) scale(1.1);
    }
}

/* Skeleton Loading States */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--concrete-light) 0%,
        var(--concrete-lighter) 50%,
        var(--concrete-light) 100%
    );
    background-size: 200% 100%;
    animation: skeletonLoading 1.5s ease-in-out infinite;
    border-radius: var(--radius-md);
}

@keyframes skeletonLoading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-text {
    height: 1em;
    margin-bottom: var(--space-2);
}

.skeleton-heading {
    height: 2em;
    margin-bottom: var(--space-4);
}

/* ============================================
   FOOTER - Industrial Precision
   ============================================ */

.footer,
.industrial-footer {
    background: linear-gradient(
        135deg,
        var(--steel-dark) 0%,
        var(--steel-medium) 100%
    );
    color: rgba(255, 255, 255, 0.9);
    padding: var(--space-8) 0;
    margin-top: var(--space-16);
    border-top: 2px solid var(--drillerdb-orange);
    position: relative;
}

.footer::before,
.industrial-footer::before {
    content: '';
    position: absolute;
    top: -100px;
    left: 20%;
    width: 150px;
    height: 150px;
    background: var(--drillerdb-orange-glow);
    clip-path: polygon(
        50% 0%,
        100% 25%,
        100% 75%,
        50% 100%,
        0% 75%,
        0% 25%
    );
    opacity: 0.3;
}

/* Footer Accent Border */
.industrial-footer .footer-accent-border {
    height: 2px;
    background: var(--drillerdb-orange);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}

/* Footer Content - White/Light text on dark gradient */
.industrial-footer .footer-content {
    color: rgba(255, 255, 255, 0.9);
}

.industrial-footer .footer-logo-text strong {
    color: white;
    font-weight: 700;
    font-size: var(--text-lg);
}

.industrial-footer .footer-logo-text span {
    color: rgba(255, 255, 255, 0.8);
    font-size: var(--text-sm);
}

.industrial-footer .footer-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--text-sm);
    line-height: 1.7;
}

.industrial-footer .footer-heading {
    color: white;
    font-weight: 700;
    font-size: var(--text-base);
    margin-bottom: var(--space-4);
    position: relative;
    padding-left: var(--space-5);
}

.industrial-footer .footer-heading .hex-accent {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: var(--drillerdb-orange);
    clip-path: polygon(
        50% 0%,
        100% 25%,
        100% 75%,
        50% 100%,
        0% 75%,
        0% 25%
    );
}

/* Footer Links - Light text on dark gradient */
.industrial-footer .footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.industrial-footer .footer-links li {
    margin-bottom: var(--space-2);
}

.industrial-footer .footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: var(--text-sm);
    display: flex;
    align-items: center;
    transition: var(--transition-base);
}

.industrial-footer .footer-links a:hover {
    color: var(--drillerdb-orange);
    transform: translateX(4px);
}

.industrial-footer .footer-links a i {
    margin-right: var(--space-2);
    font-size: var(--text-xs);
    color: rgba(255, 255, 255, 0.5);
}

.industrial-footer .footer-links a:hover i {
    color: var(--drillerdb-orange);
}

/* Social Links */
.industrial-footer .footer-social {
    display: flex;
    gap: var(--space-3);
    margin-top: var(--space-4);
}

.industrial-footer .social-link {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: var(--radius-md);
    transition: var(--transition-base);
}

.industrial-footer .social-link:hover {
    background: var(--drillerdb-orange);
    color: white;
    transform: translateY(-2px);
}

/* System Status */
.industrial-footer .system-status {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    margin-bottom: var(--space-4);
}

.industrial-footer .status-item {
    display: flex;
    align-items: center;
    margin-bottom: var(--space-2);
    color: rgba(255, 255, 255, 0.9);
    font-size: var(--text-sm);
}

.industrial-footer .status-indicator {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    margin-right: var(--space-2);
}

.industrial-footer .status-indicator.status-operational {
    background: var(--success-green);
    box-shadow: 0 0 8px rgba(39, 174, 96, 0.5);
}

.industrial-footer .status-label {
    color: rgba(255, 255, 255, 0.6);
    margin-right: var(--space-2);
}

.industrial-footer .status-value {
    color: rgba(255, 255, 255, 0.9);
}

/* Support Contact */
.industrial-footer .support-contact h6 {
    color: white;
    font-weight: 700;
    font-size: var(--text-sm);
    margin-bottom: var(--space-3);
}

.industrial-footer .support-contact p {
    color: rgba(255, 255, 255, 0.8);
    font-size: var(--text-sm);
    margin-bottom: var(--space-2);
}

.industrial-footer .support-contact a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition-base);
}

.industrial-footer .support-contact a:hover {
    color: var(--drillerdb-orange);
}

.industrial-footer .support-contact i {
    color: var(--drillerdb-orange);
    margin-right: var(--space-2);
}

/* Footer Bottom */
.industrial-footer .footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--space-5);
    margin-top: var(--space-5);
}

.industrial-footer .copyright {
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--text-sm);
}

.industrial-footer .copyright i {
    color: rgba(255, 255, 255, 0.5);
    margin-right: var(--space-1);
}

.industrial-footer .version-info {
    color: rgba(255, 255, 255, 0.5);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
}

.industrial-footer .version-info i {
    color: rgba(255, 255, 255, 0.4);
    margin-right: var(--space-1);
}

.industrial-footer .powered-by {
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--text-sm);
}

.industrial-footer .brand-name {
    color: white;
    font-weight: 700;
    margin-left: var(--space-2);
}

/* Generic Footer */
.footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition-base);
}

.footer a:hover {
    color: var(--drillerdb-orange);
}

/* ============================================
   LOGIN/AUTH PAGES
   ============================================ */

.min-vh-100 {
    background: linear-gradient(
        135deg,
        var(--steel-dark) 0%,
        var(--steel-medium) 50%,
        var(--drillerdb-orange) 100%
    );
    position: relative;
    overflow: hidden;
}

/* Animated hexagon pattern for auth pages */
.min-vh-100::before {
    content: '';
    position: absolute;
    top: 10%;
    left: 10%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.05);
    clip-path: polygon(
        50% 0%,
        100% 25%,
        100% 75%,
        50% 100%,
        0% 75%,
        0% 25%
    );
    animation: hexFloat 8s ease-in-out infinite;
}

.min-vh-100::after {
    content: '';
    position: absolute;
    bottom: 10%;
    right: 10%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.05);
    clip-path: polygon(
        50% 0%,
        100% 25%,
        100% 75%,
        50% 100%,
        0% 75%,
        0% 25%
    );
    animation: hexFloat 6s ease-in-out infinite reverse;
}

@keyframes hexFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-30px) rotate(10deg);
    }
}

.min-vh-100 .card {
    border-radius: var(--radius-2xl);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-2xl);
}

/* ============================================
   NOTIFICATION TOASTS - Text Readability
   ============================================ */

.notification-toast {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border-left: 4px solid;
}

.notification-toast.info {
    border-left-color: var(--precision-blue);
}

.notification-toast.success {
    border-left-color: var(--success-green);
}

.notification-toast.warning {
    border-left-color: var(--safety-yellow);
}

.notification-toast.error {
    border-left-color: var(--caution-red);
}

.notification-toast .toast-header {
    background: var(--concrete-paper);
    border-bottom: 1px solid var(--concrete-light);
    color: var(--steel-dark);
    font-weight: 600;
}

.notification-toast .toast-header i {
    color: var(--steel-medium);
}

.notification-toast.info .toast-header i {
    color: var(--precision-blue);
}

.notification-toast.success .toast-header i {
    color: var(--success-green);
}

.notification-toast.warning .toast-header i {
    color: var(--safety-yellow);
}

.notification-toast.error .toast-header i {
    color: var(--caution-red);
}

.notification-toast .toast-header strong {
    color: var(--steel-dark);
}

.notification-toast .toast-header small {
    color: var(--steel-lighter);
}

.notification-toast .toast-body {
    background: white;
    color: var(--steel-dark);
}

/* Logo Container */
.logo-container {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.logo-img {
    height: 32px;
    width: auto;
}

/* User Info Display */
.user-info {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.user-avatar {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

/* Text Colors */
.text-primary { color: var(--drillerdb-orange) !important; }
.text-secondary { color: var(--steel-medium) !important; }
.text-success { color: var(--success-green) !important; }
.text-danger { color: var(--caution-red) !important; }
.text-warning { color: var(--safety-yellow) !important; }
.text-info { color: var(--precision-blue) !important; }

/* Background Colors */
.bg-primary { background-color: var(--drillerdb-orange) !important; }
.bg-secondary { background-color: var(--steel-medium) !important; }
.bg-light { background-color: var(--concrete-paper) !important; }
.bg-dark { background-color: var(--steel-dark) !important; }

/* Shadows */
.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.shadow { box-shadow: var(--shadow-md) !important; }
.shadow-lg { box-shadow: var(--shadow-lg) !important; }

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.5s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================
   PURCHASE ORDER TIMELINE
   ============================================ */

.po-timeline {
    position: relative;
    padding: var(--space-8) 0;
}

.po-timeline::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(
        180deg,
        var(--drillerdb-orange) 0%,
        var(--concrete-medium) 100%
    );
}

.po-timeline-item {
    position: relative;
    padding-left: var(--space-16);
    margin-bottom: var(--space-8);
}

.po-timeline-item::before {
    content: '';
    position: absolute;
    left: 18px;
    top: 0;
    width: 24px;
    height: 24px;
    clip-path: polygon(
        50% 0%,
        100% 25%,
        100% 75%,
        50% 100%,
        0% 75%,
        0% 25%
    );
    background: var(--concrete-medium);
    border: 3px solid white;
    box-shadow: var(--shadow-md);
    transition: var(--transition-base);
}

.po-timeline-item.completed::before {
    background: var(--success-green);
}

.po-timeline-item.active::before {
    background: var(--drillerdb-orange);
    animation: hexagonPulse 2s ease-in-out infinite;
}

/* ============================================
   CUSTOM SCROLLBAR
   ============================================ */

::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--concrete-light);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
    background: var(--steel-light);
    border-radius: var(--radius-full);
    border: 2px solid var(--concrete-light);
    transition: var(--transition-base);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--drillerdb-orange);
}

/* Firefox Scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--steel-light) var(--concrete-light);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    :root {
        --text-4xl: 2rem;
        --text-3xl: 1.75rem;
        --text-2xl: 1.5rem;
    }

    main.container-fluid {
        padding: var(--space-4) var(--space-3);
    }

    .navbar {
        padding: var(--space-3) var(--space-4);
    }

    .card-body {
        padding: var(--space-4);
    }

    .modal-body {
        padding: var(--space-4);
    }

    /* Responsive Table */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table thead {
        display: none;
    }

    .table tbody tr {
        display: block;
        margin-bottom: var(--space-4);
        border: 2px solid var(--concrete-light);
        border-radius: var(--radius-md);
    }

    .table tbody td {
        display: flex;
        justify-content: space-between;
        padding: var(--space-3);
        border: none;
        border-bottom: 1px solid var(--concrete-light);
    }

    .table tbody td:last-child {
        border-bottom: none;
    }

    .table tbody td::before {
        content: attr(data-label);
        font-weight: 700;
        color: var(--steel-medium);
        flex: 0 0 40%;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    body {
        background: white;
    }

    body::before,
    body::after {
        display: none;
    }

    .navbar,
    .footer,
    .btn,
    .btn-group,
    .no-print {
        display: none !important;
    }

    .card {
        box-shadow: none;
        border: 1px solid var(--concrete-medium);
        page-break-inside: avoid;
    }

    .table {
        border: 1px solid var(--concrete-medium);
    }

    .table thead th {
        background: var(--concrete-light) !important;
        color: var(--steel-dark) !important;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

/* Focus Visible States */
*:focus-visible {
    outline: 3px solid var(--drillerdb-orange);
    outline-offset: 2px;
}

button:focus-visible,
.btn:focus-visible {
    outline: 3px solid var(--drillerdb-orange);
    outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .btn {
        border: 2px solid currentColor;
    }

    .card {
        border: 2px solid var(--steel-dark);
    }
}
