/* ==========================================================================
   TONAFLO 2027 — APPLICATION DESIGN SYSTEM
   --------------------------------------------------------------------------
   Product direction:
   - Modern agricultural operating system
   - Enterprise-grade SaaS
   - Strong visual hierarchy
   - Confident Tonaflo identity
   - Desktop / tablet / mobile
   - Farmer / investor / partner / buyer workflows
   - No external CSS dependencies
   ========================================================================== */


/* ==========================================================================
   DESIGN TOKENS
   ========================================================================== */

:root {

    /* ----------------------------------------------------------------------
       BRAND
       ---------------------------------------------------------------------- */

    --field: #0f5132;
    --field-dark: #073b25;
    --field-deep: #042719;
    --field-light: #176b43;

    --field-50: #f1f8f3;
    --field-100: #e5f1e9;
    --field-200: #cbe3d3;
    --field-300: #a8cfb6;

    --lime: #b7d957;
    --lime-dark: #91b52d;
    --lime-tint: #f4f8df;

    --harvest: #a46b00;
    --harvest-dark: #7d5000;
    --harvest-tint: #fff6df;

    --danger: #b73434;
    --danger-dark: #922727;
    --danger-tint: #fdecec;

    --blue: #2764a8;
    --blue-dark: #1d4f89;
    --blue-tint: #eaf2fb;

    /* ----------------------------------------------------------------------
       SURFACES
       ---------------------------------------------------------------------- */

    --paper: #f5f7f5;
    --surface: #ffffff;
    --surface-soft: #f0f4f1;
    --surface-sunken: #e7ede9;
    --surface-dark: #10251b;

    /* ----------------------------------------------------------------------
       TYPOGRAPHY
       ---------------------------------------------------------------------- */

    --ink: #142019;
    --ink-soft: #354139;
    --ink-muted: #65716a;
    --ink-faint: #8e9992;
    --ink-white: #ffffff;

    /* ----------------------------------------------------------------------
       BORDERS
       ---------------------------------------------------------------------- */

    --line: #dfe6e1;
    --line-strong: #cbd5ce;
    --line-dark: #aebbb3;

    /* ----------------------------------------------------------------------
       RADIUS
       ---------------------------------------------------------------------- */

    --radius-xs: 7px;
    --radius-sm: 9px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 22px;
    --radius-2xl: 28px;
    --radius-pill: 999px;

    /* ----------------------------------------------------------------------
       LAYOUT
       ---------------------------------------------------------------------- */

    --header-height: 68px;
    --sidebar-width: 264px;

    --content-max: 1500px;
    --page-max: 1180px;

    /* ----------------------------------------------------------------------
       SHADOWS
       ---------------------------------------------------------------------- */

    --shadow-xs:
        0 1px 2px rgba(12, 30, 19, .04);

    --shadow-sm:
        0 3px 10px rgba(12, 30, 19, .055);

    --shadow-md:
        0 10px 28px rgba(12, 30, 19, .075);

    --shadow-lg:
        0 18px 45px rgba(12, 30, 19, .12);

    --shadow-xl:
        0 28px 70px rgba(12, 30, 19, .16);

    /* ----------------------------------------------------------------------
       MOTION
       ---------------------------------------------------------------------- */

    --ease:
        cubic-bezier(.2, .8, .2, 1);

    --ease-fast:
        cubic-bezier(.25, .8, .25, 1);
}


/* ==========================================================================
   RESET
   ========================================================================== */

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;

    background: var(--paper);
    color: var(--ink);

    font-family:
        'Inter',
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        'Segoe UI',
        sans-serif;

    font-size: 14px;
    line-height: 1.5;

    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    border: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

p {
    margin: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0;

    color: var(--ink);

    font-family:
        'Roboto Slab',
        Georgia,
        serif;

    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: clamp(30px, 3vw, 40px);
    letter-spacing: -1px;
}

h2 {
    font-size: 22px;
    letter-spacing: -.5px;
}

h3 {
    font-size: 16px;
    letter-spacing: -.15px;
}

h4 {
    font-size: 14px;
}

::selection {
    background: var(--field);
    color: #fff;
}

:focus-visible {
    outline: 3px solid rgba(15, 81, 50, .18);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
        animation: none !important;
    }
}


/* ==========================================================================
   PUBLIC HEADER
   ========================================================================== */

