/* ShopTec Dealer Price Portal Custom Styles */

:root {
    --primary-color: #1e3c72;
    --primary-hover: #2a5298;
    --secondary-color: #00b4db;
    --success-accent: #198754;
    --best-price-bg: #e8f8f0;
    --best-price-border: #20c997;
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    --hover-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
}

body {
    background-color: #f8fafc;
    color: #334155;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.navbar-custom {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    box-shadow: 0 2px 10px rgba(0,0,0,0.12);
}

.navbar-custom .navbar-brand {
    font-weight: 700;
    letter-spacing: 0.5px;
}

.navbar-custom .nav-link {
    color: rgba(255, 255, 255, 0.88);
    font-weight: 500;
    transition: all 0.2s ease;
    padding: 0.5rem 0.85rem;
    border-radius: 6px;
}

.navbar-custom .nav-link:hover,
.navbar-custom .nav-link.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
}

/* Stat Cards */
.stat-card {
    background: #ffffff;
    border-radius: 12px;
    border: none;
    box-shadow: var(--card-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.stat-card .stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Price Comparison Group Cards */
.product-compare-card {
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    box-shadow: var(--card-shadow);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.product-compare-header {
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 1.25rem;
}

.dealer-price-row.is-lowest {
    background-color: #f0fdf4 !important;
    font-weight: 600;
    border-left: 4px solid #16a34a;
}

.badge-best-price {
    background-color: #16a34a;
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.35rem 0.65rem;
    border-radius: 20px;
    box-shadow: 0 2px 4px rgba(22, 163, 74, 0.3);
}

/* Data Tables */
.table-custom {
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

.table-custom thead th {
    background-color: #f8fafc;
    color: #475569;
    font-weight: 600;
    border-bottom: 2px solid #e2e8f0;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    padding: 0.85rem 1rem;
}

.table-custom tbody td {
    padding: 0.85rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
}

.main-content {
    flex: 1 0 auto;
    padding-bottom: 3rem;
}

.footer-custom {
    flex-shrink: 0;
    background-color: #ffffff;
    border-top: 1px solid #e2e8f0;
    padding: 1rem 0;
    font-size: 0.85rem;
    color: #64748b;
}

/* Forms */
.form-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    border: none;
    padding: 2rem;
}

.form-control:focus, .form-select:focus {
    border-color: #2a5298;
    box-shadow: 0 0 0 0.25rem rgba(42, 82, 152, 0.2);
}

/* Direct Inline Editing */
.editable-cell {
    cursor: pointer;
    position: relative;
    border-radius: 6px;
    padding: 4px 8px;
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.editable-cell:hover {
    background-color: #e2e8f0;
    box-shadow: 0 0 0 1px #94a3b8;
}

.editable-cell::after {
    content: "\F4CB"; /* bi-pencil icon */
    font-family: "bootstrap-icons";
    font-size: 0.75rem;
    color: #64748b;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.editable-cell:hover::after {
    opacity: 1;
}

.inline-edit-wrap {
    display: inline-flex;
    align-items: center;
    min-width: 140px;
}

.inline-edit-wrap .form-control {
    font-size: 0.9rem;
    padding: 0.25rem 0.5rem;
}

@keyframes savePulse {
    0% { background-color: #86efac; }
    50% { background-color: #bbf7d0; }
    100% { background-color: transparent; }
}

.cell-saved {
    animation: savePulse 1.5s ease-out;
    border-radius: 6px;
}

