/* public/css/app.css
 * Connexzia TMS – light custom layer on top of Tailwind CDN
 * This is safe on shared hosting (no build step required).
 */

/* Root palette (used by some custom components) */
:root {
    --cx-indigo: #4f46e5;
    --cx-indigo-soft: #eef2ff;
    --cx-slate-50: #f8fafc;
    --cx-slate-100: #e2e8f0;
    --cx-slate-200: #cbd5f5;
    --cx-slate-600: #475569;
    --cx-slate-700: #334155;
    --cx-slate-900: #0f172a;
}

/* Global tweaks */
body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
        "Segoe UI", sans-serif;
}

/* Simple container helper if needed */
.cx-container {
    max-width: 72rem;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* Segmented control (register account type) */
.segmented-wrap {
    display: inline-flex;
    border-radius: 9999px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    padding: 2px;
}

.segmented-option {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 1.2rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.segmented-option:hover {
    background-color: #e2e8f0;
}

.segmented-option.is-active {
    background-color: var(--cx-indigo);
    color: #ffffff;
    box-shadow: 0 6px 14px rgba(79, 70, 229, 0.35);
}

/* Register page specific */
.cx-register-card {
    box-shadow:
        0 18px 40px rgba(15, 23, 42, 0.08),
        0 0 0 1px rgba(148, 163, 184, 0.08);
}

/* Soft “pill” badges */
.cx-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    padding: 0.15rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 500;
}

.cx-pill--pending {
    background: #fef9c3;
    color: #854d0e;
    border: 1px solid #facc15;
}

.cx-pill--approved {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #4ade80;
}

.cx-pill--rejected {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #f87171;
}

/* Generic table hover (for accounts / loads lists) */
.cx-table tr:hover td {
    background-color: #f8fafc;
}

/* Broker dashboard specific helpers */
.cx-broker-layout {
    min-height: 100vh;
    background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 40%, #f9fafb 100%);
}

.cx-broker-card {
    border-radius: 0.9rem;
    background-color: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow:
        0 18px 45px rgba(15, 23, 42, 0.08),
        0 0 0 1px rgba(148, 163, 184, 0.08);
}

/* Simple fade-in animation for dashboards */
@keyframes cx-fade-in {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cx-fade-in {
    animation: cx-fade-in 0.35s ease-out both;
}

/* Mobile nav toggle placeholder (if you add later) */
.cx-nav-backdrop {
    background-color: rgba(15, 23, 42, 0.45);
}

/* Buttons that are not pure Tailwind (used by JS) */
.cx-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    padding: 0.4rem 0.95rem;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.16s ease;
}

.cx-btn--primary {
    background-color: var(--cx-indigo);
    color: #ffffff;
    border-color: transparent;
}

.cx-btn--primary:hover {
    background-color: #4338ca;
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.40);
}

.cx-btn--ghost {
    background-color: transparent;
    color: var(--cx-slate-700);
    border-color: #e2e8f0;
}

.cx-btn--ghost:hover {
    background-color: #f1f5f9;
}