/* ========================================
   NPD Enquiry Management System
   Professional Enterprise CSS
   ======================================== */

/* CSS Variables for consistent theming */
:root {
    --primary-color: #0d47a1;
    --primary-dark: #002171;
    --primary-light: #5472d3;
    --secondary-color: #37474f;
    --accent-color: #ff6f00;
    --success-color: #2e7d32;
    --warning-color: #f57c00;
    --danger-color: #c62828;
    --info-color: #0288d1;

    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --bg-dark: #263238;

    --text-primary: #212121;
    --text-secondary: #616161;
    --text-muted: #9e9e9e;
    --text-white: #ffffff;

    --border-color: #e0e0e0;
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --border-radius-sm: 4px;

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --shadow-hover: 0 8px 30px rgba(0,0,0,0.15);

    --font-primary: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;
}

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Base Reset & Typography */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-light);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   Navigation
   ======================================== */
.navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 0;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-inner {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-white);
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
    padding: 1rem 0;
    letter-spacing: -0.5px;
}

.navbar-brand img {
    height: 42px;
    width: auto;
    border-radius: var(--border-radius-sm);
    background: white;
    padding: 4px;
}

.navbar-nav {
    display: flex;
    list-style: none;
    gap: 0.25rem;
    align-items: center;
}

.nav-link {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    padding: 0.75rem 1.25rem;
    border-radius: var(--border-radius);
    transition: all var(--transition-fast);
    font-weight: 500;
    font-size: 0.9rem;
    position: relative;
}

.nav-link:hover {
    color: var(--text-white);
    background-color: rgba(255,255,255,0.15);
}

.nav-link.active {
    color: var(--text-white);
    background-color: rgba(255,255,255,0.2);
}

.nav-link.nav-highlight {
    background: linear-gradient(135deg, var(--accent-color) 0%, #e65100 100%);
    color: white;
    font-weight: 600;
}

/* User section in navbar */
.navbar-user {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}

.user-name {
    color: rgba(255,255,255,0.9);
    font-size: 0.9rem;
    font-weight: 500;
}

.logout-link {
    color: rgba(255,255,255,0.85);
    background: rgba(255,255,255,0.1);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.85rem;
}

.logout-link:hover {
    background: rgba(255,255,255,0.2);
    color: white;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--accent-color);
    border-radius: 3px 3px 0 0;
    transition: width var(--transition-fast);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 60%;
}

/* ========================================
   Main Container
   ======================================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* ========================================
   Cards
   ======================================== */
.card {
    background: var(--bg-white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: box-shadow var(--transition-normal);
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--text-white);
    padding: 1.25rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: none;
}

.card-header .btn {
    margin: -0.25rem 0;
}

.card-header .step-badge {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-white);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 1rem;
}

.card-body {
    padding: 1.75rem;
}

/* ========================================
   Form Styles
   ======================================== */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-label.required::after {
    content: ' *';
    color: var(--danger-color);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    font-family: var(--font-primary);
    transition: all var(--transition-fast);
    background-color: var(--bg-white);
    color: var(--text-primary);
}

.form-control:hover {
    border-color: #bdbdbd;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(13, 71, 161, 0.1);
}

.form-control::placeholder {
    color: var(--text-muted);
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23616161' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* Form Grid */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

.form-row-2 { grid-template-columns: repeat(2, 1fr); }
.form-row-3 { grid-template-columns: repeat(3, 1fr); }
.form-row-4 { grid-template-columns: repeat(4, 1fr); }

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: var(--font-primary);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--text-white);
    box-shadow: 0 2px 8px rgba(13, 71, 161, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 4px 16px rgba(13, 71, 161, 0.4);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #1b5e20 100%);
    color: var(--text-white);
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.3);
}

.btn-success:hover {
    box-shadow: 0 4px 16px rgba(46, 125, 50, 0.4);
    transform: translateY(-1px);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #b71c1c 100%);
    color: var(--text-white);
    box-shadow: 0 2px 8px rgba(198, 40, 40, 0.3);
}

.btn-danger:hover {
    box-shadow: 0 4px 16px rgba(198, 40, 40, 0.4);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--text-white);
}

.btn-secondary:hover {
    background: #455a64;
}

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

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

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn-group {
    display: flex;
    gap: 0.75rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--border-radius);
}

/* ========================================
   Tables
   ======================================== */
.table-container {
    overflow-x: auto;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--text-white);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.table tbody tr {
    transition: background-color var(--transition-fast);
}

.table tbody tr:hover {
    background-color: rgba(13, 71, 161, 0.04);
}

