* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font-family: 'Plus Jakarta Sans', system-ui, sans-serif; background: #F6F6FA; color: #15131F; }
a { color: #E8127A; text-decoration: none; }
a:hover { color: #B8085C; }
.script { font-family: 'Caveat', cursive; }
button { font-family: inherit; }

.app-shell { display:flex; width:100%; min-height:100vh; background:#F6F6FA; }

.sidebar { width:252px; flex-shrink:0; background:#FFFFFF; border-right:1px solid #ECEBF3; display:flex; flex-direction:column; padding:26px 18px; gap:28px; position:sticky; top:0; height:100vh; overflow-y:auto; }
.sidebar-brand { display:flex; flex-direction:column; gap:2px; padding:0 6px; }
.sidebar-brand .brand-row { display:flex; align-items:center; gap:10px; }
.sidebar-brand .wordmark { font-size:18px; font-weight:800; }
.sidebar-tagline { color:#9C9AB0; font-size:14px; margin-left:2px; }

.nav-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; color: #6B6980; font-size: 14.5px; font-weight: 500; }
.nav-item.active { background: #FDE8F2; color: #CC0F6E; font-weight: 600; }
.nav-item svg { flex-shrink: 0; }
a.nav-item, a.nav-item:hover { color: inherit; }
a.nav-item.active, a.nav-item.active:hover { color: #CC0F6E; }

.btn-primary { display: inline-flex; align-items: center; justify-content:center; gap: 8px; background: linear-gradient(90deg,#F0327A,#D6116B); color: #fff; font-weight: 600; font-size: 14px; padding: 12px 20px; border-radius: 12px; border: none; cursor: pointer; }
.btn-primary:disabled { opacity:0.55; cursor:not-allowed; }
.btn-outline { display: inline-flex; align-items: center; justify-content:center; gap: 8px; background: rgba(255,255,255,0.12); border: 1.5px solid rgba(255,255,255,0.55); color: #fff; font-weight: 600; font-size: 14px; padding: 11px 20px; border-radius: 12px; }
.btn-ghost { display: inline-flex; align-items: center; justify-content:center; gap: 8px; background: #fff; border: 1.5px solid #E4E2EF; color: #4B4863; font-weight: 600; font-size: 13.5px; padding: 10px 16px; border-radius: 10px; cursor:pointer; }
.btn-danger { display:inline-flex; align-items:center; justify-content:center; gap:8px; background:#fff; border:1.5px solid #F3C6D9; color:#CC0F6E; font-weight:600; font-size:12.5px; padding:8px 12px; border-radius:9px; cursor:pointer; }

.studio-card { position: relative; border-radius: 22px; overflow: hidden; padding: 26px; display: flex; flex-direction: column; justify-content: flex-start; gap: 20px; color: #fff; min-height:230px; }
.studio-card .icon-badge { width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,0.9); display: flex; align-items: center; justify-content: center; flex-shrink:0; }
.arrow-btn { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,0.95); display: flex; align-items: center; justify-content: center; border:none; cursor:pointer; margin-top:auto; flex-shrink:0; }

.tool-card { background: #fff; border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 10px; border: 1px solid #ECEBF3; }
.tool-card .thumb { border-radius: 12px; height: 110px; width: 100%; object-fit: cover; display: block; }
.tool-card .thumb-wrap { border-radius: 12px; height: 110px; display: flex; align-items: center; justify-content: center; }
.tool-card h4 { margin: 0; font-size: 14.5px; font-weight: 700; color: #15131F; }
.tool-card p { margin: 0; font-size: 12.5px; color: #8B899C; line-height: 1.4; }
.tool-card .meta { margin: 0; font-size: 11.5px; color: #A9A7BB; display:flex; align-items:center; gap:6px; }

.section-title { font-size: 22px; font-weight: 800; margin: 0 0 6px 0; color: #15131F; }
.section-sub { font-size: 13.5px; color: #8B899C; margin: 0; max-width: 560px; }
.more-link { font-size: 13.5px; font-weight: 700; color: #E8127A; display: flex; align-items: center; gap: 4px; white-space: nowrap; background:none; border:none; cursor:pointer; }
.section-eyebrow { font-family: 'Caveat', cursive; font-size: 22px; color: #F472B6; font-weight: 700; line-height: 1.1; text-align: right; }

.social-dot { width: 26px; height: 26px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 10px; font-weight: 800; flex-shrink:0; }

.page-header { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; flex-wrap:wrap; }
.back-link { display:flex; align-items:center; gap:6px; font-size:12.5px; font-weight:700; color:#8B899C; margin-bottom:10px; }

.filter-tab { padding:8px 16px; border-radius:999px; font-size:13px; font-weight:600; color:#6B6980; background:#fff; border:1px solid #E9E7F2; white-space:nowrap; cursor:pointer; }
.filter-tab.active { background:#FDE8F2; color:#CC0F6E; border-color:#E8127A; }

.lib-card { background:#fff; border-radius:16px; border:1px solid #ECEBF3; overflow:hidden; display:flex; flex-direction:column; position:relative; }
.lib-card img { width:100%; height:140px; object-fit:cover; display:block; }
.lib-card .lib-body { padding:14px; display:flex; flex-direction:column; gap:4px; }
.lib-card .lib-title { font-size:14px; font-weight:700; color:#15131F; }
.lib-card .lib-meta { font-size:11.5px; color:#9C9AB0; }
.lib-card .lib-delete { position:absolute; top:8px; right:8px; width:26px; height:26px; border-radius:50%; background:rgba(21,19,31,0.55); border:none; color:#fff; cursor:pointer; display:flex; align-items:center; justify-content:center; }

.card-plain { background:#fff; border-radius:18px; border:1px solid #ECEBF3; padding:22px; }

.field-label { font-size:12.5px; font-weight:700; color:#4B4863; margin-bottom:7px; display:block; }
.field-input, .field-select, .field-textarea { width:100%; border:1.5px solid #E4E2EF; border-radius:10px; padding:10px 13px; font-size:13.5px; font-family:inherit; color:#15131F; background:#fff; }
.field-textarea { resize:none; }
.field-group { margin-bottom:16px; }
.field-row { display:flex; gap:12px; }
.field-row > div { flex:1; }

.chip { padding:8px 14px; border-radius:10px; font-size:12.5px; font-weight:600; color:#4B4863; background:#F3F2F8; border:1.5px solid transparent; cursor:pointer; }
.chip.active { background:#FDE8F2; border-color:#E8127A; color:#CC0F6E; }

.upload-zone { border:1.5px dashed #D6D3E6; border-radius:14px; padding:26px 16px; text-align:center; color:#8B899C; font-size:12.5px; background:#FAFAFC; cursor:pointer; }
.upload-zone svg { margin-bottom:8px; }
.upload-zone.has-image { padding:0; border-style:solid; overflow:hidden; }
.upload-zone.has-image img { width:100%; display:block; }

.workspace-grid { display:grid; grid-template-columns: 340px 1fr; gap:20px; align-items:start; }
@media (max-width: 900px) { .workspace-grid { grid-template-columns: 1fr; } }
.control-panel { background:#fff; border-radius:18px; border:1px solid #ECEBF3; padding:22px; display:flex; flex-direction:column; }
.preview-panel { background:#fff; border-radius:18px; border:1px solid #ECEBF3; padding:22px; min-height:520px; display:flex; flex-direction:column; gap:16px; }
.preview-frame { border-radius:14px; overflow:hidden; background:#F3F2F8; display:flex; align-items:center; justify-content:center; position:relative; min-height:280px; }
.preview-frame img { width:100%; height:100%; object-fit:cover; display:block; }

table.data-table { width:100%; border-collapse:collapse; }
table.data-table th { text-align:left; font-size:11.5px; text-transform:uppercase; letter-spacing:0.04em; color:#9C9AB0; font-weight:700; padding:10px 12px; border-bottom:1px solid #ECEBF3; }
table.data-table td { font-size:13.5px; color:#15131F; padding:13px 12px; border-bottom:1px solid #F2F1F7; }

.toggle-row { display:flex; align-items:center; justify-content:space-between; padding:14px 0; border-bottom:1px solid #F2F1F7; }
.toggle-row:last-child { border-bottom:none; }
.toggle-btn { width:40px; height:22px; border-radius:20px; position:relative; flex-shrink:0; border:none; cursor:pointer; padding:0; }
.toggle-btn.on { background:#E8127A; }
.toggle-btn.off { background:#E4E2EF; }
.toggle-btn .knob { position:absolute; top:2px; width:18px; height:18px; border-radius:50%; background:#fff; transition:left 0.15s, right 0.15s; }
.toggle-btn.on .knob { right:2px; }
.toggle-btn.off .knob { left:2px; }

.toggle-switch { position:relative; display:inline-block; width:40px; height:22px; flex-shrink:0; }
.toggle-switch input { opacity:0; width:0; height:0; }
.toggle-switch .track { position:absolute; inset:0; background:#E4E2EF; border-radius:20px; transition:background 0.15s; cursor:pointer; }
.toggle-switch .track .knob { position:absolute; top:2px; left:2px; width:18px; height:18px; border-radius:50%; background:#fff; transition:left 0.15s; }
.toggle-switch input:checked + .track { background:#E8127A; }
.toggle-switch input:checked + .track .knob { left:20px; }

.stat-card { background:#fff; border-radius:16px; border:1px solid #ECEBF3; padding:18px; display:flex; flex-direction:column; gap:6px; }
.stat-card .stat-value { font-size:24px; font-weight:800; color:#15131F; }
.stat-card .stat-label { font-size:12px; color:#9C9AB0; }

.swatch { width:100%; height:64px; border-radius:12px; margin-bottom:8px; border:none; cursor:pointer; padding:0; }

.topbar { display:flex; align-items:center; gap:24px; }
.searchbar { flex:1; max-width:440px; display:flex; align-items:center; gap:10px; background:#fff; border:1px solid #E9E7F2; border-radius:12px; padding:11px 16px; color:#9C9AB0; font-size:13.5px; }
.avatar-circle { width:38px; height:38px; border-radius:50%; background:linear-gradient(140deg,#F472B6,#E8127A); display:flex; align-items:center; justify-content:center; color:#fff; font-weight:700; font-size:14px; flex-shrink:0; }

.toast { position:fixed; top:20px; right:20px; z-index:999; background:#15131F; color:#fff; padding:13px 20px; border-radius:12px; font-size:13.5px; font-weight:600; box-shadow:0 10px 30px rgba(0,0,0,0.2); }
.toast.error { background:#CC0F6E; }

.main-content { flex:1; min-width:0; padding:26px 40px 64px; display:flex; flex-direction:column; gap:30px; }
@media (max-width: 720px) { .main-content { padding:20px 16px 48px; } .workspace-grid { grid-template-columns: 1fr; } }

.auth-wrap { min-height:100vh; display:flex; align-items:center; justify-content:center; background:#F6F6FA; padding:20px; }
.auth-card { background:#fff; border-radius:20px; border:1px solid #ECEBF3; padding:36px; width:100%; max-width:380px; display:flex; flex-direction:column; gap:16px; }
.auth-error { background:#FDEBF2; color:#CC0F6E; font-size:13px; font-weight:600; padding:10px 14px; border-radius:10px; }
