@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-primary: #080c14;
    --bg-secondary: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.65);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(0, 242, 254, 0.2);
    
    --color-primary: #00f2fe; /* Cyber Cyan */
    --color-secondary: #7f00ff; /* Electric Violet */
    --color-accent: #10b981; /* Emerald Green */
    --color-danger: #f43f5e; /* Crimson Red */
    --color-warning: #f59e0b; /* Golden Amber */
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-inverse: #0f172a;
    
    --glass-grad: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    --primary-grad: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    --accent-grad: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --danger-grad: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --glow-shadow: 0 0 15px rgba(0, 242, 254, 0.35);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-primary);
    background-image: 
        radial-gradient(at 10% 20%, rgba(127, 0, 255, 0.08) 0px, transparent 50%),
        radial-gradient(at 90% 80%, rgba(0, 242, 254, 0.05) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
    box-shadow: var(--glow-shadow);
}

/* Glass Card */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    border-color: rgba(0, 242, 254, 0.25);
    box-shadow: 0 12px 40px 0 rgba(0, 242, 254, 0.06), var(--card-shadow);
}

/* Typography & Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4 {
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 0.5em;
    color: #ffffff;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.4rem; }

p {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1em;
}

/* Navigation bar */
.navbar {
    background: rgba(8, 12, 20, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar .brand {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--primary-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar .nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
    list-style: none;
}

.navbar .nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    padding: 6px 12px;
    border-radius: 8px;
}

.navbar .nav-links a:hover,
.navbar .nav-links a.active {
    color: var(--color-primary);
    background: rgba(0, 242, 254, 0.05);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    gap: 8px;
}

.btn-primary {
    background: var(--primary-grad);
    color: var(--text-inverse);
    box-shadow: 0 4px 15px rgba(0, 242, 254, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 242, 254, 0.35), var(--glow-shadow);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.btn-accent {
    background: var(--accent-grad);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.2);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
}

.btn-danger {
    background: var(--danger-grad);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(244, 63, 94, 0.2);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 63, 94, 0.35);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: 6px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 16px;
    color: var(--text-main);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.25s ease;
}

.form-control:focus {
    border-color: var(--color-primary);
    box-shadow: var(--border-glow) 0 0 0 3px, inset 0 1px 2px rgba(0, 0, 0, 0.2);
    background: rgba(15, 23, 42, 0.7);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    padding-right: 40px;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 30px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-submitted { background: rgba(0, 242, 254, 0.12); color: var(--color-primary); border: 1px solid rgba(0, 242, 254, 0.2); }
.badge-under_review { background: rgba(127, 0, 255, 0.12); color: #c4b5fd; border: 1px solid rgba(127, 0, 255, 0.2); }
.badge-quoted { background: rgba(245, 158, 11, 0.12); color: var(--color-warning); border: 1px solid rgba(245, 158, 11, 0.2); }
.badge-accepted { background: rgba(16, 185, 129, 0.12); color: var(--color-accent); border: 1px solid rgba(16, 185, 129, 0.2); }
.badge-in_production { background: rgba(59, 130, 246, 0.12); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.2); }
.badge-completed { background: rgba(16, 185, 129, 0.12); color: var(--color-accent); border: 1px solid rgba(16, 185, 129, 0.2); }
.badge-rejected { background: rgba(244, 63, 94, 0.12); color: var(--color-danger); border: 1px solid rgba(244, 63, 94, 0.2); }

/* Timeline Status */
.status-timeline {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin: 30px 0 40px;
    padding: 0 10px;
}

.status-timeline::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 20px;
    right: 20px;
    height: 3px;
    background: rgba(255, 255, 255, 0.05);
    z-index: 1;
}

.timeline-progress {
    position: absolute;
    top: 15px;
    left: 20px;
    height: 3px;
    background: var(--primary-grad);
    z-index: 2;
    transition: width 0.5s ease;
}

.timeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 3;
    width: 80px;
    text-align: center;
}

.step-node {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 2px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    transition: all 0.3s ease;
    box-shadow: var(--card-shadow);
}

.timeline-step.active .step-node {
    border-color: var(--color-primary);
    color: var(--color-primary);
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.4);
}

.timeline-step.completed .step-node {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--text-inverse);
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.2);
}

.step-label {
    margin-top: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}

.timeline-step.active .step-label {
    color: #ffffff;
}

.timeline-step.completed .step-label {
    color: var(--color-primary);
}

/* Chat Module Layout */
.chat-section {
    display: flex;
    flex-direction: column;
    height: 550px;
    background: rgba(15, 23, 42, 0.4);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.chat-header {
    padding: 16px 20px;
    background: rgba(15, 23, 42, 0.6);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chat-bubble-container {
    display: flex;
    flex-direction: column;
    max-width: 75%;
}

.chat-bubble-container.sender-user {
    align-self: flex-end;
    align-items: flex-end;
}

.chat-bubble-container.sender-other {
    align-self: flex-start;
    align-items: flex-start;
}

.chat-sender-meta {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 4px;
    display: flex;
    gap: 8px;
}

.chat-bubble {
    padding: 12px 18px;
    border-radius: 16px;
    font-size: 0.92rem;
    line-height: 1.5;
    word-break: break-word;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.sender-user .chat-bubble {
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.15) 0%, rgba(79, 172, 254, 0.15) 100%);
    border: 1px solid rgba(0, 242, 254, 0.25);
    color: #ffffff;
    border-bottom-right-radius: 4px;
}

.sender-other .chat-bubble {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-bottom-left-radius: 4px;
}

.chat-timestamp {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 4px;
}

/* Interactive Quote Card in Chat */
.chat-quote-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(20, 27, 45, 0.9) 100%);
    border: 1.5px solid var(--color-primary);
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.15), var(--card-shadow);
    border-radius: 16px;
    padding: 20px;
    width: 100%;
    margin: 8px 0;
}