.table tbody tr:nth-child(even) {
    background-color: var(--bg-light);
}

.table tbody tr:nth-child(even):hover {
    background-color: rgba(13, 71, 161, 0.06);
}

/* ========================================
   Dashboard
   ======================================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-card {
    background: var(--bg-white);
    border-radius: var(--border-radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
}

.dashboard-card:nth-child(2)::before {
    background: linear-gradient(135deg, var(--success-color) 0%, #43a047 100%);
}

.dashboard-card:nth-child(3)::before {
    background: linear-gradient(135deg, var(--warning-color) 0%, #fb8c00 100%);
}

.dashboard-card:nth-child(4)::before {
    background: linear-gradient(135deg, var(--info-color) 0%, #039be5 100%);
}

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

.dashboard-card h3 {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.dashboard-card .count {
    font-size: 2.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.dashboard-card a {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: gap var(--transition-fast);
}

.dashboard-card a:hover {
    gap: 0.5rem;
}

.dashboard-card a::after {
    content: '→';
}

/* ========================================
   Items Section
   ======================================== */
.items-container {
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.items-header {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
    color: var(--primary-dark);
}

.item-card {
    padding: 1.75rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-white);
}

.item-card:last-child {
    border-bottom: none;
}

.item-card:nth-child(even) {
    background: var(--bg-light);
}

.item-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.25rem;
    font-size: 1.1rem;
}

.item-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* ========================================
   Risk Assessment Table
   ======================================== */
.risk-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.risk-table th,
.risk-table td {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
}

.risk-table th {
    background: linear-gradient(135deg, #e8eaf6 0%, #c5cae9 100%);
    color: var(--primary-dark);
    font-weight: 600;
}

.risk-rating {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.risk-rating label {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius-sm);
    transition: background-color var(--transition-fast);
}

.risk-rating label:hover {
    background-color: rgba(13, 71, 161, 0.1);
}

.risk-rating input[type="radio"] {
    accent-color: var(--primary-color);
    width: 16px;
    height: 16px;
}

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

.badge-draft {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    color: #e65100;
}

.badge-submitted {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1565c0;
}

.badge-reviewed {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    color: #7b1fa2;
}

.badge-completed {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    color: #2e7d32;
}

/* ========================================
   Alerts
   ======================================== */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

.alert::before {
    font-size: 1.25rem;
}

.alert-success {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    color: var(--success-color);
    border: 1px solid #a5d6a7;
}

.alert-success::before {
    content: '✓';
}

.alert-error {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    color: var(--danger-color);
    border: 1px solid #ef9a9a;
}

.alert-error::before {
    content: '✕';
}

.alert-warning {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    color: var(--warning-color);
    border: 1px solid #ffcc80;
}

.alert-warning::before {
    content: '⚠';
}

/* ========================================
   Company Header (Form Headers)
   ======================================== */
.company-header {
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    border-bottom: 3px solid var(--primary-color);
    margin: -1.75rem -1.75rem 1.75rem -1.75rem;
}

.company-header img {
    max-height: 70px;
    margin-bottom: 0.75rem;
    border-radius: var(--border-radius-sm);
}

.company-header h2 {
    color: var(--primary-dark);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.company-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.company-header h3 {
    color: var(--primary-color);
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* ========================================
   Section Headers
   ======================================== */
.section-header {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    padding: 0.875rem 1.5rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin: 2rem -1.75rem 1.25rem -1.75rem;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-left: 4px solid var(--primary-color);
}

/* ========================================
   Actions Column
   ======================================== */
.actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.actions .btn {
    padding: 0.5rem 0.875rem;
    font-size: 0.8rem;
}

/* ========================================
   Footer
   ======================================== */
.footer {
    text-align: center;
    padding: 1.5rem 2rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    border-top: 1px solid var(--border-color);
    margin-top: 3rem;
    background: var(--bg-white);
}

.footer p {
    margin: 0;
}

/* ========================================
   Utility Classes
   ======================================== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary-color); }
.text-success { color: var(--success-color); }
.text-danger { color: var(--danger-color); }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.font-bold { font-weight: 700; }
.font-medium { font-weight: 500; }

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1024px) {
    .form-row-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .navbar-inner {
        flex-direction: column;
        padding: 1rem;
    }

    .navbar-nav {
        flex-wrap: wrap;
        justify-content: center;
        margin-top: 0.5rem;
    }

    .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }

    .container {
        padding: 1rem;
    }

    .form-row,
    .form-row-2,
    .form-row-3,
    .form-row-4 {
        grid-template-columns: 1fr;
    }

    .card-body {
        padding: 1.25rem;
    }

    .company-header {
        margin: -1.25rem -1.25rem 1.25rem -1.25rem;
        padding: 1rem;
    }

    .section-header {
        margin: 1.5rem -1.25rem 1rem -1.25rem;
        padding: 0.75rem 1.25rem;
    }

    .table {
        font-size: 0.8rem;
    }

    .table th,
    .table td {
        padding: 0.75rem 0.5rem;
    }

    .actions {
        flex-direction: column;
    }

    .btn-group {
        flex-direction: column;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    .navbar,
    .btn-group,
    .actions,
    .footer {
        display: none !important;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }

    body {
        background: white;
    }
}

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

.card {
    animation: fadeIn 0.3s ease-out;
}

.dashboard-card {
    animation: fadeIn 0.4s ease-out;
    animation-fill-mode: both;
}

.dashboard-card:nth-child(1) { animation-delay: 0.1s; }
.dashboard-card:nth-child(2) { animation-delay: 0.2s; }
.dashboard-card:nth-child(3) { animation-delay: 0.3s; }
.dashboard-card:nth-child(4) { animation-delay: 0.4s; }

/* ========================================
   Scrollbar Styling
   ======================================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: #bdbdbd;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9e9e9e;
}

/* ========================================
   Workflow Steps Indicator
   ======================================== */
.workflow-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #fafafa 0%, #f0f0f0 100%);
    border-bottom: 1px solid var(--border-color);
    margin: -1.75rem -1.75rem 1.75rem -1.75rem;
    gap: 0;
}

.workflow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
    max-width: 200px;
}

.workflow-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 60%;
    width: 80%;
    height: 3px;
    background: var(--border-color);
    z-index: 0;
}

