html {
    font-size: 14px;
}

:root {
    --primary-color: #0066cc;
    /* Blue */
    --primary-hover: #0052a3;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 30%, #a18cd1 70%, #fbc2eb 100%);
    /* Fallback / Cleaner gradient based on image: Blue/Cyan to Purple/Pink */
    background: linear-gradient(135deg, #56CCF2 0%, #2F80ED 50%, #c471ed 100%);
    /* Actually, user image is more Cyan -> Magenta */
    background: linear-gradient(120deg, #89f7fe 0%, #66a6ff 40%, #c471ed 70%, #f64f59 100%);
    /* Let's try to match the image accurately: Blue-ish top left, Pink/Purple bottom right */
    background: linear-gradient(to bottom right, #5AC8FA, #5856D6, #FF2D55);
}

.container {
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.login-card {
    background: #fff;
    width: 100%;
    max-width: 400px;
    padding: 50px 40px;
    border-radius: 10px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.logo {
    max-width: 250px;
    margin-bottom: 20px;
}

h2 {
    font-weight: 700;
    color: #333;
    font-size: 2rem;
    margin-bottom: 40px;
}

.input-group {
    margin-bottom: 25px;
    text-align: left;
}

/* Compact layout for Sign Up form */
.signup-card .input-group {
    margin-bottom: 12px;
}

.input-group label {
    display: block;
    color: #666;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.signup-card .input-group label {
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.input-wrapper {
    position: relative;
    border-bottom: 2px solid #e0e0e0;
    transition: 0.3s;
}

.input-wrapper:focus-within {
    border-bottom-color: var(--primary-color);
}

.input-wrapper i {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    font-size: 1.1rem;
}

.signup-card .input-wrapper i {
    font-size: 1rem;
}

.input-wrapper input {
    width: 100%;
    border: none;
    outline: none;
    padding: 10px 10px 10px 30px;
    font-size: 0.95rem;
    color: #333;
}

.signup-card .input-wrapper input {
    padding: 5px 10px 5px 30px;
    font-size: 0.9rem;
}

.input-wrapper input::placeholder {
    color: #ccc;
    font-weight: 400;
}

.forgot-pass {
    text-align: right;
    margin-bottom: 30px;
}

.forgot-pass a {
    color: #999;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
}

.forgot-pass a:hover {
    color: #666;
}

button {
    width: 100%;
    height: 50px;
    border: none;
    border-radius: 25px;
    background: var(--primary-color);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 4px 10px rgba(0, 102, 204, 0.3);
    position: relative;
    overflow: hidden;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 102, 204, 0.4);
}

.spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s linear infinite;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* --- Dashboard Styles --- */

.dashboard-body {
    background: #f8f9fa;
    /* Clean light gray */
    display: block;
    /* Override flex from login body */
    overflow: auto;
    min-height: 100vh;
}

.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: #fff;
    border-right: 1px solid #e0e0e0;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    position: fixed;
    /* Fix sidebar on left */
    top: 70px;
    /* Below Topbar */
    bottom: 0;
    left: 0;
    z-index: 900;
}

.sidebar-logo {
    display: none;
    /* Hide logo in sidebar as it's now in topbar */
    /* padding: 0 20px 30px; */
    /* display: flex; */
    /* align-items: center; */
    /* justify-content: center; */
}

.sidebar-footer {
    margin-top: auto;
    padding: 15px;
    font-size: 0.7rem;
    color: #888;
    text-align: center;
    border-top: none;
    opacity: 0.9;
}

.sidebar-lang {
    display: none;
    /* Hidden by default on desktop */
}

.sidebar-footer p {
    margin: 1px 0;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 0;
    display: flex;
    flex-direction: column;
    margin-left: 250px;
    /* Offset for fixed sidebar */
    margin-top: 70px;
    /* Offset for fixed topbar */
}

/* Scrollable Nav Links */
.nav-links {
    flex: 1;
    overflow-y: auto;
    width: 100%;
    margin: 0;
    padding: 0;
}

.nav-links li a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 20px;
    color: #555;
    text-decoration: none;
    font-size: 1rem;
    transition: 0.2s;
}

.nav-links li a i {
    width: 25px;
    text-align: center;
    flex-shrink: 0;
}

.nav-links li.active a,
.nav-links li a:hover {
    background: #e6f0ff;
    color: var(--primary-color);
    border-right: 3px solid var(--primary-color);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.page-content {
    padding: 30px;
    flex: 1;
    overflow-y: auto;
}

.dashboard-header-title {
    margin-bottom: 20px;
}

.dashboard-header-title h1 {
    font-size: 1.5rem;
    color: #333;
    font-weight: 500;
}

.header-actions-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.actions-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.actions-right {
    display: flex;
    gap: 15px;
}

.search-bar {
    background: #fff;
    border: 1px solid #333;
    /* Darker border as in image */
    border-radius: 6px;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #333;
    width: 300px;
    /* Wider */
}

.search-bar input {
    border: none;
    outline: none;
    font-size: 0.95rem;
    color: #333;
    width: 100%;
}

.search-bar i {
    color: #333;
}



.btn-filter,
.btn-outline,
.btn-primary {
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 0.9rem;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    width: auto;
    /* Override global 100% */
    height: auto;
    /* Override global height */
    box-shadow: none;
    /* Flatten if needed */
}

.btn-filter {
    background: transparent;
    border: none;
    color: var(--primary-color);
}

.btn-outline {
    background: #fff;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-primary {
    background: var(--primary-hover);
    border: none;
    color: #fff;
}

.btn-sm {
    height: 36px;
    padding: 0 15px;
    font-size: 0.85rem;
    border-radius: 18px;
}

/* Table */
.table-container {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    overflow-x: auto;
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.orders-table th,
.orders-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.orders-table th {
    background: #f9f9f9;
    color: #555;
    font-weight: 500;
}

.orders-table td {
    color: #333;
}

/* Zebra Striping */
.orders-table tbody tr:nth-child(even) {
    background-color: #f7f7f7;
}

.orders-table tbody tr:hover {
    background-color: #f0f7ff;
}

.order-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.status-badge {
    text-transform: capitalize;
    font-weight: 500;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent !important;
    padding: 0 !important;
    color: #333 !important;
}

.status-badge::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--dot-color, #bdbdbd);
}

/* Priority Badges */
.priority-badge {
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.priority-badge.neutral {
    background: transparent;
    color: #64748b;
    border: none;
}

.priority-badge.low {
    background: transparent;
    color: #16a34a;
    border: none;
}

.priority-badge.high {
    background: transparent;
    color: #ea580c;
    border: none;
}

.priority-badge.urgent {
    background: transparent;
    color: #dc2626;
    border: none;
}

.text-red {
    color: #d32f2f !important;
    font-weight: 600 !important;
}

.text-gray {
    color: #757575 !important;
}

.text-orange {
    color: #ea580c !important;
    font-weight: 600 !important;
}

.tag {
    background: #f1f5f9;
    color: #475569;
    padding: 2px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    margin-right: 5px;
    font-weight: 500;
    display: inline-block;
    margin-bottom: 3px;
}

.tag-laminate {
    background: #e0f2fe;
    color: #0369a1;
}

.tag-cutting {
    background: #dcfce7;
    color: #166534;
}

.tag-eyelets {
    background: #ffedd5;
    color: #c2410c;
}

.tag-hemming {
    background: #f3e8ff;
    color: #7e22ce;
}

.tag-urgent {
    background: #fee2e2;
    color: #b91c1c;
}

.tag-drilling {
    background: #ccfbf1;
    /* Teal */
    color: #0f766e;
}

.tag-gluing {
    background: #fce7f3;
    /* Pink */
    color: #be185d;
}

.tag-packing {
    background: #fff1f2;
    /* Rose/Red-ish */
    color: #9f1239;
}

.tag-transfer {
    background: #fef3c7;
    /* Yellow/Amber */
    color: #b45309;
}

/* Advanced Finishing Styles */
.finishing-row-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.finishing-container {
    margin-top: 5px;
    display: flex;
    flex-direction: column;
}

.finishing-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    font-size: 0.85rem;
    color: #333;
}

.drag-handle {
    cursor: grab;
    color: #ccc;
    font-size: 0.8rem;
}

.finishing-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.btn-add-finishing {
    background: transparent;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    transition: color 0.2s;
}

.btn-add-finishing:hover {
    color: #666;
}

/* Finishing Dropdown Card */
.finishing-dropdown-card {
    position: absolute;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    width: 250px;
    z-index: 1000;
    display: none;
    padding: 12px;
}

.finishing-dropdown-card.active {
    display: block;
}

.finishing-search {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #eee;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-bottom: 12px;
    outline: none;
}

.finishing-search:focus {
    border-color: var(--primary-color);
}

.finishing-section-title {
    font-size: 0.7rem;
    color: #94a3b8;
    margin: 10px 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.finishing-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.finishing-dropdown-tag {
    background: #f1f5f9;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: #475569;
    border: 1px solid transparent;
}

.finishing-dropdown-tag:hover {
    background: #e2e8f0;
}

.finishing-dropdown-tag i {
    font-size: 0.7rem;
    color: #94a3b8;
}

.finishing-dropdown-list {
    max-height: 200px;
    overflow-y: auto;
    margin: 0 -12px;
    padding: 0 12px;
}

.finishing-dropdown-item {
    padding: 8px 10px;
    font-size: 0.85rem;
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    border-radius: 6px;
    margin-bottom: 2px;
}

.finishing-dropdown-item:hover {
    background: #f1f5f9;
}

.finishing-dropdown-item i {
    color: #cbd5e1;
    font-size: 0.8rem;
}

.btn-add-new-option {
    margin-top: 12px;
    color: var(--primary-color);
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
}

.btn-add-new-option:hover {
    color: var(--primary-hover);
}

.tag-cutting {
    background: #ffedd5;
    color: #c2410c;
}

.tag-eyelets {
    background: #dcfce7;
    color: #15803d;
}

.tag-hemming {
    background: #f3e8ff;
    color: #7e22ce;
}

.tag-urgent {
    background: #fee2e2;
    color: #b91c1c;
}

.tag.dark {
    background: #333;
    color: #fff;
}

/* Filter Dropdown */
.actions-left {
    position: relative;
}

.advanced-filter-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 20px;
    width: 280px;
    display: none;
    flex-direction: column;
    gap: 15px;
}

.advanced-filter-dropdown.active {
    display: flex;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #334155;
    background-color: #f8fafc;
    cursor: pointer;
    transition: border-color 0.2s;
}

.filter-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.filter-footer {
    margin-top: 5px;
    padding-top: 15px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: flex-end;
}

.btn-clear-filters {
    font-size: 0.75rem;
    color: #ef4444;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    padding: 5px;
}

.btn-clear-filters:hover {
    text-decoration: underline;
}

/* --- Side Panel Styles --- */

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    /* Slightly darker for better focus */
    z-index: 990;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}

/* Stage Modal Styles (Updated for Color Grid) */
.stage-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    width: 400px;
    max-width: 90%;
    z-index: 2000;
    display: none;
    /* Hidden by default */
}

.stage-modal.active {
    display: block;
    animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.stage-modal h2 {
    margin: 0 0 20px 0;
    font-size: 1.1rem;
    color: #333;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-close-modal {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #999;
    cursor: pointer;
    padding: 0;
}

.btn-close-modal:hover {
    color: #333;
}

/* Color Grid */
.color-grid {
    display: grid;
    grid-template-columns: repeat(8, max-content);
    gap: 12px;
    row-gap: 15px;
    margin-top: 15px;
    padding: 0;
    justify-content: center;
}

.color-choice {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #e2e8f0;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.color-choice:hover {
    transform: scale(1.15);
    box-shadow: 0 0 0 1px #cbd5e1;
}

.color-choice.selected {
    box-shadow: 0 0 0 2px #333;
    transform: scale(1.1);
}

/* Clean Input for Modal */
.input-clean {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #333;
    outline: none;
    background: #f8fafc;
    transition: border-color 0.2s;
}

.input-clean:focus {
    border-color: #3b82f6;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Modal Footer */
.stage-modal-footer {
    margin-top: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-delete-stage {
    background: transparent;
    border: none;
    color: #ef4444;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
}

.btn-delete-stage:hover {
    color: #dc2626;
}

.btn-save-stage {
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 30px;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    height: auto;
    /* Reset from global button height */
    box-shadow: none;
}

.btn-save-stage:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}



.overlay.active {
    opacity: 1;
    visibility: visible;
}

.order-panel {
    position: fixed;
    top: 70px;
    right: -920px;
    /* Hide initially */
    width: 920px;
    /* Wider panel */
    height: calc(100vh - 70px);
    background: #fff;
    z-index: 995;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.05);
    /* Softer shadow */
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    font-family: 'Poppins', sans-serif;
}

.order-panel.active,
.filter-panel.active {
    right: 0;
}

.filter-panel {
    position: fixed;
    top: 70px;
    right: -450px;
    width: 450px;
    height: calc(100vh - 70px);
    background: #fff;
    z-index: 996;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.05);
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    font-family: 'Poppins', sans-serif;
}

.filter-panel-header {
    padding: 20px 30px;
    border-bottom: 1px solid #f8fafc;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-panel-header h2 {
    font-size: 1.1rem;
    font-weight: 500;
    color: #1e293b;
    margin: 0;
}

#closeFilterBtn {
    font-size: 1.2rem;
    color: #64748b;
    cursor: pointer;
    transition: color 0.2s;
}

#closeFilterBtn:hover {
    color: #1e293b;
}

