/* Custom CSS for BOTGI PVT.LTD */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Define Color Palette with CSS Variables */
:root {
    --primary-dark: #28282B;
    --accent-orange: #FFB600;
    --light-gray: #F4F4F4;
    --white: #FFFFFF;
    --shadow-color: rgba(0, 0, 0, 0.08);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--light-gray);
    color: var(--primary-dark);
}

/* Reusable Card & Table Styles */
.card-box {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 12px var(--shadow-color);
    margin-bottom: 2rem;
}

.table-responsive {
    overflow-x: auto;
}

.table {
    border-radius: 10px;
    overflow: hidden;
}

.table thead th {
    background-color: var(--primary-dark);
    color: var(--white);
    font-weight: 600;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: var(--light-gray);
}

.table-hover tbody tr:hover {
    background-color: rgba(255, 182, 0, 0.1);
}

/* Button & Badge Styles */
.btn-primary {
    background-color: var(--accent-orange);
    border-color: var(--accent-orange);
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #e6a400;
    border-color: #e6a400;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}
.btn-secondary:hover {
    background-color: #1a1a1a;
    border-color: #1a1a1a;
}

.badge-status {
    padding: 0.5em 0.8em;
    border-radius: 12px;
    font-weight: 600;
}

.badge-pending {
    background-color: #FFECB3;
    color: var(--primary-dark);
}

.badge-info {
    background-color: #80A0B3;
    color: var(--white);
}

.badge-success {
    background-color: #28a745;
    color: var(--white);
}

.form-control, .form-select {
    border-radius: 8px;
    border-color: #ced4da;
}

.form-control:focus, .form-select:focus {
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 0.25rem rgba(255, 182, 0, 0.25) !important;
}

/* Custom Sale Type Blue Button */
.btn-sale-blue {
    background-color: #007bff; /* A standard blue */
    border-color: #007bff;
    color: white;
    font-weight: 600;
    border-radius: 5px;
}
.btn-sale-blue:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

/* Refined Layout Rules */
.form-section {
    border-right: 1px solid #e9ecef;
    padding-right: 2rem;
}
.main-content {
    padding-left: 2rem;
}
@media (max-width: 768px) {
    .form-section {
        border-right: none;
        padding-right: 0;
        margin-bottom: 2rem;
    }
}

/* ------------------- New Additions for Dashboard Enhancements ------------------- */

/* Floating Labels for Forms */
.form-floating > label {
    color: var(--primary-dark);
    opacity: 0.8;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    opacity: 1;
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
}

/* Section Titles */
.section-title {
    font-weight: 600;
    color: var(--primary-dark);
    border-left: 4px solid var(--accent-orange);
    padding-left: 0.5rem;
}

/* Sticky Table Headers */
.sticky-header table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background-color: var(--primary-dark);
    color: var(--white);
}

/* Accordion Header Styles */
.accordion-button {
    font-weight: 600;
}

.accordion-button .badge {
    font-size: 0.8rem;
    padding: 0.35em 0.6em;
}

/* Gap helper for inline form elements on small screens */
.gap-2 {
    gap: 0.5rem;
}

/* ------------------- Navbar Link Enhancements ------------------- */
.navbar-light .navbar-nav .nav-link {
    position: relative;
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-light .navbar-nav .nav-link:hover {
    color: var(--accent-orange);
}

.navbar-light .navbar-nav .nav-link.active {
    color: var(--accent-orange);
}

/* Underline Animation */
.navbar-light .navbar-nav .nav-link::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0%;
    height: 2px;
    background-color: var(--accent-orange);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-light .navbar-nav .nav-link:hover::after,
.navbar-light .navbar-nav .nav-link.active::after {
    width: 60%;
}

/* ------------------- Right-Aligned Expanding Search Bar ------------------- */
.search-expand-container {
    position: relative;
    display: flex;
    align-items: center;
    background-color: var(--white);
    border-radius: 50px;
    box-shadow: 0 2px 8px var(--shadow-color);
    overflow: hidden;
    transition: all 0.4s ease;
    width: 45px; /* collapsed */
}

.search-expand-container:hover,
.search-expand-container:focus-within {
    width: 280px; /* expanded */
    box-shadow: 0 0 0 0.25rem rgba(255, 182, 0, 0.3);
}

.search-expand-input {
    border: none;
    outline: none;
    background: transparent;
    flex: 1;
    padding: 0.5rem 0.5rem 0.5rem 1rem;
    font-size: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.search-expand-container:hover .search-expand-input,
.search-expand-container:focus-within .search-expand-input {
    opacity: 1;
}

.search-expand-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    background: none;
    border: none;
    color: var(--primary-dark);
    font-size: 1.1rem;
    padding: 0.5rem;
    cursor: pointer;
}

.search-expand-btn:hover {
    color: var(--accent-orange);
}

.clear-search {
    color: #888;
    margin-right: 0.5rem;
    font-size: 1rem;
    transition: color 0.2s ease;
}

.clear-search:hover {
    color: var(--accent-orange);
}

@media (max-width: 768px) {
    .search-expand-container {
        width: 100% !important;
    }
    .search-expand-input {
        opacity: 1;
    }
}

/* Technician dashboard: consistent status badges (override accidental rules) */
.status-badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 12px;
  color: #ffffff !important;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

/* color variants */
.status-badge--completed { background:#28a745 !important; }    /* green */
.status-badge--closed    { background:#6c757d !important; }    /* grey */
.status-badge--ready     { background:#ffc107 !important; color:#222 !important; } /* amber with dark text */
.status-badge--repairing { background:#17a2b8 !important; }    /* teal */
.status-badge--pending   { background:#FFECB3 !important; color:#222 !important; } /* light amber with dark text */
.status-badge--default   { background:#007bff !important; }    /* blue */
