:root {
  --blue: #147dcc;
  --blue-dark: #0869b4;
  --green: #20a34a;
  --red: #df3e55;
  --ink: #525252;
  --muted: #858585;
  --line: #eef0f2;
  --canvas: #f7f8fa;
  --shadow: 0 9px 24px rgba(33, 57, 79, .11);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: "Inter", sans-serif; }
button, input, select, textarea { font: inherit; }
button, a { color: inherit; }
button { cursor: pointer; }
a { text-decoration: none; }
[data-lucide] { width: 1em; height: 1em; stroke-width: 2; pointer-events: none; }
button [data-lucide], a [data-lucide] { display: block; }

.admin-sidebar {
  position: fixed; z-index: 20; inset: 0 auto 0 0; width: 82px; display: flex; flex-direction: column; align-items: center;
  padding: 22px 0 17px; color: #fff; background: var(--blue); box-shadow: 5px 0 18px rgba(18, 91, 146, .16);
}
.admin-logo { width: 54px; height: 54px; display: grid; place-items: center; margin-bottom: 28px; border: 2px solid #fff; border-radius: 50%; font-weight: 800; box-shadow: inset 0 0 0 4px var(--blue), inset 0 0 0 6px #fff; }
.admin-sidebar nav { width: 100%; display: grid; gap: 5px; }
.side-link, .logout-link {
  position: relative; width: 100%; height: 64px; display: grid; place-items: center; border: 0; color: #fff; background: transparent; font-size: 21px;
}
.side-link::after { content: ""; position: absolute; left: 0; width: 4px; height: 0; border-radius: 0 6px 6px 0; background: #fff; transition: height .2s; }
.side-link:hover, .side-link.active { background: rgba(255,255,255,.12); }.side-link.active::after { height: 34px; }
.side-link b, .logout-link b { display: none; }
.logout-link { margin-top: auto; }

.admin-main { min-height: 100vh; margin-left: 82px; }
.admin-topbar {
  position: sticky; z-index: 15; top: 0; height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 25px;
  margin: 0 22px; padding: 0 18px; border-radius: 0 0 14px 14px; background: #fff; box-shadow: var(--shadow);
}
.admin-search { width: min(370px, 40%); display: flex; align-items: center; gap: 10px; padding: 7px; border: 1px solid #d8dadd; border-radius: 9px; }
.admin-search span { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--blue); font-size: 23px; }
.admin-search input { min-width: 0; width: 100%; border: 0; outline: 0; }
.top-actions { display: flex; align-items: center; gap: 25px; font-size: 13px; }.top-actions button { border: 0; background: transparent; }.top-actions > a, .install-button { display: inline-flex; gap: 7px; align-items: center; }
.install-button { padding: 9px 14px !important; border-radius: 8px !important; color: #fff !important; background: var(--blue) !important; }
.user-menu { display: flex; align-items: center; gap: 9px; font-size: 13px; }.user-dot { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: #777; background: #f2f2f2; }
.admin-content { padding: 38px 40px 60px; }.admin-view { display: none; }.admin-view.active { display: block; animation: fade .25s; } @keyframes fade { from { opacity: 0; transform: translateY(5px); } }

.dashboard-top { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, .9fr); gap: 32px; }
.metrics-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 32px; }
.metric-card {
  min-height: 137px; display: grid; grid-template-columns: 62px 1fr; align-items: center; gap: 18px; padding: 22px;
  border-radius: 12px; background: #fff; box-shadow: var(--shadow); transition: transform .2s, background .2s, color .2s;
}
.metric-card:hover, .metric-card.featured { transform: translateY(-3px); color: #fff; background: var(--blue); }
.metric-icon { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 9px; color: #fff; background: var(--blue); font-size: 23px; }
.metric-icon.store-initials { width: 38px; height: 38px; font-size: 10px; }
.metric-card:hover .metric-icon, .metric-card.featured .metric-icon { background: rgba(255,255,255,.15); }
.metric-card span { display: block; margin-bottom: 15px; font-size: 14px; }.metric-card strong { color: var(--blue); font-size: 18px; }.metric-card:hover strong, .metric-card.featured strong { color: #fff; }
.panel-card { overflow: hidden; border-radius: 12px; background: #fff; box-shadow: var(--shadow); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; padding: 22px 20px; }.panel-heading h2 { margin: 0; font-size: 17px; font-weight: 500; }.panel-heading a, .panel-heading button { border: 0; color: var(--blue); background: transparent; font-size: 12px; }
.dashboard-bottom { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; margin-top: 32px; }
.profile-card { display: grid; place-items: center; align-content: center; min-height: 300px; padding: 30px; text-align: center; }.profile-avatar { width: 82px; height: 82px; display: grid; place-items: center; margin-bottom: 18px; border-radius: 50%; color: #fff; background: var(--blue); font-size: 30px; }.profile-card h3 { margin: 0 0 15px; font-size: 16px; font-weight: 500; }.profile-card p { margin: 0 0 20px; color: #888; font-size: 12px; }.role { color: var(--green); font-size: 12px; }

.table-wrap { overflow-x: auto; padding: 0 20px 20px; }
table { width: 100%; border-collapse: collapse; font-size: 12px; } th { padding: 13px 10px; background: #f6f6f6; text-align: left; font-weight: 700; } td { padding: 14px 10px; border-bottom: 1px solid #f3f3f3; white-space: nowrap; }.table-image { width: 43px; height: 38px; object-fit: contain; border-radius: 6px; background: #f6f6f6; }.money { color: var(--green); }.category-text { color: #c99b25; }
.status { display: inline-block; padding: 5px 9px; border-radius: 20px; font-size: 10px; font-weight: 700; }.status.pending { color: #a66a00; background: #fff0c9; }.status.confirmed { color: #177b3b; background: #dcf8e5; }.status.contacted { color: #166aa6; background: #dff1fc; }
.table-actions { display: flex; gap: 6px; }.icon-action { width: 29px; height: 29px; display: grid; place-items: center; border: 0; border-radius: 6px; color: var(--blue); background: #eaf5fc; }.icon-action.danger { color: var(--red); background: #fff0f2; }.icon-action [data-lucide] { width: 15px; height: 15px; }

.view-header { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 25px; }.view-header span { color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }.view-header h1 { margin: 4px 0 0; font-size: 25px; font-weight: 600; }.primary-button { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border: 0; border-radius: 8px; color: #fff; background: var(--blue); box-shadow: 0 5px 12px rgba(20,125,204,.22); }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 15px 20px; border-bottom: 1px solid var(--line); }.toolbar-search { min-width: 240px; padding: 9px 12px; border: 1px solid #ddd; border-radius: 8px; outline-color: var(--blue); }.toolbar-buttons { display: flex; gap: 8px; }.secondary-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 12px; border: 1px solid #ddd; border-radius: 7px; background: #fff; font-size: 11px; }.secondary-button.danger-button { color: var(--red); border-color: #ffd6dc; background: #fff7f8; }
.banner-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 28px; padding: 25px; }.banner-admin-card { position: relative; overflow: hidden; min-height: 220px; border-radius: 14px; box-shadow: var(--shadow); }.banner-admin-card img { width: 100%; height: 220px; object-fit: cover; }.banner-admin-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.65), transparent 70%); }.banner-admin-card h3 { position: absolute; z-index: 2; left: 18px; bottom: 16px; margin: 0; color: #fff; font-size: 16px; }.banner-actions { position: absolute; z-index: 3; top: 12px; right: 12px; display: flex; gap: 7px; }.banner-actions button { width: 33px; height: 33px; display: grid; place-items: center; border: 0; border-radius: 7px; color: var(--blue); background: #fff; box-shadow: var(--shadow); }.banner-actions button:last-child { color: var(--red); }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 25px; }.settings-card { padding: 25px; border-radius: 12px; background: #fff; box-shadow: var(--shadow); }.settings-card h3 { margin-top: 0; }.settings-card label, .modal-form label { display: block; margin-bottom: 13px; color: #666; font-size: 11px; font-weight: 700; }.settings-card input, .modal-form input, .modal-form select, .modal-form textarea { width: 100%; margin-top: 6px; padding: 10px; border: 1px solid #dfe2e5; border-radius: 7px; outline-color: var(--blue); }.modal-form textarea { min-height: 80px; }

.admin-modal { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(20,40,58,.5); opacity: 0; pointer-events: none; transition: opacity .2s; backdrop-filter: blur(4px); }.admin-modal.open { opacity: 1; pointer-events: auto; }.modal-card { position: relative; width: min(570px, 100%); max-height: 92vh; overflow: auto; padding: 30px; border-radius: 14px; background: #fff; box-shadow: var(--shadow); }.modal-card h2 { margin: 0 0 20px; }.modal-close { position: absolute; top: 16px; right: 16px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: #eee; }.modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }.modal-actions { display: flex; justify-content: end; gap: 8px; margin-top: 20px; }
.image-upload-field { grid-column: 1 / -1; display: grid; gap: 10px; margin-bottom: 13px; }
.field-title { color: #666; font-size: 11px; font-weight: 700; }
.upload-preview { min-height: 190px; display: grid; place-items: center; overflow: hidden; border: 1px dashed #cfd7df; border-radius: 10px; background: #f7f9fb; }
.upload-preview img { width: 100%; height: 220px; object-fit: contain; background: #f7f9fb; }
.upload-preview.empty { min-height: 170px; }
.upload-empty { display: grid; place-items: center; gap: 8px; color: #7b8793; font-size: 12px; }
.upload-empty [data-lucide] { width: 34px; height: 34px; }
.upload-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.file-button { position: relative; overflow: hidden; cursor: pointer; }
.file-button input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-note { color: #8b949e; font-size: 10px; }
.admin-toast { position: fixed; z-index: 200; left: 50%; bottom: 25px; padding: 10px 18px; border-radius: 25px; color: #fff; background: #263238; opacity: 0; transform: translate(-50%, 10px); transition: .2s; font-size: 12px; }.admin-toast.show { opacity: 1; transform: translate(-50%,0); }

@media (max-width: 1150px) {
  .dashboard-top { grid-template-columns: 1fr; }.metrics-grid { grid-template-columns: repeat(3,1fr); }.dashboard-bottom { grid-template-columns: 1fr; }.profile-card { min-height: 220px; }.banner-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .admin-sidebar { top: auto; right: 0; width: auto; height: 68px; flex-direction: row; padding: 0 8px; border-radius: 20px 20px 0 0; }.admin-logo, .logout-link { display: none; }.admin-sidebar nav { display: grid; grid-template-columns: repeat(5,1fr); gap: 0; }.admin-sidebar nav .side-link:nth-child(n+6) { display: none; }.side-link { width: auto; height: 68px; font-size: 18px; }.side-link b { display: block; font-size: 8px; }.side-link::after { display: none; }
  .admin-main { margin: 0; padding-bottom: 68px; }.admin-topbar { height: auto; display: block; margin: 0; padding: 100px 15px 18px; border-radius: 0 0 18px 18px; background: linear-gradient(var(--blue) 0 80px, #fff 80px); }.admin-search { width: 100%; background: #fff; }.top-actions { justify-content: space-around; margin-top: 18px; }.top-actions button:first-child, .top-actions a { display: none; }
  .admin-content { padding: 28px 12px; }.metrics-grid { grid-template-columns: repeat(2,1fr); gap: 13px; }.metric-card { min-height: 115px; grid-template-columns: 45px 1fr; gap: 10px; padding: 14px; }.metric-icon { width: 44px; height: 44px; }.metric-card span { margin-bottom: 8px; font-size: 11px; }.dashboard-top, .dashboard-bottom { gap: 18px; margin-top: 18px; }.profile-card { display: none; }
  .view-header { align-items: flex-start; }.primary-button { padding: 11px 14px; font-size: 11px; }.toolbar { display: block; }.toolbar-search { width: 100%; }.toolbar-buttons { margin-top: 10px; }.banner-grid { padding: 13px; gap: 15px; }.banner-admin-card, .banner-admin-card img { min-height: 150px; height: 150px; }.settings-grid { grid-template-columns: 1fr; }.modal-grid { grid-template-columns: 1fr; }
}
