:root {
    --kts-green: #198754;
    --kts-green-dark: #146c43;
    --kts-green-light: #d1e7dd;
    --kts-yellow: #f5a623;
    --kts-navy: #0f2e1f;
    --kts-gray: #f8f9fa;
    --kts-dark: #1a1a1a;
    --font-main: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

html {
    height: 100%;
}

body {
    font-family: var(--font-main);
    color: #333;
    background: #fff;
    padding-top: 72px;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

.kts-footer {
    flex-shrink: 0;
}

/* Navbar */
.kts-nav {
    background: linear-gradient(135deg, var(--kts-navy), #164026);
    box-shadow: 0 2px 20px rgba(0,0,0,0.15);
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.kts-nav .navbar-brand {
    color: #fff;
    font-size: 1.35rem;
    letter-spacing: -0.02em;
}

.kts-nav .nav-link {
    color: rgba(255,255,255,0.85) !important;
    font-weight: 500;
    font-size: 0.92rem;
    padding: 0.5rem 0.85rem !important;
    border-radius: 0.4rem;
    transition: all 0.2s ease;
}

.kts-nav .nav-link:hover,
.kts-nav .nav-link:focus {
    color: #fff !important;
    background: rgba(255,255,255,0.08);
}

.btn-kts-accent {
    background: var(--kts-yellow);
    border-color: var(--kts-yellow);
    color: #1a1a1a;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-kts-accent:hover {
    background: #e09512;
    border-color: #e09512;
    color: #1a1a1a;
}

.btn-cart {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.35rem 0.85rem;
    border-radius: 0.4rem;
    transition: all 0.2s ease;
}

.btn-cart:hover {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

/* Mobile offcanvas navigation */
.offcanvas {
    background: linear-gradient(135deg, var(--kts-navy), #164026);
    color: #fff;
    border-left: 1px solid rgba(255,255,255,0.08);
    max-width: 320px;
}

.offcanvas-header {
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding: 1rem 1.25rem;
}

.offcanvas-title {
    color: #fff;
    font-weight: 700;
    font-size: 1.15rem;
}

.offcanvas-body {
    padding: 1rem 1.25rem;
    overflow-y: auto;
}

.mobile-nav-link {
    color: rgba(255,255,255,0.9) !important;
    font-weight: 500;
    font-size: 1rem;
    padding: 0.75rem 0 !important;
    border-radius: 0.4rem;
    display: flex;
    align-items: center;
    min-height: 48px;
    transition: all 0.2s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link:focus {
    color: #fff !important;
}

.mobile-nav-accordion .accordion-button {
    color: rgba(255,255,255,0.9) !important;
    font-weight: 500;
    font-size: 1rem;
    padding: 0.75rem 0 !important;
    min-height: 48px;
    background: transparent !important;
    box-shadow: none !important;
}

.mobile-nav-accordion .accordion-button::after {
    filter: invert(1);
}

.mobile-nav-accordion .accordion-button:not(.collapsed) {
    color: #fff !important;
}

.mobile-nav-accordion .accordion-body .mobile-nav-link {
    padding-left: 1.5rem !important;
}

.offcanvas-actions {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.15);
}

/* Desktop staff dropdown dark theme */
.dropdown-menu-dark {
    background: linear-gradient(135deg, #164026, var(--kts-navy));
    border: 1px solid rgba(255,255,255,0.1);
}

.dropdown-menu-dark .dropdown-item {
    color: rgba(255,255,255,0.9);
    font-weight: 500;
}

.dropdown-menu-dark .dropdown-item:hover,
.dropdown-menu-dark .dropdown-item:focus {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

/* Hero */
.hero {
    position: relative;
    padding: 5rem 0 6rem;
    color: #fff;
    overflow: hidden;
    background: linear-gradient(135deg, #0a1f14 0%, #146c43 50%, #198754 100%);
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 20% 50%, rgba(245, 166, 35, 0.12) 0%, transparent 50%),
                      radial-gradient(circle at 80% 20%, rgba(255,255,255,0.04) 0%, transparent 40%);
    pointer-events: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(245, 166, 35, 0.15);
    border: 1px solid rgba(245, 166, 35, 0.3);
    color: var(--kts-yellow);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.35rem 0.9rem;
    border-radius: 2rem;
    margin-bottom: 1.25rem;
}

.hero-title {
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 1.25rem;
    max-width: 640px;
}

.hero-lead {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.85);
    max-width: 540px;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.btn-kts-primary {
    background: var(--kts-yellow);
    border-color: var(--kts-yellow);
    color: #1a1a1a;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-kts-primary:hover {
    background: #e09512;
    border-color: #e09512;
    color: #1a1a1a;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(245, 166, 35, 0.3);
}

.btn-kts-outline {
    background: transparent;
    border: 2px solid rgba(255,255,255,0.4);
    color: #fff;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-kts-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.7);
    color: #fff;
}

.hero-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hero-stat {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 1.1rem 1.25rem;
    border-radius: 0.75rem;
    backdrop-filter: blur(4px);
    transition: all 0.25s ease;
}

.hero-stat:hover {
    background: rgba(255,255,255,0.1);
    transform: translateX(4px);
}

.hero-stat-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(245, 166, 35, 0.15);
    border-radius: 0.6rem;
    color: var(--kts-yellow);
    font-size: 1.25rem;
}

.hero-stat-value {
    font-weight: 700;
    font-size: 0.95rem;
    color: #fff;
    line-height: 1.2;
}

.hero-stat-label {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.2;
}

/* Sections */
.section {
    padding: 4rem 0;
}

.section-light {
    background: var(--kts-gray);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-title {
    font-weight: 800;
    font-size: 1.75rem;
    letter-spacing: -0.02em;
    margin-bottom: 0;
    color: var(--kts-dark);
}

/* Feature Cards */
.feature-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 1rem;
    padding: 2rem;
    transition: all 0.25s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.08);
    border-color: #dee2e6;
}

.feature-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--kts-green), var(--kts-green-dark));
    color: #fff;
    font-size: 1.4rem;
    border-radius: 0.75rem;
    margin-bottom: 1.25rem;
}

.feature-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    color: var(--kts-dark);
}

.feature-card p {
    color: #6c757d;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0;
}

/* Product Cards */
.product-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.25s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0,0,0,0.1);
    border-color: #dee2e6;
}

