:root {
    --bg-body: #e7ebf0;
    --bg-card: #ffffff;
    --bg-card-soft: #f4f7fb;
    --accent: #2a4cf5;
    --accent-soft: rgba(0,136,204,0.12);
    --text-main: #17212b;
    --text-muted: #6b7280;
    --border-subtle: #bfc8d0;
    --danger: #e53935;
    --success: #22c55e;
    --warning: #facc15;
    --radius-lg: 18px;
    --radius-sm: 10px;
    --shadow-soft: 0 10px 28px rgba(15,23,42,0.10);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
    background: radial-gradient(circle at top, #f6f8fc 0, #e7ebf0 55%, #dce4f3 100%);
    color: var(--text-main);
}

a {
    color: #2473e2;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

.bg-body {
    min-height: 100vh;
}

/* Header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(18px);
    background: rgba(255,255,255,0.96);
    border-bottom: 1px solid rgba(15,23,42,0.06);
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}



.logo a {
    font-weight: 800;
    font-size: 20px;
    letter-spacing: 0.05em;
    color: var(--text-main);
}
.logo span {
    color: var(--accent);
}


.launch-banner {
    margin-bottom: 24px;
    padding: 20px 24px;
    border-radius: 16px;
    background: radial-gradient(circle at top left, #dbeafe 0, #bfdbfe 45%, #93c5fd 100%);
    color: #0f172a;
    display: flex;
    gap: 32px;
    align-items: stretch;
    box-shadow: 0 20px 40px rgba(15,23,42,0.16);
}

.launch-banner__left,
.launch-banner__right {
    flex: 1;
    min-width: 0;
}

.launch-banner__right {
    display: flex;
    align-items: center;
    justify-content: center;
}

.launch-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: rgba(255,255,255,0.96);
    border: 1px solid rgba(148,163,184,0.5);
    margin-bottom: 10px;
    color: #0f172a;
}

.launch-title {
    font-size: 26px;
    line-height: 1.2;
    margin: 0 0 8px;
}

.launch-text {
    margin: 0 0 16px;
    font-size: 14px;
    color: var(--text-muted);
}

.launch-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.launch-actions .btn {
    border-radius: 999px;
    padding-left: 16px;
    padding-right: 16px;
}

.launch-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.launch-chip {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(255,255,255,0.96);
    border: 1px solid rgba(148,163,184,0.5);
    color: var(--text-muted);
}

/* Правая карточка */
.launch-card {
    width: 100%;
    max-width: 320px;
    padding: 16px 18px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    backdrop-filter: blur(10px);
}

.launch-card-row + .launch-card-row {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(15,23,42,0.06);
}

.launch-card-label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.launch-card-value {
    font-size: 13px;
    color: var(--text-main);
}

/* Адаптив */
@media (max-width: 768px) {
    .launch-banner {
        flex-direction: column;
        padding: 16px 14px;
    }
    .launch-title {
        font-size: 22px;
    }
    .launch-card {
        max-width: 100%;
    }
}

.nav {
    display: flex;
    gap: 12px;
    align-items: center;
}

.nav-link {
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 14px;
    color: var(--text-muted);
}
.nav-link--admin {
    border: 1px solid rgba(148,163,184,0.35);
}
.nav-link:hover {
    background: var(--accent-soft);
    color: var(--text-main);
}

.header-user {
    display: flex;
    align-items: center;
    gap: 10px;
}
.tabs--chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.tab-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.5);
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    background: #ffffff;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
}

.tab-chip:hover {
    border-color: rgba(0,136,204,0.8);
    background: rgba(0,136,204,0.06);
    color: var(--text-main);
}

