@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@100;200;300;400;500;600;700&family=Manrope:wght@100;200;300;400;500;600;700;800&display=swap');
:root,
:root[data-theme="dark"] {
    color-scheme: dark;

    --bg: #0d1018;
    --card: #161a23;
    --head: #1b202b;
    --hover: #1f2533;
    --input: #0f131b;
    --line: #272d3a;

    --text: #e5e8ef;
    --muted: #8a93a5;

    --primary: #52988a;
    --primary-h: #437a76;
    --on-primary: #fff;

    --top: #10131b;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);

    --red: #f87171;
    --blue: #4c8db1;
    --orange: #fb923c;
    --green: #4ade80;
    --gray: #a3acbd;
}

:root[data-theme="light"] {
    color-scheme: light;

    --bg: #f4f6fa;
    --card: #fff;
    --head: #f8fafc;
    --hover: #f1f5fd;
    --input: #fff;
    --line: #e1e6ee;

    --text: #1f2933;
    --muted: #6b7785;

     --primary: #52988a;
    --primary-h: #437a76;
    --on-primary: #fff;

    --top: #111827;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);

    --red: #b91c1c;
    --blue: #1d4ed8;
    --orange: #c2410c;
    --green: #15803d;
    --gray: #374151;
}

/* ========================================
   Global
======================================== */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-size: 13px;
    font-family: "DM Sans", sans-serif;
    background: var(--bg);
    color: var(--text);
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ========================================
   Header / Navigation
======================================== */

.top {
    display: flex;
    align-items: center;
    gap: 24px;
    height: 56px;
    padding: 0 24px; 
    background: var(--top);
    border-bottom: 1px solid var(--line);
    color: #fff;
}

.top a {
    color: #e5e8ef;
}

.top a.brand,h1.brand {
    font-size: 3.0em;
    font-weight: 200;
    color:var(--primary);
    text-decoration:none;
    
}

.top a.brand svg,h1.brand svg{
 margin-right:8px;
  
}

.top nav {
    display: flex;
    flex: 1;
    gap: 18px;
}

.top nav a{
	margin-top:6px;
}

.top nav a, .who a{
	border:1px solid red;
	padding:4px 8px;
	border-radius:6px;
	border:1px solid var(--primary);
	color:var(--primary);
}
.who {
    display: flex;
    align-items: center;
    gap: 8px;

    font-size: 14px;
    color: #c3c9d6;
}

.icon-btn {
    padding: 3px 8px;

    background: transparent;
    border: 1px solid var(--line);
    border-radius: 8px;

    font-size: 14px;
    cursor: pointer;
}

/* ========================================
   Main Content
======================================== */

main {
    max-width: 90%;
    margin: 24px auto;
    padding: 0 20px;
}

h1 {
    margin: 0 0 14px;
    font-size: 27px;
    font-weight: 200;
}

h2 {
    margin: 26px 0 8px;
    font-size: 17px;
}

.bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.muted {
    color: var(--muted);
    font-weight: 400;
}

.small {
    font-size: 13px;
}

/* ========================================
   Cards
======================================== */

.card {
    padding: 20px;

    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.scroll {
    overflow-x: auto;
    padding: 0;
}

/* ========================================
   Buttons
======================================== */

.btn {
    display: inline-block;
    padding: 8px 16px;

    background: var(--head);
    border: 1px solid var(--line);
    border-radius: 8px;

    color: var(--text);
    font: inherit;
    cursor: pointer;

    transition: 0.15s;
}

.btn:hover {
    background: var(--hover);
    border-color: var(--primary);
    text-decoration: none;
}

.btn.primary {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--on-primary);
}

.btn.primary:hover {
    background: var(--primary-h);
}

/* ========================================
   Messages
======================================== */

.msg {
    margin-bottom: 16px;
    padding: 10px 14px;

    border: 1px solid transparent;
    border-radius: 8px;
}

.msg.ok {
    background: color-mix(in srgb, var(--green) 14%, transparent);
    color: var(--green);
    border-color: color-mix(in srgb, var(--green) 35%, transparent);
}

.msg.error {
    background: color-mix(in srgb, var(--red) 14%, transparent);
    color: var(--red);
    border-color: color-mix(in srgb, var(--red) 35%, transparent);
}

/* ========================================
   Data Tables
======================================== */

table.dt {
    width: 100%;
    border-collapse: collapse;
}

.dt th,
.dt td {
    padding: 9px 12px;

    border-bottom: 1px solid var(--line);

    text-align: left;
    vertical-align: middle;
}

