/* ==========================================================================
   CricScoring - css/utilities.css
   UTILITY LAYER
   ==========================================================================
   Single-purpose helper classes only. They are additive: nothing in the
   legacy stylesheets is overridden and the app shell does not depend on them.
   Standalone pages (website/, auth/, customer/, admin/) use them heavily;
   inside the app they are available but optional.
   Loaded after components.css, before the module stylesheets.
   ========================================================================== */

/* layout ------------------------------------------------------------------ */
.u-flex        { display: flex; }
.u-inline-flex { display: inline-flex; }
.u-block       { display: block; }
.u-hidden      { display: none !important; }
.u-col         { display: flex; flex-direction: column; }
.u-wrap        { flex-wrap: wrap; }
.u-between     { display: flex; align-items: center; justify-content: space-between; }
.u-center      { display: flex; align-items: center; justify-content: center; }
.u-middle      { align-items: center; }
.u-grow        { flex: 1 1 auto; min-width: 0; }
.u-grid        { display: grid; gap: 14px; }
.u-grid-2      { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.u-grid-3      { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* spacing ----------------------------------------------------------------- */
.u-mt-0 { margin-top: 0; }      .u-mt-1 { margin-top: 6px; }
.u-mt-2 { margin-top: 12px; }   .u-mt-3 { margin-top: 20px; }
.u-mt-4 { margin-top: 30px; }   .u-mt-5 { margin-top: 44px; }
.u-mb-0 { margin-bottom: 0; }   .u-mb-1 { margin-bottom: 6px; }
.u-mb-2 { margin-bottom: 12px; } .u-mb-3 { margin-bottom: 20px; }
.u-mb-4 { margin-bottom: 30px; } .u-mb-5 { margin-bottom: 44px; }
.u-gap-1 { gap: 6px; } .u-gap-2 { gap: 12px; } .u-gap-3 { gap: 20px; }
.u-p-0 { padding: 0; } .u-p-2 { padding: 12px; } .u-p-3 { padding: 20px; }

/* type -------------------------------------------------------------------- */
.u-text-xs   { font-size: 11px; }
.u-text-sm   { font-size: 13px; }
.u-text-md   { font-size: 15px; }
.u-text-lg   { font-size: 18px; }
.u-text-xl   { font-size: 24px; }
.u-text-2xl  { font-size: 32px; }
.u-bold      { font-weight: 800; }
.u-semibold  { font-weight: 600; }
.u-center-t  { text-align: center; }
.u-right     { text-align: right; }
.u-muted     { color: #94a3b8; }
.u-dim       { opacity: .72; }
.u-caps      { text-transform: uppercase; letter-spacing: 1.6px; }
.u-nowrap    { white-space: nowrap; }
.u-mono      { font-variant-numeric: tabular-nums; font-family: 'Roboto Condensed', Inter, monospace; }
.u-truncate  { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u-break     { word-break: break-word; }
.u-link      { color: #10dbd8; text-decoration: none; }
.u-link:hover { text-decoration: underline; }

/* colours (broadcast palette) --------------------------------------------- */
.u-cyan   { color: #10dbd8; }
.u-gold   { color: #facc15; }
.u-danger { color: #e51a3a; }
.u-green  { color: #10b981; }
.u-white  { color: #f8fafc; }

/* surfaces ---------------------------------------------------------------- */
.u-card {
    background: #131c37;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 16px;
    padding: 18px;
}
.u-panel {
    background: #0c0b2c;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 18px;
}
.u-shadow { box-shadow: 0 14px 34px rgba(0, 0, 0, .45); }
.u-divider { height: 1px; background: rgba(148, 163, 184, .18); border: 0; margin: 18px 0; }

/* forms ------------------------------------------------------------------- */
.u-input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, .28);
    background: #0f1730;
    color: #f8fafc;
    font-size: 14px;
    font-family: inherit;
}
.u-input:focus { outline: none; border-color: #10dbd8; }

.u-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 18px; border-radius: 12px; border: 0; cursor: pointer;
    font-weight: 800; font-size: 14px; font-family: inherit;
    background: linear-gradient(135deg, #10dbd8, #05c2c2); color: #04222c;
    transition: transform .12s ease, filter .12s ease;
}
.u-btn:hover { filter: brightness(1.06); }
.u-btn:active { transform: translateY(1px); }
.u-btn-ghost {
    background: transparent; color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, .32);
}
.u-btn-danger { background: linear-gradient(135deg, #e51a3a, #b01024); color: #fff; }
.u-btn-sm { padding: 8px 12px; font-size: 12.5px; border-radius: 10px; }
.u-btn[disabled] { opacity: .55; cursor: not-allowed; }

/* badges ------------------------------------------------------------------ */
.u-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 10px; border-radius: 999px;
    font-size: 11px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase;
    background: rgba(148, 163, 184, .14); color: #cbd5e1;
}
.u-badge-live { background: rgba(229, 26, 58, .18); color: #ff8095; }
.u-badge-ok   { background: rgba(16, 185, 129, .18); color: #6ee7b7; }
.u-badge-warn { background: rgba(250, 204, 21, .16); color: #fde68a; }
.u-badge-info { background: rgba(16, 219, 216, .16); color: #7ff0ee; }

/* tables ------------------------------------------------------------------ */
.u-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.u-table th {
    text-align: left; padding: 10px 12px; font-size: 11px; letter-spacing: 1.2px;
    text-transform: uppercase; color: #94a3b8; border-bottom: 1px solid rgba(148, 163, 184, .2);
}
.u-table td { padding: 11px 12px; border-bottom: 1px solid rgba(148, 163, 184, .1); }
.u-table tr:last-child td { border-bottom: 0; }
.u-table-scroll { overflow-x: auto; }

/* misc -------------------------------------------------------------------- */
.u-scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.u-sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.u-pointer { cursor: pointer; }
.u-relative { position: relative; }
.u-hr-dot { width: 6px; height: 6px; border-radius: 50%; background: #10dbd8; }
