:root {
    --primary: #6366f1;
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --bg-dark: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.1);
    --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(at 0% 0%, hsla(253,16%,7%,1) 0, transparent 50%), 
        radial-gradient(at 50% 0%, hsla(225,39%,30%,1) 0, transparent 50%), 
        radial-gradient(at 100% 0%, hsla(339,49%,30%,1) 0, transparent 50%);
    color: var(--text-main);
    min-height: 100vh;
    padding: 2rem 1rem;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

.wide-container {
    max-width: 1400px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.logo span {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-left: 0.25rem;
}

.search-box {
    display: flex;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 9999px;
    padding: 0.5rem 1.5rem;
    width: 100%;
    max-width: 450px;
    box-shadow: var(--shadow);
}

.search-box input {
    background: transparent;
    border: none;
    color: var(--text-main);
    padding: 0.5rem 0;
    width: 100%;
    outline: none;
    font-size: 1rem;
}

.search-box button {
    background: transparent;
    border: none;
    color: var(--primary);
    cursor: pointer;
    padding-left: 1rem;
    transition: transform 0.2s;
}

.search-box button:hover {
    transform: scale(1.1);
}

.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.order-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.info-group label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.info-group p {
    font-weight: 600;
    font-size: 1.1rem;
}

.status-badge {
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    width: fit-content;
}

.logistics-timeline {
    margin-top: 2rem;
}

.logistics-timeline h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0.45rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    margin-bottom: 2.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2rem;
    top: 0.25rem;
    width: 12px;
    height: 12px;
    background: var(--text-muted);
    border-radius: 50%;
    border: 3px solid var(--bg-dark);
    z-index: 2;
}

.timeline-item.active::before {
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary);
}

.item-content h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.item-content p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.item-content .time {
    display: block;
    font-size: 0.75rem;
    margin-top: 0.5rem;
}

.hidden { display: none; }

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5rem 0;
    color: var(--text-muted);
}

.empty-state i {
    width: 64px;
    height: 64px;
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.demo-panel {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    max-width: 250px;
    padding: 1.5rem;
    z-index: 100;
}

.demo-panel h4 { margin-bottom: 1rem; }

.primary-btn {
    background: var(--primary-gradient);
    border: none;
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin-bottom: 0.75rem;
    transition: opacity 0.2s;
}

.primary-btn:hover { opacity: 0.9; }

.admin-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 4rem;
    transition: color 0.2s;
}

.admin-link:hover {
    color: var(--primary);
}

/* Admin Specific */
.admin-header {
    margin-bottom: 2rem;
}

.tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-btn.active {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.admin-section h2 {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.form-group input, .form-group select {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-main);
    outline: none;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-group select {
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.25rem;
    padding-right: 3rem;
}

.form-group input:focus, .form-group select:focus {
    border-color: var(--primary);
    background: rgba(30, 41, 59, 0.8);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-group select option {
    background-color: #1e293b;
    color: var(--text-main);
}

/* Tables */
.admin-table-container {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.admin-table th, .admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.admin-table th {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
}

.admin-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.action-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: color 0.2s;
}

.action-btn.delete:hover {
    color: #ef4444;
}

.badge {
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    background: var(--border);
}

.clickable-no {
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 4px;
    opacity: 1;
    transition: all 0.2s;
}

.clickable-no:hover {
    color: var(--text-main) !important;
    opacity: 0.8;
}

@media (max-width: 600px) {
    .order-info {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .tabs {
        flex-direction: column;
    }
}
