/* ============================================================
   HT On Demand - shared styles for Manday / Auth / Admin pages
   Matches the main site dark pink/purple theme. Responsive.
   ============================================================ */

:root {
    /* Softer, eye-comfortable dark palette (calmer surfaces + desaturated accents) */
    --bg: #181622;
    --panel: #211e2b;
    --panel-2: #2a2636;
    --line: rgba(190, 170, 225, 0.14);
    --line-strong: rgba(214, 140, 190, 0.32);
    --text: #e8e7f0;
    --muted: #a8a5bb;
    --pink: #d97bb0;
    --purple: #b79bea;
    --brand: #c285b4;
    --accent: #cbb6d8;
    --green: #5fcf9e;
    --amber: #e6b95c;
    --red: #e2807c;
    --blue: #9fb4e8;
}

.app-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 48px clamp(16px, 5vw, 32px) 80px;
}

.page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
}

.page-title {
    font-size: clamp(26px, 4vw, 38px);
    color: var(--purple);
    letter-spacing: 0.5px;
    margin: 0;
}

.page-subtitle {
    color: var(--muted);
    font-size: 15px;
    margin-top: 4px;
}

.breadcrumbs {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 18px;
}

    .breadcrumbs a {
        color: var(--blue);
    }

    .breadcrumbs a:hover {
        text-decoration: underline;
    }

/* ---------- Cards ---------- */
.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 22px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--pink);
    margin-bottom: 16px;
}

.grid {
    display: grid;
    gap: 22px;
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

/* ---------- Stat tiles ---------- */
.stat-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.stat {
    flex: 1 1 140px;
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px 18px;
}

.stat-label {
    font-size: 13px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.stat-value {
    font-size: 26px;
    font-weight: 700;
    margin-top: 4px;
}

    .stat-value.green { color: var(--green); }
    .stat-value.amber { color: var(--amber); }
    .stat-value.purple { color: var(--purple); }

/* ---------- Tables ---------- */
.table-wrap {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--line);
}

table.data {
    width: 100%;
    border-collapse: collapse;
    min-width: 560px;
}

    table.data th,
    table.data td {
        padding: 12px 14px;
        text-align: left;
        border-bottom: 1px solid var(--line);
        font-size: 14px;
    }

    table.data th {
        background: var(--panel-2);
        color: var(--accent);
        font-weight: 600;
        white-space: nowrap;
    }

    table.data tr:last-child td {
        border-bottom: none;
    }

    table.data tr:hover td {
        background: rgba(192, 132, 252, 0.05);
    }

.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* ---------- Badges ---------- */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid transparent;
    white-space: nowrap;
}

.badge-green { background: rgba(52, 211, 153, 0.12); color: var(--green); border-color: rgba(52, 211, 153, 0.4); }
.badge-amber { background: rgba(251, 191, 36, 0.12); color: var(--amber); border-color: rgba(251, 191, 36, 0.4); }
.badge-red { background: rgba(248, 113, 113, 0.12); color: var(--red); border-color: rgba(248, 113, 113, 0.4); }
.badge-purple { background: rgba(192, 132, 252, 0.12); color: var(--purple); border-color: rgba(192, 132, 252, 0.4); }
.badge-gray { background: rgba(185, 185, 204, 0.12); color: var(--muted); border-color: rgba(185, 185, 204, 0.4); }

/* ---------- Forms ---------- */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .field.full {
        grid-column: 1 / -1;
    }

    .field label {
        font-size: 14px;
        color: var(--accent);
    }

    .field input,
    .field select,
    .field textarea {
        background: #0e0e15;
        border: 1px solid var(--line);
        border-radius: 10px;
        padding: 11px 13px;
        color: var(--text);
        font-size: 15px;
        font-family: inherit;
        width: 100%;
    }

        .field input:focus,
        .field select:focus,
        .field textarea:focus {
            outline: none;
            border-color: var(--pink);
            box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.15);
        }

    .field textarea {
        resize: vertical;
        min-height: 90px;
    }

.field-error,
.validation-summary-errors {
    color: var(--red);
    font-size: 13px;
}