.product-img-wrap {
    position: relative;
    aspect-ratio: 4 / 3;
    background: #f1f3f5;
    overflow: hidden;
}

.product-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-card:hover .product-img-wrap img {
    transform: scale(1.05);
}

.product-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
    font-size: 2.5rem;
}

.product-condition {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(255,255,255,0.95);
    color: var(--kts-green-dark);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.3rem 0.7rem;
    border-radius: 2rem;
    backdrop-filter: blur(4px);
}

.product-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: var(--kts-dark);
    line-height: 1.3;
}

.product-desc {
    font-size: 0.85rem;
    color: #6c757d;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.product-meta {
    margin-top: auto;
    margin-bottom: 0.5rem;
}

.product-price {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--kts-green-dark);
    display: block;
}

.product-shipping {
    font-size: 0.75rem;
    color: #868e96;
}

/* Step Cards */
.step-card {
    text-align: center;
    padding: 1.5rem;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 1rem;
    height: 100%;
    transition: all 0.25s ease;
}

.step-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}

.step-number {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--kts-green), var(--kts-green-dark));
    color: #fff;
    font-weight: 800;
    font-size: 1.1rem;
    border-radius: 50%;
    margin-bottom: 1rem;
}

.step-card h5 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--kts-dark);
}

.step-card p {
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Document Download Tiles */
.document-tile {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 0.9rem;
    padding: 1rem 1.1rem;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.document-tile:hover,
.document-tile:focus {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-color: var(--kts-green);
    color: inherit;
}

.document-tile-icon {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--kts-green), var(--kts-green-dark));
    color: #fff;
    font-size: 1.35rem;
    border-radius: 0.65rem;
}

