/* ============================================================
   HT On Demand - Manday / Auth / Admin pages
   Light, friendly, low-contrast theme. Soft surfaces & accents.
   (The shared dark header from _Layout stays as a brand frame.)
   ============================================================ */

:root {
    --bg: #f4f6f9;
    --panel: #ffffff;
    --panel-2: #f7f9fb;
    --line: #e7eaf0;
    --line-2: #eef1f5;

    --text: #4a5462;        /* soft slate body text (not pure black) */
    --heading: #313a48;
    --muted: #8b93a3;

    --primary: #bd6a98;     /* soft mauve-rose */
    --primary-600: #a8568a;
    --accent: #9a6fb0;
    --purple: #8a6fb8;

    --green: #3a9d72;
    --amber: #c0892c;
    --red: #cf6363;
    --blue: #5a7bc4;

    --shadow-sm: 0 1px 2px rgba(25, 35, 60, 0.05);
    --shadow: 0 6px 20px rgba(25, 35, 60, 0.07);
}

/* Light full-page backdrop ONLY on app pages (covers the layout's dark gradient).
   Corporate pages have no .app-main/.auth-wrap, so they keep their own theme. */
.app-main::before,
.auth-wrap::before {
    content: "";
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: -1;
}

.app-main {
    max-width: 1600px;
    margin: 0 auto;
    padding: 40px clamp(16px, 5vw, 32px) 72px;
    color: var(--text);
}

/* keep row action icons (📎 ⬇ ✕ 🖨 🧾) on a single line */
.data td.right { white-space: nowrap; }

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

.page-title {
    font-size: clamp(24px, 3.4vw, 32px);
    color: var(--heading);
    letter-spacing: 0.2px;
    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(--primary); }
    .breadcrumbs a:hover { text-decoration: underline; }

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

.card-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--heading);
    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: 14px; }

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

.stat-label {
    font-size: 12px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.stat-value {
    font-size: 26px;
    font-weight: 700;
    margin-top: 4px;
    color: var(--heading);
}

    .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;
    background: var(--panel);
}

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

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

    table.data tr:last-child td { border-bottom: none; }
    table.data tbody tr:hover td { background: #faf7fb; }

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

/* ---------- Badges (soft pastel) ---------- */
.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: #e9f6f0; color: #2f8a63; border-color: #cdeadd; }
.badge-amber { background: #fbf3e3; color: #a9761f; border-color: #f0e0bf; }
.badge-red { background: #fbeded; color: #c25656; border-color: #f2d4d4; }
.badge-purple { background: #f1ecf8; color: #7c5fae; border-color: #e2d7f1; }
.badge-gray { background: #eef1f5; color: #707a8a; border-color: #e0e4ea; }

/* ---------- 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(--heading); font-weight: 600; }

    .field input,
    .field select,
    .field textarea {
        background: #fff;
        border: 1px solid #d9dee6;
        border-radius: 10px;
        padding: 11px 13px;
        color: var(--heading);
        font-size: 15px;
        font-family: inherit;
        width: 100%;
        transition: border-color .15s, box-shadow .15s;
    }

        .field input::placeholder,
        .field textarea::placeholder { color: #b3bac6; }

        .field input:focus,
        .field select:focus,
        .field textarea:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(189, 106, 152, 0.12);
        }

    .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: 10px 18px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: .18s ease;
    text-decoration: none;
}

.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-sm); }
    .btn-primary:hover { background: var(--primary-600); }

.btn-ghost { background: #fff; border-color: #dfe3ea; color: var(--heading); }
    .btn-ghost:hover { border-color: var(--primary); color: var(--primary-600); }

.btn-danger { background: #fff; border-color: #ebc4c4; color: var(--red); }
    .btn-danger:hover { background: #fbeded; }

.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: #e9f6f0; color: #2f8a63; border-color: #cdeadd; }
.alert-error { background: #fbeded; color: #c25656; border-color: #f2d4d4; }
.alert-info { background: #eef3fb; color: #4b6cb0; border-color: #d8e2f4; }

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

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

/* ---------- Pricing (legacy, harmless) ---------- */
.plan {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: var(--shadow-sm);
}
.plan-name { font-size: 20px; font-weight: 700; color: var(--purple); }
.plan-mandays { font-size: 40px; font-weight: 800; color: var(--heading); margin: 10px 0 2px; }
.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; }

/* ---------- 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: 700; color: var(--heading); }

/* ---------- 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: var(--shadow);
}

.check { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 14px; cursor: pointer; color: var(--text); }
    .check input { width: auto; }

/* ---------- 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; }

.bar { height: 8px; border-radius: 999px; background: #edf0f4; overflow: hidden; margin-top: 8px; }
.bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); }

/* ---------- 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; }
}