.quote-title {
    font-weight: 700;
    font-size: 1.1rem;
    background: var(--primary-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 10px;
    margin-bottom: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quote-details {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.quote-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

.quote-row .label {
    color: var(--text-muted);
}

.quote-row .value {
    font-weight: 600;
    color: #ffffff;
}

.quote-row .value.price {
    font-size: 1.25rem;
    color: var(--color-primary);
    text-shadow: 0 0 5px rgba(0, 242, 254, 0.2);
}

.quote-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

.quote-actions form {
    flex: 1;
}

.quote-actions button, .quote-actions a {
    width: 100%;
}

.quote-status-badge {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    text-align: center;
    display: block;
    margin-top: 10px;
}

.quote-status-badge.accepted {
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-accent);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.quote-status-badge.rejected {
    background: rgba(244, 63, 94, 0.1);
    color: var(--color-danger);
    border: 1px solid rgba(244, 63, 94, 0.25);
}

.chat-input-area {
    padding: 16px 20px;
    background: rgba(15, 23, 42, 0.6);
    border-top: 1px solid var(--border-color);
}

.chat-input-form {
    display: flex;
    gap: 12px;
}

.chat-input-form input {
    flex: 1;
}

/* Statistics cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.stat-icon.total { background: rgba(0, 242, 254, 0.1); color: var(--color-primary); }
.stat-icon.pending { background: rgba(245, 158, 11, 0.1); color: var(--color-warning); }
.stat-icon.active { background: rgba(127, 0, 255, 0.1); color: #c4b5fd; }
.stat-icon.completed { background: rgba(16, 185, 129, 0.1); color: var(--color-accent); }

.stat-number {
    font-size: 1.8rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}

/* Custom Table */
.table-wrapper {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    background: rgba(15, 23, 42, 0.3);
}

.custom-table th {
    background: rgba(15, 23, 42, 0.7);
    padding: 16px 20px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}

.custom-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
    color: var(--text-main);
}

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

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

.custom-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Alert system notifications */
.alert {
    padding: 14px 20px;
    border-radius: 10px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    font-size: 0.95rem;
    border: 1px solid transparent;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.2);
}

.alert-danger {
    background: rgba(244, 63, 94, 0.1);
    color: #f43f5e;
    border-color: rgba(244, 63, 94, 0.2);
}

/* Rejection Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(8, 12, 20, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-container {
    width: 100%;
    max-width: 480px;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.open .modal-container {
    transform: scale(1);
}

/* File Upload styling */
.file-upload-wrapper {
    position: relative;
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    background: rgba(15, 23, 42, 0.3);
    cursor: pointer;
    transition: all 0.25s ease;
}

.file-upload-wrapper:hover {
    border-color: var(--color-primary);
    background: rgba(0, 242, 254, 0.03);
}

.file-upload-wrapper input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-upload-icon {
    font-size: 2rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    transition: color 0.2s ease;
}

.file-upload-wrapper:hover .file-upload-icon {
    color: var(--color-primary);
    text-shadow: var(--glow-shadow);
}

.file-name-display {
    font-size: 0.85rem;
    color: var(--color-primary);
    margin-top: 8px;
    font-weight: 600;
}

/* Wizard Dynamic job lists */
.wizard-job-card {
    border-left: 4px solid var(--color-primary);
    margin-bottom: 24px;
    position: relative;
}

.remove-job-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(244, 63, 94, 0.1);
    color: var(--color-danger);
    border: 1px solid rgba(244, 63, 94, 0.15);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.2s ease;
}

.remove-job-btn:hover {
    background: var(--color-danger);
    color: #ffffff;
    box-shadow: 0 0 10px rgba(244, 63, 94, 0.4);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Utilities */
.flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-10 { gap: 10px; }
.gap-20 { gap: 20px; }
.w-100 { width: 100%; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 24px; }

/* Dropdown Navigation */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    border-radius: 12px;
    padding: 8px 0;
    min-width: 210px;
    list-style: none;
    z-index: 1000;
    margin-top: 8px;
    animation: fadeInUp 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.dropdown-menu li {
    width: 100%;
}

.dropdown-menu li a {
    display: block !important;
    padding: 10px 16px !important;
    font-size: 0.9rem !important;
    color: var(--text-muted) !important;
    border-radius: 0 !important;
    text-align: left !important;
    background: transparent !important;
    transition: all 0.2s ease;
}

.dropdown-menu li a:hover {
    color: var(--color-primary) !important;
    background: rgba(0, 242, 254, 0.06) !important;
}

/* Show on Click Toggle */
.dropdown.open .dropdown-menu {
    display: block;
}

/* Segmented tab controllers */
.tab-seg-container {
    display: flex;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 24px;
}

.tab-seg-btn {
    flex: 1;
    text-align: center;
    padding: 10px 16px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    border: none;
    background: transparent;
}

.tab-seg-btn.active.vendors {
    background: var(--primary-grad);
    color: var(--text-inverse);
    box-shadow: 0 4px 15px rgba(0, 242, 254, 0.15);
}

.tab-seg-btn.active.customers {
    background: linear-gradient(135deg, #7f00ff 0%, #e100ff 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(127, 0, 255, 0.15);
}
