/* M3 Expressive Buttons, Inputs & Material Symbols */
.material-symbols-rounded {
    font-family: 'Material Symbols Rounded' !important;
    font-weight: normal;
    font-style: normal;
    font-size: 18px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 34px;
    padding: 0 16px;
    border-radius: var(--md-radius-pill);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    background: transparent;
    color: var(--md-sys-color-on-surface);
    transition: transform var(--md-transition-fast), background-color var(--md-transition-fast), box-shadow var(--md-transition-fast);
}

.btn:hover { filter: brightness(1.04); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.btn--filled {
    background-color: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
}

.btn--tonal {
    background-color: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
}

.btn--text {
    background-color: transparent;
    color: var(--md-sys-color-primary);
}

.btn--text:hover { background-color: rgba(11, 87, 208, 0.08); }

.btn--danger {
    background-color: var(--md-sys-color-error-container);
    color: var(--md-sys-color-on-error-container);
}

.btn--small { height: 28px; padding: 0 10px; font-size: 12px; }
.btn--small .material-symbols-rounded { font-size: 16px; }
.btn--wide { width: 100%; }

.field {
    width: 100%;
    height: 36px;
    padding: 0 14px;
    border-radius: var(--md-radius-s);
    background-color: var(--md-sys-color-surface-container-low);
    color: var(--md-sys-color-on-surface);
    font-family: inherit;
    font-size: 13px;
    transition: background-color var(--md-transition-fast), box-shadow var(--md-transition-fast);
}

.field:focus {
    background-color: var(--md-sys-color-surface-container);
    box-shadow: 0 0 0 2px var(--md-sys-color-primary);
}

.field--search {
    padding-left: 38px;
    border-radius: var(--md-radius-pill);
    background-color: var(--md-sys-color-surface-container-low);
}

.field--narrow { max-width: 110px; }

.field--code {
    font-family: var(--md-sys-font-code);
    height: auto;
    min-height: 120px;
    padding: 12px;
    resize: vertical;
}

.field--short { min-height: 72px; }

.field--select {
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23444746' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.field-row { display: flex; gap: 8px; }

.nav-rail { display: flex; flex-direction: column; gap: 12px; }

.nav-rail__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 4px 0;
    border-radius: var(--md-radius-m);
    background-color: transparent;
    color: var(--md-sys-color-on-surface-variant);
    cursor: pointer;
    font-family: inherit;
    transition: color var(--md-transition-fast);
}

.nav-rail__indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 32px;
    border-radius: var(--md-radius-pill);
    transition: background-color var(--md-transition-fast);
}

.nav-rail__item:hover .nav-rail__indicator {
    background-color: var(--md-sys-color-surface-container-high);
}

.nav-rail__item--active .nav-rail__indicator {
    background-color: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
}

.nav-rail__item--active .material-symbols-rounded {
    font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24;
}

.nav-rail__item--active {
    color: var(--md-sys-color-on-surface);
    font-weight: 600;
}

.nav-rail__label { font-size: 11px; }
