@media (max-width: 600px) {
    .custom-supplier-dropdown .dropdown-item span {
        text-decoration: underline;
        text-underline-offset: 2px;
        width: 100%;
        display: inline-block;
        text-align: center;
    }
}
/* Custom Supplier Dropdown Styles */
.custom-supplier-dropdown {
    position: relative;
    display: inline-block;
}

.custom-supplier-dropdown .dropdown-toggle {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 0.5rem 1rem;
    font-weight: 600;
    font-size: 0.8rem;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.10);
    padding: 8px 18px;
    font-size: 1rem;
    cursor: pointer;
    min-width: 140px;
    max-width: 100vw;
    white-space: nowrap;
    font-weight: 600;
    transition: background 0.3s;
}

.custom-supplier-dropdown .dropdown-toggle:hover,
.custom-supplier-dropdown .dropdown-toggle:focus {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    color: #fff;
}

.custom-supplier-dropdown .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 20px;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.15);
    width: 370px;
    max-width: 98vw;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.15);
    z-index: 1000;
    padding: 0;
    margin: 0;
    overflow-x: auto;
    overflow-y: auto;
    max-height: 60vh;
    font-weight: 500;
}

.custom-supplier-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 16px;
    white-space: nowrap;
    font-size: 0.98rem;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    color: #fff;
    border-radius: 16px;
    margin: 6px 8px;
}

.custom-supplier-dropdown .dropdown-item span {
    color: #fff;
    font-weight: 600;
}
.custom-supplier-dropdown .dropdown-item:last-child {
    border-bottom: none;
}
.custom-supplier-dropdown .dropdown-item button {
    font-size: 0.95rem;
    padding: 8px 18px;
    border-radius: 20px;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.10);
    transition: background 0.3s, color 0.3s;
    background: #fff;
    color: #764ba2;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s, color 0.2s;
}
.custom-supplier-dropdown .dropdown-item button:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    color: #fff;
}

@media (max-width: 600px) {
    .custom-supplier-dropdown .dropdown-menu {
    min-width: 220px !important;
    width: 100vw !important;
    max-width: 270px !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    border-radius: 18px;
    font-size: 0.92rem;
    }
    .custom-supplier-dropdown .dropdown-item {
        flex-direction: column;
        align-items: center;
        gap: 4px;
        padding: 8px 6px;
        white-space: normal !important;
        width: 100%;
        box-sizing: border-box;
        font-size: 0.92rem;
    }
    .custom-supplier-dropdown .dropdown-item button {
        width: 90%;
        font-size: 0.92rem;
        padding: 7px 0;
        margin: 0 auto;
        display: block;
    }
}
/* Ensure language icons and login button are spaced apart on desktop */
.lang-login-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.5em;
}

.delete-quotations-sticky {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #fff;
    padding-top: 10px;
    padding-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-danger {
    background: #e53935;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin-right: 10px;
    transition: background 0.2s;
}

.btn-danger:disabled,
.btn-danger[disabled] {
    background: #ccc;
    color: #888;
    cursor: not-allowed;
    opacity: 0.7;
}

.quotation-card-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
}

.quotation-delete-checkbox {
    margin-top: 18px;
    accent-color: #e53935;
    width: 22px;
    height: 22px;
    cursor: pointer;
}

/* HEADER/NAV - DESKTOP DEFAULT */
.main-header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
}

/* Left-align dashboard title for desktop, matching suppliers */
.main-header h1 {
    margin: 0;
    font-size: 1.8em;
    font-weight: 600;
    text-align: left;
    width: auto;
}

.main-nav {
    display: flex;
    gap: 20px;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    transition: background 0.3s;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    white-space: nowrap;
    font-size: 1rem;
}

.nav-link:hover, .nav-link.active {
    background: rgba(255, 255, 255, 0.2);
}

