/* Filament-Inspired Clean Light Design System */

:root {
    --primary: #4f46e5;
    /* Indigo 600 */
    --primary-light: #eef2ff;
    --secondary: #d97706;
    /* Amber 600 */
    --success: #16a34a;
    --error: #dc2626;

    --bg-main: #f9fafb;
    /* Gray 50 */
    --sidebar-bg: #ffffff;
    --card-bg: #ffffff;
    --border-color: #e5e7eb;
    /* Gray 200 */

    --text-main: #111827;
    /* Gray 900 */
    --text-secondary: #4b5563;
    /* Gray 600 */
    --text-muted: #9ca3af;
    /* Gray 400 */
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
}

/* Glass Card Overhaul to Filament Card */
.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s;
}

.glass-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.glass-card-stat {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.25rem;
}

/* Inputs - Filament Style */
.glass-input {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 0.625rem 0.875rem;
    font-size: 0.9375rem;
    color: var(--text-main);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: border-color 0.2s, ring 0.2s;
}

.glass-input:focus {
    border-color: var(--primary);
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.glass-input-sm {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: var(--text-main);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: border-color 0.2s, ring 0.2s;
}

/* Buttons */
.btn-gradient {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-gradient:hover {
    background: #4338ca;
    /* Indigo 700 */
    transform: none;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.btn-secondary-sm {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.btn-secondary-sm:hover {
    background: #f3f4f6;
    color: var(--text-main);
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.5rem;
    background: white;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    transition: all 0.2s;
}

.btn-icon:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-1px);
}

.btn-icon.destructive:hover {
    background: #fef2f2;
    color: var(--error);
    border-color: var(--error);
}

.btn-icon i {
    font-size: 0.875rem;
}

/* Navigation */
.nav-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.625rem 0.75rem;
    border-radius: 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.15s;
}

.nav-btn:hover {
    background: #f3f4f6;
    color: var(--text-main);
}

.nav-btn.active {
    background: var(--primary-light);
    color: var(--primary);
}

.nav-btn.active i {
    color: var(--primary);
}

/* Tab Management */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.hidden {
    display: none !important;
}

/* Table Design */
.premium-table thead th {
    background: #f8fafc;
    /* Slate 50 */
    color: #64748b;
    /* Slate 500 */
    font-weight: 700;
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.premium-table td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    /* Slate 100 */
    font-size: 0.875rem;
    color: var(--text-secondary);
    vertical-align: middle;
}

.premium-table tr:hover td {
    background: #f8fafc;
}

/* Order Detail View Layout */
.order-detail-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 1024px) {
    .order-detail-grid {
        grid-template-columns: 1fr;
    }
}

.detail-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    overflow: hidden;
}

.detail-card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    background: #f8fafc;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-card-header h4 {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-card-body {
    padding: 1.25rem;
}

/* Info List in Sidebar */
.info-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    font-size: 0.875rem;
}

.info-label {
    color: var(--text-muted);
    font-weight: 500;
}

.info-value {
    color: var(--text-main);
    font-weight: 600;
    text-align: right;
    max-width: 60%;
}

/* Design Preview Grid */
.design-preview-grid {
    display: flex;
    gap: 0.5rem;
}

.design-thumb-card {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    background: #f1f5f9;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.design-thumb-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.design-thumb-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 0.5rem;
    text-align: center;
    padding: 1px 0;
}

/* Sticky Action Bar */
.sticky-action-bar {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid var(--border-color);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 40;
    margin-top: 2rem;
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* Thumbnails */
.table-thumbnail {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.5rem;
    object-fit: cover;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}

/* Status Badges - Filament High-End */
.stage-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.badge-success {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.badge-info {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.badge-warning {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
}

.badge-error {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.badge-indigo {
    background: #eef2ff;
    color: #4338ca;
    border: 1px solid #e0e7ff;
}

.badge-purple {
    background: #f3e8ff;
    color: #7e22ce;
    border: 1px solid #e9d5ff;
}

/* Status Mapping */
.stage-PENDING,
.stage-CONFIRMED,
.stage-WAIT_LIST {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.stage-PRODUCTION,
.stage-PRODUCING {
    background: #f3e8ff;
    color: #7e22ce;
    border: 1px solid #e9d5ff;
}

.stage-SHIPPED {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.stage-REVIEW {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
}

.stage-CANCELLED {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

/* Payment Badges */
.payment-badge {
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.payment-SUCCESS {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.payment-REFUNDED,
.payment-REFUND {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.payment-PENDING {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
}

/* Column Layouts */
.col-multi-line {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.col-title {
    font-weight: 600;
    color: var(--text-main);
}

.col-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
}

.table-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.table-link:hover {
    text-decoration: underline;
}

/* Typography Customization for Light Mode */
#current-tab-title {
    color: var(--text-main);
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 10px;
}