.document-tile-body {
    flex: 1 1 auto;
    min-width: 0;
}

.document-tile-title {
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--kts-dark);
    margin-bottom: 0.1rem;
}

.document-tile-desc {
    font-size: 0.8rem;
    color: #6c757d;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.document-tile-action {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--kts-green-light);
    color: var(--kts-green-dark);
    font-size: 1.05rem;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.document-tile:hover .document-tile-action {
    background: var(--kts-green);
    color: #fff;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--kts-navy), #164026);
    color: #fff;
}

.cta-section .lead {
    color: rgba(255,255,255,0.8);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Footer */
.kts-footer {
    background: linear-gradient(135deg, #0a1f14, #0f2e1f);
    color: #fff;
    padding: 3rem 0 0;
}

.kts-footer a {
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    font-size: 0.92rem;
    line-height: 2;
    transition: color 0.2s ease;
}

.kts-footer a:hover {
    color: var(--kts-yellow);
}

.footer-bottom {
    margin-top: 2.5rem;
    padding: 1.25rem 0;
    border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 0.85rem;
}

/* Page headers */
.page-header {
    background: linear-gradient(135deg, var(--kts-navy), #164026);
    color: #fff;
    padding: 3rem 0;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: rgba(255,255,255,0.8);
    margin-bottom: 0;
    max-width: 600px;
}

/* Existing utilities */
.card-img-top {
    object-fit: cover;
    aspect-ratio: 4 / 3;
    width: 100%;
}

.metric-card {
    border-left: 4px solid var(--kts-green);
}

/* Form Styles */
.form-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e9ecef;
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--kts-dark);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.form-section-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--kts-green), var(--kts-green-dark));
    color: #fff;
    font-size: 0.95rem;
    border-radius: 0.55rem;
}

.form-control, .form-select {
    border: 1.5px solid #dee2e6;
    border-radius: 0.6rem;
    padding: 0.6rem 0.85rem;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--kts-green);
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.15);
}

.form-label {
    font-weight: 600;
    font-size: 0.88rem;
    color: #495057;
    margin-bottom: 0.4rem;
}

.form-text {
    font-size: 0.8rem;
    color: #868e96;
    margin-top: 0.35rem;
}

.invalid-feedback {
    font-size: 0.82rem;
    font-weight: 500;
}

/* Auction Styles */
.auction-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.25s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.auction-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0,0,0,0.1);
    border-color: #dee2e6;
}

.auction-card-header {
    background: linear-gradient(135deg, var(--kts-navy), #164026);
    color: #fff;
    padding: 1.25rem;
}

.auction-card-title {
    font-weight: 700;
    font-size: 1.15rem;
    margin-bottom: 0.15rem;
}

.auction-card-subtitle {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.65);
}

.auction-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.3rem 0.7rem;
    border-radius: 2rem;
}

.auction-badge-open {
    background: rgba(25, 135, 84, 0.9);
    color: #fff;
}

.auction-badge-closed {
    background: rgba(108, 117, 125, 0.9);
    color: #fff;
}

.auction-timer {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    background: rgba(0,0,0,0.2);
    padding: 0.3rem 0.7rem;
    border-radius: 2rem;
}

.auction-card-body {
    padding: 1.25rem;
    flex: 1;
}

.auction-meta-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.auction-meta {
    flex: 1;
    text-align: center;
}

.auction-meta-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #868e96;
    margin-bottom: 0.2rem;
}

.auction-meta-value {
    display: block;
    font-weight: 700;
    font-size: 1rem;
    color: var(--kts-dark);
}

.auction-meta-highlight {
    color: var(--kts-green-dark);
    font-size: 1.1rem;
}

.auction-items-preview {
    font-size: 0.85rem;
    color: #6c757d;
    padding-top: 0.75rem;
    border-top: 1px solid #e9ecef;
}

