:root {
    --primary: #233676;
    --secondary: #f3953e;
    --bg: #f4f6fb;
    --text: #172033;
    --muted: #6b7280;
    --white: #ffffff;
    --border: #e4e8f1;
    --danger: #c93636;
    --success: #147a45;
    --shadow: 0 18px 45px rgba(35, 54, 118, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
}
button, input, textarea, select { font: inherit; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.shell { min-height: 100vh; }
.topbar {
    background: var(--primary);
    color: var(--white);
    position: sticky;
    top: 0;
    z-index: 20;
    box-shadow: 0 8px 30px rgba(18, 27, 65, .18);
}
.topbar__inner {
    width: min(1180px, calc(100% - 32px));
    min-height: 72px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}
.brand-system { display: flex; align-items: center; gap: 12px; font-weight: 800; }
.brand-system__mark {
    width: 42px; height: 42px; border-radius: 13px;
    display: grid; place-items: center;
    background: var(--secondary); color: var(--primary);
    font-weight: 900;
}
.topbar__actions { display: flex; gap: 10px; align-items: center; }

.btn {
    border: 0;
    border-radius: 12px;
    padding: 11px 16px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 800;
    transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--secondary { background: var(--secondary); color: #2a2a2a; }
.btn--primary { background: var(--primary); color: #fff; }
.btn--light { background: #fff; color: var(--primary); }
.btn--outline { background: transparent; color: var(--primary); border: 1px solid var(--border); }
.btn--danger { background: #fff0f0; color: var(--danger); border: 1px solid #ffd0d0; }
.btn--small { padding: 8px 11px; min-height: 36px; font-size: 13px; }

.container { width: min(1180px, calc(100% - 32px)); margin: auto; }
.hero {
    padding: 64px 0 30px;
    background:
      radial-gradient(circle at 85% 15%, rgba(243,149,62,.22), transparent 28%),
      linear-gradient(180deg, #edf1ff 0%, var(--bg) 100%);
}
.hero__eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--primary); font-weight: 900; text-transform: uppercase;
    letter-spacing: .08em; font-size: 12px;
}
.hero h1 {
    margin: 13px 0 12px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.04;
    max-width: 850px;
    color: var(--primary);
}
.hero p { max-width: 720px; color: var(--muted); font-size: 17px; line-height: 1.65; }

.create-strip {
    margin-top: 30px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.create-strip__icon {
    width: 52px; height: 52px; border-radius: 16px;
    background: rgba(243,149,62,.18); color: var(--primary);
    display: grid; place-items: center; font-size: 28px; font-weight: 900;
    flex: 0 0 auto;
}
.create-strip__content { display: flex; align-items: center; gap: 15px; }
.create-strip h2 { font-size: 18px; margin: 0 0 5px; }
.create-strip p { margin: 0; font-size: 14px; }

.section { padding: 32px 0 70px; }
.section-head { display: flex; justify-content: space-between; gap: 16px; align-items: end; margin-bottom: 20px; }
.section-head h2 { margin: 0; color: var(--primary); font-size: 26px; }
.section-head p { margin: 7px 0 0; color: var(--muted); }

.brand-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.brand-card {
    --brand-primary: #233676;
    --brand-secondary: #f3953e;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 22px;
    min-height: 264px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(35,54,118,.08);
    transition: transform .2s ease, box-shadow .2s ease;
    display: flex; flex-direction: column;
}
.brand-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.brand-card::before {
    content: ""; position: absolute; inset: 0 0 auto 0; height: 7px;
    background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary));
}
.brand-card::after {
    content: ""; position: absolute; width: 145px; height: 145px; right: -55px; top: 25px;
    border-radius: 999px; background: var(--brand-secondary); opacity: .09;
}
.brand-card__logo {
    width: 68px; height: 68px; border-radius: 18px;
    border: 1px solid var(--border); background: #fff;
    display: grid; place-items: center; overflow: hidden;
    color: var(--brand-primary); font-weight: 900; font-size: 23px;
    position: relative; z-index: 2;
}
.brand-card__logo img { width: 100%; height: 100%; object-fit: contain; padding: 7px; }
.brand-card h3 { margin: 18px 0 8px; font-size: 22px; color: var(--brand-primary); }
.brand-card p { color: var(--muted); line-height: 1.55; margin: 0 0 20px; flex: 1; }
.brand-card__meta { display: flex; gap: 7px; margin-bottom: 17px; }
.color-dot { width: 23px; height: 23px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--border); }
.brand-card__enter { background: var(--brand-primary); color: #fff; width: 100%; }
.brand-card__enter:hover { box-shadow: 0 10px 24px color-mix(in srgb, var(--brand-primary) 25%, transparent); }

.empty {
    grid-column: 1 / -1; padding: 50px 24px; text-align: center;
    border: 2px dashed #ccd3e5; border-radius: 20px; background: #fff;
}
.empty h3 { color: var(--primary); margin: 0 0 8px; }
.empty p { color: var(--muted); }

.panel {
    background: #fff; border: 1px solid var(--border); border-radius: 20px;
    box-shadow: 0 12px 34px rgba(35,54,118,.09); padding: 24px;
}
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field--full { grid-column: 1 / -1; }
.field label { font-weight: 800; font-size: 14px; color: #34405a; }
.field input, .field textarea, .field select {
    width: 100%; border: 1px solid #ccd3e2; border-radius: 12px;
    min-height: 46px; padding: 11px 13px; outline: none; background: #fff;
}
.field textarea { min-height: 92px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(35,54,118,.10); }
.form-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 18px; }

.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: linear-gradient(145deg,#eaf0ff,#fff7ee); }
.login-card { width: min(430px,100%); background:#fff; border:1px solid var(--border); border-radius:24px; padding:28px; box-shadow:var(--shadow); }
.login-card h1 { color: var(--primary); margin: 0 0 8px; }
.login-card p { color: var(--muted); margin: 0 0 22px; }

.admin-layout { min-height: 100vh; }
.admin-main { padding: 30px 0 60px; }
.admin-head { display:flex; justify-content:space-between; align-items:flex-start; gap:18px; margin-bottom:22px; }
.admin-head h1 { margin:0; color:var(--primary); }
.admin-head p { margin:7px 0 0; color:var(--muted); }
.admin-grid { display:grid; grid-template-columns: 390px minmax(0,1fr); gap:22px; align-items:start; }
.admin-list { display:grid; gap:12px; }
.admin-brand {
    border:1px solid var(--border); border-radius:16px; padding:14px;
    display:grid; grid-template-columns:52px minmax(0,1fr); gap:12px; align-items:center;
}
.admin-brand__logo { width:52px; height:52px; border-radius:14px; overflow:hidden; border:1px solid var(--border); display:grid; place-items:center; font-weight:900; }
.admin-brand__logo img { width:100%; height:100%; object-fit:contain; padding:5px; }
.admin-brand h3 { margin:0 0 3px; font-size:16px; }
.admin-brand p { margin:0; color:var(--muted); font-size:13px; }
.admin-brand__actions { grid-column:1/-1; display:flex; gap:7px; flex-wrap:wrap; }
.status { display:inline-flex; align-items:center; border-radius:999px; padding:4px 8px; font-size:12px; font-weight:800; }
.status--on { color:#116b3a; background:#e9f8ef; }
.status--off { color:#8d3131; background:#fff0f0; }

.flash { border-radius:13px; padding:12px 14px; margin-bottom:18px; font-weight:700; }
.flash--success { background:#e8f8ef; color:#116b3a; border:1px solid #c9edd8; }
.flash--error { background:#fff0f0; color:#9e2f2f; border:1px solid #ffd2d2; }

.brand-home {
    --brand-primary:#233676; --brand-secondary:#f3953e;
    min-height:100vh; background:linear-gradient(145deg, color-mix(in srgb,var(--brand-primary) 8%, white), #fff);
}
.brand-hero { padding:68px 0 35px; }
.brand-hero__box { background:#fff; border-radius:26px; padding:28px; border:1px solid var(--border); box-shadow:var(--shadow); display:flex; justify-content:space-between; gap:25px; align-items:center; }
.brand-identity { display:flex; align-items:center; gap:18px; }
.brand-identity__logo { width:86px; height:86px; border-radius:22px; border:1px solid var(--border); overflow:hidden; display:grid; place-items:center; font-size:30px; font-weight:900; color:var(--brand-primary); }
.brand-identity__logo img { width:100%; height:100%; object-fit:contain; padding:8px; }
.brand-identity h1 { margin:0 0 7px; color:var(--brand-primary); }
.brand-identity p { margin:0; color:var(--muted); }
.module-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; padding-bottom:65px; }
.module-card { background:#fff; border:1px solid var(--border); border-radius:22px; padding:26px; min-height:230px; box-shadow:0 12px 32px rgba(35,54,118,.08); display:flex; flex-direction:column; }
.module-card__icon { width:58px; height:58px; border-radius:17px; background:color-mix(in srgb,var(--brand-secondary) 18%, white); color:var(--brand-primary); display:grid; place-items:center; font-size:26px; }
.module-card h2 { color:var(--brand-primary); margin:18px 0 8px; }
.module-card p { color:var(--muted); line-height:1.55; flex:1; }
.module-card .btn { background:var(--brand-primary); color:#fff; }

.footer { padding:22px 0 34px; color:var(--muted); text-align:center; font-size:13px; }

@media (max-width: 900px) {
    .brand-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .admin-grid { grid-template-columns: 1fr; }
    .create-strip, .brand-hero__box { align-items:flex-start; flex-direction:column; }
}
@media (max-width: 640px) {
    .topbar__inner { min-height:64px; }
    .brand-system span:last-child { display:none; }
    .hero { padding-top:42px; }
    .hero h1 { font-size:36px; }
    .brand-grid, .module-grid, .form-grid { grid-template-columns:1fr; }
    .field--full { grid-column:auto; }
    .section-head, .admin-head { align-items:flex-start; flex-direction:column; }
    .create-strip__content { align-items:flex-start; }
    .create-strip { padding:17px; }
    .brand-card { min-height:240px; }
    .brand-identity { align-items:flex-start; }
    .brand-identity__logo { width:70px; height:70px; }
}
