:root {
    --bg-color: #000000;
    --card-bg: #1c1c1e;
    --text-primary: #f5f5f7;
    --text-secondary: #86868b;
    --accent-color: #0071e3;
    --success-color: #34c759;
    --danger-color: #ff3b30;
    --border-radius: 18px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 60px;
    padding-bottom: 20px;
    border-bottom: 1px solid #333;
}

h1 {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, #fff 0%, #a1a1aa 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--text-secondary);
    transition: var(--transition);
}

.status-badge.running .dot {
    background-color: var(--success-color);
    box-shadow: 0 0 10px rgba(52, 199, 89, 0.5);
}

.status-badge.stopped .dot {
    background-color: var(--danger-color);
}

/* Controls */
.controls {
    display: flex;
    gap: 12px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 980px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background-color: var(--accent-color);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: #0077ed;
    transform: scale(1.02);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.btn-secondary:hover:not(:disabled) {
    background-color: rgba(255, 255, 255, 0.2);
}

.btn-danger {
    background-color: rgba(255, 59, 48, 0.1);
    color: var(--danger-color);
}

.btn-danger:hover:not(:disabled) {
    background-color: rgba(255, 59, 48, 0.2);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--card-bg);
    margin: 10% auto;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 20px;
    margin: 0;
}

.close {
    color: var(--text-secondary);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

.modal-body h3 {
    font-size: 16px;
    margin-bottom: 16px;
    color: var(--text-secondary);
}

.modal-body h4 {
    font-size: 14px;
    margin-bottom: 12px;
    color: var(--text-primary);
    font-weight: 600;
}

.notification-section {
    margin-bottom: 24px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.notification-section:last-of-type {
    margin-bottom: 0;
}

/* Inputs */
.input-group {
    margin-bottom: 16px;
}

.input-group label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.input-group input {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.input-group input:focus {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.08);
}

.sku-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sku-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.sku-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.sku-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--accent-color);
}

.sku-info {
    display: flex;
    flex-direction: column;
}

.sku-name {
    font-weight: 500;
}

.sku-code {
    font-size: 12px;
    color: var(--text-secondary);
    font-family: monospace;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: right;
}

/* Grid */
.stores-section {
    margin-bottom: 60px;
}

.stores-section h2,
.logs-section h2 {
    font-size: 24px;
    margin-bottom: 10px;
}

.last-updated {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.stores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.store-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.store-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.1);
}

.store-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.store-city {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

/* Parts List */
.parts-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.part-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    font-size: 13px;
}

.part-sku {
    font-weight: 500;
    color: var(--text-primary);
}

.part-status {
    font-weight: 500;
    color: var(--text-secondary);
}

.part-row.available {
    background: rgba(52, 199, 89, 0.1);
}

.part-row.available .part-status {
    color: var(--success-color);
}

/* Logs */
.table-container {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 16px 24px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

th {
    background-color: rgba(255, 255, 255, 0.02);
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    font-size: 14px;
}

tr:last-child td {
    border-bottom: none;
}

.loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}