* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: Arial, sans-serif; background: #f7f7f9; color: #1f2328; }
a { text-decoration: none; color: inherit; }
.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: 280px; background: linear-gradient(180deg, #ff8a00 0%, #ff6a00 100%); color: #fff; padding: 20px 16px; position: fixed; left: 0; top: 0; bottom: 0; overflow-y: auto; display:flex; flex-direction:column; justify-content:space-between; }
.main-content { margin-left: 280px; width: calc(100% - 280px); padding: 24px; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.brand-box { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.brand-box-vertical { flex-direction: column; align-items: stretch; text-align: center; }
.brand-logo { width: 112px; height: 112px; margin: 0 auto; border-radius: 22px; background: rgba(255,255,255,.16); display: flex; align-items: center; justify-content: center; font-weight: 700; border: 1px solid rgba(255,255,255,.2); overflow: hidden; }
.brand-logo-click { cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.brand-logo-click:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(0,0,0,.18); }
.brand-logo img { width: 100%; height: 100%; object-fit: cover; }
.brand-logo.large { width: 76px; height: 76px; margin: 0 auto 12px; }
.brand-text { display: flex; flex-direction: column; gap: 4px; }
.sidebar-meta { margin-top: 14px; padding: 14px 12px; border-radius: 18px; background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.14); text-align: left; }
.meta-line { display:flex; flex-direction:column; gap:4px; margin-bottom:12px; }
.meta-line:last-child { margin-bottom:0; }
.meta-line span { font-size:12px; opacity:.85; text-transform:uppercase; letter-spacing:.05em; }
.meta-line strong { font-size:14px; line-height:1.35; }
.menu { display: flex; flex-direction: column; gap: 8px; }
.menu a { padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.06); }
.menu a.active, .menu a:hover { background: rgba(255,255,255,.18); }
.card { background: #fff; border-radius: 18px; padding: 20px; box-shadow: 0 10px 30px rgba(0,0,0,.06); margin-bottom: 22px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 22px; }
.stat-card span { display: block; color: #6b7280; margin-bottom: 10px; }
.stat-card strong { font-size: 34px; line-height: 1; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 10px; border-bottom: 1px solid #eceef2; text-align: left; }
th { color: #6b7280; font-size: 13px; text-transform: uppercase; }
.badge { display: inline-block; padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #e5e7eb; color: #111827; }
.badge-active { background: #dcfce7; color: #166534; }
.badge-expired { background: #fee2e2; color: #991b1b; }
.badge-suspended { background: #fef3c7; color: #92400e; }
.btn { display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 12px; padding: 12px 16px; cursor: pointer; font-weight: 700; background: #f3f4f6; }
.btn-small { padding: 8px 12px; border-radius: 10px; }
.btn-primary { background: #ff7a00; color: #fff; }
.w-full { width: 100%; }
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card { width: 100%; max-width: 420px; }
.login-brand { text-align: center; margin-bottom: 18px; }
label { display: block; font-weight: 700; margin: 12px 0 6px; }
input, select { width: 100%; padding: 12px 14px; border: 1px solid #d8dde6; border-radius: 12px; background: #fff; }
input:focus, select:focus { outline: none; border-color: #ff7a00; box-shadow: 0 0 0 3px rgba(255,122,0,.15); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; }
.inline-form { display: grid; grid-template-columns: 1.3fr 1.3fr auto; gap: 12px; align-items: end; }
.alert { padding: 13px 14px; border-radius: 12px; margin-bottom: 14px; }
.alert-danger { background: #fee2e2; color: #991b1b; }
.alert-success { background: #dcfce7; color: #166534; }
.license-banner { display: flex; justify-content: space-between; gap: 14px; padding: 14px 16px; border-radius: 14px; margin-bottom: 22px; }
.license-banner.ok { background: #ecfdf5; }
.license-banner.warn { background: #fff7ed; }
.license-banner.bad { background: #fef2f2; }
.mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 22px; }
.signature-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 24px; padding-top: 24px; border-top: 1px dashed #d1d5db; }
.footer-note { color: #6b7280; text-align: center; padding: 24px 0 10px; }
.sidebar-bottom { margin-top: 18px; }
.clock-card { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.16); border-radius: 18px; padding: 14px 12px; text-align: center; }
.analog-clock { width: 112px; height: 112px; margin: 0 auto 12px; border-radius: 50%; border: 4px solid rgba(255,255,255,.72); position: relative; background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 2px rgba(255,255,255,.12); }
.analog-clock::before { content:""; position:absolute; inset:8px; border-radius:50%; border:1px dashed rgba(255,255,255,.2); }
.clock-center { position:absolute; left:50%; top:50%; width:10px; height:10px; background:#fff; border-radius:50%; transform:translate(-50%,-50%); z-index:5; }
.clock-hand { position:absolute; left:50%; bottom:50%; transform-origin:bottom center; border-radius:999px; background:#fff; }
.clock-hand.hour { width:6px; height:28px; margin-left:-3px; }
.clock-hand.minute { width:4px; height:38px; margin-left:-2px; }
.clock-hand.second { width:2px; height:44px; margin-left:-1px; background:#7f1d1d; }
.clock-date { font-size:13px; font-weight:700; line-height:1.4; }
@media (max-width: 1000px) { .stats-grid, .form-grid, .mini-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .sidebar { position: static; width: 100%; } .main-content { margin-left: 0; width: 100%; } .app-shell { flex-direction: column; } .stats-grid, .form-grid, .mini-grid, .signature-row, .inline-form { grid-template-columns: 1fr; } }
@media print { .sidebar, .topbar, .license-banner, .footer-note, .menu, .btn, form { display:none !important; } .main-content { margin-left:0; width:100%; padding:0; } .card { box-shadow:none; border:1px solid #ddd; } }

.thumb-sm { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; border: 1px solid #e5e7eb; display: block; background: #fff; }
.thumb-link { display: inline-flex; }
.thumb-placeholder { width: 64px; height: 64px; border-radius: 12px; background: #f3f4f6; border: 1px dashed #d1d5db; display: inline-flex; align-items: center; justify-content: center; text-align: center; color: #6b7280; font-size: 11px; line-height: 1.2; padding: 6px; }
.thumb-placeholder.hero-placeholder { width: 100%; min-height: 340px; border-radius: 18px; font-size: 15px; }
.hero-image { width: 100%; max-height: 420px; object-fit: contain; border-radius: 18px; background: #fff; border: 1px solid #eceef2; }
.item-detail-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; align-items: start; }
.item-hero { background: #fafafa; border: 1px solid #eceef2; border-radius: 18px; padding: 12px; }
.detail-note { margin-top: 18px; padding: 14px 16px; background: #fafafa; border-radius: 14px; border: 1px solid #eceef2; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.gallery-card { border: 1px solid #eceef2; border-radius: 16px; padding: 12px; background: #fff; }
.gallery-thumb { width: 100%; height: 180px; object-fit: cover; border-radius: 12px; display: block; background: #fff; border: 1px solid #eceef2; }
.gallery-meta { margin: 10px 0; }
.gallery-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.action-stack { display: flex; gap: 8px; flex-wrap: wrap; }
.empty-box { padding: 24px; text-align: center; color: #6b7280; background: #fafafa; border: 1px dashed #d1d5db; border-radius: 16px; }
@media (max-width: 900px) { .item-detail-grid { grid-template-columns: 1fr; } }


.asset-preview-wrap { margin-top: 12px; }
.logo-preview { width: 96px; height: 96px; object-fit: cover; border-radius: 16px; border: 1px solid #eceef2; display:block; }
.banner-preview { width: 100%; max-height: 220px; object-fit: cover; border-radius: 18px; border: 1px solid #eceef2; display:block; background:#fff; }

.table-wrap table { border-collapse: separate; border-spacing: 0; }
.table-wrap th { background:#fff7ed; }
.table-wrap tr td:first-child, .table-wrap tr th:first-child { border-left:1px solid #eceef2; }
.table-wrap tr td:last-child, .table-wrap tr th:last-child { border-right:1px solid #eceef2; }
.table-wrap tbody tr:last-child td { border-bottom:1px solid #eceef2; }
.table-wrap tbody tr:hover td { background:#fffaf5; }

.inline-correct-form{margin-top:6px;display:flex;gap:6px;align-items:center;flex-wrap:wrap}.inline-correct-form input{max-width:110px;padding:6px 8px;border-radius:8px;border:1px solid #d0d7de}
