/* --- CSS VARIABLES (COLORS & STYLES) --- */
:root {
    --bg-main: #f8fafc;
    --bg-sidebar: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-light: #94a3b8;

    --indigo-900: #312e81;
    --indigo-700: #4338ca;
    --indigo-600: #4f46e5;
    --indigo-100: #e0e7ff;
    --indigo-50: #eef2ff;

    --red-600: #dc2626;
    --red-500: #ef4444;
    --red-100: #fee2e2;
    --red-50: #fef2f2;

    --orange-600: #ea580c;
    --orange-100: #ffedd5;
    --orange-50: #fff7ed;

    --green-700: #15803d;
    --green-100: #dcfce7;

    --border-color: #e2e8f0;
    --border-radius: 12px;
}

/* --- GLOBAL STYLES --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
}

a {
    text-decoration: none;
}

/* --- LAYOUT --- */
.app-container {
    display: flex;
    height: 100vh;
}

.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* --- SIDEBAR --- */
.sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px;
    flex-shrink: 0;
}

.brand h1 {
    font-size: 20px;
    color: var(--indigo-900);
    margin-bottom: 4px;
}

.brand p {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 40px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.nav-link:hover {
    background-color: #f1f5f9;
}

.nav-link.active {
    background-color: var(--indigo-50);
    color: var(--indigo-700);
    font-weight: 600;
}

.nav-link i {
    width: 20px;
    text-align: center;
}

/* Sidebar Bottom (User & Button) */
.sidebar-bottom {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 8px;
    border: none;
    background: transparent;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background 0.2s;
}

.user-profile:hover {
    background-color: #f1f5f9;
}

.user-profile img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.user-info {
    text-align: left;
}

.user-name {
    font-size: 14px;
    font-weight: bold;
    color: var(--text-main);
}

.user-role {
    font-size: 12px;
    color: var(--text-light);
}

.chevron-icon {
    margin-left: auto;
    font-size: 10px;
    color: var(--text-light);
    opacity: 0;
    transition: opacity 0.2s;
}

.user-profile:hover .chevron-icon {
    opacity: 1;
}

.btn-primary {
    background-color: var(--indigo-900);
    color: white;
    border: none;
    padding: 12px;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    box-shadow: 0 4px 6px -1px rgba(49, 46, 129, 0.2);
}

.btn-primary:hover {
    background-color: #1e1b4b;
}

.btn-primary:active {
    transform: scale(0.96);
}

/* --- TOPBAR --- */
.topbar {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.search-bar {
    position: relative;
    width: 350px;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.search-bar input {
    width: 100%;
    background-color: #f1f5f9;
    border: none;
    border-radius: 8px;
    padding: 10px 16px 10px 36px;
    font-size: 14px;
    outline: none;
}

.search-bar input:focus {
    box-shadow: 0 0 0 2px var(--indigo-100);
}

.topbar-actions {
    display: flex;
    gap: 16px;
}

.action-btn {
    background: transparent;
    border: none;
    font-size: 20px;
    color: var(--text-light);
    cursor: pointer;
    position: relative;
}

.action-btn:hover {
    color: var(--indigo-600);
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    background-color: var(--red-500);
    border-radius: 50%;
    border: 2px solid white;
}

/* --- MAIN DASHBOARD CONTENT --- */
.dashboard-content {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
}

.dashboard-header {
    margin-bottom: 32px;
}

.dashboard-header h2 {
    font-size: 28px;
    color: var(--indigo-900);
}

.dashboard-header p {
    color: var(--text-muted);
    margin-top: 4px;
}

/* Cards General */
.card {
    background-color: white;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid var(--border-color);
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.metric-header h3 {
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.metric-value {
    font-size: 36px;
    font-weight: bold;
}

.alert-card {
    background-color: var(--red-50);
    border-color: var(--red-100);
}

.metric-body {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.metric-subtitle {
    font-size: 14px;
    color: var(--red-500);
}

/* Text Colors */
.text-indigo {
    color: var(--indigo-900);
}

.text-red {
    color: var(--red-600);
}

.text-orange {
    color: var(--orange-600);
}

.text-gray {
    color: var(--text-muted);
}

/* Content Grid (Bottom Section) */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.card-header h3,
.card-title {
    font-size: 20px;
    color: var(--indigo-900);
}

.link-btn {
    font-size: 14px;
    font-weight: 600;
    color: var(--indigo-600);
}

.link-btn:hover {
    color: var(--indigo-900);
}

/* Stock List */
.stock-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stock-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.stock-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.stock-icon {
    width: 40px;
    height: 40px;
    background-color: white;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-light);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.stock-details h4 {
    font-size: 14px;
    color: var(--indigo-900);
}

.stock-details p {
    font-size: 12px;
    color: var(--text-muted);
}

.stock-status {
    display: flex;
    align-items: center;
    gap: 32px;
}

.stock-count {
    font-size: 14px;
    font-weight: 600;
}

.badge {
    padding: 4px 12px;
    font-size: 10px;
    font-weight: bold;
    border-radius: 20px;
    text-transform: uppercase;
}

/* Stock Status Variations */
.status-good {
    background-color: #f8fafc;
}

.badge-good {
    background-color: var(--green-100);
    color: var(--green-700);
}

.status-low {
    background-color: var(--orange-50);
    border-color: var(--orange-100);
    border-left: 4px solid #fb923c;
}

.badge-low {
    background-color: var(--orange-100);
    color: var(--orange-600);
}

.status-empty {
    background-color: var(--red-50);
    border-color: var(--red-100);
    border-left: 4px solid var(--red-500);
}

.badge-empty {
    background-color: var(--red-100);
    color: var(--red-600);
}

/* Timeline */
.activity-card {
    background-color: #f8fafc;
}

.timeline {
    border-left: 2px solid var(--border-color);
    margin-left: 12px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.timeline-item {
    position: relative;
    padding-left: 24px;
}

.timeline-icon {
    position: absolute;
    left: -14px;
    top: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 10px;
    border: 4px solid #f8fafc;
}

.bg-indigo-light {
    background-color: var(--indigo-100);
}

.bg-gray-light {
    background-color: #e2e8f0;
}

.bg-red-light {
    background-color: var(--red-100);
}

.timeline-content {
    background-color: white;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.border-red {
    border-color: var(--red-100);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.timeline-header h4 {
    font-size: 14px;
    color: var(--indigo-900);
}

.time {
    font-size: 10px;
    color: var(--text-light);
}

.timeline-content p {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* =========================================
   ORDER MANAGEMENT PAGE STYLES
   ========================================= */

/* Header Row Layout */
.page-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 32px;
}

/* Filters */
.filters-container {
    display: flex;
    gap: 12px;
    align-items: center;
}

.filter-select {
    appearance: none;
    /* Removes default browser arrow */
    background-color: white;
    border: 1px solid var(--border-color);
    padding: 10px 36px 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-main);
    font-weight: 500;
    cursor: pointer;
    outline: none;
    /* Custom arrow via background image */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%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 12px center;
    background-size: 16px;
    transition: border-color 0.2s;
}

.filter-select:focus,
.filter-select:hover {
    border-color: var(--indigo-600);
}

.filter-icon-btn {
    background-color: #e2e8f0;
    border: none;
    padding: 10px 14px;
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.2s;
}

.filter-icon-btn:hover {
    background-color: #cbd5e1;
}

/* Order List Layout */
.order-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Order Card */
.order-card {
    display: grid;
    grid-template-columns: 1.5fr 1.5fr 1fr 1fr 1fr;
    align-items: center;
    background-color: white;
    padding: 20px 24px;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--border-color);
    transition: transform 0.1s, box-shadow 0.2s;
}

.order-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

/* Status Border Indicators */
.border-left-purple {
    border-left: 6px solid #8b5cf6;
}

.border-left-yellow {
    border-left: 6px solid #eab308;
}

.border-left-green {
    border-left: 6px solid #22c55e;
}

/* Text Status Colors */
.text-purple {
    color: #8b5cf6;
}

.text-yellow {
    color: #eab308;
}

.text-green {
    color: #22c55e;
}

/* Typography inside Cards */
.order-id,
.order-total-label {
    font-size: 11px;
    color: var(--text-light);
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.client-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
}

.material-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 4px;
}

.order-details {
    font-size: 12px;
    color: var(--text-muted);
}

.order-price {
    font-size: 16px;
    font-weight: 700;
}

.text-right {
    text-align: right;
}

.flex-center {
    display: flex;
    justify-content: center;
}

/* Finishing Pill */
.finishing-pill {
    background-color: #f1f5f9;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 6px;
}

/* Status Column Layout */
.status-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.status-col i {
    font-size: 18px;
}

.status-col span {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
}

/* =========================================
   CONFIGURE PRINT JOB PAGE STYLES
   ========================================= */

.config-wrapper {
    flex-direction: row;
    /* Split into 2 columns */
    background-color: var(--bg-main);
}

.config-form-area {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
}

.config-header h2 {
    font-size: 36px;
    color: var(--indigo-900);
    margin-bottom: 8px;
}

.config-header p {
    color: var(--text-muted);
    font-size: 16px;
    margin-bottom: 40px;
}

/* Form Sections */
.form-section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 18px;
    color: var(--indigo-900);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

/* Inputs */
.input-row {
    display: flex;
    gap: 20px;
}

.input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.input-group.w-50 {
    width: 50%;
}

.input-group label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-light);
    letter-spacing: 1px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.input-group input,
.input-group textarea {
    background-color: #f1f5f9;
    border: 1px solid transparent;
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
    font-family: inherit;
}

.input-group input:focus,
.input-group textarea:focus {
    background-color: white;
    border-color: var(--indigo-600);
    box-shadow: 0 0 0 3px var(--indigo-50);
}

/* File Upload Button */
.upload-btn {
    background-color: #f1f5f9;
    color: var(--text-main);
    border: 1px dashed var(--text-light);
    padding: 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    text-align: center;
    width: 200px;
    transition: all 0.2s;
}

.upload-btn:hover {
    background-color: #e2e8f0;
    border-color: var(--indigo-600);
}

/* Image Previews */
.image-preview-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

.preview-box {
    width: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.preview-box img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.preview-name {
    font-size: 10px;
    color: var(--text-muted);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

/* Selection Cards Grid */
.selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 16px;
}

.hidden-input {
    display: none;
}

.select-card {
    background-color: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.select-card:hover {
    border-color: var(--indigo-100);
    background-color: var(--bg-main);
}

.select-card.active {
    border-color: var(--indigo-600);
    background-color: var(--indigo-50);
}

.select-card.active::before {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background-color: var(--indigo-600);
    border-radius: 50%;
}

.card-icon {
    font-size: 24px;
    color: var(--indigo-900);
    margin-bottom: 12px;
}

.select-card h4 {
    font-size: 13px;
    color: var(--indigo-900);
    margin-bottom: 4px;
}

.select-card p {
    font-size: 11px;
    color: var(--text-muted);
}

/* --- RIGHT SIDEBAR: LIVE SPEC --- */
.live-spec-sidebar {
    width: 380px;
    background-color: #f8fafc;
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.spec-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 32px;
    border-bottom: 1px solid var(--border-color);
}

.spec-header h3 {
    font-size: 18px;
    color: var(--indigo-900);
}

.spec-items {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 16px;
}

.spec-item .spec-icon {
    width: 40px;
    height: 40px;
    background-color: #e2e8f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.spec-details {
    flex: 1;
}

.spec-details h4 {
    font-size: 14px;
    color: var(--indigo-900);
}

.spec-details p {
    font-size: 12px;
    color: var(--text-light);
}

.spec-price {
    font-size: 14px;
    font-weight: 600;
    color: var(--indigo-600);
}

.spec-total-container {
    padding: 32px;
    background-color: white;
    border-top: 1px solid var(--border-color);
}

.total-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-light);
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.total-price {
    font-size: 42px;
    font-weight: 800;
    color: var(--indigo-900);
    margin-bottom: 24px;
    line-height: 1;
}

.btn-confirm {
    width: 100%;
    background-color: #10b981;
    /* Emerald/Mint Green */
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.btn-confirm:hover {
    background-color: #059669;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.2);
}

/* Status Buttons in Configurator */
.status-btn-group {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.status-btn {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--border-color);
    background-color: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.2s;
}

.status-btn[data-val="printing"].active {
    background-color: #f3e8ff;
    color: #8b5cf6;
    border-color: #8b5cf6;
}

.status-btn[data-val="pending"].active {
    background-color: #fef9c3;
    color: #eab308;
    border-color: #eab308;
}

.status-btn[data-val="done"].active {
    background-color: #dcfce7;
    color: #22c55e;
    border-color: #22c55e;
}

/* Order Card Delete Button */
.order-card {
    position: relative;
    /* Ensures the X stays inside the card */
}

.delete-order-btn {
    position: absolute;
    top: 12px;
    right: 15px;
    color: #cbd5e1;
    font-size: 16px;
    cursor: pointer;
    z-index: 10;
    transition: color 0.2s;
}

.delete-order-btn:hover {
    color: #ef4444;
    /* Red on hover */
}

/* Dashboard Specific & Notifications */
.header-actions {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
}

.bell-icon-wrapper {
    position: relative;
    cursor: pointer;
}

.notif-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: bold;
    height: 16px;
    width: 16px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.notification-dropdown {
    position: absolute;
    top: 40px;
    right: 0;
    width: 320px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 100;
    max-height: 400px;
    overflow-y: auto;
}

.notification-dropdown.active {
    display: block;
}

.notif-header {
    padding: 15px;
    font-weight: 600;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-main);
}

.notif-item {
    padding: 12px 15px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.notif-item:hover {
    background: #f8fafc;
}

.notif-item i {
    margin-top: 3px;
}

/* Activity Feed */
.activity-section-title {
    font-size: 12px;
    text-transform: uppercase;
    color: #94a3b8;
    margin: 20px 0 10px;
    font-weight: 600;
    letter-spacing: 1px;
}

.activity-item {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
    color: white;
    flex-shrink: 0;
}

.icon-red {
    background: #ef4444;
}

.icon-yellow {
    background: #f59e0b;
}

.icon-green {
    background: #10b981;
}

.activity-content {
    font-size: 13px;
    color: var(--text-main);
}

.activity-time {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 4px;
}

/* Sidebar Consistency Fixes */
.sidebar {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* Pushes the bottom section down */
    height: 100vh;
    /* Ensures the sidebar stretches the full screen height */
    overflow-y: auto;
    /* Allows scrolling if the menu gets too long */
}

.sidebar-bottom {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    /* Subtle divider */
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: var(--primary-color, #3b82f6);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.user-info p {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: inherit;
}

.user-info span {
    font-size: 11px;
    color: #94a3b8;
}

/* Strict Button Sizing */
.btn-create {
    width: 100% !important;
    /* Forces consistent width */
    min-height: 42px;
    /* Forces consistent height */
    padding: 10px 15px;
    background: var(--primary-color, #3b82f6);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-sizing: border-box;
    /* Prevents padding from breaking width */
    transition: 0.2s;
}

.btn-create:hover {
    filter: brightness(1.1);
}

/* Custom Price Input Styles */
.live-specs-container {
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.spec-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.spec-label {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

.custom-price-wrapper {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 4px 8px;
    transition: 0.2s;
}

.custom-price-wrapper:focus-within {
    border-color: var(--primary-color, #3b82f6);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.currency-label {
    font-size: 14px;
    color: #94a3b8;
    margin-right: 5px;
}

.price-input {
    border: none;
    outline: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    width: 80px;
    text-align: right;
}

.qty-input {
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 6px 8px;
    width: 60px;
}

/* Hide the up/down arrows on number inputs for a cleaner look */
.price-input::-webkit-outer-spin-button,
.price-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.divider {
    height: 1px;
    background: #e2e8f0;
    margin: 15px 0;
}

.total-row {
    font-size: 18px;
    font-weight: bold;
}

.total-highlight {
    color: var(--primary-color, #3b82f6);
}

/* Sidebar Profile Styling */
.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

#userPhoto {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    /* Matches your dashboard UI */
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.user-info {
    display: flex;
    flex-direction: column;
}

#userName {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    /* Explicitly set to match your sidebar text */
    margin: 0;
    line-height: 1.2;
}

.logout-trigger {
    font-size: 10px;
    font-weight: 800;
    color: #ef4444;
    /* Professional Red */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
    cursor: pointer;
    transition: 0.2s;
}

.logout-trigger:hover {
    color: #f87171;
    text-decoration: underline;
}

#loginContainer {
    display: flex;
    justify-content: center;
}

/* =========================================
   Configure Print Job - Summary Panel
   ========================================= */

.summary-panel {
    background: #ffffff;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    /* This makes the panel stick to the screen as you scroll, and sets a nice height */
    position: sticky;
    top: 20px;
    height: calc(100vh - 40px);
    max-height: 800px;
}

.summary-content {
    flex-grow: 1;
    /* This is the magic rule that pushes the footer to the bottom! */
    overflow-y: auto;
    /* Adds a neat scrollbar just for the specs if the list gets too long */
    margin-bottom: 20px;
    padding-right: 5px;
}

.summary-content h3 {
    margin-bottom: 20px;
    font-size: 18px;
    color: var(--text-main);
    font-weight: 700;
}

.summary-footer {
    margin-top: auto;
    /* Ensures it stays locked to the bottom */
}

.summary-footer .divider {
    height: 1px;
    background: #e2e8f0;
    margin: 0 0 20px 0;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.total-label {
    font-weight: 600;
    color: #64748b;
    font-size: 16px;
}

.total-amount {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary-color, #3b82f6);
}

/* --- Status Buttons Styling --- */
.status-section h4 {
    font-size: 13px;
    margin-bottom: 10px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
}

.status-btn-group {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.status-btn {
    flex: 1;
    padding: 10px 8px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #475569;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s ease;
}

.status-btn:hover {
    background: #e2e8f0;
}

/* This fixes the color changing issue! */
.status-btn.active {
    background: var(--primary-color, #3b82f6);
    color: white;
    border-color: var(--primary-color, #3b82f6);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

/* --- Save Button Enhancements --- */
.btn-save-job {
    width: 100% !important;
    padding: 16px !important;
    font-size: 16px !important;
    border-radius: 8px !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.2);
}

.btn-save-job:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(59, 130, 246, 0.3);
}

/* FORCED SAVE BUTTON VISIBILITY */
.btn-save {
    padding: 8px 16px !important;
    border: 2px solid #1d4ed8 !important;
    background-color: #2563eb !important;
    color: #ffffff !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-weight: bold !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-size: 14px !important;
}