.workflow-step.completed:not(:last-child)::after {
    background: var(--success-color);
}

.workflow-step.active:not(:last-child)::after {
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--border-color) 100%);
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--border-color);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    z-index: 1;
    transition: all var(--transition-normal);
    border: 3px solid white;
    box-shadow: var(--shadow-sm);
}

.workflow-step.active .step-number {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(13, 71, 161, 0.3);
}

.workflow-step.completed .step-number {
    background: linear-gradient(135deg, var(--success-color) 0%, #1b5e20 100%);
    color: white;
}

.workflow-step.completed .step-number::after {
    content: '✓';
    font-size: 1.1rem;
}

.workflow-step.completed .step-number span {
    display: none;
}

.step-label {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

.workflow-step.active .step-label {
    color: var(--primary-color);
}

.workflow-step.completed .step-label {
    color: var(--success-color);
}

.step-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform var(--transition-fast);
}

.step-link:hover {
    transform: translateY(-2px);
}

.step-link:hover .step-number {
    box-shadow: var(--shadow-md);
}

/* Enquiry Reference Banner */
.enquiry-ref-banner {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.enquiry-ref-banner .ref-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.enquiry-ref-banner .ref-item {
    display: flex;
    flex-direction: column;
}

.enquiry-ref-banner .ref-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    font-weight: 600;
}

.enquiry-ref-banner .ref-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.enquiry-ref-banner .ref-actions {
    display: flex;
    gap: 0.5rem;
}

/* Related Forms Navigation */
.related-forms {
    background: linear-gradient(135deg, #f5f7fa 0%, #e8eaf6 100%);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    margin-top: 2rem;
    border: 2px solid var(--border-color);
}

.related-forms-header {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary-dark);
    margin-bottom: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.related-forms-header::before {
    content: '→';
    font-weight: bold;
}

.related-forms h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.related-forms h4::before {
    content: '🔗';
}

.related-forms-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.related-forms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.related-form-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.related-form-link:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
    transform: translateX(4px);
}

.related-form-link.exists {
    border-left: 4px solid var(--success-color);
}

.related-form-link.missing {
    border-left: 4px solid var(--warning-color);
    opacity: 0.8;
}

.related-form-link .form-step {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.related-form-link.exists .form-step {
    background: var(--success-color);
    color: white;
}

.related-form-link .form-info {
    flex: 1;
}

.related-form-link .form-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.related-form-link .form-status {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.related-form-link.exists .form-status {
    color: var(--success-color);
}

/* Link Step Badge */
.related-form-link .link-step {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
}

.related-form-link .link-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.related-form-link:hover .link-title {
    color: var(--primary-color);
}

/* Form Step Badge in Header */
.step-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.2);
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

.step-badge .step-num {
    background: white;
    color: var(--primary-color);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}