.filter-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 30px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.filter-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.filter-section-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
}

.filter-section-title i {
    font-size: 0.9rem;
    color: #94a3b8;
}

.date-input-group {
    display: flex;
    gap: 10px;
}

.date-input-group input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #334155;
    outline: none;
    cursor: pointer;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-chip {
    padding: 6px 16px;
    background: var(--chip-bg, #fff);
    border: 1px solid var(--chip-border, #e2e8f0);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--chip-text, #475569);
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    font-weight: 500;
}

.filter-chip:hover {
    filter: brightness(0.95);
}

.filter-chip.active {
    background: var(--active-bg, #1e293b);
    color: var(--active-text, #fff);
    border-color: var(--active-bg, #1e293b);
}

.tags-filter-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.tag-filter-item {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.tag-filter-item input {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.tag-filter-label {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.filter-panel-footer {
    padding: 20px 30px;
    border-top: 1px solid #f8fafc;
    display: flex;
    justify-content: flex-end;
}

.btn-clear-all {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-clear-all:hover {
    color: #64748b;
    text-decoration: underline;
}

.panel-header {
    padding: 15px 40px;
    /* More padding */
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    padding: 4px 0;
    font-weight: 500;
    color: #333;
    position: relative;
}

.panel-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.9rem;
    color: #666;
}

.order-id {
    font-weight: 600;
    color: #333;
    border: 1px solid #e0e0e0;
    padding: 2px 8px;
    border-radius: 4px;
    /* Square corners */
}

.order-date {
    color: #999;
    font-size: 0.85rem;
}

.panel-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.panel-controls i {
    cursor: pointer;
    line-height: 1;
}

#deleteOrderBtn {
    color: #ff0000 !important;
}

.panel-body {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.panel-column {
    padding: 40px;
    overflow-y: auto;
}

.left-col {
    flex: 1.1;
    border-right: 1px solid #f0f0f0;
}

.right-col {
    flex: 1;
    background: #fff;
    /* White background as per image */
}

/* Forms in Panel */
.input-description {
    width: 100%;
    font-size: 1.5rem;
    /* Larger font */
    border: none;
    border-bottom: 1px solid transparent;
    padding: 10px 0;
    margin-bottom: 40px;
    outline: none;
    color: #333;
    font-weight: 400;
    font-family: inherit;
}

.input-description:hover,
.input-description:focus {
    border-bottom-color: #eee;
}

.input-description::placeholder {
    color: #666;
}

.form-grid {
    display: grid;
    grid-template-columns: 100px 1fr;
    /* Label width fixed */
    row-gap: 25px;
    margin-bottom: 40px;
    align-items: center;
}

.form-group {
    display: contents;
    /* Flatten grid items */
}

.form-group label {
    font-size: 0.95rem;
    color: #555;
    font-weight: 400;
}

.form-group .value {
    font-weight: 400;
    color: #333;
    font-size: 0.95rem;
}

.text-orange {
    color: #ff9800;
}


/* Tabs */
.tabs,
.bottom-tabs {
    display: flex;
    gap: 30px;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 30px;
    padding-bottom: 0;
}

/* Order Specific Tabs (Clean Underline) */
/* Order specific filters (Renamed to break cache/conflicts) */
.order-filter-container {
    display: flex;
    gap: 5px;
    border-bottom: 1px solid #eaecf0;
    margin-bottom: 25px;
    background: transparent;
    border-radius: 0;
    padding: 0;
}

.order-filter-btn {
    width: auto;
    /* Override global button width */
    background: transparent;
    border: none;
    padding: 12px 0;
    /* Minimal padding */
    font-size: 0.9rem;
    color: #667085;
    font-weight: 600;
    cursor: pointer;
    border-radius: 0;
    border-bottom: 2px solid #eaecf0;
    transition: all 0.2s ease;
    box-shadow: none !important;
    outline: none !important;
    white-space: nowrap;
    /* Prevent wrapping */
    flex-shrink: 0;
    /* Prevent shrinking */
}

.order-filter-btn:hover {
    color: #1d2939;
    background: transparent;
    border-bottom-color: #d0d5dd;
}

.order-filter-btn.active {
    background: transparent !important;
    color: var(--primary-color) !important;
    border-bottom: 2px solid var(--primary-color) !important;
    box-shadow: none !important;
}

.order-filter-btn:focus,
.order-filter-btn:active {
    box-shadow: none !important;
    outline: none !important;
    background: transparent;
}

.tab-btn {
    background: none;
    border: none;
    padding: 10px 0;
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    bottom: -2px;
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 6px !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}


.tab-btn.active {
    color: var(--primary-color);
    font-weight: 600;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px 3px 0 0;
}

.badge {
    background: #f0f0f0;
    color: #333;
    padding: 0 6px;
    border-radius: 4px;
    /* Square-ish as per other UI elements */
    font-size: 0.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    line-height: 1;
    font-weight: 600;
}

.product-card-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    /* Gap between product cards */
    margin-bottom: 20px;
}

.product-card {
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    gap: 15px;
    align-items: center;
    cursor: pointer;
    background: #fff;
    min-height: 100px;
    position: relative;
    transition: all 0.2s ease;
}

.product-card:hover {
    border-color: #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.product-card.active {
    border-color: #333;
    border-width: 1px;
    background: #fafafa;
}

.product-info-row {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #334155;
    /* Darker slate for better contrast */
    font-size: 0.8rem;
    font-weight: 400;
    /* Medium weight instead of ultra-light */
}

.product-info-row i {
    width: 14px;
    text-align: center;
    color: #64748b;
    /* Darker icon color */
    font-size: 0.75rem;
}

.product-status-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 400;
}

.product-img-placeholder {
    width: 80px;
    height: 80px;
    background: #eee;
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    color: #ccc;
}

.product-status-badge {
    background: #bbb;
    color: #fff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.product-status-badge.status-silver {
    background: #94a3b8;
}

.product-status-badge.status-blue {
    background: #3182ce;
}

.product-status-badge.status-orange {
    background: #ed8936;
}

.product-status-badge.status-green {
    background: #48bb78;
}

.product-status-badge.status-red {
    background: #e53e3e;
}

.btn-add-product {
    color: #aaa;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.btn-add-product:hover {
    color: #666;
}

/* Right Col details */
.details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    color: #333;
}

.details-header h3 {
    font-size: 1.1rem;
    font-weight: 500;
}

.btn-select-product {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #0056b3;
    /* Blue outline */
    background: #fff;
    color: #333;
    border-radius: 12px;
    /* Rounded but not bubble */
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 40px;
    cursor: text;
    text-align: left;
    outline: none;
}

.btn-select-product:focus {
    border-color: var(--primary-hover);
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.1);
}

.details-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    /* Reduced padding */
    border-bottom: 1px solid #f0f0f0;
}

.detail-row.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    align-items: flex-end;
}

.detail-row.split .field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-row label {
    font-size: 0.75rem;
    /* Smaller label for grouped view */
    color: #888;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-right: 10px;
}

.detail-row:not(.split) label {
    flex: 1;
}

.input-clean {
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.9rem;
    color: #333;
    width: 100%;
    text-align: left;
    outline: none;
    cursor: text;
}

select.input-clean {
    cursor: pointer;
    background-color: #fcfcfc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 6px 30px 6px 10px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%234a5568'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 14px;
    width: auto;
    min-width: 150px;
    text-align: left;
    /* Changed to left for better readability in dropdowns */
    transition: all 0.2s ease;
}

select.input-clean:hover {
    border-color: #cbd5e0;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

select.input-clean:focus {
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.15);
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #ccc;
    text-align: center;
}

.empty-state i {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.empty-state p {
    font-size: 0.9rem;
}

.btn-select-product:hover {
    background-color: #f8fbff;
}

.stage-pill {
    background: #ccc;
    padding: 2px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    color: #fff;
    width: fit-content;
}

.placeholder-line {
    width: 40px;
    height: 1px;
    background: #aaa;
}

/* File Previews & Modal */
.file-thumbnail {
    width: 40px;
    height: 40px;
    background: #f1f5f9;
    border-radius: 4px;
    object-fit: cover;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    color: #64748b;
    cursor: pointer;
    border: 1px solid #e2e8f0;
}

.product-card-preview {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.preview-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.preview-modal.active {
    display: flex;
}

.preview-modal img {
    max-width: 90%;
    max-height: 90%;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    border-radius: 8px;
}

.preview-close {
    position: absolute;
    top: 30px;
    right: 30px;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
}

.empty-state i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #ddd;
}

/* Restored Social/Login Styles */
.social-login p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

#comment_list_container::-webkit-scrollbar {
    width: 4px;
}

#comment_list_container::-webkit-scrollbar-track {
    background: #f1f1f1;
}

#comment_list_container::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 10px;
}

