/* =====================================================
   SHARED STYLES - Vector Contour Sales Cockpit
   Unified Header & Footer Design
   Version: 1.0.0
   Date: 2026-02-25
   ===================================================== */

/* CSS Variables (shared) */
:root {
    --vc-primary:       #0078c1;
    --vc-primary-dark:  #005a9c;
    --vc-text-main:     #333333;
    --vc-text-sub:      #7F7F7F;
    --vc-bg-page:       linear-gradient(135deg, #f5f7fa 0%, #e8ecf0 100%);
    --vc-shadow-hdr:    0 4px 12px rgba(0,0,0,0.10);
    --vc-shadow-ftr:    0 2px 6px  rgba(0,0,0,0.07);
    --vc-radius:        12px;
    --vc-font:          'Calibri', 'Segoe UI', 'Arial', sans-serif;
}

/* ── Page body default (pages that include shared.css) ── */
body.vc-page {
    font-family: var(--vc-font);
    background: var(--vc-bg-page);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 30px 30px 0 30px;
    margin: 0;
    box-sizing: border-box;
    color: var(--vc-text-main);
}

/* ── Unified Header Card ── */
.vc-header {
    background: #ffffff;
    border-radius: var(--vc-radius);
    box-shadow: var(--vc-shadow-hdr);
    padding: 18px 36px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    flex-shrink: 0;
}

/* Logo area */
.vc-header .logo-container {
    display: flex;
    align-items: center;
    gap: 14px;
}

.vc-header .logo {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
}

/* Universal logo size override – 60px on all pages */
.header .logo {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    box-shadow: none;
}

.vc-header .logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.vc-header .company-info h1 {
    font-size: 1.45rem;
    color: var(--vc-primary);
    font-weight: 300;
    margin-bottom: 2px;
    white-space: nowrap;
}

.vc-header .company-info p {
    color: var(--vc-text-sub);
    font-size: 0.82rem;
    font-style: italic;
}

/* Universal header overrides – unify logo/typography across all pages
   to match the Service Quote / Machine Calculator standard */
.header .logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.header .company-info h1 {
    font-size: 1.5rem;
    color: #0078c1;
    font-weight: 300;
    margin-bottom: 3px;
}

.header .company-info p {
    color: #7F7F7F;
    font-size: 0.85rem;
    font-style: italic;
}

/* Version span inside title */
.vc-version {
    font-size: 0.5em;
    color: #aaa;
    font-weight: 300;
    margin-left: 6px;
}

/* Right-side nav/actions */
.vc-header .header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Version badge pill */
.vc-header .version-badge {
    background: var(--vc-primary);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

/* User info display */
.vc-user-chip {
    background: #f0f7ff;
    border: 1px solid #c2dcf4;
    color: var(--vc-primary);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 500;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Nav links */
.vc-nav-link {
    color: var(--vc-primary);
    text-decoration: none;
    padding: 7px 14px;
    border-radius: 6px;
    transition: background 0.2s;
    font-size: 0.88rem;
    font-weight: 500;
    white-space: nowrap;
}

.vc-nav-link:hover {
    background: #e8f4ff;
}

/* Logout button */
.vc-logout-btn {
    background: transparent;
    border: 1px solid #ddd;
    color: #999;
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--vc-font);
    white-space: nowrap;
}

.vc-logout-btn:hover {
    background: #fee;
    border-color: #f88;
    color: #c00;
}

/* Small nav button (like "← Home") */
.vc-btn-sm {
    display: inline-block;
    padding: 7px 16px;
    background: #f0f0f0;
    color: #333;
    border-radius: 6px;
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
    font-family: var(--vc-font);
    white-space: nowrap;
}

.vc-btn-sm:hover {
    background: #e0e0e0;
}

/* Primary small button */
.vc-btn-sm.primary {
    background: var(--vc-primary);
    color: white;
}

.vc-btn-sm.primary:hover {
    background: var(--vc-primary-dark);
}

/* ── Unified Footer Card ── */
.vc-footer {
    background: #ffffff;
    border-radius: var(--vc-radius);
    box-shadow: var(--vc-shadow-ftr);
    padding: 22px 40px;
    text-align: center;
    margin-top: 24px;
    flex-shrink: 0;
}

.vc-footer p {
    margin: 4px 0;
    font-size: 0.85rem;
    color: var(--vc-text-sub);
}

.vc-footer .slogan {
    color: var(--vc-primary);
    font-style: italic;
    font-weight: 600;
    margin-top: 8px;
    font-size: 0.9rem;
}

/* ── Access Denied Overlay ── */
.vc-access-denied {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.96);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    gap: 16px;
    font-family: var(--vc-font);
}

.vc-access-denied h2 {
    color: #c00;
    font-size: 1.6rem;
}

.vc-access-denied p {
    color: #666;
}

/* ── Loading Auth Overlay ── */
.vc-auth-loading {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.98);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    font-family: var(--vc-font);
    gap: 16px;
}

.vc-auth-loading .spinner {
    width: 48px;
    height: 48px;
    border: 5px solid #e0e0e0;
    border-top-color: var(--vc-primary);
    border-radius: 50%;
    animation: vc-spin 1s linear infinite;
}

@keyframes vc-spin {
    to { transform: rotate(360deg); }
}

.vc-auth-loading p {
    color: #999;
    font-size: 0.95rem;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    body.vc-page {
        padding: 15px 15px 0 15px;
    }

    .vc-header {
        padding: 14px 20px;
        gap: 12px;
    }

    .vc-header .company-info h1 {
        font-size: 1.15rem;
    }

    .vc-header .logo {
        width: 44px;
        height: 44px;
    }

    .vc-footer {
        padding: 16px 20px;
    }
}

/* ── Back to Top button (all pages) ── */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 44px;
    height: 44px;
    background: #0078c1;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    line-height: 44px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0,120,193,0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
    z-index: 999;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { transform: translateY(-3px); background: #005a9c; }

/* ── Collapsible info cards (Project/Report/Customer/Machine Information etc.) ── */
.card[data-collapsible] > .card-header {
    cursor: pointer;
    user-select: none;
}
.card-collapse-toggle {
    background: none;
    border: none;
    padding: 4px;
    margin-left: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    color: #888;
}
.card-collapse-icon {
    display: inline-block;
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}
.card[data-collapsible].collapsed .card-collapse-icon {
    transform: rotate(-90deg);
}
.card[data-collapsible].collapsed .card-body {
    display: none;
}
