:root {
    --m-border: #e5e7eb;
    --m-border-focus: #3b82f6;
    --m-text: #111827;
    --m-muted: #6b7280;
    --m-danger: #dc2626;
    --m-bg: #ffffff;
    --m-btn-bg: #111827;
    --m-btn-text: #ffffff;
}

.m-section {
    margin-bottom: 16px;
}

.m-section-title {
    margin: 0 0 4px;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--m-text);
}

.m-section-desc {
    margin: 0 0 12px;
    font-size: .875rem;
    color: var(--m-muted);
}

.m-form-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr;
}

@media (min-width: 992px) {
    .m-form-grid.m-form-grid-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

.m-col-span-2 {
    grid-column: span 1;
}

@media (min-width: 992px) {
    .m-col-span-2 {
        grid-column: span 2;
    }
}

.m-field {
    margin-bottom: 0;
}

.m-label {
    display: block;
    margin-bottom: 4px;
    font-size: .78rem;
    font-weight: 600;
    line-height: 1.2;
    color: #374151;
}

.m-input,
.m-select,
.m-textarea {
    width: 100%;
    border: 1px solid var(--m-border);
    border-radius: 10px;
    background: var(--m-bg);
    color: var(--m-text);
    padding: 10px 12px;
    font-size: .92rem;
    line-height: 1.25;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.m-input,
.m-select {
    height: 40px;
}

.m-textarea {
    min-height: 88px;
    resize: vertical;
}

.m-input:focus,
.m-select:focus,
.m-textarea:focus {
    outline: 0;
    border-color: var(--m-border-focus);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .14);
}

.m-input::placeholder,
.m-textarea::placeholder {
    color: #9ca3af;
}

.m-hint {
    display: block;
    margin-top: 4px;
    font-size: .74rem;
    color: var(--m-muted);
}

.m-error {
    display: block;
    margin-top: 4px;
    font-size: .74rem;
    color: var(--m-danger);
}

.m-invalid {
    border-color: #fca5a5 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, .12) !important;
}

.m-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .9rem;
    color: #374151;
}

.m-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
}

.m-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    height: 40px;
    border: 0;
    border-radius: 10px;
    padding: 0 14px;
    font-size: .88rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    background: var(--m-btn-bg);
    color: var(--m-btn-text);
    transition: opacity .15s ease, transform .05s ease;
}

.m-btn:hover {
    opacity: .92;
}

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

.m-btn-secondary {
    background: #334155;
}

.m-btn-success {
    background: #059669;
}

.m-btn-danger {
    background: #dc2626;
}

.m-btn-warning {
    background: #d97706;
}

.m-input-group {
    display: flex;
    align-items: center;
    border: 1px solid var(--m-border);
    border-radius: 10px;
    background: var(--m-bg);
    overflow: hidden;
    min-height: 40px;
}

.m-input-group .m-input-icon {
    width: 40px;
    text-align: center;
    color: #9ca3af;
    font-size: .85rem;
}

.m-input-group .m-input {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    height: 40px;
}

.m-input-group:focus-within {
    border-color: var(--m-border-focus);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .14);
}

.m-card {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    padding: 16px;
    margin-bottom: 16px;
}