#comment_list_container::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}

.tab-btn.active[data-tab="product-comments"] {
    border-bottom-color: var(--primary-color);
    color: var(--primary-color);
}

.facebook {
    background: #3b5998;
}

.twitter {
    background: #1da1f2;
}

.google {
    background: #db4437;
}

.social-icons a:hover {
    transform: scale(1.1);
}

.signup-footer {
    margin-top: 40px;
}

.signup-footer p {
    color: #666;
    font-size: 0.8rem;
    margin-bottom: 5px;
}

.signup-link {
    color: #333;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.9rem;
}

.signup-link:hover {
    text-decoration: underline;
}

/* Ensure buttons in panel are flat/outlined/clean not bubbly */
.order-panel button,
.order-panel .btn-primary,
.order-panel .btn-add-product {
    box-shadow: none;
    transform: none;
}

.order-panel button:hover {
    box-shadow: none;
    transform: none;
}

/* --- Kanban Board Styles --- */

.kanban-container {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    height: calc(100vh - 180px);
    /* Adjust based on header height */
    padding-bottom: 20px;
}

.kanban-column {
    min-width: 280px;
    width: 280px;
    background: #f8f9fa;
    /* Default gray bg */
    border-radius: 8px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    height: fit-content;
    max-height: 100%;
}

