/* ============================================================
   Pastebin-style UI — Laravel demo clone
   Recreates the pastebin.com look from its public design tokens:
   header gradient #023859 → #02456c, #f7f7f7 page wrap, white
   bordered container, gray action buttons, 320px right sidebar.
   ============================================================ */

:root {
    --header-a: #023859;
    --header-b: #02456c;
    --accent: #f68e12;
    --green: #61ba65;
    --green-hover: #56b65b;
    --link: #04a;
    --text: #181818;
    --muted: #999;
    --border: #ddd;
    --wrap-bg: #f7f7f7;
    --box-bg: #fff;
    --code-bg: #f7f7f7;
    --btn-bg: #ddd;
    --btn-border: #ccc;
    --input-bg: #fff;
    --danger: #f44336;
    --font: "Segoe UI", "Trebuchet MS", "Lucida Sans Unicode", "Lucida Sans", sans-serif;
    --mono: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { height: 100%; }

body {
    min-height: 100%;
    font-family: var(--font);
    font-size: 16px;
    line-height: 24px;
    color: var(--text);
    background: var(--wrap-bg);
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

img, svg { vertical-align: middle; }

.sr-only {
    position: absolute; width: 1px; height: 1px;
    clip: rect(0 0 0 0); overflow: hidden; white-space: nowrap;
}

/* ---------------- Header ---------------- */

.header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 50px;
    z-index: 1030;
    background: linear-gradient(var(--header-a), var(--header-b));
    box-shadow: 0 1px 1px 0 rgba(0, 0, 0, .52);
    font-size: .8em;
    color: #fff;
}

.header__inner {
    max-width: 1340px;
    height: 100%;
    margin: 0 auto;
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.header__left {
    display: flex;
    align-items: center;
    height: 100%;
    min-width: 0;
}

.header__logo {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 100%;
    color: #fff;
    font-size: 1.75em;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-right: 20px;
    white-space: nowrap;
}
.header__logo:hover { color: #fff; text-decoration: none; }
.logo-icon { width: 24px; height: 24px; }

.header__links { display: flex; gap: 18px; white-space: nowrap; }
.header__links a {
    color: inherit;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 5px 0;
}
.header__links a:hover { color: #fff; text-decoration: underline; }

.header__right {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 100%;
}

.header__search { display: flex; align-items: center; }
.header__search input {
    width: 170px;
    height: 28px;
    padding: 0 10px;
    border: none;
    border-radius: 3px 0 0 3px;
    background: rgba(255, 255, 255, .15);
    color: #fff;
    font-size: 13px;
}
.header__search input::placeholder { color: rgba(255, 255, 255, .6); }
.header__search input:focus { background: rgba(255, 255, 255, .25); outline: none; }
.header__search button {
    height: 28px;
    width: 30px;
    border: none;
    border-radius: 0 3px 3px 0;
    background: rgba(255, 255, 255, .15);
    color: #fff;
    cursor: pointer;
}
.header__search button:hover { background: rgba(255, 255, 255, .3); }

.night-toggle {
    width: 30px; height: 28px;
    border: none;
    border-radius: 3px;
    background: rgba(255, 255, 255, .15);
    color: #fff;
    cursor: pointer;
}
.night-toggle:hover { background: rgba(255, 255, 255, .3); }

.btn-sign {
    display: inline-block;
    border: 1px solid #fff;
    border-radius: 3px;
    color: #fff;
    cursor: pointer;
    font-size: 1em;
    height: 30px;
    line-height: 23px;
    padding: 3px 0;
    width: 71px;
    text-align: center;
    text-transform: uppercase;
    background: transparent;
    font-family: var(--font);
    white-space: nowrap;
}
.btn-sign.sign-in:hover { background: hsla(0, 0%, 100%, .2); text-decoration: none; }
.btn-sign.sign-up { color: #023f63; background: #fff; }
.btn-sign.sign-up:hover { background: hsla(0, 0%, 100%, .8); text-decoration: none; }

.header__user { font-weight: 600; letter-spacing: .3px; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.header__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 12px 0 10px;
    border-radius: 3px;
    background-color: var(--green);
    color: #fff;
    cursor: pointer;
    font-size: 1em;
    line-height: 28px;
    text-transform: lowercase;
    white-space: nowrap;
}
.header__btn:hover { background-color: var(--green-hover); color: #fff; text-decoration: none; }

.inline-form { display: inline-block; margin: 0; }

/* ---------------- Page layout ---------------- */

.wrap {
    min-height: 100vh;
    padding: 58px 10px 10px;
    background: var(--wrap-bg);
}

.container {
    max-width: 1340px;
    margin: 0 auto;
    background: var(--box-bg);
    border: 1px solid var(--border);
    border-radius: 0 0 3px 3px;
    min-height: calc(100vh - 130px);
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 10px;
    padding: 10px 0;
}

.content-main {
    padding: 2px 10px 10px;
    min-width: 0;
}

.content__title {
    position: relative;
    color: #333;
    font-size: 1em;
    font-weight: 600;
    padding: 0 0 5px;
    border-bottom: 2px solid var(--border);
    margin-bottom: 8px;
}
.content__title.-no-border { border-bottom: none; }
.content__title.-paste { margin-top: 14px; }

.content__text { font-size: .85em; line-height: 22px; padding: 6px 0; color: var(--text); }

/* ---------------- Forms ---------------- */

.form-group { margin: 8px 0; }
.form-group label {
    display: block;
    font-size: .8em;
    font-weight: 600;
    color: #555;
    margin-bottom: 3px;
}

input[type="text"], input[type="search"], input[type="email"],
input[type="password"], select, textarea {
    font-family: var(--font);
    font-size: 14px;
    color: var(--text);
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 6px 8px;
    width: 100%;
    max-width: 100%;
}
select { width: auto; min-width: 180px; cursor: pointer; }
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--header-b);
    box-shadow: 0 0 0 2px rgba(2, 67, 108, .12);
}

.paste-textarea {
    font-family: var(--mono);
    font-size: 13px;
    line-height: 19px;
    min-height: 300px;
    resize: vertical;
    white-space: pre;
    overflow: auto;
}

.post-form__settings {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 0 24px;
}

.post-form__bottom { margin-top: 14px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.guest-note { font-size: .78em; color: #777; max-width: 560px; }

.field-error { color: var(--danger); font-size: .78em; margin-top: 3px; }

/* ---------------- Buttons ---------------- */

.btn {
    display: inline-block;
    background: var(--btn-bg);
    border: none;
    border-bottom: 2px solid var(--btn-border);
    border-radius: 3px;
    color: #000;
    cursor: pointer;
    font-family: var(--font);
    font-size: 13px;
    font-weight: 400;
    height: 29px;
    line-height: 27px;
    min-width: 73px;
    padding: 0 10px;
    text-align: center;
}
.btn:hover { opacity: .8; text-decoration: none; color: #000; }
.btn.-big { height: 35px; line-height: 33px; font-weight: 600; padding: 0 25px; }
.btn.-small { font-size: 12px; height: 22px; line-height: 19px; padding: 0 8px; min-width: auto; }
.btn.-pro {
    background: var(--green);
    color: #fff;
    border-bottom: none;
    min-width: 230px;
    min-height: 40px;
    font-size: 16px;
    line-height: 40px;
    display: block;
    text-align: center;
}

/* ---------------- Flash / alerts ---------------- */

.flash {
    border-radius: 3px;
    border: 1px solid var(--border);
    padding: 10px 14px;
    margin: 8px 0;
    font-size: .85em;
    word-break: break-word;
}
.flash--success { background: #e8f5e9; border-color: #61ba65; color: #2c4e3c; }
.flash--error { background: #fdecea; border-color: var(--danger); color: #8c1d14; }
.flash--error ul { margin: 6px 0 0 18px; }

/* ---------------- Sidebar ---------------- */

.sidebar { padding: 2px 10px 10px; min-width: 0; }

.sidebar__widget { margin-bottom: 18px; }
.sidebar__title { margin: 0 0 4px; border-bottom: 2px solid var(--border); padding-bottom: 4px; }
.sidebar__title a { color: #333; font-size: .85em; font-weight: 600; }

.sidebar__menu { list-style: none; }
.sidebar__menu li {
    font-size: .75em;
    line-height: 16px;
    padding: 6px 0 6px 18px;
    border-top: 1px dotted var(--border);
    position: relative;
    overflow: hidden;
}
.sidebar__menu li:first-child { border-top: none; }
.sidebar__menu li::before {
    content: "";
    position: absolute;
    left: 2px; top: 11px;
    width: 8px; height: 8px;
    border-radius: 2px;
    background: #ccc;
}
.sidebar__menu li.-unlisted::before { background: #f0ad4e; }
.sidebar__menu li.-private::before { background: var(--danger); }
.sidebar__menu li a { display: block; color: var(--link); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar__menu li .details { color: var(--muted); display: block; }

.ad-box {
    min-height: 100px;
    border: 1px dashed var(--border);
    border-radius: 3px;
    background: repeating-linear-gradient(45deg, transparent, transparent 12px, rgba(0, 0, 0, .02) 12px, rgba(0, 0, 0, .02) 24px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: .75em;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 18px;
}

.signup-widget .social-signup { margin-top: 12px; display: grid; gap: 6px; }
.signup-widget .social {
    display: block;
    font-size: .75em;
    padding: 6px 10px;
    border-radius: 3px;
    color: #fff;
    opacity: .85;
    cursor: not-allowed;
}
.signup-widget .social.-facebook { background: #3b5998; }
.signup-widget .social.-twitter { background: #55acee; }
.signup-widget .social.-google { background: #dd4b39; }

.details-list { font-size: .8em; margin-top: 2px; }
.details-list dt {
    float: left;
    clear: left;
    width: 110px;
    color: var(--muted);
    padding: 3px 0;
}
.details-list dd { margin-left: 118px; padding: 3px 0; word-break: break-word; }
.details-list::after { content: ""; display: block; clear: both; }

.share-box { display: flex; gap: 6px; margin: 6px 0; }
.share-box input {
    flex: 1;
    min-width: 0;
    font-family: var(--mono);
    font-size: 12px;
    color: #555;
}

/* ---------------- Paste view ---------------- */

.post-view { min-width: 0; }

.post-view__head { display: flex; align-items: center; gap: 12px; margin: 4px 0 10px; }
.user-icon {
    flex: none;
    width: 46px; height: 46px;
    border: 1px solid var(--border);
    border-radius: 3px;
    background: var(--code-bg);
    color: #888;
    font-size: 1.4em;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}
.post-view__titles { min-width: 0; }
.post-view__head h1 {
    font-size: 1.25em;
    font-weight: 600;
    color: #333;
    line-height: 1.2;
    overflow-wrap: anywhere;
}
.post-view .info-bar { color: #666; font-size: .8em; }
.post-view .info-bar .username { color: var(--link); font-weight: 600; }
.post-view .info-bar .dot { margin: 0 4px; color: #bbb; }

.post-view__actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin: 0 0 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
}

.code-wrap {
    display: flex;
    align-items: flex-start;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 3px;
    background: var(--code-bg);
}

.code-gutter {
    flex: none;
    min-width: 40px;
    padding: 7px 0;
    text-align: right;
    font-family: var(--mono);
    font-size: 12px;
    line-height: 18px;
    color: var(--muted);
    background: rgba(0, 0, 0, .03);
    border-right: 1px dotted var(--border);
    user-select: none;
}
.code-gutter span { display: block; padding: 0 8px; }

.code_box {
    flex: 1;
    min-width: 0;
    margin: 0;
    padding: 7px 15px;
    background: transparent;
    overflow: visible;
}
.code_box code {
    font-family: var(--mono);
    font-size: 12px;
    line-height: 18px;
    white-space: pre;
    display: block;
    overflow-wrap: normal;
    background: transparent;
    padding: 0;
}

/* highlight.js palette (github-light style) */
.hljs { color: #333; }
.hljs-comment, .hljs-quote { color: #998; font-style: italic; }
.hljs-keyword, .hljs-selector-tag, .hljs-subst { color: #333; font-weight: 700; }
.hljs-number, .hljs-literal, .hljs-variable, .hljs-template-variable, .hljs-tag .hljs-attr { color: #008080; }
.hljs-string, .hljs-doctag { color: #d14; }
.hljs-title, .hljs-section, .hljs-selector-id { color: #900; font-weight: 700; }
.hljs-type, .hljs-class .hljs-title { color: #458; font-weight: 700; }
.hljs-tag, .hljs-name, .hljs-attribute { color: #000080; }
.hljs-attr, .hljs-built_in { color: #0086b3; }
.hljs-meta { color: #999; }
.hljs-deletion { color: #bd2c00; background: #ffecec; }
.hljs-addition { color: #55a532; background: #eaffea; }
.hljs-emphasis { font-style: italic; }
.hljs-strong { font-weight: 700; }

/* ---------------- Tables ---------------- */

.pastes-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .82em;
    margin-top: 8px;
}
.pastes-table th, .pastes-table td {
    text-align: left;
    padding: 7px 10px;
    border-bottom: 1px dotted var(--border);
}
.pastes-table th { color: #555; border-bottom: 2px solid var(--border); font-size: .95em; }
.pastes-table td { color: #444; }
.pastes-table td:first-child { font-weight: 600; max-width: 380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------- Pagination ---------------- */

.pagination { margin: 14px 0 6px; display: flex; gap: 5px; flex-wrap: wrap; }
.pg-btn {
    display: inline-block;
    background: var(--btn-bg);
    border-bottom: 2px solid var(--btn-border);
    border-radius: 3px;
    color: #000;
    font-size: 12px;
    line-height: 19px;
    height: 22px;
    padding: 0 8px;
}
a.pg-btn:hover { opacity: .8; text-decoration: none; color: #000; }
.pg-btn.is-current { background: var(--header-b); color: #fff; border-bottom-color: var(--header-a); }
.pg-btn.is-disabled { opacity: .5; cursor: default; }
.pg-dots { color: var(--muted); font-size: 12px; line-height: 22px; }

/* ---------------- Auth / password boxes ---------------- */

.auth-box {
    max-width: 480px;
    margin: 20px auto;
    padding: 18px 20px;
    border: 1px solid var(--border);
    border-radius: 3px;
    background: var(--box-bg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
}
.auth-box .btn { margin-top: 6px; }
.auth-alt { display: block; font-size: .78em; color: #777; margin-top: 12px; }
.form-check { display: flex; align-items: center; gap: 6px; }
.form-check input { width: auto; }
.form-check label { margin: 0; font-weight: 400; }

/* ---------------- Cookie bar ---------------- */

.cookie-bar {
    position: fixed;
    left: 12px; right: 12px; bottom: 12px;
    z-index: 1050;
    max-width: 760px;
    margin: 0 auto;
    background: var(--box-bg);
    border: 1px solid var(--border);
    border-radius: 3px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
    padding: 10px 14px;
    font-size: .78em;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

/* ---------------- Footer ---------------- */

.footer {
    background: var(--box-bg);
    border-top: 1px solid var(--border);
    margin-top: 14px;
    font-size: .8em;
    color: #ccc;
}

.footer__inner {
    max-width: 1340px;
    margin: 0 auto;
    padding: 18px 10px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.footer__links { line-height: 24px; }
.footer__links a { color: var(--muted); }
.footer__links a:hover { color: #666; }
.footer__links span { margin: 0 7px; color: #ddd; }

.footer__copy { margin-top: 10px; color: #bbb; font-size: .92em; max-width: 720px; }

.footer__right { display: flex; gap: 8px; padding-top: 4px; }
.icon-link { opacity: .8; }
.icon-link:hover { opacity: 1; }

/* ---------------- Languages list ---------------- */

.languages-list {
    columns: 3;
    font-size: .82em;
    margin: 10px 0;
    padding-left: 20px;
}
.languages-list li { padding: 2px 0; }
.languages-list code { font-family: var(--mono); color: #666; }

/* ---------------- Night mode ---------------- */

html.night {
    --wrap-bg: #181818;
    --box-bg: #252525;
    --code-bg: #1d1d1d;
    --btn-bg: #3c3c3c;
    --btn-border: #2b2b2b;
    --border: #3c3c3c;
    --text: #ddd;
    --link: #6d9eeb;
    --input-bg: #1d1d1d;
}

html.night body { background: var(--wrap-bg); }
html.night .content__title, html.night .post-view__head h1 { color: #ddd; }
html.night .sidebar__title a { color: #ddd; }
html.night .content__text { color: #ccc; }
html.night .pastes-table th { color: #aaa; }
html.night .pastes-table td { color: #ccc; }
html.night .post-view .info-bar { color: #999; }
html.night .user-icon { background: #1d1d1d; color: #999; }
html.night .guest-note, html.night .auth-alt { color: #999; }
html.night .form-group label { color: #aaa; }
html.night .footer { color: #666; }
html.night .footer__copy { color: #555; }
html.night .cookie-bar { background: #252525; color: #aaa; }
html.night .flash--success { background: #1e2b1e; color: #9fd3a1; }
html.night .flash--error { background: #33201e; color: #f0a8a0; }
html.night .code-gutter { background: rgba(255, 255, 255, .04); color: #777; }
html.night .btn { color: #ddd; }
html.night .btn:hover { color: #fff; }
html.night .pg-btn { color: #ddd; }
html.night a.pg-btn:hover { color: #fff; }
html.night .pg-btn.is-current { background: var(--header-b); color: #fff; }
html.night .sidebar__menu li::before { background: #555; }
html.night .auth-box { box-shadow: none; }
html.night .details-list dt { color: #888; }
html.night .details-list dd { color: #ccc; }
html.night .languages-list code { color: #888; }

/* highlight.js night palette (one-dark style) */
html.night .hljs { color: #abb2bf; }
html.night .hljs-comment, html.night .hljs-quote { color: #5c6370; }
html.night .hljs-keyword, html.night .hljs-selector-tag, html.night .hljs-subst { color: #c678dd; }
html.night .hljs-number, html.night .hljs-literal, html.night .hljs-variable, html.night .hljs-template-variable, html.night .hljs-tag .hljs-attr { color: #d19a66; }
html.night .hljs-string, html.night .hljs-doctag { color: #98c379; }
html.night .hljs-title, html.night .hljs-section, html.night .hljs-selector-id { color: #61afef; }
html.night .hljs-type, html.night .hljs-class .hljs-title { color: #e5c07b; }
html.night .hljs-tag, html.night .hljs-name, html.night .hljs-attribute { color: #e06c75; }
html.night .hljs-attr, html.night .hljs-built_in { color: #56b6c2; }
html.night .hljs-meta { color: #777; }

/* ---------------- Print ---------------- */

@media print {
    .header, .footer, .sidebar, .cookie-bar, .post-view__actions,
    .night-toggle, .header__search, .ad-box, .pagination { display: none !important; }
    body { background: #fff; }
    .wrap { padding: 0; }
    .container { border: none; grid-template-columns: 1fr; min-height: auto; }
    .code-wrap { border-color: #999; background: #fff; }
    .code-gutter { background: #f0f0f0; color: #666; }
}

/* ---------------- Responsive ---------------- */

@media (max-width: 1100px) {
    .header__links { display: none; }
}

@media (max-width: 900px) {
    .container { grid-template-columns: 1fr; }
    .post-form__settings { grid-template-columns: 1fr; }
    .languages-list { columns: 2; }
    .header__search input { width: 110px; }
    .header__logo span { display: none; }
    .header__logo { margin-right: 8px; }
}

@media (max-width: 640px) {
    .header__search { display: none; }
    .btn-sign { width: auto; padding: 3px 10px; }
    .footer__inner { flex-direction: column; }
    .languages-list { columns: 1; }
}

/* ---------------- Admin panel ---------------- */

.header__admin {
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 5px 10px;
    border: 1px solid rgba(255, 255, 255, .5);
    border-radius: 3px;
}
.header__admin:hover { background: rgba(255, 255, 255, .15); text-decoration: none; }

.admin-wrap {
    max-width: 1340px;
    margin: 0 auto;
    background: var(--box-bg);
    border: 1px solid var(--border);
    border-radius: 0 0 3px 3px;
    min-height: calc(100vh - 160px);
    display: grid;
    grid-template-columns: 230px 1fr;
}

.admin-nav { background: #032c47; padding: 10px 0 20px; }
.admin-nav .group {
    font-size: .7em;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #7fa6c4;
    padding: 16px 16px 5px;
}
.admin-nav a {
    display: block;
    color: #cfe3f2;
    font-size: .85em;
    padding: 9px 16px;
    border-left: 3px solid transparent;
}
.admin-nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; text-decoration: none; }
.admin-nav a.active { border-left-color: #f68e12; background: rgba(255, 255, 255, .1); color: #fff; font-weight: 600; }

.admin-main { padding: 4px 16px 24px; min-width: 0; }

.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.admin-panel { margin: 12px 0; min-width: 0; }

.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin: 10px 0 4px;
}
.stat-card { border: 1px solid var(--border); border-radius: 3px; padding: 12px 14px; background: var(--box-bg); }
.stat-card .num { font-size: 1.5em; font-weight: 700; color: #023859; line-height: 1.2; }
html.night .stat-card .num { color: #6d9eeb; }
.stat-card .lbl { font-size: .72em; color: #777; text-transform: uppercase; letter-spacing: .5px; }

.chart {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 150px;
    padding: 10px 4px 24px;
    border-bottom: 1px solid var(--border);
}
.chart .bar {
    flex: 1;
    min-height: 3px;
    background: linear-gradient(#02456c, #023859);
    border-radius: 2px 2px 0 0;
    position: relative;
}
html.night .chart .bar { background: linear-gradient(#024a78, #023859); }
.chart .bar:hover { opacity: .85; }
.chart .bar span {
    position: absolute;
    bottom: -18px; left: 0; right: 0;
    text-align: center;
    font-size: 9px;
    color: var(--muted);
    transform: rotate(-45deg);
    transform-origin: top right;
}

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 0; }
.chip {
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 3px 12px;
    font-size: .78em;
    background: var(--code-bg);
}
.chip strong { color: #023859; }
html.night .chip strong { color: #6d9eeb; }

.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 14px; }
.filter-bar input[type="text"], .filter-bar input[type="search"] { width: 260px; }
.filter-bar select { width: auto; min-width: 140px; }

.inline-edit {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    flex-wrap: wrap;
}
.inline-edit input[type="text"] { width: 180px; }
.inline-edit .sort-input { width: 70px; }
.inline-edit code { color: var(--muted); font-size: .85em; }
.inline-edit .check-label { display: flex; align-items: center; gap: 5px; font-size: .8em; color: #555; }
.inline-edit .check-label input { width: auto; }
.inline-edit .count { font-size: .78em; color: var(--muted); margin-left: auto; }
.row-actions td { border-bottom: 1px dotted var(--border); padding: 4px 10px; }
.row-actions:last-child td { border-bottom: none; }

.mono { font-family: var(--mono); font-size: 12px; }

.preview-panel { background: var(--code-bg); border: 1px solid var(--border); border-radius: 3px; padding: 0 14px 14px; }
.preview-header {
    height: 50px;
    background: linear-gradient(#023859, #02456c);
    border-radius: 3px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    margin: 8px 0;
}
.preview-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
}
.preview-logo .logo-icon, .preview-logo svg { width: 24px; height: 24px; }
.preview-favicon { width: 32px; height: 32px; }
.preview-favicon svg { width: 100%; height: 100%; }

.flag {
    display: inline-block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .5px;
    border-radius: 2px;
    padding: 1px 5px;
    margin-right: 3px;
    color: #fff;
}
.flag.-lock { background: #f0ad4e; }
.flag.-burn { background: var(--danger); }
.flag.-expired { background: #888; }

.tag-row { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 0 2px; }
.tag-chip {
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 2px 12px;
    font-size: .78em;
    color: var(--link);
    background: var(--code-bg);
}
.tag-chip:hover { text-decoration: none; border-color: var(--header-b); }

.num-cell { white-space: nowrap; color: var(--muted); }

@media (max-width: 900px) {
    .admin-wrap { grid-template-columns: 1fr; }
    .admin-nav { display: flex; flex-wrap: wrap; padding: 6px; }
    .admin-nav .group { display: none; }
    .admin-nav a { border-left: none; border-bottom: 2px solid transparent; padding: 8px 10px; }
    .admin-nav a.active { border-bottom-color: #f68e12; }
    .admin-grid { grid-template-columns: 1fr; }
}
