/* Store Owner Dashboard Styles */
.so-layout { display: flex; min-height: 100vh; background: #f5f7fa; }
.so-sidebar { width: 240px; background: #1e2a38; position: fixed; height: 100vh; overflow-y: auto; z-index: 100; }
.so-sidebar-brand { padding: 20px; color: #fff; font-size: 16px; font-weight: 700; border-bottom: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; gap: 10px; }
.so-sidebar-brand i { color: var(--primary); }
.so-sidebar a { display: flex; align-items: center; gap: 12px; padding: 12px 20px; color: #8a9bb5; font-size: 13px; text-decoration: none; border-left: 3px solid transparent; transition: all .15s; }
.so-sidebar a:hover, .so-sidebar a.active { color: #fff; background: #2c3e50; border-left-color: var(--primary); }
.so-sidebar a i { width: 18px; text-align: center; }
.so-main { flex: 1; margin-left: 240px; padding: 20px; }
.so-topbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.06); margin: -16px -16px 16px; position: sticky; top: 0; z-index: 50; }
.so-topbar-title { font-size: 16px; font-weight: 600; }
.so-bottom-nav { display: none; }

/* Cards */
.so-card { background: #fff; border-radius: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.06); margin-bottom: 16px; overflow: hidden; }
.so-card-header { padding: 14px 18px; border-bottom: 1px solid #f0f0f0; font-weight: 600; font-size: 14px; display: flex; justify-content: space-between; align-items: center; }
.so-card-body { padding: 18px; }

/* Stats */
.so-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 20px; }
.so-stat { background: #fff; border-radius: 12px; padding: 18px; text-align: center; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.so-stat-value { font-size: 24px; font-weight: 700; }
.so-stat-label { font-size: 12px; color: #888; margin-top: 4px; }

/* Table */
.so-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.so-table th { text-align: left; padding: 10px 12px; font-size: 11px; text-transform: uppercase; color: #888; border-bottom: 1px solid #f0f0f0; }
.so-table td { padding: 10px 12px; border-bottom: 1px solid #f8f8f8; vertical-align: middle; }
.so-table tr:hover { background: #fafbfc; }

/* Buttons */
.so-btn { padding: 8px 14px; border-radius: 6px; font-size: 13px; font-weight: 500; border: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.so-btn-primary { background: var(--primary); color: #fff; }
.so-btn-success { background: #4caf50; color: #fff; }
.so-btn-danger { background: #f44336; color: #fff; }
.so-btn-outline { background: none; border: 1px solid #ddd; color: #555; }
.so-btn-sm { padding: 5px 10px; font-size: 12px; }

/* Form */
.so-form-group { margin-bottom: 14px; }
.so-form-group label { display: block; font-size: 12px; font-weight: 500; color: #555; margin-bottom: 4px; }
.so-form-group input, .so-form-group select, .so-form-group textarea { width: 100%; padding: 10px 12px; border: 1px solid #e0e0e0; border-radius: 8px; font-size: 14px; transition: border .2s; }
.so-form-group input[type="checkbox"] { width: auto; }
.so-form-group input:focus, .so-form-group select:focus, .so-form-group textarea:focus { outline: none; border-color: var(--primary); }
.so-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Product grid */
.so-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.so-product-card { background: #fff; border-radius: 10px; border: 1px solid #f0f0f0; overflow: hidden; transition: box-shadow .2s; }
.so-product-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.so-product-img { width: 100%; height: 140px; object-fit: cover; background: #f5f5f5; }
.so-product-body { padding: 12px; }
.so-product-name { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.so-product-price { font-size: 15px; font-weight: 700; color: var(--primary); }
.so-product-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }

/* Badge */
.so-badge { display: inline-block; padding: 3px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.so-badge-success { background: #e8f5e9; color: #2e7d32; }
.so-badge-danger { background: #ffebee; color: #c62828; }
.so-badge-info { background: #e3f2fd; color: #1565c0; }

/* Modal */
.so-modal { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 16px; }
.so-modal-content { background: #fff; border-radius: 14px; width: 100%; max-width: 500px; max-height: 90vh; overflow-y: auto; padding: 24px; }
.so-modal-title { font-size: 18px; font-weight: 600; margin-bottom: 16px; }

/* Responsive */
@media (max-width: 991px) {
  .so-sidebar { display: none; }
  .so-main { margin-left: 0; padding: 16px; padding-bottom: 80px; }
  .so-bottom-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: #fff; box-shadow: 0 -2px 8px rgba(0,0,0,.06); z-index: 100; justify-content: space-around; padding: 8px 0 env(safe-area-inset-bottom, 8px); }
  .so-bottom-nav a { display: flex; flex-direction: column; align-items: center; font-size: 10px; color: #888; text-decoration: none; padding: 4px 12px; gap: 2px; }
  .so-bottom-nav a i { font-size: 18px; }
  .so-bottom-nav a.active { color: var(--primary); }
  .so-form-row { grid-template-columns: 1fr; }
  .so-products { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .so-product-img { height: 100px; }
}
@media (max-width: 480px) {
  .so-stats { grid-template-columns: 1fr 1fr; }
  .so-products { grid-template-columns: 1fr; }
}

/* Dark Mode */
[data-theme="dark"] .so-layout { background: #121212; }
[data-theme="dark"] .so-sidebar { background: #0d1117; }
[data-theme="dark"] .so-main { background: #121212; }
[data-theme="dark"] .so-topbar { background: #1e1e1e; color: #e0e0e0; }
[data-theme="dark"] .so-topbar-title { color: #e0e0e0; }
[data-theme="dark"] .so-card { background: #1e1e1e; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
[data-theme="dark"] .so-card-header { border-color: #333; color: #e0e0e0; }
[data-theme="dark"] .so-card-body { color: #e0e0e0; }
[data-theme="dark"] .so-stat { background: #1e1e1e; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
[data-theme="dark"] .so-table th { color: #999; border-color: #333; }
[data-theme="dark"] .so-table td { border-color: #2a2a2a; color: #e0e0e0; }
[data-theme="dark"] .so-table tr:hover { background: #2a2a2a; }
[data-theme="dark"] .so-modal-content { background: #1e1e1e; color: #e0e0e0; }
[data-theme="dark"] .so-form-group label { color: #bbb; }
[data-theme="dark"] .so-form-group input, [data-theme="dark"] .so-form-group select, [data-theme="dark"] .so-form-group textarea { background: #2a2a2a; color: #e0e0e0; border-color: #444; }
[data-theme="dark"] .so-btn-outline { border-color: #444; color: #ccc; }
[data-theme="dark"] .so-bottom-nav { background: #1e1e1e; }
[data-theme="dark"] .so-product-card { background: #1e1e1e; border-color: #333; }
[data-theme="dark"] .so-product-body { color: #e0e0e0; }
[data-theme="dark"] .so-product-img { background: #2a2a2a; }
[data-theme="dark"] .so-sidebar a { color: #8a9bb5; }
[data-theme="dark"] .so-sidebar a:hover, [data-theme="dark"] .so-sidebar a.active { color: #fff; background: #1a2332; }
[data-theme="dark"] .so-stat-label { color: #999; }
[data-theme="dark"] .so-badge-info { background: #1a2332; color: #64b5f6; }
[data-theme="dark"] .so-badge-success { background: #1b3a1b; color: #66bb6a; }
[data-theme="dark"] .so-badge-danger { background: #3a1b1b; color: #ef5350; }
[data-theme="dark"] .so-form-group input[type="file"] { color: #e0e0e0; }
[data-theme="dark"] .so-sidebar-brand { color: #fff; }