.tab-chip--active {
    border-color: rgba(248,252,252,1);
    background: linear-gradient(135deg, #54b0fe, #2a4cf5);
    color: #f9fafb;
}

.tab-chip__label {
    font-weight: 500;
}

.tab-chip__count {
    padding: 2px 7px;
    border-radius: 999px;
    background: #edf1f4;
    font-size: 11px;
    color: var(--text-muted);
}

.task-sections-grid {
    display: grid;
    gap: 16px;
}

@media (min-width: 900px) {
    .task-sections-grid {
        grid-template-columns: 1.5fr 1fr;
    }
}

.task-section {
    border-radius: 14px;
    padding: 12px 14px;
    background: var(--bg-card-soft);
    border: 1px solid var(--border-subtle);
}

.task-section-header {
    margin-bottom: 8px;
}

.task-section-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 500;
    padding: 3px 9px;
    border-radius: 999px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.task-section-tag--blue {
    background: rgba(59,130,246,0.12);
    color: #2563eb;
}

.task-section-tag--violet {
    background: rgba(129,140,248,0.12);
    color: #6366f1;
}

.task-section-body p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}


.user-info {
    display: flex;
    flex-direction: column;
    font-size: 13px;
    align-items: flex-end;
}
.user-name {
    font-weight: 500;
}
.user-balance {
    color: var(--accent);
    font-weight: 500;
}
.user-balance .unit {
    color: var(--text-muted);
    font-size: 11px;
}

.user-actions {
    display: flex;
    gap: 6px;
}

/* Buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,0.5);
    cursor: pointer;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 500;
    background: var(--bg-card-soft);
    color: var(--text-main);
}
.btn:hover {
    background: #e2ecf9;
}
.btn-primary {
    background: linear-gradient(135deg, #54b0fe, #2a4cf5);
    color: #f9fafb;
    border-color: rgba(248, 252, 252, 1);
}
.btn-primary:hover {
    background: linear-gradient(135deg, #38bdf8, #54b0fe);
}
.btn-secondary {
    border: 1px solid rgba(148,163,184,0.6);
    background: #ffffff;
}
.btn-ghost {
    background: transparent;
    border: 1px solid rgba(148,163,184,0.4);
}
.btn-sm {
    padding: 5px 10px;
    font-size: 13px;
}
.btn-full {
    width: 100%;
}

/* Layout */

.site-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 18px 16px 32px;
}

.shell {
    max-width: 1100px;
    margin: 0 auto;
}

.title {
    font-size: 26px;
    margin: 0 0 6px;
}
.subtitle {
    margin: 0 0 12px;
    color: var(--text-muted);
    font-size: 14px;
}

.section-title {
    font-size: 18px;
    margin: 18px 0 6px;
}

/* Cards */

.task-card-full {
    background: var(--bg-card);
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-soft);
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 22px;
}

.task-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 6px;
}

.task-sub {
    display: flex;
    gap: 10px;
    align-items: center;
    opacity: 0.85;
    font-size: 14px;
}

.task-owner .icon {
    width: 16px;
    height: 16px;
    margin-right: 4px;
    opacity: 0.7;
}

.badge {
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}
.badge-blue { background:#3b82f6; color:white; }
.badge-green { background:#10b981; color:white; }

.reward-box {
    background: var(--bg-card-soft);
    padding: 14px 18px;
    border-radius: 10px;
    text-align: right;
    min-width: 110px;
    border: 1px solid var(--border-subtle);
}

.reward-amount {
    font-size: 26px;
    font-weight: 700;
}
.reward-amount span {
    font-size: 14px;
    opacity: .8;
}

.reward-fee {
    color: var(--text-muted);
    font-size: 12px;
}

.task-info-grid {
    margin: 20px 0;
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(130px,1fr));
    gap: 12px;
}

.info-item {
    background: var(--bg-card-soft);
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
}

.info-label {
    font-size: 12px;
    text-transform: uppercase;
    opacity: .65;
    margin-bottom: 4px;
}

.info-value {
    font-size: 16px;
    font-weight: 600;
}

.url-item {
    grid-column: 1 / -1;
}

.info-url {
    word-break: break-all;
    color: #2563eb;
}

.task-section {
    margin-top: 25px;
}
.task-section h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}


