@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --mall-blue: #00e5ff;
    --mall-blue-dark: #008ba3;
    --mall-green: #00ff88;
    --bg-deep: #0a0c10;
    --bg-card: #151921;
    --bg-hover: #1c222d;
    --text-main: #e1e1e1;
    --text-muted: #8b949e;
    --border-dim: #30363d;
    --acc-green: #00ff88;
    --base-font-size: 14px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-deep);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: var(--base-font-size);
    line-height: 1.5;
}

/* JD-style Layout Container */
.mall-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
}

/* Professional Header (JD Style) */
.top-nav {
    background: #000;
    border-bottom: 1px solid var(--border-dim);
    padding: 5px 0;
    font-size: 12px;
    color: var(--text-muted);
}

.main-header {
    background: var(--bg-deep);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 2px solid var(--mall-blue);
}

.header-flex {
    display: flex;
    align-items: center;
    gap: 40px;
}

.mall-logo {
    font-size: 24px;
    font-weight: 800;
    color: var(--mall-blue);
    text-decoration: none;
    letter-spacing: -1px;
}

.search-box-wrapper {
    flex: 1;
    display: flex;
}

.search-input {
    flex: 1;
    background: var(--bg-card);
    border: 2px solid var(--mall-blue);
    padding: 8px 15px;
    color: white;
    font-size: 14px;
    outline: none;
}

.search-btn {
    background: var(--mall-blue);
    color: #000;
    border: none;
    padding: 0 25px;
    font-weight: 700;
    cursor: pointer;
}

/* Category Sidebar + Banner Area */
.hero-mall {
    display: grid;
    grid-template-columns: 200px 1fr 250px;
    gap: 10px;
    margin-top: 10px;
}

.side-menu {
    background: var(--bg-card);
    padding: 10px 0;
    border: 1px solid var(--border-dim);
}

.menu-item {
    padding: 8px 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.menu-item:hover {
    background: var(--bg-hover);
    color: var(--mall-blue);
}

.mall-banner {
    background: linear-gradient(45deg, #001f3f, #001122);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    height: 400px;
}

.user-panel {
    background: var(--bg-card);
    padding: 20px;
    border: 1px solid var(--border-dim);
    text-align: center;
}

/* Content Sections */
.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 30px 0 15px;
    font-size: 18px;
    border-left: 4px solid var(--mall-blue);
    padding-left: 10px;
}

/* Product Grid (JD Style) */
.mall-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.mall-card {
    background: var(--bg-card);
    border: 1px solid transparent;
    transition: all 0.2s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.mall-card:hover {
    border-color: var(--mall-blue);
    box-shadow: 0 5px 15px rgba(0, 229, 255, 0.1);
}

.mall-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.card-info {
    padding: 10px;
    flex: 1;
}

.item-price {
    color: #ff4400;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 5px;
}

.item-name {
    font-size: 13px;
    height: 40px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 8px;
}

.item-tag {
    font-size: 11px;
    color: var(--mall-blue);
    border: 1px solid var(--mall-blue);
    padding: 0 4px;
    margin-right: 5px;
}

/* Modal UI */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.pay-modal {
    background: var(--bg-card);
    width: 450px;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid var(--mall-blue);
    text-align: center;
}

.qr-frame {
    background: white;
    padding: 15px;
    margin: 20px auto;
    width: 200px;
    height: 200px;
}

/* Order Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.data-table th {
    background: var(--bg-hover);
    padding: 12px;
    text-align: left;
    color: var(--text-muted);
}

.data-table td {
    padding: 15px 12px;
    border-bottom: 1px solid var(--border-dim);
}

.status-badge {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
}

.status-paid {
    background: rgba(0, 255, 136, 0.1);
    color: var(--mall-green);
}

.status-pending {
    background: rgba(0, 229, 255, 0.1);
    color: var(--mall-blue);
}

.btn-mall {
    padding: 6px 15px;
    border-radius: 2px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
}

.btn-primary-mall {
    background: var(--mall-blue);
    color: #000;
}

.btn-secondary-mall {
    background: #333;
    color: #fff;
}

/* Admin Shell & UI */
.admin-shell {
    display: flex;
    min-height: 100vh;
    background: #0a0a0c;
}

.admin-sidebar {
    width: 240px;
    background: #111114;
    border-right: 1px solid var(--border-dim);
    padding: 1.5rem;
    position: sticky;
    top: 0;
    height: 100vh;
}

.admin-sidebar .nav-link {
    display: block;
    padding: 12px 15px;
    color: var(--text-mid);
    text-decoration: none;
    border-radius: 4px;
    margin-bottom: 5px;
    font-size: 14px;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background: rgba(0, 229, 255, 0.1);
    color: var(--mall-blue);
}

.admin-content {
    flex: 1;
    padding: 30px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.stat-card {
    background: #16161a;
    padding: 24px;
    border: 1px solid var(--border-dim);
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
}