/* ═══════════════════════════════════════════════════════════
   COMPONENTS.CSS - Shared UI Components
   Merged: navbar.css, footer.css, machbar.css, productbar.css
   + shared components extracted from dashboard.css
   ═══════════════════════════════════════════════════════════ */

/* ── Welcome Section ── */
.welcome {
    margin-bottom: 24px;
}

.welcome h2 {
    color: var(--text-primary);
    font-size: 28px;
    margin-bottom: 8px;
}

.welcome p {
    color: var(--text-secondary);
    font-size: 16px;
}

/* ── Section ── */
.section {
    background: var(--background);
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px var(--shadow);
    margin-bottom: 24px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 40px;
    margin-bottom: 20px;
}

.section-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.section-title {
    color: var(--primary);
    font-size: 20px;
    font-weight: 600;
}

.header-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
}

.section-header-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

/* ── View Switcher ── */
.view-switcher {
    display: flex;
    gap: 8px;
    background: rgba(0, 0, 0, 0.05);
    padding: 4px;
    border-radius: 8px;
}

.view-btn {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.view-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text);
}

.view-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ── Filter Buttons ── */
.filter-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 6px 12px;
    border: 1.5px solid var(--border);
    background: var(--card-bg);
    color: var(--text-secondary);
    border-radius: 16px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.filter-btn:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
}

.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.filter-icon {
    font-size: 13px;
}

@media (max-width: 600px) {
    .filter-buttons {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }
    .filter-btn {
        width: 100%;
        box-sizing: border-box;
        justify-content: center;
        padding: 10px 12px;
        font-size: 13px;
        border-radius: 10px;
    }
}

/* ── Search Inputs ── */
.machines-search-bar {
    margin-bottom: 12px;
}

.machine-search-input {
    padding: 10px 16px;
    border: 2px solid var(--border);
    border-radius: 24px;
    font-size: 14px;
    background: #ffffff;
    color: var(--text-primary);
    outline: none;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.machine-search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb, 30, 58, 95), 0.12);
}

.machine-search-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.bom-search-input {
    padding: 6px 12px;
    border: 2px solid var(--border);
    border-radius: 20px;
    font-size: 13px;
    background: var(--card-bg);
    color: var(--text-primary);
    outline: none;
    width: 180px;
    transition: border-color 0.2s, width 0.2s;
}

.bom-search-input:focus {
    border-color: var(--primary);
    width: 220px;
}

.bom-search-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

/* ── Action Buttons ── */
.action-btn {
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px var(--shadow);
}

.action-btn:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow);
}

.action-btn:active {
    transform: translateY(0);
}

.action-btn-group {
    display: flex;
    gap: 8px;
}

.action-btn-group .btn {
    flex: 1;
    margin-right: 0 !important;
    text-align: center;
    white-space: nowrap;
}

/* ── Buttons ── */
.btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
}

.btn:disabled {
    background: var(--text-secondary);
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--shadow);
}

.btn-secondary {
    background: var(--border);
    color: var(--text-primary);
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: var(--text-secondary);
    color: white;
}

.btn-danger {
    background: #f44336;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-danger:hover {
    background: #d32f2f;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3);
}

.btn-warning {
    background: #ff9800;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-warning:hover {
    background: #f57c00;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
}

.btn-success {
    background: #4caf50;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-success:hover {
    background: #45a049;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.btn-info {
    background: #1565c0;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-info:hover {
    background: #0d47a1;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(21, 101, 192, 0.3);
}

.btn-share {
    background: #28a745;
}

.btn-share:hover:not(:disabled) {
    background: #218838;
}

.btn-qr {
    background: #6f42c1;
}

.btn-qr:hover:not(:disabled) {
    background: #5a32a3;
}

.btn-delete {
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
}

.btn-delete:hover {
    background: rgba(200, 35, 51, 1);
    transform: translateY(-2px);
}

.btn-start {
    background: rgba(76, 175, 80, 0.9);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
}

.btn-start:hover {
    background: rgba(56, 142, 60, 1);
    transform: translateY(-2px);
}