.kanban-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    margin-bottom: 5px;
}

.column-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 5px;
}

.column-count {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #555;
    margin-left: auto;
    margin-right: 10px;
}

.kanban-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    padding: 0;
    /* Padding inside body */
    cursor: pointer;
    transition: 0.2s;
    overflow: hidden;
}

.kanban-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.card-img-top,
.card-img-preview {
    width: 100%;
    height: 120px;
    background: #eee;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #ccc;
    font-size: 2rem;
}

.card-img-preview {
    height: 80px;
}

.card-body {
    padding: 15px;
}

.card-body h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.card-client {
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.card-pill {
    font-size: 0.75rem;
    border: 1px solid #ddd;
    padding: 2px 8px;
    border-radius: 4px;
    color: #666;
    float: right;
}

.card-meta {
    margin-bottom: 10px;
    font-size: 0.8rem;
    color: #888;
}

.tag-date {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    color: #fff;
    margin-right: 5px;
}

.tag-date.red {
    background: #ef5350;
}

/* Background Colors for Columns */
.bg-blue-light {
    background: #e3f2fd;
}

.bg-gray-light {
    background: #f5f5f5;
}

.bg-blue-mid {
    background: #bbdefb;
}

.bg-yellow-light {
    background: #fff9c4;
}

.bg-pink-light {
    background: #f8bbd0;
}

/* Client Form Styling */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-section {
    grid-column: 1 / -1;
    margin-top: 15px;
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.form-section h4 {
    color: var(--primary-color);
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
}

.full-width {
    grid-column: 1 / -1;
}

.detail-row label {
    display: block;
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 5px;
}

.input-clean {
    width: 100%;
    border: none;
    border-bottom: 1px solid #ddd;
    padding: 8px 0;
    font-size: 0.95rem;
    color: #333;
    transition: all 0.3s ease;
    background: transparent;
}

.input-clean:focus {
    outline: none;
    border-bottom-color: var(--primary-color);
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 25px;
    /* Align with inputs */
}

.checkbox-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
}

.checkbox-row label {
    margin-bottom: 0;
    color: #333;
    font-weight: 500;
}

/* Stage Selector Styles */
.stage-selector-container {
    position: relative;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.stage-pill-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 20px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
    min-width: 140px;
    justify-content: space-between;
}

.stage-pill-trigger:hover {
    border-color: var(--primary-color);
}

.stage-pill-text {
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    color: #fff;
    white-space: nowrap;
}

/* Stage Dropdown Card */
.stage-dropdown-card {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    width: 220px;
    z-index: 1100;
    display: none;
    padding: 15px;
    margin-top: 10px;
    max-height: 510px;
    display: none;
    flex-direction: column;
}

.stage-dropdown-card.active {
    display: flex;
}

.stage-dropdown-list {
    overflow-y: auto;
    flex: 1;
    min-height: 300px;
}

.stage-option-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 6px 5px;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s;
}

