/* static/css/layout.css */

/* =========================================================
   Global layout helpers (theme-agnostic)
   Uses theme variables: --bg --text --muted --card --border --link
   ========================================================= */

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

html, body {
    height: 100%;
}

/* ---------------------------------------------------------
   Containers
   --------------------------------------------------------- */

/* Standard page container used on most pages */
.page {
    max-width: 980px;
    margin: 22px auto;
    padding: 0 18px;
}

/* Slightly narrower pages (auth screens, settings, etc.) */
.page-sm {
    max-width: 640px;
}

/* Wider pages if you later need them */
.page-lg {
    max-width: 1200px;
}

/* ---------------------------------------------------------
   Vertical rhythm (consistent spacing)
   --------------------------------------------------------- */

/* Quick "stack" utility: any direct child after the first gets spacing */
.stack > * + * {
    margin-top: 14px;
}

/* Tighter / looser spacing variants */
.stack-sm > * + * { margin-top: 10px; }
.stack-lg > * + * { margin-top: 20px; }

/* Helpful divider */
.divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 16px 0;
}

/* ---------------------------------------------------------
   Typography helpers
   --------------------------------------------------------- */

.h1, h1 { font-size: 1.6rem; line-height: 1.2; margin: 0; }
.h2, h2 { font-size: 1.25rem; line-height: 1.25; margin: 0; }
.h3, h3 { font-size: 1.05rem; line-height: 1.3; margin: 0; }

.muted {
    color: var(--muted);
}

.small {
    font-size: 0.9rem;
}

/* ---------------------------------------------------------
   Cards / panels
   --------------------------------------------------------- */

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.card-title {
    font-weight: 700;
    color: var(--text);
}

/* A subtle section block (useful inside pages) */
.section {
    padding: 14px 0;
}

/* ---------------------------------------------------------
   Buttons / links (light touch – your main button styles are in theme.css)
   --------------------------------------------------------- */

.link {
    color: var(--link);
    text-decoration: none;
    font-weight: 600;
}

.link:hover {
    text-decoration: underline;
}

/* ---------------------------------------------------------
   Breadcrumbs
   --------------------------------------------------------- */

.breadcrumb {
    margin: 10px 0 16px;
    font-size: 0.9rem;
}

.breadcrumb ol {
    list-style: none;
    display: flex;
    gap: 6px;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}

.breadcrumb li {
    display: flex;
    align-items: center;
    color: var(--muted);
}

.breadcrumb li::after {
    content: "/";
    margin: 0 6px;
    opacity: 0.4;
}

.breadcrumb li:last-child::after {
    content: "";
}

.breadcrumb a {
    text-decoration: none;
    color: var(--link);
    font-weight: 600;
}

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

.breadcrumb .current {
    font-weight: 700;
    color: var(--text);
}