.dt thead th {
    background: var(--head);
    color: var(--muted);

    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.dt th.sortable {
    cursor: pointer;
    user-select: none;
}

.dt th.asc::after {
    content: " ▲";
    font-size: 10px;
}

.dt th.desc::after {
    content: " ▼";
    font-size: 10px;
}

.dt tr.filters td {
    padding: 4px 8px;
    background: var(--head);
}

.dt .filters input,
.dt .filters select {
    width: 100%;
    padding: 4px 6px;

    background: var(--input);
    border: 1px solid var(--line);
    border-radius: 6px;

    color: var(--text);
}

.dt tbody tr {
    cursor: pointer;
}

.dt tbody tr:hover {
    background: var(--hover);
}

.dt tbody tr:last-child td {
    border-bottom: 0;
}

.c {
    text-align: center !important;
}

/* ========================================
   Pagination
======================================== */

.pager {
    display: flex;
    justify-content: center;
    gap: 4px;

    margin: 16px 0;
}

.pager button,
.pager select {
    padding: 5px 10px;

    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 6px;

    color: var(--text);
    cursor: pointer;
}

.pager button.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--on-primary);
}

.pager button:disabled {
    opacity: 0.4;
    cursor: default;
}

/* ========================================
   Badges
======================================== */

.badge {
    display: inline-block;
    padding: 1px 10px;

    border: 1px solid transparent;
    border-radius: 999px;

    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.badge.red {
    color: var(--red);
    background: color-mix(in srgb, var(--red) 16%, transparent);
    border-color: color-mix(in srgb, var(--red) 30%, transparent);
}

.badge.blue {
    color: var(--blue);
    background: color-mix(in srgb, var(--blue) 16%, transparent);
    border-color: color-mix(in srgb, var(--blue) 30%, transparent);
}

.badge.orange {
    color: var(--orange);
    background: color-mix(in srgb, var(--orange) 16%, transparent);
    border-color: color-mix(in srgb, var(--orange) 30%, transparent);
}

.badge.green {
    color: var(--green);
    background: color-mix(in srgb, var(--green) 16%, transparent);
    border-color: color-mix(in srgb, var(--green) 30%, transparent);
}

.badge.gray {
    color: var(--gray);
    background: color-mix(in srgb, var(--gray) 16%, transparent);
    border-color: color-mix(in srgb, var(--gray) 30%, transparent);
}

/* ========================================
   Forms
======================================== */

.form {
    max-width: 60%;
}

.form label {
    display: block;
    margin-bottom: 14px;
    font-weight: 500;
}

.form input[type="text"],
.form select,
.form textarea,
.login-card input {
    display: block;
    width: 100%;
    margin-top: 4px;
    padding: 8px 10px;

    background: var(--input);
    border: 1px solid var(--line);
    border-radius: 8px;

    color: var(--text);
    font: inherit;
}

.form input:focus,
.form select:focus,
.form textarea:focus,
.login-card input:focus,
.dt .filters :focus {
    outline: 2px solid color-mix(in srgb, var(--primary) 55%, transparent);
    border-color: var(--primary);
}

.form select {
    max-width: 260px;
}

.form textarea {
    resize: vertical;
}

.form input[type="file"] {
    display: block;
    margin-top: 6px;

    color: var(--muted);
    font-weight: 400;
}

/* ========================================
   Rows / Labels
======================================== */

.row {
    display: flex;
    gap: 16px;
    margin-bottom: 14px;
}

.lbl {
    width: 130px;
    flex: none;

    color: var(--muted);
    font-weight: 500;
}

/* ========================================
   Content / Images
======================================== */

.pre {
    white-space: pre-wrap;
    word-break: break-word;
}

.images img {
    height: 90px;
    margin: 0 8px 8px 0;

    border: 1px solid var(--line);
    border-radius: 8px;

    transition: 0.15s;
}

.images img:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* ========================================
   Comments
======================================== */

.comments {
    max-height: 260px;
    overflow: auto;
    margin-bottom: 14px;
}

.comment {
    margin-bottom: 8px;
    padding: 10px 12px;

    background: var(--input);
    border: 1px solid var(--line);
    border-radius: 8px;
}

/* ========================================
   Actions
======================================== */

.actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* ========================================
   Login
======================================== */

.login-body {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
}

.login-card {
    width: 400px;
    padding: 30px 50px;

    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
}

.login-card h1 {
    margin-bottom: 4px;
}

.login-card label {
    display: block;
    margin: 14px 0;
    font-weight: 500;
}

.login-card .btn {
    width: 100%;
}