.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 18px 18px 20px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-subtle);
    margin-bottom: 18px;
}
.card--side {
    background: var(--bg-card-soft);
}
.card-title {
    font-size: 18px;
    margin: 0 0 8px;
}

/* Forms */

.form-card {
    max-width: 460px;
    margin: 0 auto;
}

.form label,
.label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--text-muted);
}

.input,
.textarea,
select.input {
    width: 100%;
    padding: 9px 12px;
    border-radius: 12px;
    border: 1px solid #bfc8d0;
    background: #ffffff;
    color: var(--text-main);
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.input:hover,
.textarea:hover,
select.input:hover {
    border-color: #94a3b8;
}

.input:focus,
.textarea:focus,
select.input:focus {
    border-color: #2a4cf5;
    box-shadow: 0 0 0 1px rgba(0,136,204,0.35);
    background: #ffffff;
}

.input--small {
    max-width: 120px;
}
.textarea {
    min-height: 80px;
    resize: vertical;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}
.checkbox input {
    width: 16px;
    height: 16px;
}

/* Messages */

.message {
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 13px;
    margin-bottom: 10px;
}
.message-error {
    background: #ffeef0;
    color: #b91c1c;
    border: 1px solid #fecaca;
}
.message-success {
    background: #e9fdf3;
    color: #166534;
    border: 1px solid #bbf7d0;
}
.message-warning {
    background: #fffbeb;
    color: #92400e;
}

/* Tasks */

.tasks-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 18px;
}
.tasks-filters {
    align-self: flex-start;
}
.tasks-main {
}

.cat-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.cat-link,
.cat-link--active {
    display: block;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 13px;
    color: var(--text-muted);
}
.cat-link--active {
    background: var(--accent-soft);
    color: var(--accent);
}

.task-card {
    background: var(--bg-card);
    border-radius: 18px;
    padding: 14px 14px 12px;
    border: 1px solid var(--border-subtle);
    margin-bottom: 10px;
    box-shadow: var(--shadow-soft);
}
.task-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
}
.task-title {
    font-size: 16px;
    margin: 0;
}
.task-meta {
    display: flex;
    gap: 8px;
    font-size: 11px;
    color: var(--text-muted);
}
.task-card__body {
    display: flex;
    gap: 18px;
    margin-top: 10px;
    font-size: 13px;
    align-items: center;
}

/* подписи под полями */
.task-reward .label,
.task-rating .label,
.task-slots .label {
    display: block;
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
}

/* КАПСУЛА для награды */
.task-reward {
    min-width: 170px;
}

.task-reward .value {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    border-radius: 999px;
    background: rgba(0,136,204,0.08);
    border: 1px solid rgba(0,136,204,0.65);
    font-weight: 600;
    color: #0f172a;
    font-size: 15px;
}

.task-reward .value .unit {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #0369a1;
}

/* (after fee) – тихо серым рядом */
.task-reward .muted {
    margin-left: 4px;
    font-size: 11px !important;
}

/* остальные value оставляем обычными */
.task-rating .value,
.task-slots .value {
    font-weight: 500;
    margin-top: 2px;
}

.task-card__footer {
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;
}

/* Tables */

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.table th,
.table td {
    padding: 6px 8px;
    border-bottom: 1px solid #e5e9f0;
}
.table th {
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
}
.table--compact th,
.table--compact td {
    padding: 4px 6px;
}





/* Stats grid */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-top: 8px;
}
.stat-box {
    padding: 10px 12px;
    border-radius: 14px;
    background: var(--bg-card-soft);
    border: 1px solid var(--border-subtle);
}
.stat-label {
    font-size: 12px;
    color: var(--text-muted);
}
.stat-value {
    font-size: 18px;
    font-weight: 600;
}
.stat-unit {
    font-size: 11px;
    color: var(--text-muted);
}

/* Notifications */

.notification-item {
    padding: 10px 12px;
    border-bottom: 1px solid #e5e9f0;
    background: #ffffff;
}

.notification-item--unread {
    background: #e0f2fe;
}