.auction-card-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid #e9ecef;
}

/* Auction Detail */
.auction-status-banner {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 1rem;
    padding: 1.25rem;
}

.auction-pulse {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--kts-green), var(--kts-green-dark));
    color: #fff;
    font-size: 1.25rem;
    border-radius: 50%;
    animation: pulse-green 2s infinite;
}

.auction-pulse-closed {
    background: linear-gradient(135deg, #6c757d, #495057);
    animation: none;
}

.auction-pulse-pending {
    background: linear-gradient(135deg, var(--kts-yellow), #e09512);
    animation: none;
}

@keyframes pulse-green {
    0% { box-shadow: 0 0 0 0 rgba(25, 135, 84, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(25, 135, 84, 0); }
    100% { box-shadow: 0 0 0 0 rgba(25, 135, 84, 0); }
}

.auction-price-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 1rem;
    padding: 1.25rem;
    text-align: center;
    transition: all 0.2s ease;
}

.auction-price-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.auction-price-card-highlight {
    border-color: var(--kts-yellow);
    background: linear-gradient(135deg, #fff9e6, #fff);
}

.auction-price-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #868e96;
    margin-bottom: 0.4rem;
}

.auction-price-value {
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--kts-dark);
}

.auction-price-card-highlight .auction-price-value {
    color: var(--kts-green-dark);
}

/* Pagination */
.pagination .page-link {
    color: var(--kts-green-dark);
    border-radius: 0.5rem;
    margin: 0 0.15rem;
    border: 1px solid #e9ecef;
    font-weight: 500;
    min-width: 2.5rem;
    text-align: center;
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--kts-green), var(--kts-green-dark));
    border-color: var(--kts-green);
    color: #fff;
}

.pagination .page-link:hover {
    background: var(--kts-gray);
    border-color: #dee2e6;
    color: var(--kts-green-dark);
}

/* Product list toolbar */
.product-toolbar {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 1rem;
    padding: 1rem 1.25rem;
}

/* Product carousel */
.product-carousel {
    border: 1px solid #e9ecef;
    border-radius: 1rem;
    background: #fff;
}

.product-carousel .carousel-item img {
    aspect-ratio: 4 / 3;
    object-fit: cover;
    width: 100%;
    cursor: zoom-in;
}

.product-carousel .carousel-control-prev,
.product-carousel .carousel-control-next {
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

.product-carousel .carousel-control-prev { left: 1rem; }
.product-carousel .carousel-control-next { right: 1rem; }

.product-carousel .carousel-control-prev:hover,
.product-carousel .carousel-control-next:hover {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.product-carousel .carousel-control-prev-icon,
.product-carousel .carousel-control-next-icon {
    filter: invert(1) grayscale(100);
    width: 1rem;
    height: 1rem;
}

.product-carousel .carousel-indicators {
    bottom: 0.75rem;
    margin-bottom: 0;
}

.product-carousel .carousel-indicators button {
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    background-color: rgba(0,0,0,0.3);
    border: 2px solid transparent;
    margin: 0 0.25rem;
    transition: all 0.2s ease;
}

.product-carousel .carousel-indicators button.active {
    background-color: var(--kts-green);
    transform: scale(1.2);
}

.carousel-zoom-hint {
    position: absolute;
    bottom: 3rem;
    right: 1rem;
    background: rgba(0,0,0,0.45);
    color: #fff;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.product-carousel:hover .carousel-zoom-hint {
    opacity: 1;
}

/* Auction meta row wrap */
.auction-meta-row {
    flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 991.98px) {
    .hero {
        padding: 3rem 0 4rem;
    }
    .hero-title {
        font-size: 2rem;
    }
    .hero-lead {
        font-size: 1rem;
    }
    .page-header {
        padding: 2rem 0;
    }
}

@media (max-width: 767.98px) {
    .hero-title {
        font-size: 1.65rem;
    }
    .section {
        padding: 2.5rem 0;
    }
    .hero-actions .btn-lg {
        padding: 0.6rem 1.2rem;
        font-size: 1rem;
    }
    .page-header {
        padding: 1.5rem 0;
    }
    .page-header h1 {
        font-size: 1.5rem;
    }
    .feature-card {
        padding: 1.25rem;
    }
}
/* Solar Costing UI */
.solar-page-header {
    background: linear-gradient(135deg, var(--kts-navy), #164026);
    color: #fff;
    padding: 2.5rem 0;
    margin-bottom: 2rem;
}

.solar-page-header h1 {
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.solar-page-header p {
    color: rgba(255,255,255,0.8);
    margin-bottom: 0;
    max-width: 640px;
}

.solar-template-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.25s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.solar-template-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0,0,0,0.1);
    border-color: #dee2e6;
    color: inherit;
}

.solar-template-card .card-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--kts-green), var(--kts-green-dark));
    color: #fff;
    font-size: 1.4rem;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
}