.stage-option-item:hover {
    background: #f8fafc;
}

.stage-radio {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stage-option-item.selected .stage-radio {
    border-color: var(--primary-color);
}

.stage-radio-inner {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-color);
    display: none;
}

.stage-option-item.selected .stage-radio-inner {
    display: block;
}

.stage-color-pill {
    padding: 6px 15px;
    border-radius: 15px;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 500;
    flex-grow: 1;
    text-align: center;
}

.stage-edit-icon {
    color: #94a3b8;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 5px;
}

.stage-edit-icon:hover {
    color: #64748b;
}

.btn-add-stage {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-color);
    font-size: 0.85rem;
    padding: 12px 5px 0;
    margin-top: 0;
    border-top: 1px solid #f1f5f9;
    cursor: pointer;
}

.btn-add-stage:hover {
    color: var(--primary-hover);
}

/* Stage Edit Modal - Pixel Perfect Final Refinement */
.order-panel .stage-selector-container {
    width: 100%;
    justify-content: flex-start;
    flex-direction: column;
    align-items: flex-end;
}

.order-panel .stage-dropdown-card {
    width: 240px;
    display: none;
    right: 0;
    left: auto;
    margin-top: 5px;
}

.order-panel .stage-dropdown-card.active {
    display: flex;
}