.validation-summary-errors ul {
    margin: 0;
    padding-left: 18px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: 0.2s ease;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--pink), var(--brand));
    color: #fff;
}

    .btn-primary:hover {
        filter: brightness(1.1);
    }

.btn-ghost {
    background: transparent;
    border-color: var(--line);
    color: var(--accent);
}

    .btn-ghost:hover {
        border-color: var(--pink);
        color: #fff;
    }

.btn-danger {
    background: transparent;
    border-color: rgba(248, 113, 113, 0.5);
    color: var(--red);
}

    .btn-danger:hover {
        background: rgba(248, 113, 113, 0.12);
    }

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
}

/* ---------- Alerts ---------- */
.alert {
    padding: 13px 16px;
    border-radius: 12px;
    font-size: 14px;
    margin-bottom: 20px;
    border: 1px solid transparent;
}

.alert-success { background: rgba(52, 211, 153, 0.1); color: var(--green); border-color: rgba(52, 211, 153, 0.35); }
.alert-error { background: rgba(248, 113, 113, 0.1); color: var(--red); border-color: rgba(248, 113, 113, 0.35); }
.alert-info { background: rgba(165, 180, 252, 0.1); color: var(--blue); border-color: rgba(165, 180, 252, 0.35); }

/* ---------- Auth (login) ---------- */
.auth-wrap {
    max-width: 420px;
    margin: 8vh auto;
    padding: 0 16px;
}

.auth-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 34px 30px;
}

/* ---------- Pricing (Buy Manday) ---------- */
.plan {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: 0.25s ease;
}

    .plan:hover {
        transform: translateY(-6px);
        border-color: var(--pink);
        box-shadow: 0 12px 30px rgba(236, 72, 153, 0.15);
    }

    .plan.featured {
        border-color: var(--line-strong);
        box-shadow: 0 0 25px rgba(236, 72, 153, 0.12);
    }

.plan-tag {
    position: absolute;
    top: 16px;
    right: 16px;
    background: linear-gradient(135deg, var(--pink), var(--brand));
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
}

.plan-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--purple);
}

.plan-mandays {
    font-size: 40px;
    font-weight: 800;
    color: #fff;
    margin: 10px 0 2px;
}

    .plan-mandays span {
        font-size: 16px;
        font-weight: 500;
        color: var(--muted);
    }

.price-old {
    color: var(--muted);
    text-decoration: line-through;
    font-size: 15px;
}

.price-new {
    color: var(--green);
    font-size: 26px;
    font-weight: 800;
    margin-top: 2px;
}

    .price-new span {
        font-size: 14px;
        color: var(--muted);
        font-weight: 500;
    }

.plan .btn {
    margin-top: 20px;
}

/* ---------- Misc ---------- */
.muted { color: var(--muted); }
.right { text-align: right; }
.mt { margin-top: 18px; }
.empty {
    color: var(--muted);
    font-size: 15px;
    padding: 24px;
    text-align: center;
}

/* progress bar for remaining mandays */
.bar {
    height: 8px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    overflow: hidden;
    margin-top: 8px;
}

.bar > span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--pink), var(--purple));
}

/* ---------- Claim cards ---------- */
.claim {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 18px 20px;
    margin-bottom: 16px;
    background: var(--panel-2);
}

.claim-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.claim-project {
    font-size: 16px;
    font-weight: 600;
    color: var(--purple);
}

/* ---------- Send / history dropdown ---------- */
.send-box {
    position: relative;
    display: inline-block;
}

    .send-box > summary {
        list-style: none;
        cursor: pointer;
    }

        .send-box > summary::-webkit-details-marker { display: none; }
        .send-box > summary::marker { content: ""; }

.send-panel {
    position: absolute;
    left: 0;
    z-index: 50;
    margin-top: 8px;
    min-width: 300px;
    max-width: 380px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
}

.check {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 14px;
    cursor: pointer;
}

    .check input { width: auto; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
    .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .send-panel {
        position: static;
        min-width: 0;
        max-width: 100%;
        box-shadow: none;
        margin-top: 10px;
    }
}