.solar-template-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--kts-dark);
}

.solar-template-card p {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    flex: 1;
}

.solar-template-meta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-size: 0.8rem;
    color: #868e96;
}

.solar-component-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
    position: relative;
}

.solar-component-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.solar-component-number {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--kts-green), var(--kts-green-dark));
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 50%;
    flex-shrink: 0;
}

.solar-component-name {
    font-weight: 700;
    color: var(--kts-dark);
    flex: 1;
    margin: 0;
}

.solar-operation-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.35rem 0.7rem;
    border-radius: 2rem;
    flex-shrink: 0;
}

.solar-operation-badge.add {
    background: #d1e7dd;
    color: #0f5132;
}

.solar-operation-badge.subtract {
    background: #f8d7da;
    color: #842029;
}

.solar-component-form .row {
    align-items: end;
}

.solar-step-connector {
    width: 2px;
    height: 1.25rem;
    background: #e9ecef;
    margin: -0.5rem 0 -0.25rem 31px;
}

.solar-empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    background: #fff;
    border: 2px dashed #dee2e6;
    border-radius: 1rem;
}

.solar-empty-state-icon {
    width: 72px;
    height: 72px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--kts-gray);
    color: #adb5bd;
    font-size: 2rem;
    border-radius: 50%;
    margin-bottom: 1rem;
}

.solar-metric-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.2s ease;
    height: 100%;
}

.solar-metric-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.solar-metric-card.profit {
    border-top: 4px solid var(--kts-green);
}

.solar-metric-card.loss {
    border-top: 4px solid #dc3545;
}

.solar-metric-card.neutral {
    border-top: 4px solid #6c757d;
}

.solar-metric-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #868e96;
    margin-bottom: 0.5rem;
}

.solar-metric-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--kts-dark);
    line-height: 1.2;
}

.solar-metric-value.profit {
    color: var(--kts-green-dark);
}

.solar-metric-value.loss {
    color: #dc3545;
}

.solar-breakdown-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 1rem;
    overflow: hidden;
}

.solar-breakdown-header {
    background: var(--kts-gray);
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e9ecef;
    font-weight: 700;
    color: var(--kts-dark);
}

.solar-breakdown-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e9ecef;
}

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

.solar-breakdown-step {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e9ecef;
    color: #495057;
    font-weight: 700;
    font-size: 0.8rem;
    border-radius: 50%;
    flex-shrink: 0;
}

.solar-breakdown-detail {
    flex: 1;
}

.solar-breakdown-name {
    font-weight: 600;
    color: var(--kts-dark);
    margin-bottom: 0.15rem;
}

.solar-breakdown-math {
    font-size: 0.85rem;
    color: #6c757d;
}

.solar-breakdown-result {
    font-weight: 800;
    color: var(--kts-dark);
    font-size: 1.1rem;
}

.solar-calc-row {
    transition: all 0.2s ease;
}

.solar-calc-row:hover {
    background: #f8f9fa;
}

.solar-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.4rem;
}

.solar-status-dot.profit {
    background: var(--kts-green);
}