.site-header {
    height: var(--header-height);

    position: sticky;
    top: 0;
    z-index: 1000;

    background: rgba(255, 255, 255, .94);

    border-bottom: 1px solid var(--line);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.site-header__bar {
    width: 100%;
    max-width: var(--content-max);

    height: 100%;

    margin: 0 auto;
    padding: 0 30px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 24px;
}


/* ==========================================================================
   BRAND
   ========================================================================== */

.brand {
    display: inline-flex;
    align-items: center;

    gap: 10px;

    color: var(--field-dark);

    font-family:
        'Roboto Slab',
        Georgia,
        serif;

    font-size: 20px;
    font-weight: 800;

    letter-spacing: -.55px;

    flex-shrink: 0;
}

.brand__mark {
    width: 36px;
    height: 36px;

    display: grid;
    place-items: center;

    border-radius: 11px;

    background:
        linear-gradient(
            145deg,
            var(--field-light),
            var(--field-dark)
        );

    color: #fff;

    font-family:
        'Roboto Slab',
        Georgia,
        serif;

    font-size: 17px;
    font-weight: 800;

    box-shadow:
        0 6px 16px rgba(15, 81, 50, .18);
}


/* ==========================================================================
   HEADER NAVIGATION
   ========================================================================== */

.header-nav {
    display: flex;
    align-items: center;

    gap: 4px;
}

.header-nav > a,
.header-nav > button,
.header-nav form button {

    min-height: 38px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 8px 12px;

    border-radius: var(--radius-sm);

    background: transparent;

    color: var(--ink-muted);

    font-size: 13px;
    font-weight: 650;

    cursor: pointer;

    transition:
        background .16s var(--ease),
        color .16s var(--ease),
        transform .16s var(--ease);
}

.header-nav > a:hover,
.header-nav > button:hover,
.header-nav form button:hover {

    background: var(--surface-soft);
    color: var(--field-dark);

    transform: translateY(-1px);
}

.header-nav__user {

    max-width: 180px;

    padding: 8px 12px;

    color: var(--ink-soft);

    font-size: 13px;
    font-weight: 700;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* ==========================================================================
   APPLICATION SHELL
   ========================================================================== */

.app-shell {
    min-height: calc(100vh - var(--header-height));
}


/* ==========================================================================
   SIDEBAR
   ========================================================================== */

.app-sidebar {

    position: fixed;

    top: var(--header-height);
    bottom: 0;
    left: 0;

    width: var(--sidebar-width);

    padding: 22px 14px 24px;

    background: var(--surface);

    border-right: 1px solid var(--line);

    overflow-y: auto;

    z-index: 900;

    scrollbar-width: thin;
    scrollbar-color: var(--line-strong) transparent;

    transition:
        transform .28s var(--ease),
        box-shadow .28s var(--ease);
}

.app-sidebar::-webkit-scrollbar {
    width: 5px;
}

.app-sidebar::-webkit-scrollbar-thumb {
    background: var(--line-strong);
    border-radius: 20px;
}


/* ==========================================================================
   SIDEBAR GROUPS
   ========================================================================== */

.sidebar-section {
    margin-bottom: 27px;
}

.sidebar-label {

    padding: 0 12px;
    margin-bottom: 8px;

    color: var(--ink-faint);

    font-size: 9px;
    font-weight: 850;

    letter-spacing: .14em;

    text-transform: uppercase;
}


/* ==========================================================================
   SIDEBAR NAVIGATION
   ========================================================================== */

.sidebar-nav {

    display: flex;
    flex-direction: column;

    gap: 3px;
}

.sidebar-link {

    position: relative;

    min-height: 44px;

    display: flex;
    align-items: center;

    gap: 11px;

    padding: 10px 12px;

    border-radius: 11px;

    color: #5b6860;

    font-size: 13px;
    font-weight: 650;

    transition:
        background .16s var(--ease),
        color .16s var(--ease),
        transform .16s var(--ease);
}

.sidebar-link:hover {

    background: var(--surface-soft);

    color: var(--field-dark);

    transform: translateX(2px);
}

.sidebar-link.is-active {

    background:
        linear-gradient(
            90deg,
            var(--field-tint),
            #f0f7f2
        );

    color: var(--field-dark);

    font-weight: 750;
}

.sidebar-link.is-active::before {

    content: "";

    position: absolute;

    left: 0;
    top: 9px;
    bottom: 9px;

    width: 3px;

    border-radius: 0 5px 5px 0;

    background: var(--field);
}

.sidebar-icon {

    width: 21px;
    height: 21px;

    display: grid;
    place-items: center;

    color: #8a958e;

    font-size: 15px;

    flex-shrink: 0;

    transition:
        color .16s var(--ease);
}

.sidebar-link.is-active .sidebar-icon {
    color: var(--field);
}


/* ==========================================================================
   SIDEBAR USER
   ========================================================================== */

.sidebar-user {

    margin-top: 12px;

    padding: 13px;

    background:
        linear-gradient(
            145deg,
            #f3f7f4,
            #edf2ef
        );

    border: 1px solid var(--line);

    border-radius: 14px;

    box-shadow: var(--shadow-xs);
}

.sidebar-user__info {

    display: flex;
    align-items: center;

    gap: 10px;
}

.sidebar-user__details {

    min-width: 0;

    flex: 1;
}

.sidebar-user__name {

    color: var(--ink);

    font-size: 12px;
    font-weight: 750;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user__role {

    margin-top: 2px;

    color: var(--ink-muted);

    font-size: 10px;
}

.sidebar-logout-form {

    margin-top: 12px;
    padding-top: 10px;

    border-top: 1px solid var(--line);
}

.sidebar-logout {

    width: 100%;

    min-height: 36px;

    display: flex;
    align-items: center;

    gap: 9px;

    padding: 7px 9px;

    border-radius: 8px;

    background: transparent;

    color: var(--ink-muted);

    font-size: 12px;
    font-weight: 650;

    cursor: pointer;

    transition:
        background .15s ease,
        color .15s ease;
}

.sidebar-logout:hover {

    background: var(--danger-tint);
    color: var(--danger);
}

.sidebar-logout span:first-child {
    font-size: 15px;
}


/* ==========================================================================
   MAIN APPLICATION AREA
   ========================================================================== */

.app-main {

    min-height: calc(100vh - var(--header-height));

    margin-left: var(--sidebar-width);
}

.app-main__inner {

    width: 100%;
    max-width: var(--content-max);

    margin: 0 auto;

    padding: 34px 32px 50px;
}


/* ==========================================================================
   MOBILE APP HEADER
   ========================================================================== */

.mobile-app-header {

    display: none;

    height: 60px;

    position: sticky;

    top: var(--header-height);

    z-index: 800;

    align-items: center;
    justify-content: space-between;

    padding: 0 16px;

    background: rgba(255, 255, 255, .96);

    border-bottom: 1px solid var(--line);

    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.mobile-menu-button {

    width: 40px;
    height: 40px;

    display: grid;
    place-items: center;

    padding: 0;

    background: var(--surface);

    border: 1px solid var(--line);

    border-radius: 10px;

    color: var(--ink);

    font-size: 18px;

    cursor: pointer;

    box-shadow: var(--shadow-xs);

    transition:
        background .15s ease,
        border-color .15s ease;
}

.mobile-menu-button:hover {
    background: var(--surface-soft);
    border-color: var(--line-strong);
}


/* ==========================================================================
   MOBILE SIDEBAR OVERLAY
   ========================================================================== */

.sidebar-overlay {

    display: none;

    position: fixed;

    inset: 0;

    background: rgba(4, 39, 25, .42);

    z-index: 850;

    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.sidebar-overlay.is-open {
    display: block;
}


/* ==========================================================================
   PAGE
   ========================================================================== */

.page {

    width: 100%;
    max-width: var(--page-max);

    margin: 0 auto;

    padding: 0;
}

.page--narrow {
    max-width: 500px;
}


/* ==========================================================================
   PAGE HEADER
   ========================================================================== */

.page-head,
.page-header {

    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 24px;

    margin-bottom: 30px;
}

.page-head p,
.page-header__subtitle {

    margin-top: 8px;

    max-width: 760px;

    color: var(--ink-muted);

    font-size: 13px;

    line-height: 1.65;
}


/* ==========================================================================
   FLASH MESSAGES
   ========================================================================== */

.flash {

    width: 100%;

    padding: 14px 16px;

    margin-bottom: 22px;

    border: 1px solid;

    border-radius: 11px;

    font-size: 13px;
    font-weight: 650;

    box-shadow: var(--shadow-xs);
}

.flash--info {

    background: var(--field-tint);

    border-color: #c9dfd0;

    color: var(--field-dark);
}

.flash--error {

    background: var(--danger-tint);

    border-color: #efc7c4;

    color: var(--danger);
}

.flash--warning {

    background: var(--harvest-tint);

    border-color: #ecd5a8;

    color: var(--harvest-dark);
}

.flash[hidden] {
    display: none;
}


/* ==========================================================================
   CARDS
   ========================================================================== */

.card {

    background: var(--surface);

    border: 1px solid var(--line);

    border-radius: var(--radius-lg);

    padding: 24px;

    box-shadow: var(--shadow-xs);

    transition:
        box-shadow .18s var(--ease),
        border-color .18s var(--ease);
}

.card:hover {

    border-color: #d5ddd7;

    box-shadow: var(--shadow-sm);
}

.card + .card {
    margin-top: 16px;
}

.card__header {

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 18px;

    margin: -24px -24px 22px;

    padding: 18px 24px;

    border-bottom: 1px solid var(--line);
}

.card__title {

    font-size: 15px;
    font-weight: 800;
}

.card__description {

    margin-top: 4px;

    color: var(--ink-muted);

    font-size: 12px;

    line-height: 1.55;
}

.card__body {
    padding: 0;
}


/* ==========================================================================
   FEATURE CARD
   ========================================================================== */

.card--featured {

    position: relative;

    overflow: hidden;

    background:
        linear-gradient(
            135deg,
            var(--field-dark),
            var(--field)
        );

    border-color: var(--field-dark);

    color: #fff;
}

.card--featured::after {

    content: "";

    position: absolute;

    width: 180px;
    height: 180px;

    right: -70px;
    bottom: -90px;

    border-radius: 50%;

    background: rgba(183, 217, 87, .13);
}

.card--featured h1,
.card--featured h2,
.card--featured h3,
.card--featured h4 {
    color: #fff;
}

.card--featured p {
    color: rgba(255,255,255,.76);
}


/* ==========================================================================
   GRID SYSTEM
   ========================================================================== */

.grid {

    display: grid;

    gap: 18px;
}

.grid-2 {
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
}

.grid-3 {
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
}

.grid-4 {
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
}

.cols-main-side {

    grid-template-columns:
        320px minmax(0, 1fr);

    align-items: start;
}


/* ==========================================================================
   FLEX UTILITIES
   ========================================================================== */

.stack > * + * {
    margin-top: 12px;
}

.stack-lg > * + * {
    margin-top: 24px;
}

.row {

    display: flex;
    align-items: center;

    gap: 12px;
}

.row-between {

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 16px;
}

.wrap {
    flex-wrap: wrap;
}


/* ==========================================================================
   NAVIGATION CARDS
   ========================================================================== */

.nav-card {

    position: relative;

    display: block;

    padding: 21px;

    background: var(--surface);

    border: 1px solid var(--line);

    border-radius: var(--radius-lg);

    transition:
        border-color .18s var(--ease),
        transform .18s var(--ease),
        box-shadow .18s var(--ease);
}

.nav-card:hover {

    border-color: var(--field);

    transform: translateY(-3px);

    box-shadow: var(--shadow-md);
}

.nav-card h3 {
    margin-bottom: 6px;
}

.nav-card p {

    color: var(--ink-muted);

    font-size: 13px;

    line-height: 1.6;
}


/* ==========================================================================
   EMPTY STATES
   ========================================================================== */

.empty-state {

    padding: 60px 24px;

    text-align: center;

    color: var(--ink-muted);

    font-size: 13px;
}

.empty-state strong {

    display: block;

    margin-bottom: 5px;

    color: var(--ink);

    font-family:
        'Roboto Slab',
        Georgia,
        serif;

    font-size: 16px;
}


/* ==========================================================================
   FORMS
   ========================================================================== */

.field {

    display: block;

    margin-bottom: 17px;
}

.field:last-child {
    margin-bottom: 0;
}

.field label,
.field-label {

    display: block;

    margin-bottom: 7px;

    color: var(--ink);

    font-size: 12px;
    font-weight: 700;
}

input,
select,
textarea {

    width: 100%;

    padding: 11px 13px;

    border: 1px solid var(--line-strong);

    border-radius: 10px;

    background: var(--surface);

    color: var(--ink);

    font-family: inherit;

    font-size: 13px;

    transition:
        border-color .15s var(--ease),
        box-shadow .15s var(--ease),
        background .15s var(--ease);
}

input {
    min-height: 43px;
}

select {
    min-height: 43px;
}

textarea {

    min-height: 105px;

    resize: vertical;
}

input::placeholder,
textarea::placeholder {
    color: var(--ink-faint);
}

input:hover,
select:hover,
textarea:hover {
    border-color: #b9c4bd;
}

input:focus,
select:focus,
textarea:focus {

    outline: none;

    border-color: var(--field);

    box-shadow:
        0 0 0 3px rgba(15, 81, 50, .09);
}

input[type="checkbox"],
input[type="radio"] {

    width: auto;

    min-height: auto;

    accent-color: var(--field);
}

.checkbox-row {

    display: flex;
    align-items: center;

    gap: 8px;

    color: var(--ink-soft);

    font-size: 13px;
}

.checkbox-row input {

    width: 16px;
    height: 16px;
}

.field-hint {

    margin-top: 5px;

    color: var(--ink-muted);

    font-size: 11px;

    line-height: 1.5;
}

.form-row {

    display: flex;

    gap: 12px;
}

.form-row > * {
    flex: 1;
}


/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {

    min-height: 42px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    padding: 9px 16px;

    border: 1px solid transparent;

    border-radius: 10px;

    font-family: inherit;

    font-size: 13px;
    font-weight: 750;

    cursor: pointer;

    white-space: nowrap;

    transition:
        background .16s var(--ease),
        border-color .16s var(--ease),
        color .16s var(--ease),
        transform .16s var(--ease),
        box-shadow .16s var(--ease);
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}


/* Primary */

.btn-primary {

    background:
        linear-gradient(
            135deg,
            var(--field-light),
            var(--field)
        );

    color: #fff;

    box-shadow:
        0 5px 13px rgba(15, 81, 50, .14);
}

.btn-primary:hover {

    background:
        linear-gradient(
            135deg,
            var(--field),
            var(--field-dark)
        );

    box-shadow:
        0 7px 18px rgba(15, 81, 50, .19);
}


/* Secondary */

.btn-secondary {

    background: var(--surface);

    border-color: var(--line-strong);

    color: var(--ink);
}

.btn-secondary:hover {

    border-color: var(--field);

    color: var(--field-dark);

    background: var(--field-50);
}


/* Danger */

.btn-danger {

    background: var(--surface);

    border-color: #edcecb;

    color: var(--danger);
}

.btn-danger:hover {

    background: var(--danger-tint);

    border-color: #e7b6b2;
}


/* Ghost */

.btn-ghost {

    min-height: 38px;

    padding: 7px 10px;

    background: transparent;

    color: var(--ink-muted);
}

.btn-ghost:hover {

    background: var(--surface-soft);

    color: var(--field-dark);
}


/* Lime */

.btn-lime {

    background: var(--lime);

    color: var(--field-deep);

    box-shadow:
        0 5px 14px rgba(145, 181, 45, .15);
}

.btn-lime:hover {
    background: #c4e467;
}


/* Sizes */

.btn-sm {

    min-height: 35px;

    padding: 7px 11px;

    font-size: 12px;
}

.btn-lg {

    min-height: 48px;

    padding: 11px 19px;

    font-size: 14px;
}

.btn-block {
    width: 100%;
}

.btn[disabled] {

    opacity: .5;

    cursor: not-allowed;

    transform: none !important;

    box-shadow: none;
}


/* ==========================================================================
   STATUS BADGES
   ========================================================================== */

.badge {

    display: inline-flex;
    align-items: center;

    min-height: 26px;

    padding: 5px 9px;

    border-radius: var(--radius-pill);

    font-size: 10px;
    font-weight: 800;

    line-height: 1;

    white-space: nowrap;

    text-transform: capitalize;
}

.badge::before {

    content: "";

    width: 6px;
    height: 6px;

    margin-right: 6px;

    border-radius: 50%;

    background: currentColor;
}

.badge--neutral {

    background: var(--surface-sunken);

    color: var(--ink-muted);
}

.badge--positive {

    background: var(--field-tint);

    color: var(--field-dark);
}

.badge--warning {

    background: var(--harvest-tint);

    color: var(--harvest-dark);
}

.badge--danger {

    background: var(--danger-tint);

    color: var(--danger);
}

.badge--blue {

    background: var(--blue-tint);

    color: var(--blue-dark);
}


/* ==========================================================================
   CHIPS
   ========================================================================== */

.chip-field {

    display: flex;

    flex-wrap: wrap;

    gap: 8px;
}

.chip {

    position: relative;

    cursor: pointer;
}

.chip input {

    position: absolute;

    width: 1px;
    height: 1px;

    opacity: 0;
}

.chip span {

    display: inline-flex;
    align-items: center;

    min-height: 35px;

    padding: 7px 12px;

    border: 1px solid var(--line-strong);

    border-radius: var(--radius-pill);

    background: var(--surface);

    color: var(--ink-soft);

    font-size: 12px;
    font-weight: 650;

    transition:
        background .13s var(--ease),
        border-color .13s var(--ease),
        color .13s var(--ease);
}

.chip span:hover {
    border-color: var(--field);
}

.chip input:checked ~ span {

    background: var(--field);

    border-color: var(--field);

    color: #fff;
}

.chip input:focus-visible ~ span {

    outline: 3px solid rgba(15, 81, 50, .18);

    outline-offset: 2px;
}


/* ==========================================================================
   ONBOARDING
   ========================================================================== */

.progress-track {

    height: 8px;

    overflow: hidden;

    background: var(--surface-sunken);

    border-radius: var(--radius-pill);
}

.progress-fill {

    height: 100%;

    background:
        linear-gradient(
            90deg,
            var(--field),
            var(--field-light)
        );

    border-radius: inherit;

    transition: width .3s var(--ease);
}

.wizard-step {
    display: none;
}

.wizard-step.is-active {
    display: block;
}

.skill-row {

    min-height: 52px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    padding: 9px 0;

    border-bottom: 1px solid var(--line);

    font-size: 13px;
}

.skill-row:last-child {
    border-bottom: 0;
}

.skill-row select {

    width: auto;

    min-width: 125px;

    min-height: 37px;

    padding: 7px 9px;

    font-size: 12px;
}

.skill-category-label {

    margin: 21px 0 9px;

    color: var(--ink-muted);

    font-size: 10px;
    font-weight: 850;

    letter-spacing: .08em;

    text-transform: uppercase;
}

.skill-category-label:first-child {
    margin-top: 0;
}

.scroll-panel {

    max-height: 350px;

    overflow-y: auto;

    padding-right: 7px;

    scrollbar-width: thin;
}


/* ==========================================================================
   MARKETPLACE
   ========================================================================== */

.listing-card {

    display: flex;
    flex-direction: column;

    gap: 11px;
}

.listing-price {

    color: var(--field-dark);

    font-family:
        'Roboto Slab',
        Georgia,
        serif;

    font-size: 24px;
    font-weight: 800;
}

.listing-price small {

    color: var(--ink-muted);

    font-family: inherit;

    font-size: 11px;
    font-weight: 400;
}


/* ==========================================================================
   DATA / TABLES
   ========================================================================== */

.table-wrap {

    width: 100%;

    overflow-x: auto;

    border: 1px solid var(--line);

    border-radius: var(--radius-lg);

    background: var(--surface);

    box-shadow: var(--shadow-xs);
}

table {

    width: 100%;

    border-collapse: collapse;

    font-size: 13px;
}

th {

    padding: 12px 15px;

    background: #f4f7f5;

    border-bottom: 1px solid var(--line);

    color: var(--ink-muted);

    font-size: 9px;
    font-weight: 850;

    text-align: left;

    letter-spacing: .07em;

    text-transform: uppercase;

    white-space: nowrap;
}

td {

    padding: 14px 15px;

    border-bottom: 1px solid var(--line);

    color: var(--ink-soft);

    vertical-align: middle;
}

tbody tr:last-child td {
    border-bottom: 0;
}

tbody tr {

    transition:
        background .14s var(--ease);
}

tbody tr:hover {
    background: #f8faf9;
}


/* ==========================================================================
   STAT CARDS
   ========================================================================== */

.stat-card {

    position: relative;

    min-width: 0;

    padding: 20px;

    background: var(--surface);

    border: 1px solid var(--line);

    border-radius: var(--radius-lg);

    box-shadow: var(--shadow-xs);

    overflow: hidden;

    transition:
        transform .17s var(--ease),
        box-shadow .17s var(--ease),
        border-color .17s var(--ease);
}

.stat-card:hover {

    transform: translateY(-2px);

    border-color: #d1dad4;

    box-shadow: var(--shadow-md);
}

.stat-card::after {

    content: "";

    position: absolute;

    right: -35px;
    top: -35px;

    width: 100px;
    height: 100px;

    border-radius: 50%;

    background: var(--field-50);

    pointer-events: none;
}

.stat-card__label {

    position: relative;
    z-index: 1;

    color: var(--ink-muted);

    font-size: 11px;
    font-weight: 700;
}

.stat-card__value {

    position: relative;
    z-index: 1;

    margin-top: 8px;

    color: var(--ink);

    font-family:
        'Roboto Slab',
        Georgia,
        serif;

    font-size: 29px;
    font-weight: 800;

    letter-spacing: -.6px;

    line-height: 1.05;
}

.stat-card__meta {

    position: relative;
    z-index: 1;

    margin-top: 7px;

    color: var(--ink-faint);

    font-size: 11px;
}


/* ==========================================================================
   LISTS
   ========================================================================== */

.card-list {

    overflow: hidden;

    background: var(--surface);

    border: 1px solid var(--line);

    border-radius: var(--radius-lg);

    box-shadow: var(--shadow-xs);
}

.card-list > * + * {
    border-top: 1px solid var(--line);
}

.card-list__row {

    min-height: 66px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 16px;

    padding: 14px 19px;

    transition:
        background .15s var(--ease);
}

.card-list__row:hover {
    background: #fafcfb;
}


/* ==========================================================================
   AVATARS
   ========================================================================== */

.avatar {

    width: 42px;
    height: 42px;

    display: grid;
    place-items: center;

    flex-shrink: 0;

    border-radius: 50%;

    background:
        linear-gradient(
            145deg,
            var(--field-100),
            var(--field-tint)
        );

    color: var(--field-dark);

    font-size: 13px;
    font-weight: 800;
}

.avatar--sm {

    width: 33px;
    height: 33px;

    font-size: 11px;
}

.avatar--lg {

    width: 52px;
    height: 52px;

    font-size: 16px;
}


/* ==========================================================================
   DIVIDERS
   ========================================================================== */

.divider {

    height: 1px;

    margin: 22px 0;

    background: var(--line);
}


/* ==========================================================================
   TEXT UTILITIES
   ========================================================================== */

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

.faint {
    color: var(--ink-faint);
}

.small {
    font-size: 12px;
}

.tiny {
    font-size: 11px;
}

.center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-success {
    color: var(--field-dark);
}

.text-warning {
    color: var(--harvest-dark);
}

.text-danger {
    color: var(--danger);
}

.text-blue {
    color: var(--blue-dark);
}

.fw-500 {
    font-weight: 500;
}

.fw-600 {
    font-weight: 600;
}

.fw-700 {
    font-weight: 700;
}

.fw-800 {
    font-weight: 800;
}


/* ==========================================================================
   SPACING
   ========================================================================== */

.mt-0 {
    margin-top: 0;
}

.mt-1 {
    margin-top: 6px;
}

.mt-2 {
    margin-top: 12px;
}

.mt-3 {
    margin-top: 20px;
}

.mt-4 {
    margin-top: 28px;
}

.mt-5 {
    margin-top: 40px;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 6px;
}

.mb-2 {
    margin-bottom: 12px;
}

.mb-3 {
    margin-bottom: 20px;
}

.mb-4 {
    margin-bottom: 28px;
}

.mb-5 {
    margin-bottom: 40px;
}

.ml-1 {
    margin-left: 6px;
}

.ml-2 {
    margin-left: 12px;
}

.mr-1 {
    margin-right: 6px;
}

.mr-2 {
    margin-right: 12px;
}

.p-0 {
    padding: 0;
}

.p-1 {
    padding: 6px;
}

.p-2 {
    padding: 12px;
}

.p-3 {
    padding: 20px;
}

.p-4 {
    padding: 28px;
}

.hidden {
    display: none !important;
}

.w-full {
    width: 100%;
}

.flex-1 {
    flex: 1;
}

.min-w-0 {
    min-width: 0;
}


/* ==========================================================================
   MOBILE BOTTOM NAVIGATION
   ========================================================================== */

.mobile-bottom-nav {

    display: none;

    position: fixed;

    left: 10px;
    right: 10px;
    bottom: 10px;

    min-height: 64px;

    z-index: 1000;

    background: rgba(255, 255, 255, .96);

    border: 1px solid var(--line);

    border-radius: 18px;

    box-shadow: var(--shadow-lg);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.mobile-bottom-nav__inner {

    height: 64px;

    display: flex;
    align-items: stretch;
    justify-content: space-around;
}

.mobile-bottom-nav a {

    flex: 1;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 3px;

    color: var(--ink-muted);

    font-size: 9px;
    font-weight: 700;

    transition:
        color .15s ease,
        background .15s ease;
}

.mobile-bottom-nav a.is-active {
    color: var(--field);
}

.mobile-bottom-nav a span:first-child {
    font-size: 17px;
}


/* ==========================================================================
   UTILITY PANELS
   ========================================================================== */

.surface-soft {
    background: var(--surface-soft);
}

.surface {
    background: var(--surface);
}

.panel-green {

    padding: 22px;

    background:
        linear-gradient(
            135deg,
            var(--field-dark),
            var(--field)
        );

    border-radius: var(--radius-lg);

    color: #fff;
}

.panel-green h1,
.panel-green h2,
.panel-green h3,
.panel-green h4 {
    color: #fff;
}

.panel-green p {
    color: rgba(255,255,255,.76);
}


/* ==========================================================================
   RESPONSIVE — LARGE TABLET
   ========================================================================== */

@media (max-width: 1200px) {

    :root {
        --sidebar-width: 245px;
    }

    .app-main__inner {
        padding: 30px 25px 45px;
    }

    .grid-4 {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .cols-main-side {
        grid-template-columns:
            280px minmax(0, 1fr);
    }
}


/* ==========================================================================
   RESPONSIVE — TABLET
   ========================================================================== */

@media (max-width: 1000px) {

    .app-sidebar {

        transform: translateX(-105%);

        box-shadow: var(--shadow-xl);
    }

    .app-sidebar.is-open {
        transform: translateX(0);
    }

    .app-main {
        margin-left: 0;
    }

    .mobile-app-header {
        display: flex;
    }

    .app-main__inner {

        padding:
            26px
            22px
            100px;
    }

    .grid-3 {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .cols-main-side {
        grid-template-columns:
            1fr;
    }

    .mobile-bottom-nav {
        display: block;
    }
}


/* ==========================================================================
   RESPONSIVE — MOBILE
   ========================================================================== */

@media (max-width: 700px) {

    :root {
        --header-height: 60px;
    }

    body {
        font-size: 13px;
    }

    .site-header {
        height: var(--header-height);
    }

    .site-header__bar {

        padding: 0 16px;

        gap: 12px;
    }

    .brand {
        font-size: 18px;
    }

    .brand__mark {

        width: 33px;
        height: 33px;

        border-radius: 9px;
    }

    .header-nav {
        display: none;
    }

    .app-sidebar {

        top: var(--header-height);

        width: min(88vw, 310px);

        padding:
            18px 13px
            30px;
    }

    .mobile-app-header {

        top: var(--header-height);

        height: 58px;

        padding: 0 14px;
    }

    .app-main {

        min-height:
            calc(
                100vh -
                var(--header-height)
            );
    }

    .app-main__inner {

        padding:
            22px
            15px
            98px;
    }

    .page-head,
    .page-header {

        flex-direction: column;

        align-items: stretch;

        gap: 16px;

        margin-bottom: 23px;
    }

    h1 {

        font-size: 30px;

        letter-spacing: -.8px;
    }

    h2 {
        font-size: 20px;
    }

    .page-head p,
    .page-header__subtitle {
        font-size: 12px;
    }

    .grid-2,
    .grid-3,
    .grid-4 {

        grid-template-columns:
            1fr;
    }

    .grid {
        gap: 13px;
    }

    .card {

        padding: 18px;

        border-radius: 14px;
    }

    .card__header {

        margin:
            -18px
            -18px
            18px;

        padding:
            16px
            18px;
    }

    .stat-card {
        padding: 17px;
    }

    .stat-card__value {
        font-size: 26px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .row-between {

        align-items: flex-start;

        flex-direction: column;

        gap: 12px;
    }

    .row {

        flex-wrap: wrap;
    }

    .btn {

        min-height: 42px;
    }

    .btn-lg {
        min-height: 46px;
    }

    .table-wrap {

        border-radius: 12px;
    }

    table {
        min-width: 680px;
    }

    .card-list__row {

        align-items: flex-start;

        padding:
            13px
            15px;
    }

    .listing-price {
        font-size: 22px;
    }

    .nav-card {
        padding: 18px;
    }

    .empty-state {
        padding: 45px 18px;
    }

    .mobile-bottom-nav {
        left: 8px;
        right: 8px;
        bottom: 8px;

        border-radius: 17px;
    }
}


/* ==========================================================================
   RESPONSIVE — SMALL MOBILE
   ========================================================================== */

@media (max-width: 420px) {

    .site-header__bar {
        padding: 0 13px;
    }

    .app-main__inner {
        padding-left: 13px;
        padding-right: 13px;
    }

    h1 {
        font-size: 27px;
    }

    h2 {
        font-size: 19px;
    }

    .card {
        padding: 16px;
    }

    .card__header {

        margin:
            -16px
            -16px
            16px;

        padding:
            14px
            16px;
    }

    .btn {
        font-size: 12px;
    }

    .btn-lg {
        width: 100%;
    }

    .sidebar-user {
        padding: 12px;
    }

    .mobile-bottom-nav {
        min-height: 61px;
    }

    .mobile-bottom-nav__inner {
        height: 61px;
    }

    .mobile-bottom-nav a {
        font-size: 8px;
    }

    .mobile-bottom-nav a span:first-child {
        font-size: 16px;
    }
}


/* ==========================================================================
   ACCESSIBILITY
   ========================================================================== */

@media (prefers-contrast: more) {

    .card,
    .stat-card,
    .nav-card,
    .table-wrap {
        border-color: var(--line-dark);
    }

    .sidebar-link.is-active {
        border: 1px solid var(--field);
    }

    input,
    select,
    textarea {
        border-color: var(--line-dark);
    }
}


/* ==========================================================================
   PRINT
   ========================================================================== */

@media print {

    .site-header,
    .app-sidebar,
    .mobile-app-header,
    .mobile-bottom-nav,
    .sidebar-overlay {
        display: none !important;
    }

    .app-main {
        margin-left: 0;
    }

    .app-main__inner {
        padding: 0;
    }

    .card,
    .stat-card,
    .table-wrap {
        box-shadow: none;
    }

    body {
        background: #fff;
    }
}