/* Global Styles */
:root {
    --primary-color: #6c5ce7; /* Etsy-like purple/blue */
    --secondary-color: #a29bfe;
    --accent-color: #fdcb6e;
    --text-color: #2d3436;
    --bg-color: #dfe6e9;
    --sidebar-width: 250px;
    --card-shadow: 0 4px 6px rgba(0,0,0,0.1);
    --transition-speed: 0.3s;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: white;
    padding: 2rem;
    box-shadow: 2px 0 5px rgba(0,0,0,0.05);
    position: fixed;
    height: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 2rem;
    display: block;
    text-decoration: none;
}

.nav-links a {
    display: block;
    padding: 10px 15px;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 5px;
    transition: background var(--transition-speed);
}

.nav-links a:hover, .nav-links a.active {
    background-color: #f0f3f5;
    color: var(--primary-color);
    font-weight: 500;
}

.logout-btn {
    margin-top: 2rem;
    color: #e74c3c !important;
}

/* Main Content */
.main-content {
    margin-left: calc(var(--sidebar-width) + 4rem); /* sidebar width + padding */
    padding: 2rem;
    flex: 1;
    width: 100%;
}

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

h1, h2, h3 { color: #2d3436; }

/* Cards & Grid */
.card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    margin-bottom: 2rem;
}

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

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* Forms */
.search-box {
    display: flex;
    gap: 10px;
    background: white;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    margin-bottom: 2rem;
}

input[type="text"], input[type="email"], input[type="password"] {
    flex: 1;
    padding: 12px;
    border: 1px solid #dfe6e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color var(--transition-speed);
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
}

button, .btn {
    padding: 12px 24px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: transform 0.1s, background-color var(--transition-speed);
    text-decoration: none;
    display: inline-block;
}

button:hover, .btn:hover {
    background-color: #5849be;
    transform: translateY(-1px);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

th {
    background-color: #fafafa;
    font-weight: 600;
    color: #636e72;
}

tr:last-child td { border-bottom: none; }
tr:hover { background-color: #f9f9f9; }

img.product-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
}

/* Product Grid for Search Results */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: transform var(--transition-speed);
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-info { padding: 1rem; }
.product-title { font-weight: 600; margin-bottom: 0.5rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-price { color: var(--primary-color); font-weight: bold; font-size: 1.1rem; }
.meta-info { font-size: 0.85rem; color: #636e72; margin-top: 0.5rem; display: flex; justify-content: space-between; }

/* Status Classes */
.danger { color: #d63031; }
.success { color: #00b894; }