.solar-status-dot.loss {
    background: #dc3545;
}

.solar-section-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--kts-dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.solar-section-icon {
    color: var(--kts-green);
    font-size: 1.1rem;
}

/* Inventory list improvements */
.inventory-stats .card {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.inventory-stats .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.08) !important;
}

.inventory-card .card-title {
    line-height: 1.3;
}

.inventory-card img {
    border: 1px solid rgba(0, 0, 0, 0.05);
}

@media (max-width: 767.98px) {
    .inventory-card .btn {
        min-height: 38px;
    }
}

.table-inventory td {
    vertical-align: middle;
}

.table-inventory code {
    color: #0d6efd;
    background: rgba(13, 110, 253, 0.06);
    padding: 0.15rem 0.35rem;
    border-radius: 0.25rem;
}

/* ==========================================================================
   Staff / Admin Tools UI
   ========================================================================== */

/* Staff page wrapper and header
   Used by all staff-only pages to give them a consistent, polished look. */
.staff-page {
    padding-bottom: 2.5rem;
}

.staff-page-header {
    background: linear-gradient(135deg, var(--kts-navy), #164026);
    color: #fff;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.staff-page-header h1 {
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.staff-page-header p {
    color: rgba(255,255,255,0.8);
    margin-bottom: 0;
    max-width: 640px;
}

.staff-page-header .btn-kts-outline,
.staff-page-header .btn-kts-primary,
.staff-page-header .btn-kts-accent {
    border-width: 2px;
}

/* Staff cards */
.staff-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 1rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    transition: box-shadow 0.2s ease;
}

.staff-card:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.08);
}

.staff-card .card-header {
    background: transparent;
    border-bottom: 1px solid #e9ecef;
    padding: 1.25rem;
}

.staff-card .card-title {
    font-weight: 700;
    color: var(--kts-dark);
    margin-bottom: 0;
}

/* Staff metric cards */
.staff-metric-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 1rem;
    padding: 1.25rem;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.staff-metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.staff-metric-icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.staff-metric-label {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 0.15rem;
}

.staff-metric-value {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--kts-dark);
    line-height: 1.2;
}

/* Staff forms */
.staff-form-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 1rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.staff-form-card .card-header {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    border-radius: 1rem 1rem 0 0;
    padding: 1.25rem;
}

.staff-form-card .card-body {
    padding: 1.5rem;
}

.staff-form-section {
    margin-bottom: 2rem;
}

.staff-form-section:last-child {
    margin-bottom: 0;
}

.staff-form-section-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--kts-dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.staff-form-section-title i {
    color: var(--kts-green);
}

/* Staff tables */
.staff-table {
    margin-bottom: 0;
}

.staff-table thead th {
    background: #f8f9fa;
    color: #495057;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.staff-table tbody td {
    vertical-align: middle;
}

/* Empty states */
.staff-empty-state {
    text-align: center;
    padding: 3.5rem 1.5rem;
    background: #fff;
    border: 2px dashed #dee2e6;
    border-radius: 1rem;
}

.staff-empty-state-icon {
    width: 72px;
    height: 72px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--kts-gray);
    color: #adb5bd;
    font-size: 2rem;
    border-radius: 50%;
    margin-bottom: 1rem;
}

/* Delete confirmation card */
.staff-delete-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 1rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    text-align: center;
    padding: 2.5rem;
}

.staff-delete-card .staff-delete-icon {
    width: 80px;
    height: 80px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    font-size: 2.25rem;
    border-radius: 50%;
    margin-bottom: 1.25rem;
}

/* Verification form (replaces form.as_p) */
.staff-verification-form .row {
    align-items: end;
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
    .staff-page-header {
        padding: 1.5rem 0;
    }
    .staff-page-header h1 {
        font-size: 1.5rem;
    }
    .staff-metric-card {
        padding: 1rem;
    }
    .staff-metric-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    .staff-metric-value {
        font-size: 1.15rem;
    }
}