/* MOBILE (phones + tablets) */
@media (max-width: 768px) {
    .main-header {
        padding: 0.5rem !important;
        flex-direction: column;
        align-items: flex-start;
    }

    .main-header > div {
        display: flex !important;
        flex-direction: column !important;
        width: 100%;
        gap: 0.5em;
    }

    .main-header h1 {
        font-size: 1.1rem;
        text-align: center;
        width: 100%;
        margin: 0 auto;
        display: block;
    }

    .main-nav {
        display: flex !important;
        flex-direction: column !important;
        flex-wrap: nowrap;
        width: 100%;
        justify-content: flex-start;
        order: 1;
        margin-top: 0;
        margin-bottom: 0.5em;
        gap: 0 !important; /* collapse vertical spacing */
        align-items: stretch;
    }

    .nav-link {
        display: inline-flex !important;
        align-items: center;
        gap: 0.4em;
        white-space: nowrap;
        width: 100%;
        justify-content: flex-start;
        font-size: 1rem;
        box-sizing: border-box;

        /* collapse padding + margin */
        padding-top: 4px !important;
        padding-bottom: 4px !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        line-height: 1.2 !important;
    }

    .main-header img {
        width: 28px !important;
        height: 18px !important;
    }

    .main-header > div > div:nth-child(2),
    .main-header > div > #user-header-info {
        order: 2;
        width: 100%;
        display: flex !important;
        flex-direction: row;
        justify-content: flex-start;
        gap: 0.5em;
        margin-bottom: 0.5em;
    }
}

.dashboard-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Summary Cards */
.summary-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.summary-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
    text-align: center;
    transition: transform 0.3s ease;
}

.summary-card:hover {
    transform: translateY(-5px);
}

.summary-card h3 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 0.9rem;
    font-weight: 600;
}

.summary-value {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
}

/* Quotations Section */
.quotations-section {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 1rem;
}

.section-header h2 {
    margin: 0;
    color: #333;
}

.refresh-btn {
    background: linear-gradient(135deg, #11998e 0%, #38f9d7 100%);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Quotations List */
.quotations-list {
    display: grid;
    gap: 1rem;
}

.quotation-card {
    max-width: 420px;          /* prevent super-wide tickets */
    word-wrap: break-word;     /* allow breaking long words if needed */
    overflow-wrap: break-word;
    font-size: 0.95rem;        /* slightly smaller font inside cards */
}

/* Adjust title font size inside the capped cards */
.quotation-card .quotation-title {
    font-size: 1.2rem;         /* smaller than default 1.4em */
}

/* Keep meta text readable but compact */
.quotation-card .quotation-meta {
    font-size: 0.85rem;
}

.quotation-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.15);
}

.quotation-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.quotation-title {
    font-size: 1.4em;
    font-weight: 600;
    color: #333;
    margin-bottom: 1.2em;
}


.quotation-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.meta-item.suppliers-hover {
    cursor: pointer;
}

.meta-item.suppliers-hover:hover .meta-value {
    color: #667eea;
    text-decoration: underline;
}

.meta-value {
    font-weight: 600;
    color: #333;
    transition: color 0.3s ease;
}

/* Tooltip Styles */
.tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    margin-bottom: 8px;
    white-space: nowrap;
}

.tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #333;
}

.tooltip.show {
    opacity: 1;
    visibility: visible;
}

.suppliers-list {
    line-height: 1.4;
    text-align: center;
}

.quotation-progress {
    margin-bottom: 1rem;
}

.progress-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #11998e 0%, #38f9d7 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.quotation-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.action-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-2px);
}

.btn-secondary {
    background: #f8f9fa;
    color: #666;
    border: 1px solid #dee2e6;
}

.btn-secondary:hover {
    background: #e9ecef;
    color: #333;
}

/* Empty State */
.empty-section {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.empty-section h3 {
    color: #333;
    margin-bottom: 1rem;
}

.empty-section a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.empty-section a:hover {
    text-decoration: underline;
}

/* Error State */
.error-section {
    text-align: center;
    padding: 3rem;
    color: #dc3545;
}

.error-section h3 {
    color: #dc3545;
    margin-bottom: 1rem;
}

.retry-btn {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-weight: 600;
    margin-top: 1rem;
}

.retry-btn:hover {
    background: #c82333;
}

/* Utility Classes */
.hidden {
    display: none !important;
}
