/*
    Custom Control Panel styling for BlueOn.
    Loaded via statamic.cp.custom_css_url → /cms/cp.css (Pro mode only).

    Dashboard widget HTML is compiled by Statamic as a Vue template, so
    <style> tags and inline on* handlers inside the widget views are not
    an option — every dashboard style lives here. Colours follow the CP
    theme tokens (--color-gray-*) so the cards match Statamic's own panels
    in both light and dark mode.
*/

:root {
    --bo-primary: #0F2650;
    --bo-secondary: #2373B1;
    --bo-muted: #EDE8E5;
    --bo-card-radius: 0.75rem;
    --bo-card-shadow: 0 1px 16px -2px rgba(63, 63, 71, 0.2);
}

/* ------------------------------------------------------------------ */
/* Shared card                                                         */
/* ------------------------------------------------------------------ */

.bo-card {
    background: #fff;
    border: 1px solid var(--color-gray-300);
    border-radius: var(--bo-card-radius);
    box-shadow: var(--bo-card-shadow);
}

.dark .bo-card {
    background: var(--color-gray-850);
    border-color: var(--color-gray-700);
}

/* ------------------------------------------------------------------ */
/* Welcome                                                             */
/* ------------------------------------------------------------------ */

.bo-welcome {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.75rem 2rem;
    border-radius: var(--bo-card-radius);
    background: linear-gradient(120deg, var(--bo-primary) 0%, #173a72 55%, var(--bo-secondary) 100%);
    color: #fff;
    box-shadow: 0 10px 30px -12px rgba(15, 38, 80, 0.45);
}

/* Decorative circle in the corner — a nod to the BlueOn logo mark. */
.bo-welcome::after {
    content: "";
    position: absolute;
    right: -6rem;
    top: -8rem;
    width: 22rem;
    height: 22rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.06);
    pointer-events: none;
}

.bo-welcome__body {
    position: relative;
    flex: 1 1 22rem;
    min-width: 0;
}

.bo-welcome__eyebrow {
    margin: 0 0 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.65);
}

.bo-welcome__title {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
}

.bo-welcome__text {
    margin: 0;
    max-width: 42rem;
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.82);
}

.bo-welcome__actions {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.bo-welcome__link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.9rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s ease;
}

.bo-welcome__link:hover {
    background: rgba(255, 255, 255, 0.26);
    color: #fff;
}

.bo-welcome__link--accent {
    background: #fff;
    color: var(--bo-primary);
}

.bo-welcome__link--accent:hover {
    background: var(--bo-muted);
    color: var(--bo-primary);
}

.bo-welcome__link svg {
    width: 0.9rem;
    height: 0.9rem;
    flex: none;
}

/* ------------------------------------------------------------------ */
/* Stats                                                               */
/* ------------------------------------------------------------------ */

.bo-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    gap: 0.75rem;
}

.bo-stat {
    display: block;
    padding: 1.1rem 1.25rem;
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.bo-stat:hover {
    border-color: var(--bo-secondary);
    box-shadow: 0 6px 20px -6px rgba(35, 115, 177, 0.35);
    transform: translateY(-1px);
}

.bo-stat__value {
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--bo-primary);
    font-variant-numeric: tabular-nums;
}

.dark .bo-stat__value {
    color: #fff;
}

.bo-stat__label {
    margin-top: 0.3rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-gray-500, #6b7280);
}

.bo-stat__meta {
    margin-top: 0.45rem;
    display: inline-block;
    padding: 0.1rem 0.45rem;
    border-radius: 9999px;
    background: #fff4e0;
    color: #9a5b00;
    font-size: 0.7rem;
    font-weight: 600;
}

.dark .bo-stat__meta {
    background: rgba(245, 158, 11, 0.18);
    color: #fbbf24;
}

/* ------------------------------------------------------------------ */
/* Quick actions                                                       */
/* ------------------------------------------------------------------ */

.bo-quick {
    padding: 1.25rem;
}

.bo-quick__title {
    margin: 0 0 0.85rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-gray-500, #6b7280);
}

.bo-quick__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    gap: 0.5rem;
}

.bo-quick__link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid rgba(35, 115, 177, 0.25);
    border-radius: 0.5rem;
    background: rgba(35, 115, 177, 0.06);
    color: var(--bo-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.bo-quick__link:hover {
    background: rgba(35, 115, 177, 0.14);
    border-color: var(--bo-secondary);
    color: var(--bo-secondary);
}

.dark .bo-quick__link {
    border-color: rgba(96, 165, 250, 0.3);
    background: rgba(96, 165, 250, 0.08);
    color: #93c5fd;
}

.dark .bo-quick__link:hover {
    background: rgba(96, 165, 250, 0.16);
    color: #bfdbfe;
}

.bo-quick__plus {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 9999px;
    background: var(--bo-secondary);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1;
    flex: none;
}