.btn-finish {
    background: rgba(33, 150, 243, 0.9);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
}

.btn-finish:hover {
    background: rgba(13, 71, 161, 1);
    transform: translateY(-2px);
}

.btn-small {
    padding: 6px 12px;
    font-size: 13px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 6px;
}

.btn-small:hover {
    background: var(--primary-light);
}

.btn-small.btn-danger {
    background: var(--error);
}

.btn-small.btn-danger:hover {
    background: #c82333;
}

.btn-small:disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

/* ── Empty State / Loading ── */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.empty-state p {
    margin-bottom: 16px;
}

.loading {
    text-align: center;
    padding: 0px;
    color: var(--text-secondary);
}

/* ── Modal ── */
/* Lock body scroll when any modal is open */
body:has(.modal.show),
body:has(.modal[style*="flex"]),
body:has(.confirm-modal.show),
body:has(.edit-machine-modal.show) {
    overflow: hidden !important;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--background);
    padding: 32px 32px 32px 32px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    scroll-behavior: smooth;
}

.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.modal-action-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.modal-action-btn.btn-start {
    background: #4caf50;
    color: white;
}

.modal-action-btn.btn-start:hover {
    background: #45a049;
    transform: translateY(-1px);
}

.modal-action-btn.btn-finish {
    background: #4caf50;
    color: white;
}

.modal-action-btn.btn-finish:hover {
    background: #45a049;
    transform: translateY(-1px);
}

.modal-action-btn.btn-delete {
    background: var(--error);
    color: white;
}

.modal-action-btn.btn-delete:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
}

.modal-body {
    margin-bottom: 20px;
}

.modal-body label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 14px;
}

.modal-body input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.modal-body input:focus {
    outline: none;
    border-color: var(--primary);
}

.close-btn {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: right;
}

.close-btn:hover {
    color: var(--primary);
}

.close {
    color: var(--text-secondary);
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.close:hover {
    color: var(--primary);
}

/* ── Forms ── */
.form-group {
    margin-bottom: 20px;
}

.form-section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 24px 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.form-row {
    display: flex;
    gap: 12px;
}

.form-row .form-group {
    flex: 1;
    min-width: 0;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* ── Company Selector ── */
.company-selector {
    width: auto;
    min-width: 200px;
    max-width: 300px;
    background: white;
    color: var(--primary);
    border: 2px solid var(--border);
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    outline: none;
    transition: all 0.2s;
}

.company-selector:hover {
    border-color: var(--primary);
}

.company-selector:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* ── Alerts ── */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    border: 1px solid #fecaca;
}

/* ── Confirm Modal ── */
.confirm-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 4000;
    align-items: center;
    justify-content: center;
}

.confirm-modal.show {
    display: flex;
}

.confirm-content {
    background: var(--background);
    padding: 32px;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.confirm-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--error);
    margin-bottom: 16px;
}

.confirm-modal.success .confirm-title {
    color: #4caf50;
}

.confirm-modal.success .confirm-content {
    border-top: 4px solid #4caf50;
}

.confirm-modal.success .btn-confirm {
    background: #4caf50;
}

.confirm-modal.success .btn-confirm:hover {
    background: #45a049;
}

.confirm-modal.danger .confirm-title {
    color: #e74c3c;
}

.confirm-modal.danger .confirm-content {
    border-top: 4px solid #e74c3c;
}

.confirm-modal.danger .btn-confirm {
    background: #e74c3c;
}

.confirm-modal.danger .btn-confirm:hover {
    background: #c0392b;
}

.confirm-message {
    color: var(--text-primary);
    margin-bottom: 24px;
    line-height: 1.5;
    white-space: pre-line;
}

.confirm-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn-confirm {
    flex: 1;
    background: var(--error);
}

.btn-confirm:hover {
    background: #c82333;
}

/* ── Breadcrumb Navigation ── */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb-item {
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 500;
    transition: color 0.2s;
}

.breadcrumb-item.breadcrumb-link {
    cursor: pointer;
    text-decoration: underline;
}

.breadcrumb-item.breadcrumb-link:hover {
    color: var(--primary);
}