.stage-color-pill {
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border-radius: 6px;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    flex-grow: 1;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.stage-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    width: 400px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 2001;
    display: none;
    padding: 25px;
}

.stage-modal.active {
    display: block;
}

@media (max-width: 768px) {
    .sidebar-overlay.active {
        display: block;
    }

    .sidebar-lang {
        display: flex !important;
    }
}

.stage-modal h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: #1a1a1a;
    letter-spacing: -0.1px;
}

.btn-close-modal {
    position: absolute;
    top: 12px;
    right: 12px;
    color: #5f6368;
    font-size: 1.1rem;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    cursor: pointer;
    padding: 10px;
    outline: none !important;
    z-index: 10;
}

.stage-modal label {
    font-size: 0.85rem;
    color: #5f6368;
    margin-bottom: 6px;
    display: block;
    font-weight: 400;
}

.stage-name-input {
    width: 100%;
    border: 2px solid #0b57d0;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 1rem;
    color: #1f1f1f;
    outline: none;
    margin-bottom: 20px;
}





.color-label {
    font-size: 0.95rem;
    color: #1f1f1f;
    font-weight: 400;
}

.stage-modal-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    margin-top: 30px;
}

.btn-delete-stage {
    color: #d93025;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    font-weight: 600;
    cursor: pointer;
    outline: none !important;
    padding: 10px;
}

.btn-delete-stage:hover {
    background: none !important;
    box-shadow: none !important;
}