.notification-header {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 4px;
}

.notification-title {
    font-weight: 600;
}

.notification-time {
    color: var(--text-muted);
    font-size: 12px;
}

.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    padding: 0 6px;
    margin-left: 4px;
    border-radius: 999px;
    font-size: 11px;
    line-height: 1.4;
    background: #f97316;
    color: #0f172a;
    font-weight: 600;
}


.notif-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.notif-item {
    border-radius: 14px;
    padding: 10px 12px;
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    margin-bottom: 8px;
}
.notif-title {
    font-weight: 500;
    margin-bottom: 4px;
}
.notif-body {
    font-size: 13px;
}
.notif-meta {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Misc */

.muted {
    color: var(--text-muted);
    font-size: 13px;
}

.inline-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.profile-layout,
.wallet-layout,
.admin-layout,
.task-manage-layout,
.task-view-layout {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Footer */

.site-footer {
    border-top: 1px solid rgba(15,23,42,0.06);
    margin-top: 20px;
    background: rgba(255,255,255,0.96);
}
.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 10px 16px 16px;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
}
.footer-links a {
    margin-left: 10px;
}

/* Responsive */

@media (max-width: 900px) {
    .tasks-layout {
        grid-template-columns: 1fr;
    }
    .header-inner {
        flex-wrap: wrap;
        gap: 10px;
    }
    .header-user {
        margin-left: auto;
    }
}


/* ============================
   MY TASKS: таблица -> карточки на мобиле
   ============================ */

@media (max-width: 720px) {

    /* убираем горизонтальный скролл, даём «карточный» вид */
    .my-tasks-table {
        border-collapse: separate;
        border-spacing: 0;
        width: 100%;
    }

    .my-tasks-table thead {
        display: none; /* заголовок колонок не нужен на карточках */
    }

    .my-tasks-table tbody {
        display: block;
    }

    .my-tasks-table tr {
        display: block;
        background: #ffffff;
        border-radius: 16px;
        margin-bottom: 12px;
        box-shadow: 0 8px 18px rgba(15,23,42,0.08);
        border: 1px solid #d4e1f4;
        padding: 10px 12px;
    }

    .my-tasks-table td {
        display: block;
        border: none;
        padding: 4px 0;
        font-size: 13px;
    }

    /* Чуть отделим блоки внутри карточки */
    .my-tasks-table td + td {
        margin-top: 4px;
        padding-top: 4px;
        border-top: 1px dashed #e2e8f0;
    }

    /* ID и заголовок пусть идут «шапкой» карточки */
    .my-tasks-table td:nth-child(1) {
        font-weight: 600;
        font-size: 13px;
        color: #64748b;
    }

    .my-tasks-table td:nth-child(2) {
        margin-top: 2px;
    }

    /* Добавим подписи к числовым полям */
    .my-tasks-table td:nth-child(3)::before {
        content: "Reward: ";
        font-weight: 500;
        color: #64748b;
    }

    .my-tasks-table td:nth-child(4)::before {
        content: "Slots: ";
        font-weight: 500;
        color: #64748b;
    }

    .my-tasks-table td:nth-child(5)::before {
        content: "Submissions: ";
        font-weight: 500;
        color: #64748b;
        display: block;
        margin-bottom: 2px;
    }

    .my-tasks-table td:nth-child(6)::before {
        content: "Actions:";
        font-weight: 500;
        color: #64748b;
        display: block;
        margin-bottom: 4px;
    }

    /* Кнопки и инпуты внутри карточки — на всю ширину и в столбик */
    .my-tasks-table td:nth-child(6) .inline-form {
        flex-direction: column;
        align-items: stretch;
    }

    .my-tasks-table td:nth-child(6) .input--small {
        max-width: 100%;
    }

    .my-tasks-table td:nth-child(6) .btn {
        width: 100%;
        justify-content: center;
    }

    .my-tasks-table td:nth-child(6) > .muted {
        display: block;
        margin-top: 6px;
    }
}