.breadcrumb-item.active {
    color: var(--primary);
    font-weight: 600;
    cursor: default;
}

.breadcrumb-separator {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ── Machine Status Colors ── */
.completed-badge,
.inprogress-badge,
.notstarted-badge,
.machine-status-badge {
    font-size: 12px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 12px;
    white-space: nowrap;
    display: inline-block;
}

.status-not-started       { background: #e5e7eb; color: #374151; }
.status-concept-design    { background: #ede9fe; color: #5b21b6; }
.status-mechanical-design { background: #dbeafe; color: #1e40af; }
.status-procurement       { background: #fef3c7; color: #92400e; }
.status-fabrication       { background: #ffedd5; color: #c2410c; }
.status-assembly          { background: #fce7f3; color: #9d174d; }
.status-testing           { background: #e0e7ff; color: #3730a3; }
.status-commissioning     { background: #d1fae5; color: #065f46; }
.status-completed         { background: #d1fae5; color: #065f46; }
.status-cancelled         { background: #fee2e2; color: #991b1b; }

.machine-status-select {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    outline: none;
    appearance: auto;
    white-space: nowrap;
}

.machine-status-select-card {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 10px;
}

/* ── Procurement Status Badges ── */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.status-notordered {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.status-quoted {
    background: #cfe2ff;
    color: #084298;
}

.status-ordered {
    background: #fff3cd;
    color: #856404;
}

.status-delivered {
    background: #d1e7dd;
    color: #0f5132;
}

.status-stock {
    background: #157347;
    color: #ffffff;
}

.status-draft {
    background: #f8f9fa;
    color: #6c757d;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-approved {
    background: #cfe2ff;
    color: #084298;
}

/* ── Mobile Warning Banner ── */
.mobile-warning-banner {
    display: none;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-left: 4px solid #dc2626;
    color: #991b1b;
    padding: 12px 20px;
    margin: 0;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.1);
}

@media (max-width: 768px) {
    .mobile-warning-banner {
        display: block !important;
    }
}

/* ── Responsive: Search Inputs ── */
@media (max-width: 768px) {
    .bom-search-input {
        width: 100% !important;
        flex-basis: 100%;
        box-sizing: border-box;
        order: -1;
    }
    .bom-search-input:focus {
        width: 100% !important;
    }
    .section-header-buttons .action-btn {
        width: 100%;
        flex-basis: 100%;
        box-sizing: border-box;
        text-align: center;
    }
}

/* ── Responsive: Action Button Group ── */
@media (max-width: 768px) {
    .action-btn-group {
        flex-direction: column;
    }
    .action-btn-group .btn {
        width: 100%;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start !important;
        height: auto !important;
        gap: 12px;
    }

    .section-header h3 {
        width: 100%;
        margin-bottom: 0;
    }

    .section-header > div {
        width: 100%;
    }

    .section-header button,
    .section-header .btn {
        width: 100%;
    }

    #locationStockModal .modal-content {
        max-width: 100% !important;
        margin: 8px;
        border-radius: 8px;
    }

    #locationStockModal .products-table th,
    #locationStockModal .products-table td {
        padding: 8px 6px;
        font-size: 13px;
    }

    .warehouse-header-info {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
    }

    .warehouse-header-info h3 {
        font-size: 18px;
    }

    .warehouse-header-info #selectedWarehouseName {
        max-width: 100% !important;
        width: 100%;
    }

    .warehouse-header-actions {
        width: 100%;
        flex-direction: column !important;
    }

    .warehouse-header-actions button {
        width: 100% !important;
    }
}

/* ═══════════════════════════════════════════════════════════
   NAVBAR (from navbar.css)
   ═══════════════════════════════════════════════════════════ */

.navbar {
    background: var(--primary);
    color: white;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px var(--shadow);
}

.navbar h1 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.account-switcher {
    display: none;
}

.username {
    font-size: 14px;
    opacity: 0.9;
    padding: 8px 16px;
    border-radius: 6px;
    transition: background 0.2s, opacity 0.2s;
}

.username.user-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    opacity: 1;
}

.dropdown {
    position: relative;
}

.dropdown-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dropdown-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.dropdown-arrow {
    font-size: 10px;
    transition: transform 0.2s;
}

.dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: var(--background);
    min-width: 280px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 8px 0;
    z-index: 1000;
}

.dropdown-content.show {
    display: block;
    animation: dropdownFadeIn 0.2s ease-out;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-content a {
    display: block;
    padding: 12px 20px;
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.2s;
    font-size: 14px;
}

.dropdown-content a:hover {
    background: var(--surface);
}

.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 8px 0;
}

.dropdown-account-section {
    padding: 12px 20px;
}

.dropdown-label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dropdown-account-switcher {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    background: var(--background);
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color 0.2s;
}

.dropdown-account-switcher:hover {
    border-color: var(--primary);
}

.dropdown-account-switcher:focus {
    outline: none;
    border-color: var(--primary);
}

.logout-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.notif-badge-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    margin-left: 6px;
}

.notif-badge {
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    line-height: 1;
    vertical-align: middle;
}

.dropdown-notif-badge {
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    margin-left: 6px;
    vertical-align: middle;
    line-height: 1;
}

/* ═══════════════════════════════════════════════════════════
   FOOTER (from footer.css)
   ═══════════════════════════════════════════════════════════ */

.site-footer {
    background: var(--background);
    border-top: 1px solid var(--border);
    margin-top: 0px;
    padding: 48px 0 24px;
    color: var(--text-secondary);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 32px;
}

.footer-section h3 {
    color: var(--primary);
    font-size: 24px;
    margin: 0 0 12px 0;
    font-weight: 600;
}

.footer-section h4 {
    color: var(--text);
    font-size: 16px;
    margin: 0 0 16px 0;
    font-weight: 600;
}

.footer-section p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 24px 0;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-bottom p {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
}

@media (max-width: 968px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
}

@media (max-width: 640px) {
    .site-footer {
        padding: 32px 0 16px;
        margin-top: 0px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 0 16px;
    }

    .footer-section h3 {
        font-size: 20px;
    }
}

/* ═══════════════════════════════════════════════════════════
   MACHINE NAVBAR (from machbar.css)
   ═══════════════════════════════════════════════════════════ */

.machine-navbar {
    background: transparent;
    padding: 0;
    overflow: hidden;
}

.machine-navbar-content {
    display: flex;
    align-items: center;
    padding: 0;
}

.machine-navbar-left {
    display: flex;
    align-items: center;
    gap: 0;
    flex: 1;
}

.machine-navbar-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    text-decoration: none;
    color: #7f8c8d;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
    position: relative;
}

.machine-navbar-link:hover {
    color: #2c3e50;
    background: rgba(0, 0, 0, 0.02);
}

.machine-navbar-link.active {
    color: #3498db;
    border-bottom-color: #3498db;
    font-weight: 600;
}

.machine-navbar-icon {
    display: none;
}

@media (max-width: 768px) {
    .machine-navbar-left {
        width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .machine-navbar-link {
        padding: 10px 16px;
        white-space: nowrap;
    }
}

/* ═══════════════════════════════════════════════════════════
   PRODUCT NAVBAR (from productbar.css)
   ═══════════════════════════════════════════════════════════ */

.product-navbar {
    background: transparent;
    padding: 0;
    margin-bottom: 20px;
    overflow: hidden;
}

.product-navbar-content {
    display: flex;
    align-items: center;
    padding: 0;
}

.product-navbar-left {
    display: flex;
    align-items: center;
    gap: 0;
    flex: 1;
}

.product-navbar-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    text-decoration: none;
    color: #7f8c8d;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
    position: relative;
}

.product-navbar-link:hover {
    color: #2c3e50;
    background: rgba(0, 0, 0, 0.02);
}

.product-navbar-link.active {
    color: #3498db;
    border-bottom-color: #3498db;
    font-weight: 600;
}

@media (max-width: 768px) {
    .product-navbar-left {
        width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }
}

/* ── Shared Mobile Utility ── */
@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
}
