/* =====================================================================
   cards.css — the white panel every screen is built from.

   A card earns its edges from a hairline border, not from a shadow.
   The header sits on the same white as the body with a rule under it,
   which reads as one object; a grey header bar reads as two stacked.
   ===================================================================== */

.card-x {
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
}

.card-x + .card-x { margin-top: 18px; }

/* -- Header ------------------------------------------------------------ */
.card-x__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 17px 20px 15px;
    border-bottom: 1px solid var(--c-line);
}

.card-x__title {
    font-size: var(--fs-md);
    font-weight: 600;
    letter-spacing: -.008em;
    color: var(--c-ink);
}

.card-x__sub {
    margin: 3px 0 0;
    font-size: var(--fs-sm);
    line-height: 1.45;
    color: var(--c-ink-3);
}

/* -- Body -------------------------------------------------------------- */
.card-x__body { padding: 20px; }

/* A table fills its card corner to corner; padding around it would only
   push the header row away from the header above it. */
.card-x__body--flush { padding: 0; }
.card-x__body--tight { padding: 14px 20px; }
.card-x__body--roomy { padding: 32px; }

/* -- Footer ------------------------------------------------------------- */
.card-x__foot {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    padding: 15px 20px;
    background: var(--c-sunken);
    border-top: 1px solid var(--c-line);
    border-radius: 0 0 var(--radius) var(--radius);
}
.card-x__foot--split { justify-content: space-between; }

/* A flush table bleeds to the card's edges, so its bottom corners have to
   be rounded to match the card's own. */
.card-x__body--flush > .table-wrap:last-child,
.card-x__body--flush > .table-x:last-child,
.card-x__body--flush > .dt-container:last-child { border-radius: 0 0 var(--radius) var(--radius); overflow: hidden; }

/* An empty state inside a padded body provides its own room. */
.card-x__body > .empty { padding-left: 0; padding-right: 0; }

/* -- Link card ----------------------------------------------------------
   A whole panel that is one target, used on the settings hub. */
.card-link {
    display: block;
    height: 100%;
    color: inherit;
    text-decoration: none;
    transition: border-color var(--t-fast) var(--ease),
                box-shadow var(--t-fast) var(--ease),
                transform var(--t-fast) var(--ease);
}
.card-link:hover {
    border-color: var(--c-brand-line);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    color: inherit;
    text-decoration: none;
}
.card-link:active { transform: none; box-shadow: var(--shadow-xs); }

.card-link__title { margin-top: 16px; font-size: var(--fs-lg); font-weight: 600; color: var(--c-ink); }
.card-link__text  { margin: 6px 0 16px; font-size: var(--fs-sm); line-height: 1.55; color: var(--c-ink-3); }

.card-link__go {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--c-brand);
}
.card-link__go i { font-size: 13px; transition: transform var(--t-mid) var(--ease); }
.card-link:hover .card-link__go i { transform: translateX(3px); }

/* A generated identifier shown back to the user, big enough to check at
   a glance before they commit to it. */
.code-preview {
    padding: 18px;
    border: 1px dashed var(--c-line-strong);
    border-radius: var(--radius);
    background: var(--c-sunken);
    font-family: var(--mono);
    font-size: 22px;
    font-weight: 600;
    letter-spacing: .02em;
    text-align: center;
    color: var(--c-brand-dark);
}