.btn-delete-stage i {
    font-size: 1.5rem;
}

.btn-save-stage {
    background: #0b57d0;
    color: #fff;
    border: none;
    padding: 8px 35px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    cursor: pointer;
}

/* Dropdown Cards (Status, Priority, Finishings) */
.stage-dropdown-card,
.finishing-dropdown-card {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 100;
    margin-top: 5px;
    padding: 10px;
}

.stage-dropdown-card.active,
.finishing-dropdown-card.active {
    display: block !important;
}

/* Ensure inline style override works if needed */
.stage-dropdown-card[style*="display: block"] {
    display: block !important;
}

.stage-dropdown-list,
.finishing-dropdown-list {
    max-height: 200px;
    overflow-y: auto;
}

.stage-option-item,
.finishing-dropdown-item {
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s;
}

.stage-option-item:hover,
.finishing-dropdown-item:hover {
    background: #f8fafc;
}

.stage-option-item.selected {
    background: #f1f5f9;
}

/* Specific inner elements */
.stage-pill-small {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.finishing-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 10px;
}

.finishing-dropdown-tag {
    background: #e2e8f0;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.finishing-search,
.status-search input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
}

.finishing-section-title,
.stage-section-title {
    font-size: 0.75rem;
    color: #999;
    text-transform: uppercase;
    margin: 5px 0 2px 0;
    font-weight: 600;
}

.stage-name-text {
    flex: 1;
    font-size: 0.9rem;
    color: #333;
}

.stage-selector-container {
    position: relative;
    width: 100%;
}

/* Priority Badges */
.priority-badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-flex;
}

.btn-add-new-stage {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-color);
    font-size: 0.85rem;
    padding: 12px 5px 0;
    margin-top: 0;
    border-top: 1px solid #f1f5f9;
    cursor: pointer;
}

.btn-add-new-stage:hover {
    color: var(--primary-hover);
}



.priority-badge.urgent {
    color: #c0392b;
    background-color: #fadbd8;
}

.priority-badge.high {
    color: #e67e22;
    background-color: #fdebd0;
}

.priority-badge.neutral {
    color: #566573;
    background-color: #ebedef;
}

.priority-badge.low {
    color: #27ae60;
    background-color: #d5f5e3;
}

/* Finishing Dropdown Styles */
.finishing-dropdown-card {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border: 1px solid var(--primary-color);
    /* Distinct border color */
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    width: 250px;
    z-index: 1100;
    display: none;
    padding: 15px;
    margin-top: 10px;
    max-height: 400px;
    flex-direction: column;
}

.finishing-dropdown-card.active {
    display: flex;
}

.finishing-search {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.finishing-section-title {
    font-size: 0.75rem;
    color: #999;
    text-transform: uppercase;
    margin: 10px 0 5px 0;
    font-weight: 600;
}

.finishing-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 10px;
}

.finishing-dropdown-tag {
    background: var(--primary-color);
    color: #fff;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.finishing-dropdown-item {
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #333;
    transition: background 0.2s;
    display: flex;
    align-items: center;
}

.finishing-dropdown-item:hover {
    background: #e6f2ff;
    /* Light blue tint */
}

.btn-add-new-option {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-color);
    font-size: 0.85rem;
    padding: 10px 5px 0;
    margin-top: 5px;
    border-top: 1px solid #f1f5f9;
    cursor: pointer;
}

.btn-add-finishing {
    width: 24px;
    height: 24px;
    background: #f0f0f0;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
    transition: all 0.2s;
}

.btn-add-finishing:hover {
    background: var(--primary-color);
    color: #fff;
}

.finishing-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 0;
    font-size: 0.9rem;
    color: #333;
}

/* --- Advanced Client Selector Styles --- */
.client-selector-container {
    position: relative;
    width: 100%;
}

.client-select-trigger {
    width: 100%;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
    background: transparent;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #333;
    transition: border-color 0.2s;
}

.client-select-trigger:hover {
    border-bottom-color: #cbd5e1;
}

.client-dropdown-card {
    position: absolute;
    top: 100%;
    right: 0;
    /* Align to right to prevent overflow on the right side */
    left: auto;
    min-width: 350px;
    /* Wider dropdown as requested */
    width: 100%;
    /* Fallback/Base */
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 10px;
    display: none;
    /* Toggled by JS */
    margin-top: 5px;
}

.dropdown-search {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #cbd5e1;
    /* Darker, more visible border */
    border-radius: 6px;
    padding: 2px 12px;
    margin-bottom: 10px;
    transition: all 0.2s;
    cursor: text;
    /* Indicates the whole box is input */
}

