@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600&family=Playfair+Display:ital,wght@0,400;0,700;1,400&display=swap');

:root {
    --bg-dark: #0a0b0e;
    --card-bg: rgba(22, 26, 34, 0.7);
    --sidebar-bg: #11141b;
    --gold: #D4AF37;
    --gold-glow: rgba(212, 175, 55, 0.4);
    --gold-muted: #996515;
    --text-white: #f8f9fa;
    --text-gray: #a0aec0;
    --border-color: rgba(212, 175, 55, 0.2);
}

body {
    background-color: var(--bg-dark);
    color: var(--text-white);
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    overflow-x: hidden;
}

h1, h2, h3, .luxury-text {
    font-family: 'Playfair Display', serif;
}

.luxury-sidebar {
    width: 260px;
    height: 100vh;
    background: var(--sidebar-bg);
    position: fixed;
    top: 0;
    left: 0;
    border-right: 1px solid var(--border-color);
    padding: 2rem 1.5rem;
    z-index: 100;
}

.brand-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 3rem;
}

.brand-logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--gold), var(--gold-muted));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px var(--gold-glow);
}

.brand-name {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--gold);
}

.nav-links {
    list-style: none;
    padding: 0;
}

.nav-link {
    margin-bottom: 1rem;
}

.nav-link a {
    color: var(--text-gray);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-link a:hover, .nav-link.active a {
    color: var(--gold);
    background: rgba(212, 175, 55, 0.1);
}

.luxury-main {
    margin-left: 260px;
    padding: 2rem 3rem;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid var(--gold);
    background: #2d3748;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-color: var(--gold);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gold);
    margin: 8px 0;
}

.stat-label {
    color: var(--text-gray);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.orders-container {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem;
    overflow-x: auto; /* Prevent table from going out of box */
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.luxury-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1000px; /* Ensures all columns fit without squashing */
}

.luxury-table th {
    text-align: left;
    padding: 1rem;
    color: var(--text-gray);
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
}

.luxury-table td {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.order-id {
    font-weight: 600;
    color: var(--gold);
}

.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold);
    border: 1px solid var(--border-color);
}

.badge-todo {
    background: rgba(160, 174, 192, 0.1);
    color: var(--text-gray);
    border-color: rgba(160, 174, 192, 0.2);
}

.badge-doing {
    background: rgba(66, 153, 225, 0.1);
    color: #4299e1;
    border-color: rgba(66, 153, 225, 0.3);
}

.badge-done {
    background: rgba(72, 187, 120, 0.1);
    color: #48bb78;
    border-color: rgba(72, 187, 120, 0.3);
}

.status-select {
    padding: 6px 30px 6px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cpath fill='%23D4AF37' d='M0 2l4 4 4-4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    border: 1px solid var(--border-color);
    outline: none;
    transition: all 0.3s ease;
}

.status-select:hover {
    box-shadow: 0 0 10px var(--gold-glow);
}

.status-select option {
    background: var(--sidebar-bg);
    color: white;
}

.badge-btn {
    border: none;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 100px;
}

.badge-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.luxury-modal {
    background: #1a1d24;
    border: 1px solid var(--border-color);
    border-radius: 24px;
    color: white;
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
}

.status-option-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.status-option-item:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--gold);
    transform: translateX(5px);
}

.status-radio-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.item-thumb {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.luxury-btn {
    background: linear-gradient(135deg, var(--gold), var(--gold-muted));
    color: var(--bg-dark);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.luxury-btn-small {
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.luxury-btn-small:hover {
    background: var(--gold);
    color: var(--bg-dark);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.02); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease forwards;
}

/* AI Powered Components */
.ai-search-container {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 8px 24px;
    display: flex;
    align-items: center;
    gap: 15px;
    width: 400px;
    position: relative;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ai-search-container:focus-within {
    width: 500px;
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--gold);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
}

.ai-icon {
    color: var(--gold);
    filter: drop-shadow(0 0 5px var(--gold-glow));
}

.ai-search-input {
    background: transparent;
    border: none;
    color: white;
    width: 100%;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.875rem;
    outline: none;
}

.ai-badge {
    font-size: 0.6rem;
    background: linear-gradient(135deg, #00d2ff, #3a7bd5);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 800;
    letter-spacing: 1px;
}

.ai-insight-container {
    width: 180px;
}

.ai-progress-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.ai-insight-text {
    font-size: 0.7rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.ai-insight-text.on-track { color: #48bb78; }
.ai-insight-text.at-risk { color: #f6ad55; }
.ai-insight-text.completed { color: #4299e1; }

.ai-progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    overflow: hidden;
}

.ai-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold-muted), var(--gold));
    box-shadow: 0 0 8px var(--gold-glow);
    border-radius: 2px;
    transition: width 1s ease-in-out;
}

.worker-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    font-size: 0.8rem;
    color: var(--text-gray);
    cursor: pointer;
    transition: all 0.3s ease;
}

.worker-tag:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--gold);
    color: var(--gold);
}

.luxury-label {
    color: var(--text-gray);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    display: block;
}

.luxury-input {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--border-color) !important;
    color: white !important;
    border-radius: 10px !important;
    padding: 10px 15px !important;
}

.luxury-input:focus {
    box-shadow: 0 0 15px var(--gold-glow) !important;
    border-color: var(--gold) !important;
}
