:root {
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: #334155;
    --success: #10b981;
    --danger: #ef4444;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    margin: 0;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

.app-container {
    width: 100%;
    max-width: 800px;
    padding: 20px;
}

/* Header */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 40px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Buttons */
.btn {
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--success);
    color: white;
}

.btn-secondary:hover {
    opacity: 0.9;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
}

.btn-outline:hover {
    border-color: var(--text-main);
    color: var(--text-main);
}

.btn-sm {
    padding: 5px 12px;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 1rem;
    width: 100%;
}

.btn-icon {
    background: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    padding: 0 10px;
}

.btn-icon:hover {
    color: var(--primary);
}

/* Inputs */
.input-field {
    background: var(--bg-color);
    border: 1px solid var(--border);
    color: white;
    padding: 10px;
    border-radius: 6px;
    width: 100%;
}

.input-field:focus {
    outline: 2px solid var(--primary);
    border-color: transparent;
}

/* Login View */
.login-card {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    max-width: 400px;
    margin: 40px auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.login-card h1 {
    margin-bottom: 10px;
}

.login-card p {
    color: var(--text-muted);
    margin-bottom: 30px;
}

.status-msg {
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
    min-height: 20px;
}

/* Grid */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.coupon-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Category Tabs */
.category-tab {
    background: var(--card-bg);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 20px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.category-tab:hover {
    border-color: var(--primary);
}

.category-tab.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.coupon-price {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--success);
}

.coupon-desc {
    color: var(--text-muted);
    margin-bottom: 20px;
    flex-grow: 1;
}

/* Admin Panel */
.admin-panel {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid var(--primary);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 40px;
}

.form-inline {
    display: flex;
    gap: 10px;
}

@media (max-width: 600px) {
    .app-container {
        padding: 10px;
    }

    .form-inline {
        flex-direction: column;
    }

    .shop-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .shop-header>div {
        width: 100%;
        justify-content: space-between;
    }

    /* Stack order items on mobile */
    .order-card {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 15px;
    }

    .order-card>div:last-child {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-top: 1px solid var(--border);
        padding-top: 10px;
        margin-top: 5px;
        text-align: left !important;
    }
}

/* New classes to replace inline styles */
.shop-nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

.order-card {
    background: var(--card-bg);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-content {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    margin: 10vh auto;
    position: relative;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    overflow-y: auto;
}