.dropdown-search:focus-within {
    border-color: #94a3b8;
    /* Even darker on focus */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.dropdown-search i {
    color: #94a3b8;
    font-size: 0.9rem;
    margin-left: 10px;
    flex-shrink: 0;
    pointer-events: none;
    /* Icon passes clicks to container/input */
}

.client-search-input {
    flex: 1;
    width: auto;
    padding: 8px 0;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    font-size: 0.9rem;
    color: #333;
    margin-bottom: 0;
    min-width: 0;
}

.client-search-input::placeholder {
    color: #94a3b8;
    /* Matches icon */
    opacity: 1;
}

.client-search-input:focus {
    border: none;
    box-shadow: none;
}

.client-dropdown-list {
    max-height: 200px;
    overflow-y: auto;
    margin: 0 -5px;
    padding: 0 5px;
}

/* Side Panel Client Body Override */
.client-panel-body {
    padding: 30px;
    height: calc(100vh - 70px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.client-option-item {
    padding: 8px 10px;
    font-size: 0.85rem;
    color: #333;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.client-option-item:hover {
    background: #f1f5f9;
}

.client-edit-icon {
    color: #94a3b8;
    font-size: 0.8rem;
    padding: 5px;
    border-radius: 4px;
    transition: color 0.2s;
    cursor: pointer;
}

.client-edit-icon:hover {
    color: var(--primary-color);
    background: #e0f2fe;
}

.btn-add-new-client {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-add-new-client:hover {
    color: var(--primary-hover);
}

/* Payment Modal */
.payment-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1100;
    display: flex;
    justify-content: center;
    align-items: center;
}

.payment-modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    width: 400px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* --- Order Filter Tabs --- */
.order-filter-container {
    display: flex;
    gap: 30px;
    margin-bottom: 25px;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 0;
    flex-wrap: wrap;
    /* Allow wrapping */
}

.order-filter-btn {
    background: none;
    border: none;
    padding-bottom: 12px;
    border-bottom: 2px solid transparent;
    font-size: 0.85rem;
    font-weight: 600;
    color: #94a3b8;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0;
    transition: all 0.2s;
    margin-bottom: -2px;
    white-space: nowrap;
}

.order-filter-btn:hover {
    color: #475569;
}

.order-filter-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* --- RESPONSIVE STYLES --- */
@media (max-width: 768px) {

    /* Layout */
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1200;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    /* Topbar */
    .topbar-left {
        width: auto;
        padding-left: 30px;
        /* Aligns with page-content padding (30px) */
        position: static;
    }

    .menu-toggle {
        display: flex !important;
        position: relative;
        /* Changed from static */
        margin: 0 !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0;
        width: 40px !important;
        height: 40px !important;
        justify-content: center;
        /* Center the icon */
        align-items: center;
        outline: none !important;
        -webkit-tap-highlight-color: transparent;
        color: #333 !important;
        /* Ensure visible color */
        z-index: 1002;
        /* Ensure on top */
    }

    .menu-toggle i {
        font-size: 1.4rem;
        /* Slightly larger */
        line-height: 1;
        display: block;
    }

    /* Center Logo */
    .topbar .logo-img {
        max-width: 110px;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    /* Remove margin from lang selector on mobile */
    .language-selector {
        margin-right: 0 !important;
        padding: 4px 6px !important;
        display: none !important;
    }

    /* Hide the text in lang selector to save space ? Optional.
       Let's keep text but make it compact */
    .current-lang {
        font-size: 0.8rem !important;
    }

    /* Hide Help icon on mobile to declutter */
    .topbar-item[title="Help"] {
        display: none !important;
    }

    .topbar-right {
        gap: 10px;
        padding-right: 30px;
        /* Symmetry */
    }

    .topbar-item {
        font-size: 1.1rem;
        width: 30px;
        height: 30px;
    }

    /* Hide User Profile & Logout in Topbar on Mobile */
    .user-profile,
    .logout-btn {
        display: none !important;
    }

    /* Show Sidebar mobile elements */
    .sidebar-lang,
    .sidebar-user {
        display: flex !important;
    }
}

/* Force Mobile Spacing Override at the very end to ensure it applies */
@media (max-width: 768px) {
    .topbar-left {
        padding-left: 30px !important;
        justify-content: flex-start !important;
        /* Force Left Alignment */
        width: auto !important;
        position: static !important;
        /* Allow logo to position relative to .topbar */
    }

    .topbar-right {
        padding-right: 30px !important;
    }

    /* Target the logo container specifically to take it out of flow */
    .topbar .sidebar-logo {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        width: auto;
        margin: 0;
        padding: 0;
        display: flex !important;
        justify-content: center;
        z-index: 1000;
        /* Ensure it doesn't get covered but button is 1005 */
    }

    .topbar .logo-img {
        max-width: 110px;
        position: static;
        /* Image follows container */
        transform: none;
        left: auto;
    }

    .menu-toggle {
        z-index: 1005;
        /* Ensure above everything */
        position: relative;
        /* Keep it clickable */
    }
}

/* Force Bootstrap Overrides for Theme Color */
.btn-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.border-primary {
    border-color: var(--primary-color) !important;
}

/* Prevent FOUC on tabbed pages */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}